Address allocation method and device, battery and storage medium

By comparing address and exchanging information when the battery is powered on, the problem of address allocation conflicts between multiple parallel batteries is solved, and the precise address allocation and normal operation of the battery system is achieved.

CN120075198APending Publication Date: 2025-05-30EMERSON NETWORK POWER (MIANYANG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311554780.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-20
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The prior art is difficult to accurately allocate non-conflicting addresses to multiple parallel batteries, especially when multiple batteries are online at the same time, and the power-on time is consistent, the address allocation is likely to fail.

Method used

By comparing the initial address with the address range of the battery system when the battery is powered on, relevant information is generated and exchanged to determine the target address, ensuring that the address does not encroach on the existing target address on the bus, and reducing the bus load rate.

Benefits of technology

Accurate address allocation of the battery is achieved, address conflicts are avoided, the normal operation of the battery system is ensured, and bus load is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075198A_ABST
    Figure CN120075198A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an address allocation method and device, a battery and a storage medium, the method is applied to a target battery, the target battery is any battery in a battery system, and the battery system comprises a plurality of batteries connected in parallel; the method comprises the following steps: in a power-on state, comparing an initial address of a target battery with an address range of a battery system; based on the comparison result, the SN code and the initial address of the target battery, generating first information corresponding to the target battery, and obtaining the first information sent by the first battery and the second information sent by the second battery; wherein the first battery is another battery in a power-on state in the battery system, the second battery is a battery with a distributed target address, and the second information comprises an SN code and the target address of the second battery; and based on the first information and the second information, determining a target address of the target battery, and accurately allocating non-conflict addresses to each battery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of batteries, and in particular, to an address allocation method, device, battery, and storage medium. Background Art

[0002] With the development of technology, batteries are widely used in many industries and are maintaining a high growth rate. In the actual application process, due to the capacity limitation of a single battery, multiple batteries are usually used in parallel, that is, there are multiple parallel-connected batteries in the battery system. Due to the parallel connection of the batteries in the battery system, it is necessary to allocate addresses to the batteries to facilitate the detection of the status of each battery box.

[0003] In the related art, by obtaining the power-on time of each battery in the battery system, the order of address sizes is determined according to the sequence of the power-on times, and the corresponding addresses in the address table are obtained.

[0004] However, when multiple batteries are powered on at the same time, the power-on times may be the same, and it is possible that the address allocation fails. Therefore, it is difficult to accurately allocate non-conflicting addresses to each battery by the above method. Summary of the Invention

[0005] The embodiments of the present application provide an address allocation method, device, battery, and storage medium for accurately allocating non-conflicting addresses to each battery.

[0006] In a first aspect, the embodiments of the present application provide a first address allocation method, which is applied to a target battery. The target battery is any battery in the battery system, and the battery system includes multiple parallel-connected batteries; the method includes:

[0007] When in the power-on state, compare the initial address of the target battery with the address range of the battery system;

[0008] Based on the comparison result, serial number (Serial Number, SN) code, and initial address of the target battery, generate the first information corresponding to the target battery, and obtain the first information sent by the first battery and the second information sent by the second battery; wherein, the first battery is other batteries in the power-on state in the battery system, and the second battery is the battery that has been allocated the target address, and the second information includes the SN code and the target address of the second battery;

[0009] Based on the first information and the second information, determine the target address of the target battery.

[0010] In the above solution, when the battery is powered on, by comparing its initial address with the address range of the battery system, it can be known whether the initial address meets the basic requirements of the battery system; each powered-on battery will send its own relevant information (its own comparison result, SN code, and initial address), and obtain the relevant information of other batteries (the comparison results, SN codes, and initial addresses of the powered-on batteries, and the SN codes and initial addresses of the batteries with assigned target addresses); based on the first information and the second information, in addition to being able to know the initial addresses / target addresses of all other batteries, the SN code that uniquely identifies the battery can also be known, so that even if there is an address conflict, the situation of occupying the target address can be avoided. Therefore, based on the first information and the second information, the target address of itself is determined, which will not occupy the existing target addresses on the bus and will not affect the normal operation of other batteries on the bus. In addition, the battery only executes this method in the initial stage of power-on, and there will be no more data related to address allocation on the bus after the address allocation is completed, reducing the bus load rate.

[0011] In some optional embodiments, based on the first information and the second information, determining the target address of the target battery includes:

[0012] If the initial address of the target battery is not within the address range, based on the first information and the second information, determine the addresses occupied in the battery system;

[0013] Based on the address range of the battery system and the occupied addresses, determine the remaining addresses in the battery system;

[0014] Based on the SN code of the abnormally occupied battery, sort the abnormally occupied batteries, and determine the target address corresponding to the target battery from the remaining addresses based on the order of the target battery among the abnormally occupied batteries; where the abnormally occupied battery is a battery in the battery system whose initial address is not within the address range.

[0015] In some optional embodiments, based on the first information and the second information, determining the addresses occupied in the battery system includes:

[0016] Determine the initial addresses in the first information corresponding to the normally occupied batteries and the target addresses in all the second information as the occupied addresses; where the normally occupied battery is a battery in the battery system whose initial address is within the address range.

[0017] In some optional embodiments, based on the order of the target battery among the abnormally occupied batteries, determining the target address corresponding to the target battery from the remaining addresses includes:

[0018] Determine the address at the corresponding position in the remaining addresses according to the order as the target address corresponding to the target battery.

[0019] In some optional embodiments, determining the target address of the target battery based on the first information and the second information includes:

[0020] If the initial address of the target battery is within the address range and there is an address in the second information that is the same as the initial address of the target battery, then determine a preset address as the new initial address of the target battery, and re - execute the step of comparing the initial address of the target battery with the address range of the battery system; wherein, the preset address is not within the address range.

[0021] In some optional embodiments, determining the target address of the target battery based on the first information and the second information includes:

[0022] If the initial address of the target battery is within the address range and there is no address in the second information that is the same as the initial address of the target battery, then determine whether there is an address in the first information that is the same as the initial address of the target battery;

[0023] If so, determine the target address of the target battery based on the SN code of the target battery;

[0024] Otherwise, determine the initial address of the target battery as the target address.

[0025] In some optional embodiments, determining the target address of the target battery based on the SN code of the target battery includes:

[0026] If the SN code of the target battery is greater than the SN code corresponding to the same address, then determine the initial address of the target battery as the target address;

[0027] Otherwise, determine a preset address as the new initial address of the target battery, and re - execute the step of comparing the initial address of the target battery with the address range of the battery system; wherein, the preset address is not within the address range.

[0028] In a second aspect, an embodiment of the present application provides a first address allocation device, where the target battery is any battery in a battery system, and the battery system includes a plurality of batteries connected in parallel; the device includes:

[0029] An address comparison module, configured to compare the initial address of the target battery with the address range of the battery system when in the powered - on state;

[0030] An information processing module, configured to generate first information corresponding to the target battery based on the comparison result, SN code, and initial address of the target battery, and obtain the first information sent by the first battery and the second information sent by the second battery; wherein, the first battery is another battery in the battery system in the powered-on state, and the second battery is the battery to which the target address has been allocated, and the second information includes the SN code and target address of the second battery;

[0031] An address allocation module, configured to determine the target address of the target battery based on the first information and the second information.

[0032] In a third aspect, an embodiment of the present application provides a battery, including at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor is caused to execute the address allocation method according to any one of the first aspects above.

[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program executable by a processor, and when the program runs on the processor, the processor is caused to execute the address allocation method according to any one of the first aspects above. Description of the Drawings

[0034] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0035] Figure 1 A schematic diagram of a battery system provided by an embodiment of the present application;

[0036] Figure 2 A flowchart of the first address allocation method provided by an embodiment of the present application;

[0037] Figure 3 A flowchart of the second address allocation method provided by an embodiment of the present application;

[0038] Figure 4 A flowchart of the third address allocation method provided by an embodiment of the present application;

[0039] Figure 5 A flowchart of the fourth address allocation method provided by an embodiment of the present application;

[0040] Figure 6 A schematic diagram of the structure of the address allocation device provided by an embodiment of the present application;

[0041] Figure 7 This is a schematic structural diagram of the battery provided by the embodiment of the present application. Detailed implementation manners

[0042] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0043] The terms "first" and "second" are only used for descriptive purposes, and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present application, unless otherwise stated, the meaning of "a plurality" is two or more.

[0044] In the description of the present application, it should be noted that unless otherwise clearly defined and limited, the term "connection" should be understood in a broad sense. For example, it may be directly connected, or indirectly connected through an intermediate medium, and may be the connection inside two devices. For those of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood according to specific situations.

[0045] In the actual application process, due to the capacity limitation of a single battery, multiple batteries are usually used in parallel, that is, there are multiple parallel-connected batteries in the battery system. Refer to Figure 1 As shown, the battery system includes parallel-connected Battery 1, Battery 2,..., Battery n. Due to the parallel connection of the batteries in the battery system, it is necessary to assign addresses to the batteries to facilitate the detection of the status of each battery box.

[0046] In the related art, by obtaining the power-on time of each battery in the battery system, the order of address sizes is determined according to the sequence of the power-on times, and the corresponding addresses in the address table are obtained.

[0047] However, when multiple batteries are powered on simultaneously, the power-on times may be the same, and address allocation failures may occur. Therefore, it is difficult to accurately allocate non-conflicting addresses to each battery by the above method.

[0048] In some embodiments, the order of address sizes is directly determined based on the SN code sizes of the batteries. However, in this way, the battery management system (Battery Management System, BMS) needs to send data frames indicating that the address allocation of the bus batteries has been completed in real time, which will increase the load rate of the bus and may cause bus congestion and data loss when there is a large amount of bus data.

[0049] In view of this, an address allocation method, device, battery and storage medium are provided in an embodiment of the present application. The method is applied to a target battery, where the target battery is any battery in a battery system, and the battery system includes a plurality of batteries connected in parallel. The method includes: when in the powered-on state, comparing the initial address of the target battery with the address range of the battery system; generating first information corresponding to the target battery based on the comparison result, SN code and initial address of the target battery, and obtaining the first information sent by a first battery and the second information sent by a second battery; where the first battery is other batteries in the powered-on state in the battery system, and the second battery is a battery to which a target address has been allocated, and the second information includes the SN code and the target address of the second battery; determining the target address of the target battery based on the first information and the second information.

[0050] In the above solution, when the battery is powered on, by comparing its own initial address with the address range of the battery system, it can be known whether the initial address meets the basic requirements of the battery system; each battery will send its own relevant information (its own comparison result, SN code and initial address) when powered on, and obtain the relevant information of other batteries (the comparison result, SN code and initial address of the powered-on battery, the SN code and initial address of the battery to which the target address has been allocated); based on the first information and the second information, in addition to knowing the initial addresses / target addresses of all other batteries, the SN code that uniquely identifies the battery can also be known, so that even if there is an address conflict, the situation of occupying the target address can be avoided. Therefore, determining its own target address based on the first information and the second information will not occupy the existing target address on the bus, nor will it affect the normal operation of other batteries on the bus. In addition, the battery only executes this method in the initial stage of power-on. After the address allocation is completed, no address allocation-related data will appear on the bus, reducing the bus load rate.

[0051] Next, the technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail in conjunction with the accompanying drawings and specific embodiments. These specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0052] Figure 2 It is a schematic flow chart of the first address allocation method provided in an embodiment of the present application, as Figure 2 shown, and includes the following steps:

[0053] Step S201: When in the powered-on state, compare the initial address of the target battery with the address range of the battery system.

[0054] During implementation, after the battery is powered on, it will read data from a specific location in the storage chip, and the read data can be used as the initial address of the battery. However, this initial address may not necessarily be within the address range of the battery system.

[0055] Exemplarily, the battery system is set with an address range of 0 - N, where N can be the maximum number of parallel batteries in the battery system; the target address finally allocated to the battery needs to be within the address range of the battery system so that the battery system can manage the battery based on the target address, that is, only when the target address is within the address range can it meet the basic requirements of the battery system for address allocation.

[0056] Based on this, when each battery in this embodiment is powered on, it first compares its own initial address with the address range of the battery system, and then it can know whether the initial address meets the basic requirements of the battery system.

[0057] Step S202: Generate the first information corresponding to the target battery based on the comparison result, SN code, and initial address of the target battery, and obtain the first information sent by the first battery and the second information sent by the second battery.

[0058] Among them, the first battery is other batteries in the battery system with a powered-on state, and the second battery is a battery that has been allocated a target address. The second information includes the SN code and target address of the second battery.

[0059] In this embodiment, in addition to being within the address range of the battery system, the target address finally allocated to the battery cannot conflict with the addresses of other batteries. Based on this, the batteries in the powered-on state (which have not been allocated a target address) send the comparison result, SN code, and initial address to other batteries, and the batteries that have been allocated a target address only need to send the SN code and target address (which must be within the above address range) to other batteries; in this way, each battery can know the address-related information of other batteries.

[0060] Exemplarily, different identification information can be used to distinguish the comparison results of the first information. For example, "0x030303XX" indicates that the initial address of the battery is not within the address range of the battery system, and "0x050505XX" indicates that the initial address of the battery is within the address range of the battery system. Different identification information can also be used to distinguish the first information from the second information. For example, "0x18**01XX" indicates the second information. Based on the identification information, it can be determined whether it is the first information or the second information, and the comparison result of the corresponding battery can be determined when it is the first information. Details will not be elaborated one by one hereafter.

[0061] Step S203: Determine the target address of the target battery based on the first information and the second information.

[0062] The first information carries the battery comparison result, SN code, and initial address in the powered-on state, and the second information carries the SN code and target address. Therefore, after integrating the first information and the second information, the battery can learn the initial addresses / target addresses of all other batteries and the SN code that uniquely identifies the battery. In this way, even if there is an address conflict, the situation of occupying the target address can be avoided. Therefore, based on the first information and the second information, the battery determines its own target address without occupying the existing target addresses on the bus and without affecting the normal operation of other batteries on the bus.

[0063] In the above solution, when the battery is powered on, by comparing its own initial address with the address range of the battery system, it can be known whether the initial address meets the basic requirements of the battery system. Each powered-on battery will send its own relevant information (its own comparison result, SN code, and initial address) and obtain the relevant information of other batteries (the comparison results, SN codes, and initial addresses of the powered-on batteries, and the SN codes and initial addresses of the batteries with allocated target addresses). Based on the first information and the second information, in addition to learning the initial addresses / target addresses of all other batteries, the battery can also learn the SN code that uniquely identifies the battery. In this way, even if there is an address conflict, the situation of occupying the target address can be avoided. Therefore, based on the first information and the second information, the battery determines its own target address without occupying the existing target addresses on the bus and without affecting the normal operation of other batteries on the bus. In addition, the battery only executes this method in the initial stage of power-on. After the address allocation is completed, no address allocation-related data will appear on the bus, reducing the bus load rate.

[0064] The following will be described separately for different situations.

[0065] Figure 3 The flowchart of the second address allocation method provided by the embodiment of the present application is shown in Figure 3 and includes the following steps:

[0066] Step S301: When in the powered-on state, compare the initial address of the target battery with the address range of the battery system.

[0067] Step S302: Based on the comparison result, SN code, and initial address of the target battery, generate the first information corresponding to the target battery, and obtain the first information sent by the first battery and the second information sent by the second battery.

[0068] Among them, the first battery is other batteries in the powered-on state in the battery system, and the second battery is the battery with an allocated target address. The second information includes the SN code and target address of the second battery.

[0069] The specific implementation manners of steps S301 to S302 can refer to other embodiments and will not be elaborated here.

[0070] Step S303: If the initial address of the target battery is not within the address range, determine the occupied addresses in the battery system based on the first information and the second information.

[0071] As described above, in addition to being within the address range of the battery system, the finally allocated target address of the battery cannot conflict with the addresses of other batteries. Based on this, in this embodiment, it is necessary to comprehensively consider the first information and the second information to determine which addresses within the address range of the battery system are occupied, and the target addresses of subsequent batteries cannot conflict with these addresses.

[0072] Step S304: Determine the remaining addresses in the battery system based on the address range of the battery system and the occupied addresses.

[0073] In this embodiment, within the address range of the battery system, except for the above-mentioned occupied addresses, the remaining addresses can all be allocated; therefore, it is necessary to determine which remaining addresses within the address range are available based on the address range of the battery system and the occupied addresses.

[0074] Step S305: Sort the abnormally occupied batteries based on the SN codes of the abnormally occupied batteries, and determine the target address corresponding to the target battery from the remaining addresses based on the order of the target battery among the abnormally occupied batteries.

[0075] Among them, the abnormally occupied battery is a battery in the battery system whose initial address is not within the address range.

[0076] In implementation, the remaining addresses are all addresses that can be used within the address range of the battery system. If these remaining addresses are directly allocated randomly, although there will be no conflict with the previously occupied addresses, when there are multiple batteries not within the address range (abnormally occupied batteries), there may be an address conflict between these multiple abnormally occupied batteries;

[0077] Based on this, in this embodiment, all abnormally occupied batteries are sorted, and the corresponding target addresses are determined from the remaining addresses according to the order, reducing the address conflict between the abnormally occupied batteries.

[0078] In the above solution, by comprehensively considering the first information and the second information, it is determined which addresses within the address range of the battery system are occupied; based on the address range of the battery system and the occupied addresses, it is determined which remaining available addresses are within the address range, so that the target addresses of subsequent batteries do not conflict with the occupied addresses; by sorting all abnormally occupied batteries and determining the corresponding target addresses from the remaining addresses according to the order, the address conflict between the abnormally occupied batteries is reduced.

[0079] In some alternative embodiments, step S303 above may be implemented by, but not limited to, the following method:

[0080] Determine the initial address in the first information corresponding to the normally occupied battery and the target addresses in all the second information as the occupied addresses.

[0081] Wherein, the normally occupied battery is the battery in the battery system whose initial address is within the address range.

[0082] In implementation, the addresses in the above second information are all allocated target addresses, and the addresses in the first information of the abnormally occupied battery are not within the address range of the battery system, and these addresses are invalid per se, while the addresses in the first information of the normally occupied battery are within the address range of the battery system and are valid. Therefore, within the address range of the battery system, the initial address corresponding to the normally occupied battery and the target addresses in all the second information all belong to the occupied addresses, and the target addresses of subsequent batteries cannot conflict with these addresses.

[0083] In the above solution, by determining the initial address in the first information corresponding to the normally occupied battery and the target addresses in all the second information as the occupied addresses, the target addresses of subsequent batteries are made not to conflict with the allocated and determined-to-be-allocated target addresses.

[0084] In some alternative embodiments, step S305 above may be implemented by, but not limited to, the following method:

[0085] Determine the address at the corresponding position of the order in the remaining addresses as the target address corresponding to the target battery.

[0086] Since the positions of the remaining addresses are different (which can also be understood as different in size order), by determining the positions of the remaining addresses, and then determining the position corresponding to the order of the batteries, and determining the address at this position as the target address, the target addresses of the abnormally occupied batteries are made different from each other, avoiding address conflicts between these abnormally occupied batteries.

[0087] Figure 4 It is a schematic flowchart of the third address allocation method provided by the embodiment of the present application. As Figure 4 shown, it includes the following steps:

[0088] Step S401: When in the powered-on state, compare the initial address of the target battery with the address range of the battery system.

[0089] Step S402: Generate the first information corresponding to the target battery based on the comparison result, SN code, and initial address of the target battery, and obtain the first information sent by the first battery and the second information sent by the second battery.

[0090] Wherein, the first battery is a battery in other powered-on states in the battery system, the second battery is a battery to which a target address has been assigned, and the second information includes the SN code and the target address of the second battery.

[0091] The specific implementation manners of steps S401 to S402 may refer to other embodiments and will not be elaborated here.

[0092] Step S403: If the initial address of the target battery is within the address range and there is an address in the second information that is the same as the initial address of the target battery, then determine a preset address as the new initial address of the target battery, and re-execute the step of comparing the initial address of the target battery with the address range of the battery system.

[0093] Wherein, the preset address is not within the address range.

[0094] In implementation, if the initial address of the target battery is within the address range of the battery system, then this initial address is valid. However, if its initial address conflicts with the assigned target address (there is an address in the second information that is the same as this initial address), then the target battery still cannot use this initial address; by determining a preset address that is not within the address range as the new initial address of the target battery and re-executing the step of comparing the initial address of the target battery with the address range of the battery system, the process corresponding to the case where the initial address of the target battery is not within the address range can be followed to re-obtain the target address. For details, reference can be made to Figure 3 the corresponding embodiments.

[0095] Figure 5 is a flowchart of a fourth address allocation method provided by an embodiment of the present application. As Figure 5 shown, it includes the following steps:

[0096] Step S501: When powered on, compare the initial address of the target battery with the address range of the battery system.

[0097] Step S502: Generate first information corresponding to the target battery based on the comparison result, SN code, and initial address of the target battery, and obtain the first information sent by the first battery and the second information sent by the second battery.

[0098] Wherein, the first battery is a battery in other powered-on states in the battery system, the second battery is a battery to which a target address has been assigned, and the second information includes the SN code and the target address of the second battery.

[0099] The specific implementation manners of steps S501 to S502 may refer to other embodiments and will not be elaborated here.

[0100] Step S503: If the initial address of the target battery is within the address range and there is no address in the second information that is the same as the initial address of the target battery, determine whether there is an address in the first information that is the same as the initial address of the target battery.

[0101] If so, execute Step S504; otherwise, execute Step S505.

[0102] In implementation, if the initial address of the target battery is within the address range of the battery system, then the initial address is valid; if there is no address in the second information that is the same as the initial address, its initial address will not conflict with the assigned target address.

[0103] However, if the initial addresses of these batteries are all retained, there may be address conflicts between these batteries; based on this, this embodiment also needs to determine whether there are the same addresses between these batteries, that is, to check whether there is an address in the received first information that is the same as the initial address of the target battery itself.

[0104] In implementation, if there is an address that is the same as the initial address of the target battery, only one of the same addresses can be retained. Since the SN code of the battery is the information that uniquely identifies the battery, the target battery using this address can be determined according to the SN code, and then its own target address can be determined, that is, execute Step S504.

[0105] On the contrary, if there is no address that is the same as the initial address of the target battery, then the target battery can directly use the initial address without conflicting with any battery, that is, execute Step S505.

[0106] Step S504: Based on the SN code of the target battery, determine the target address of the target battery.

[0107] Step S505: Determine the initial address of the target battery as the target address.

[0108] In the above solution, for the case where the initial address of the target battery is within the address range of the battery system and there is no address in the second information that is the same as the initial address, its initial address will not conflict with the allocated target address. However, if the initial addresses of these batteries are all retained, there may be an address conflict between these batteries. By determining whether there are the same addresses among these batteries, that is, the target battery checks whether there is an address in the received first information that is the same as its own initial address. If there is an address that is the same as the initial address of the target battery, only one of the same addresses can be retained. Since the SN code of the battery is the information that uniquely identifies the battery, the battery that uses this address can be determined according to the SN code, and then its own target address can be determined. If there is no address in the first information that is the same as the initial address of the target battery, the target battery can directly use the initial address without conflicting with any other battery.

[0109] In some alternative embodiments, determining the target address of the target battery based on the SN code of the target battery includes:

[0110] If the SN code of the target battery is greater than the SN code corresponding to the same address, the initial address of the target battery is determined as the target address;

[0111] Otherwise, a preset address is determined as the new initial address of the target battery, and the step of comparing the initial address of the target battery with the address range of the battery system is re-executed; wherein, the preset address is not within the address range.

[0112] In implementation, for the case where there is an address that is the same as the initial address of the target battery, only one of the same addresses can be retained. Since the SN code of the battery is the information that uniquely identifies the battery, the battery that uses this address can be determined according to the SN code, and then its own target address can be determined.

[0113] In order to enable all batteries to determine which battery's same address to retain according to the same rule, the battery with the largest SN code can be retained. That is, if the SN code of the target battery is greater than the SN codes corresponding to other same addresses, the target battery retains its initial address, that is, the initial address is determined as the target address;

[0114] If the SN code corresponding to another same address is greater than the SN code of the target battery, the target battery still cannot use the initial address. By determining a preset address that is not within the address range as the new initial address of the target battery and re-executing the step of comparing the initial address of the target battery with the address range of the battery system, the process corresponding to the case where the initial address of the target battery is not within the address range can be followed, and the target address can be re-obtained. Specifically, reference can be made to Figure 3 the corresponding embodiment.

[0115] Such asFigure 6 As shown in Figure 6 , an address allocation device 600 is provided in an embodiment of the present application, which is applied to a target battery. The target battery is any battery in a battery system, and the battery system includes a plurality of batteries connected in parallel. The device includes:

[0116] An address comparison module 601, configured to compare the initial address of the target battery with the address range of the battery system when in the powered-on state;

[0117] An information processing module 602, configured to generate first information corresponding to the target battery based on the comparison result, SN code, and initial address of the target battery, and obtain the first information sent by a first battery and the second information sent by a second battery; wherein, the first battery is other batteries in the powered-on state in the battery system, and the second battery is a battery to which a target address has been allocated, and the second information includes the SN code and the target address of the second battery;

[0118] An address allocation module 603, configured to determine the target address of the target battery based on the first information and the second information.

[0119] In some optional embodiments, the address allocation module 603 is specifically configured to:

[0120] If the initial address of the target battery is not within the address range, determine the occupied addresses in the battery system based on the first information and the second information;

[0121] Determine the remaining addresses in the battery system based on the address range of the battery system and the occupied addresses;

[0122] Sort the abnormally occupied batteries based on the SN codes of the abnormally occupied batteries, and determine the target address corresponding to the target battery from the remaining addresses based on the order of the target battery among the abnormally occupied batteries; wherein, the abnormally occupied battery is a battery in the battery system whose initial address is not within the address range.

[0123] In some optional embodiments, the address allocation module 603 is specifically configured to:

[0124] Determine the initial addresses in the first information corresponding to the normally occupied batteries and the target addresses in all the second information as the occupied addresses; wherein, the normally occupied battery is a battery in the battery system whose initial address is within the address range.

[0125] In some optional embodiments, the address allocation module 603 is specifically configured to:

[0126] Determine the address at the corresponding position in the remaining addresses in the order as the target address corresponding to the target battery.

[0127] In some optional embodiments, the address allocation module 603 is specifically configured to:

[0128] If the initial address of the target battery is within the address range and there is an address in the second information that is the same as the initial address of the target battery, then determine a preset address as the new initial address of the target battery, and re - execute the step of comparing the initial address of the target battery with the address range of the battery system; wherein, the preset address is not within the address range.

[0129] In some optional embodiments, the address allocation module 603 is specifically configured to:

[0130] If the initial address of the target battery is within the address range and there is no address in the second information that is the same as the initial address of the target battery, then determine whether there is an address in the first information that is the same as the initial address of the target battery;

[0131] If so, based on the SN code of the target battery, determine the target address of the target battery;

[0132] Otherwise, determine the initial address of the target battery as the target address.

[0133] In some optional embodiments, the address allocation module 603 is specifically configured to:

[0134] If the SN code of the target battery is greater than the SN code corresponding to the same address, then determine the initial address of the target battery as the target address;

[0135] Otherwise, determine a preset address as the new initial address of the target battery, and re - execute the step of comparing the initial address of the target battery with the address range of the battery system; wherein, the preset address is not within the address range.

[0136] Since this device is the device in the method in the embodiments of the present application, and the principle by which this device solves problems is similar to that of the method, the implementation of this device can refer to the implementation of the method, and repeated parts will not be elaborated.

[0137] Based on the same technical concept, the embodiments of the present application further provide a battery 700, as Figure 7 shown, including at least one processor 701 and a memory 702 connected to at least one processor. In the embodiments of the present application, the specific connection medium between the processor 701 and the memory 702 is not limited. Figure 7Take the connection between the central processor 701 and the memory 702 through the bus 703 as an example. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity in representation, Figure 7 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0138] Among them, the processor 701 is the control center of the battery. It can use various interfaces and circuits to connect various parts of the battery, and realize data processing by running or executing instructions stored in the memory 702 and calling data stored in the memory 702. Optionally, the processor 701 may include one or more processing units. The processor 701 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes the issued instructions. It can be understood that the above-mentioned modem processor may not be integrated into the processor 701. In some embodiments, the processor 701 and the memory 702 may be implemented on the same chip, and in some embodiments, they may also be separately implemented on independent chips.

[0139] The processor 701 may be a general-purpose processor, such as a CPU, a digital signal processor, an application specific integrated circuit (ASIC), a field programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the address allocation method can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0140] The memory 702, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 702 may include at least one type of storage medium, for example, it may include flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disc, and so on. The memory 702 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 702 in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data.

[0141] In the embodiments of the present application, the memory 702 stores a computer program, and when the program is executed by the processor 701, the processor 701 is caused to execute:

[0142] When in the powered-on state, compare the initial address of the target battery with the address range of the battery system;

[0143] Based on the comparison result, SN code, and initial address of the target battery, generate the first information corresponding to the target battery, and obtain the first information sent by the first battery and the second information sent by the second battery; wherein, the first battery is other batteries in the powered-on state in the battery system, and the second battery is the battery to which the target address has been allocated, and the second information includes the SN code and target address of the second battery;

[0144] Based on the first information and the second information, determine the target address of the target battery.

[0145] In some optional embodiments, the processor 701 specifically executes:

[0146] If the initial address of the target battery is not within the address range, based on the first information and the second information, determine the occupied addresses in the battery system;

[0147] Based on the address range of the battery system and the occupied addresses, determine the remaining addresses in the battery system;

[0148] Sort the abnormally occupied batteries based on the SN codes corresponding to the abnormally occupied batteries, and determine the target address corresponding to the target battery from the remaining addresses based on the order of the target battery among the abnormally occupied batteries; wherein, the abnormally occupied batteries are the batteries in the battery system whose initial addresses are not within the address range.

[0149] In some alternative embodiments, the processor 701 specifically executes:

[0150] Determine the initial addresses in the first information corresponding to the normally occupied batteries and the target addresses in all the second information as the occupied addresses; wherein, the normally occupied batteries are the batteries in the battery system whose initial addresses are within the address range.

[0151] In some alternative embodiments, the processor 701 specifically executes:

[0152] Determine the address at the corresponding position in the order of the remaining addresses as the target address corresponding to the target battery.

[0153] In some alternative embodiments, the processor 701 specifically executes:

[0154] If the initial address of the target battery is within the address range and there is an address in the second information that is the same as the initial address of the target battery, then determine a preset address as the new initial address of the target battery, and re-execute the step of comparing the initial address of the target battery with the address range of the battery system; wherein, the preset address is not within the address range.

[0155] In some alternative embodiments, the processor 701 specifically executes:

[0156] If the initial address of the target battery is within the address range and there is no address in the second information that is the same as the initial address of the target battery, then determine whether there is an address in the first information that is the same as the initial address of the target battery;

[0157] If so, determine the target address of the target battery based on the SN code of the target battery;

[0158] Otherwise, determine the initial address of the target battery as the target address.

[0159] In some alternative embodiments, the processor 701 specifically executes:

[0160] If the SN code of the target battery is greater than the SN code corresponding to the same address, then determine the initial address of the target battery as the target address;

[0161] Otherwise, determine the preset address as the new initial address of the target battery, and re - execute the step of comparing the initial address of the target battery with the address range of the battery system; wherein, the preset address is not within the address range.

[0162] Since this battery is the battery in the method of the embodiments of the present application, and the principle of the battery to solve the problem is similar to that of the method, the implementation of this battery can refer to the implementation of the method, and the repeated parts will not be elaborated.

[0163] Based on the same technical concept, an embodiment of the present application also provides a computer - readable storage medium, which stores a computer program executable by a processor. When the program runs on the processor, it enables the processor to execute the steps of the above - mentioned address allocation method.

[0164] In some optional implementation manners, each aspect of the address allocation method provided by the present application can also be implemented in the form of a program product, which includes computer - executable instructions. When the program product runs on a computer device, the computer - executable instructions are used to enable the computer device to execute the steps of the address allocation method according to various exemplary implementation manners of the present application described above in this specification.

[0165] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer - usable storage media (including but not limited to disk storage, CD - ROM, optical storage, etc.) containing computer - usable program code.

[0166] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general - purpose computer, a special - purpose computer, an embedded processor, or other programmable data - processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data - processing devices generate a device for realizing the functions specified in Figure 1 one or more flows or multiple flows and / or blocks Figure 1 one or more blocks or multiple blocks.

[0167] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one or more of the procedures Figure 1 and / or boxes Figure 1 specified in one or more of the boxes.

[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, such that a series of operational steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more of the procedures Figure 1 and / or boxes Figure 1 specified in one or more of the boxes.

[0169] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications that fall within the scope of the present application.

[0170] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims

1. An address allocation method, characterized in that, it is applied to a target battery, where the target battery is any battery in a battery system, and the battery system includes a plurality of batteries connected in parallel; the method includes: When in the powered-on state, comparing the initial address of the target battery with the address range of the battery system; Based on the comparison result, SN code, and initial address of the target battery, generating first information corresponding to the target battery, and obtaining first information sent by a first battery and second information sent by a second battery; wherein, the first battery is other batteries in the powered-on state in the battery system, and the second battery is a battery to which a target address has been allocated, and the second information includes the SN code and target address of the second battery; Based on the first information and the second information, determining the target address of the target battery.

2. The method according to claim 1, characterized in that, determining the target address of the target battery based on the first information and the second information includes: If the initial address of the target battery is not within the address range, determining the occupied addresses in the battery system based on the first information and the second information; Based on the address range of the battery system and the occupied addresses, determining the remaining addresses in the battery system; Sorting the abnormally occupied batteries based on the SN code of the abnormally occupied battery, and determining the target address corresponding to the target battery from the remaining addresses based on the order of the target battery among the abnormally occupied batteries; wherein, the abnormally occupied battery is a battery in the battery system whose initial address is not within the address range.

3. The method according to claim 2, characterized in that, determining the occupied addresses in the battery system based on the first information and the second information includes: Determining the initial addresses in the first information corresponding to the normally occupied batteries and the target addresses in all the second information as the occupied addresses; wherein, the normally occupied battery is a battery in the battery system whose initial address is within the address range.

4. The method according to claim 2, characterized in that, determining the target address corresponding to the target battery from the remaining addresses based on the order of the target battery among the abnormally occupied batteries includes: Determining the address at the corresponding position of the order in the remaining addresses as the target address corresponding to the target battery.

5. The method according to claim 1, characterized in that, determining the target address of the target battery based on the first information and the second information includes: If the initial address of the target battery is within the address range and there is an address in the second information that is the same as the initial address of the target battery, then determining a preset address as the new initial address of the target battery, and re-executing the step of comparing the initial address of the target battery with the address range of the battery system; wherein, the preset address is not within the address range.

6. The method according to claim 1, characterized in that, Determining the target address of the target battery based on the first information and the second information includes: If the initial address of the target battery is within the address range and there is no address in the second information that is the same as the initial address of the target battery, determine whether there is an address in the first information that is the same as the initial address of the target battery; If so, determine the target address of the target battery based on the SN code of the target battery; Otherwise, determine the initial address of the target battery as the target address.

7. The method according to claim 6, wherein, Determining the target address of the target battery based on the SN code of the target battery includes: If the SN code of the target battery is greater than the SN code corresponding to the same address, determine the initial address of the target battery as the target address; Otherwise, determine a preset address as the new initial address of the target battery, and re - execute the step of comparing the initial address of the target battery with the address range of the battery system; wherein, the preset address is not within the address range.

8. An address allocation device, wherein, Applied to a target battery, the target battery is any battery in a battery system, and the battery system includes a plurality of batteries connected in parallel; The device includes: An address comparison module, configured to compare the initial address of the target battery with the address range of the battery system when in the powered - on state; An information processing module, configured to generate the first information corresponding to the target battery based on the comparison result, SN code, and initial address of the target battery, and obtain the first information sent by the first battery and the second information sent by the second battery; wherein, the first battery is other batteries in the battery system in the powered - on state, the second battery is a battery to which a target address has been allocated, and the second information includes the SN code and target address of the second battery; An address allocation module, configured to determine the target address of the target battery based on the first information and the second information.

9. The device according to claim 8, wherein, The address allocation module is specifically configured to: If the initial address of the target battery is not within the address range, determine the occupied addresses in the battery system based on the first information and the second information; Determine the remaining addresses in the battery system based on the address range of the battery system and the occupied addresses; Sort the abnormally occupied batteries based on the SN code of the abnormally occupied batteries, and determine the target address corresponding to the target battery from the remaining addresses based on the order of the target battery among the abnormally occupied batteries; wherein, the abnormally occupied batteries are batteries in the battery system whose initial addresses are not within the address range.

10. The device according to claim 9, wherein, The address allocation module is specifically configured to: Determine the initial addresses in the first information corresponding to the normally occupied batteries and the target addresses in all the second information as the occupied addresses; wherein, the normally occupied batteries are batteries in the battery system whose initial addresses are within the address range.

11. The device according to claim 9, characterized in that, the address allocation module is specifically configured to: determine the address at the corresponding position of the order in the remaining addresses as the target address corresponding to the target battery.

12. The device according to claim 8, characterized in that, the address allocation module is specifically configured to: if the initial address of the target battery is within the address range and there is an address in the second information that is the same as the initial address of the target battery, then determine a preset address as the new initial address of the target battery, and re-execute the step of comparing the initial address of the target battery with the address range of the battery system; wherein, the preset address is not within the address range.

13. The device according to claim 8, characterized in that, the address allocation module is specifically configured to: if the initial address of the target battery is within the address range and there is no address in the second information that is the same as the initial address of the target battery, then determine whether there is an address in the first information that is the same as the initial address of the target battery; if so, determine the target address of the target battery based on the SN code of the target battery; otherwise, determine the initial address of the target battery as the target address.

14. The device according to claim 13, characterized in that, the address allocation module is specifically configured to: if the SN code of the target battery is greater than the SN code corresponding to the same address, then determine the initial address of the target battery as the target address; otherwise, determine a preset address as the new initial address of the target battery, and re-execute the step of comparing the initial address of the target battery with the address range of the battery system; wherein, the preset address is not within the address range.

15. A battery, characterized in that, it includes at least one processor and at least one memory, wherein, the memory stores a computer program, and when the program is executed by the processor, the processor is caused to execute the method according to any one of claims 1 to 7.

16. A computer-readable storage medium, characterized in that, it stores a computer program executable by a computer, and when the program runs on the computer, the computer is caused to execute the method according to any one of claims 1 to 7.