Battery pack coding method and device, battery pack and photovoltaic system

By using the CAN bus to negotiate requests and information exchange between battery packs, automatic encoding of battery packs is realized, solving the problems of inefficient manual configuration and frequent errors, and improving the configuration efficiency and deployment quality of photovoltaic systems.

CN119892796APending Publication Date: 2025-04-25GUANGZHOU LANGO ELECTRONICS TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411932126.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In large photovoltaic power plants, manual configuration of battery pack encoding is inefficient and errors are prone to occur, resulting in increased photovoltaic system deployment complexity and time cost.

Method used

Through the CAN bus, the battery pack introduces itself to other battery packs through negotiation request messages after powering on, obtains information about other battery packs, and automatically generates and configures unique encodings to avoid manual configuration.

Benefits of technology

Automatic encoding of battery packs is realized, which improves the configuration efficiency of photovoltaic systems when extending access to battery packs, reduces the occurrence of errors, and reduces deployment complexity and time cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892796A_ABST
    Figure CN119892796A_ABST
Patent Text Reader

Abstract

The invention provides a battery pack coding method and device, a battery pack and a photovoltaic system, relates to the technical field of batteries, and is used for automatically coding the battery pack in the photovoltaic system and improving the configuration efficiency when the photovoltaic system is expanded and accessed to the battery pack. The method is applied to a target battery pack, and the target battery pack is any battery pack in a photovoltaic system. The battery pack coding method comprises the steps that after a target battery pack is powered on, a negotiation request message is sent to a first battery pack through a CAN bus, the first battery pack is other battery packs except the target battery pack in a plurality of battery packs, and the negotiation request message comprises battery pack information. And the target battery pack also obtains a negotiation request message sent by the first battery pack through the CAN bus, and obtains the battery pack information of the first battery pack from the negotiation request message. Furthermore, the target battery pack generates a target code according to the battery pack information of the target battery pack and the battery pack information of the first battery pack, and configures the target code in the target battery pack.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of battery technology, and in particular to a battery pack coding method, device, battery pack and photovoltaic system. Background Art

[0002] As the energy storage unit in the photovoltaic system, each battery pack needs to have a unique code to manage the battery pack, such as charge and discharge management, during the operation of the photovoltaic system.

[0003] At present, when a battery pack is connected to a photovoltaic system, the operation and maintenance personnel usually need to manually configure it to ensure that the battery pack can be correctly identified and managed by the photovoltaic system. Especially in large photovoltaic power stations, when multiple battery packs are connected at the same time, this manual configuration method is not only inefficient, but also prone to errors, which greatly increases the complexity and time cost of photovoltaic system deployment. Summary of the invention

[0004] The present application proposes a battery pack coding method, device, battery pack and photovoltaic system, which are used to realize automatic coding of battery packs in a photovoltaic system and improve the configuration efficiency when the photovoltaic system is expanded and connected to the battery pack.

[0005] In order to achieve the above purpose, this application adopts the following technical solutions:

[0006] In a first aspect, a battery pack encoding method is provided, which is applied to a target battery pack, wherein the target battery pack is any battery pack in a photovoltaic system, and multiple battery packs in the photovoltaic system are connected via a controller area network (CAN) bus. The battery pack encoding method includes: after the target battery pack is powered on, the target battery pack sends a negotiation request message to the first battery pack via the CAN bus, wherein the first battery pack is a battery pack other than the target battery pack among the multiple battery packs, and the negotiation request message includes battery pack information. The target battery pack also obtains the negotiation request message sent by the first battery pack via the CAN bus, and obtains the battery pack information of the first battery pack from the negotiation request message. Furthermore, the target battery pack generates a target code based on the battery pack information of the target battery pack and the battery pack information of the first battery pack, and configures the target code in the target battery pack.

[0007] In the battery pack encoding method provided in the present application, after any battery pack in the photovoltaic system is powered on, it can "introduce itself" to other battery packs through a negotiation request message, and automatically complete its own encoding after obtaining and identifying the battery pack information of other battery packs. There is no need for manual configuration by operation and maintenance personnel, which greatly improves the configuration efficiency when expanding the photovoltaic system to access the battery pack.

[0008] In one possible design, the target battery pack generates a target code based on the battery pack information of the target battery pack and the battery pack information of the first battery pack, including: sorting the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack to obtain the order of the target battery packs; generating the target code according to the order of the target battery packs.

[0009] In one possible design, the target battery packs are sorted according to the battery pack information of the target battery pack and the battery pack information of the first battery pack, including: determining a sorting value of the target battery pack according to the battery pack information of the target battery pack; determining a sorting value of the first battery pack according to the battery pack information of the first battery pack; and sorting the target battery pack and the first battery pack according to the sorting value of the target battery pack and the sorting value of the first battery pack.

[0010] In one possible design, the battery pack information includes a battery pack serial number, and at least one of a battery pack model, a battery pack capacity, a battery pack state of health (SOH), a battery pack initial voltage, and a battery pack initial current.

[0011] In one possible design, the battery pack coding method further includes: sending a coding confirmation message to the first battery pack via the CAN bus, the coding confirmation message including a target code; acquiring the coding confirmation message sent by the first battery pack via the CAN bus to obtain the code of the first battery pack; and when there is a second battery pack in the first battery pack, determining that there is a coding conflict between the target battery pack and the second battery pack, and the code of the second battery pack is the same as the target code.

[0012] In one possible design, the battery pack coding method further includes: updating the target coding according to the battery pack information of the target battery pack and the battery pack information of the second battery pack, until the updated target coding is different from the coding of the first battery pack.

[0013] In one possible design, the battery pack coding method further includes: when there is no second battery pack in the first battery pack, sending a coding completion message to the host, the coding completion message including a target code, so that the host establishes a communication connection with the target battery pack based on the target code.

[0014] In a second aspect, a battery pack encoding device is provided, which is deployed on a target battery pack. The target battery pack is any battery pack in a photovoltaic system. Multiple battery packs in the photovoltaic system are connected via a CAN bus. The battery pack encoding device includes a sending unit, an acquisition unit, and a processing unit. The sending unit is used to send a negotiation request message to a first battery pack via the CAN bus after the target battery pack is powered on. The first battery pack is a battery pack other than the target battery pack among multiple battery packs, and obtain the battery pack information of the first battery pack from the negotiation request message. The acquisition unit is used to obtain the negotiation request message sent by the first battery pack via the CAN bus. The negotiation request message includes the battery pack information of the battery pack. The processing unit is used to generate a target code according to the battery pack information of the target battery pack and the battery pack information of the first battery pack, and configure the target code on the target battery pack.

[0015] In one possible design, the processing unit is specifically used to sort the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack to obtain the order of the target battery packs; and generate the target code according to the order of the target battery packs.

[0016] In one possible design, the processing unit is specifically used to determine a ranking value of a target battery pack based on the battery pack information of the target battery pack; determine a ranking value of a first battery pack based on the battery pack information of the first battery pack; and sort the target battery pack and the first battery pack based on the ranking value of the target battery pack and the ranking value of the first battery pack.

[0017] In one possible design, the battery pack information includes a battery pack serial number, and at least one of a battery pack model, a battery pack capacity, a battery pack SOH, a battery pack initial voltage, and a battery pack initial current.

[0018] In one possible design, the sending unit is further used to send a coding confirmation message to the first battery pack via the CAN bus, and the coding confirmation message includes a target code. The acquiring unit is further used to acquire the coding confirmation message sent by the first battery pack via the CAN bus to obtain the code of the first battery pack. The processing unit is further used to determine, when there is a second battery pack in the first battery pack, that there is a coding conflict between the target battery pack and the second battery pack, and that the code of the second battery pack is the same as the target code.

[0019] In one possible design, the processing unit is further used to update the target code according to the battery pack information of the target battery pack and the battery pack information of the second battery pack, until the updated target code is different from the code of the first battery pack.

[0020] In one possible design, the processing unit is also used to send an encoding completion message to the host when the second battery pack does not exist in the first battery pack, and the encoding completion message includes a target code, so that the host establishes a communication connection with the target battery pack based on the target code.

[0021] In a third aspect, a battery pack is provided, which includes a memory and a processor; the memory and the processor are coupled, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the battery pack executes the battery pack coding method provided in the first aspect or any possible design thereof.

[0022] In a fourth aspect, a photovoltaic system is provided, comprising the battery pack provided in the third aspect.

[0023] In a fifth aspect, a computer-readable storage medium is provided, in which instructions are stored. When the instructions are executed on a battery pack, the battery pack executes the battery pack encoding method provided in the first aspect or any possible implementation thereof.

[0024] In a sixth aspect, a computer program product is provided, the computer program product comprising computer instructions, which, when executed on a battery pack, causes the battery pack to execute the battery pack encoding method provided in the first aspect or any possible implementation thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A schematic diagram of a photovoltaic system structure provided in an embodiment of the present application;

[0026] Figure 2 A schematic diagram of a battery pack encoding method provided in an embodiment of the present application Figure 1 ;

[0027] Figure 3 A schematic diagram of a battery pack encoding method provided in an embodiment of the present application Figure 2 ;

[0028] Figure 4 A schematic diagram of the structure of a battery pack encoding device provided in an embodiment of the present application;

[0029] Figure 5 A schematic diagram of a battery pack structure provided for an embodiment of the present application. DETAILED DESCRIPTION

[0030] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0031] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0032] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" and "plurality" refer to two or more. The words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be different.

[0033] As the energy storage unit in the photovoltaic system, each battery pack needs to have a unique code to manage the battery pack during the operation of the photovoltaic system, such as charge and discharge management. At present, when the battery pack is connected to the photovoltaic system, the operation and maintenance personnel usually need to manually configure it to ensure that the battery pack can be correctly identified and managed by the photovoltaic system. Especially in large photovoltaic power stations, when multiple battery packs are connected at the same time, this manual configuration method is not only inefficient, but also prone to errors, which greatly increases the complexity and time cost of photovoltaic system deployment.

[0034] In order to solve the above problems, the present application proposes a battery pack coding method, device, battery pack and photovoltaic system. The battery pack coding method is applied to a target battery pack. The target battery pack is any battery pack in the photovoltaic system. Multiple battery packs in the photovoltaic system are connected through a CAN bus. The battery pack coding method includes: after the target battery pack is powered on, a negotiation request message is sent to the first battery pack through the CAN bus. The first battery pack is a battery pack other than the target battery pack among the multiple battery packs. The negotiation request message includes battery pack information. The target battery pack also obtains the negotiation request message sent by the first battery pack through the CAN bus, and obtains the battery pack information of the first battery pack from the negotiation request message. Furthermore, the target battery pack generates a target code based on the battery pack information of the target battery pack and the battery pack information of the first battery pack, and configures the target code in the target battery pack.

[0035] In this way, through the battery pack encoding method provided by this application, any battery pack in the photovoltaic system can "introduce itself" to other battery packs through a negotiation request message after power-on, and automatically complete its own encoding after obtaining and identifying the battery pack information of other battery packs. There is no need for manual configuration by operation and maintenance personnel, which greatly improves the configuration efficiency when expanding the photovoltaic system to access the battery pack.

[0036] Figure 1 A photovoltaic system is shown. The battery pack encoding method provided in the embodiment of the present application can be applied to Figure 1 Any battery pack in the photovoltaic system shown is used to realize automatic encoding of the battery pack after power-on, thereby improving the configuration efficiency when the photovoltaic system is connected to the battery pack. Figure 1 As shown, the photovoltaic system 10 includes a host 11 and a plurality of battery packs 12 .

[0037] The multiple battery packs 12 may be battery packs of the same specification or battery packs of different specifications, which is not specifically limited in the present embodiment. The host 11 is connected to the multiple battery packs 12 respectively, and the multiple battery packs 12 are all connected to the CAN bus in the photovoltaic system 10, and the multiple battery packs can communicate with each other through the CAN bus.

[0038] Figure 2 is a flowchart of a battery pack coding method according to some exemplary embodiments. In some embodiments, the battery pack coding method can be applied to Figure 1 Any one of the multiple battery packs 12 in the photovoltaic system 10 shown. In the following, the embodiment of the present application takes the battery pack coding method applied to any one of the multiple battery packs 12 as an example to illustrate the battery pack coding method.

[0039] like Figure 2 As shown, the battery pack coding method provided in the embodiment of the present application includes the following S201-S203.

[0040] S201. After being powered on, the target battery pack sends a negotiation request message to the first battery pack via the CAN bus.

[0041] The target battery pack is any battery pack in the photovoltaic system, the first battery pack is any battery pack other than the target battery pack among the multiple battery packs, and the negotiation request message includes the battery pack information.

[0042] As a possible implementation, the target battery pack generates a negotiation request message based on the battery pack information in response to the power-on of the photovoltaic system, and reports it to the CAN bus, and sends the negotiation request message to the first battery pack through the CAN bus.

[0043] It can be understood that since the target battery pack is any battery pack in the photovoltaic system, that is, in the photovoltaic system, each battery pack will generate a negotiation request message after power-on and send it to other battery packs, so that each battery pack can obtain the battery pack information of all the current battery packs in the photovoltaic system, thereby realizing the identification of each battery pack in the photovoltaic system.

[0044] In some embodiments, if the target battery pack has been configured with a code, the negotiation request message also includes the code of the target battery pack.

[0045] In some embodiments, if the target battery pack fails to successfully send a negotiation request message due to CAN bus congestion or other reasons, the negotiation request message is resent after a preset time until the negotiation request message is sent. Exemplarily, the preset time may be 5 seconds.

[0046] In some embodiments, the battery pack information includes a battery pack serial number, and at least one of a battery pack model, a battery pack capacity, a battery pack SOH, a battery pack initial voltage, and a battery pack initial current.

[0047] Exemplarily, the format of the negotiation request message may be <battery pack serial number><battery pack model><battery pack initial voltage><battery pack initial current>, wherein the battery pack information includes the battery pack serial number, the battery pack model, the battery pack initial voltage, and the battery pack initial current.

[0048] S202: The target battery pack obtains a negotiation request message sent by the first battery pack through the CAN bus, and obtains battery pack information of the first battery pack from the negotiation request message.

[0049] As a possible implementation, the target battery pack monitors messages on the CAN bus and obtains the negotiation request message sent by the first battery pack. Further, the target battery pack obtains the battery pack information of the first battery pack from the negotiation request message sent by the first battery pack.

[0050] S203: The target battery pack generates a target code according to the battery pack information of the target battery pack and the battery pack information of the first battery pack, and configures the target code in the target battery pack.

[0051] As a possible implementation manner, the target battery pack calculates the code corresponding to each battery pack according to the battery pack information of the battery pack, and determines the code of the target battery pack as the target code as the target battery pack configuration.

[0052] In some embodiments, the target battery pack calculates each item of information included in the battery pack information to obtain a numerical value corresponding to each item of information, and combines the numerical values ​​to obtain the code of the battery pack.

[0053] Exemplarily, taking the battery pack information illustrated in the above step S202 including the battery pack serial number, battery pack model, battery pack initial voltage, and battery pack initial current as an example, the target battery pack is calculated for the battery pack serial number, battery pack model, battery pack initial voltage, and battery pack initial current, and the corresponding values ​​of the battery pack serial number, battery pack model, battery pack initial voltage, and battery pack initial current are obtained and combined to obtain the battery pack code.

[0054] The target battery pack calculates the value of the battery pack serial number as follows: directly take the values ​​of the numbers in the battery pack serial number, assign values ​​to the letters in the battery pack serial number, and further sum the number values ​​and the letter values ​​to obtain the value corresponding to the battery pack serial number. When assigning values ​​to the letters in the battery pack serial number, the letters are assigned according to their order in the 26 letters. For example, the serial number is AX717B2, the target battery pack takes the values ​​of 7, 1, 7, 2 for the numbers, and assigns the values ​​of 1, 24, 2 for the letters. The further summation results in the value corresponding to the battery pack serial number of 7+1+7+2+1+24+2=44.

[0055] The method for calculating the value of the battery pack model by the target battery pack is the same as the method for calculating the battery pack serial number mentioned above. The numbers in the battery pack model are directly taken, and the letters in the battery pack model are assigned values. The numerical values ​​and letter assignments are further summed to obtain the value corresponding to the battery pack model. For example, if the battery pack model is XQ24, the calculated value corresponding to the battery pack model is 17+24+2+4=47.

[0056] The target battery pack calculates the value of the initial voltage of the battery pack as follows: converting the initial voltage of the battery pack into a voltage value in a preset unit, and determining the voltage value as the value corresponding to the initial voltage of the battery pack. For example, if the initial voltage of the battery pack is 70V (volts), and the preset unit is V, then the value corresponding to the initial voltage of the battery pack is 70.

[0057] The target battery pack calculates the value of the initial current of the battery pack as follows: convert the initial current of the battery pack into a current value in a preset unit, and determine the current value as the value corresponding to the initial current of the battery pack. For example, if the initial voltage of the battery pack is 150A (ampere), and the preset unit is A, then the value corresponding to the initial voltage of the battery pack is 150.

[0058] Based on the numerical value corresponding to each item of information in the battery pack information exemplified above, the target battery pack determines that the battery pack code is 444770150.

[0059] As another possible implementation method, the target battery pack and the first battery pack are sorted according to the battery pack information of the target battery pack and the battery pack information of the first battery pack to obtain the order of the target battery packs, further generate a target code according to the order of the target battery packs, and configure the target code for the target battery pack.

[0060] In some embodiments, the target battery pack sorts the target battery pack and the first battery pack, including the following steps S2031 - S2033 .

[0061] S2031. The target battery pack determines a ranking value of the target battery pack according to the battery pack information of the target battery pack.

[0062] The ranking value of the target battery pack may be determined based on a combination of all battery pack information included in the battery pack information, or may be determined based on partial item information.

[0063] Furthermore, the target battery pack determines the value corresponding to the item information to be determined in the battery pack information based on the above-mentioned method of calculating the value corresponding to each item of information in the battery pack information according to the item to be determined. When the item to be determined is a single item, the obtained value is determined as the ranking value, and when the item to be determined is multiple items, the multiple values ​​are summed and determined as the ranking value.

[0064] For example, based on the above example, the corresponding value of the battery pack serial number is 44, the corresponding value of the battery pack model is 47, the corresponding value of the battery pack initial voltage is 70, and the corresponding value of the battery pack initial current is 150. When the item to be determined is the battery pack serial number, the ranking value of the battery pack is 44, and when the items to be determined are the battery pack serial number and the battery pack model, the ranking value of the battery pack is 91.

[0065] S2032: The target battery pack determines a ranking value of the first battery pack according to the battery pack information of the first battery pack.

[0066] It should be noted that the implementation method of determining the ranking value of the first battery pack according to the battery pack information of the first battery pack is the same as the implementation method of determining the ranking value of the target battery pack in the above step S2031, except that the battery pack information of the target battery pack is replaced with the battery pack information of the first battery pack, and it will not be repeated here.

[0067] S2033: The target battery pack sorts the target battery pack and the first battery pack according to the sorting value of the target battery pack and the sorting value of the first battery pack.

[0068] For example, if the ranking value of the target battery pack is 91, and the ranking values ​​of the multiple battery packs included in the first battery pack are 56, 71, 42, 98, 121, and 152 respectively, then the target battery pack is sorted from small to large as 42, 56, 71, 91, 98, 121, and 152, that is, the order of the target battery pack is 4.

[0069] Further, the target battery pack is installed in the target battery pack order 4, and a target code is generated, for example, the target code is 004.

[0070] In some embodiments, if there is a battery pack that has completed encoding in the photovoltaic system, the target code is generated based on the code in the negotiation request message sent by the battery pack that has completed encoding. For example, in the negotiation request message sent by the battery pack that has completed encoding, the maximum code is 052, and the order of the target battery pack in the battery pack that has not completed encoding is 2, then the target battery pack determines the target code as 054.

[0071] It can be understood that the embodiment of the present application provides a battery pack coding method, which can automatically negotiate and complete the battery pack coding after the battery pack is powered on, without the need for manual configuration by operation and maintenance personnel, thereby greatly improving the configuration efficiency when the photovoltaic system is expanded and connected to the battery pack.

[0072] In one design, in order to avoid coding conflicts in automatic coding of battery packs, the battery pack coding method provided in the embodiment of the present application also includes coding conflict detection, such as Figure 3 As shown, including S301-S303.

[0073] S301. The target battery pack sends a coding confirmation message to the first battery pack via the CAN bus.

[0074] The coding confirmation message includes the target coding.

[0075] Exemplarily, the format of the coding confirmation message may be <battery pack serial number><battery pack model><target code>.

[0076] S302: The target battery pack obtains the coding confirmation message sent by the first battery pack through the CAN bus to obtain the coding of the first battery pack.

[0077] S303: When the target battery pack has a second battery pack in the first battery pack, determine that there is a coding conflict between the target battery pack and the second battery pack.

[0078] The code of the second battery pack is the same as the target code.

[0079] As a possible implementation method, the target battery pack is compared with the target code based on the acquired code of the first battery pack to determine whether the same code exists, and the battery pack with the same code is determined as the second battery pack, and it is determined that there is a coding conflict between the target battery pack and the second battery pack.

[0080] In some embodiments, when it is determined that there is a coding conflict between the target battery pack and the second battery pack, the target battery pack updates the target coding according to the battery pack information of the target battery pack and the battery pack information of the second battery pack until the updated target coding is different from the coding of the first battery pack.

[0081] The target battery pack sorts the target battery pack and the second battery pack, and encodes the target battery pack according to the sorting based on the encoding of the battery pack that has been encoded, thereby ensuring that each battery pack has a unique corresponding code.

[0082] In some embodiments, when the target battery pack does not exist in the second battery pack in the first battery pack, the target battery pack sends an encoding completion message to the host, so that the host establishes a communication connection with the target battery pack based on the target code.

[0083] The encoding completion message includes the target encoding.

[0084] It can be understood that the battery pack coding method provided in the embodiment of the present application can detect whether there is a coding conflict after the battery pack completes automatic coding, and if the coding conflict is small, continue to update the coding of the battery pack. If there is no coding conflict, the coding will be reported and a communication connection with the host will be established to ensure that the host in the photovoltaic system can manage the battery packs based on the coding of each battery pack.

[0085] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0086] The embodiment of the present application can divide the functional modules of the user equipment according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0087] Figure 4 Schematic diagram of the structure of a battery pack encoding device provided in an embodiment of the present application. The battery pack encoding device is used to execute the above-mentioned battery pack encoding method. Figure 4 As shown, the battery pack encoding device 40 includes a sending unit 401 , an acquiring unit 402 and a processing unit 403 .

[0088] The sending unit 401 is used to send a negotiation request message to a first battery pack through the CAN bus after the target battery pack is powered on, where the first battery pack is a battery pack other than the target battery pack among the multiple battery packs, and obtain the battery pack information of the first battery pack from the negotiation request message. Figure 2 As shown, the sending unit 401 can be used to execute S201.

[0089] The acquisition unit 402 is configured to acquire a negotiation request message sent by the first battery pack via the CAN bus, wherein the negotiation request message includes battery pack information of the battery pack. Figure 2 As shown, the acquisition unit 402 can be used to execute S202.

[0090] The processing unit 403 is used to generate a target code according to the battery pack information of the target battery pack and the battery pack information of the first battery pack, and configure the target code in the target battery pack. Figure 2 As shown, the processing unit 403 can be used to execute S203.

[0091] Optional, such as Figure 4 As shown, in the battery pack encoding device 40 provided in the embodiment of the present application, the processing unit 403 is specifically used to sort the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack to obtain the order of the target battery packs; and generate the target code according to the order of the target battery packs.

[0092] Optional, such as Figure 4As shown, in the battery pack encoding device 40 provided in the embodiment of the present application, the processing unit 403 is specifically used to determine the ranking value of the target battery pack according to the battery pack information of the target battery pack; determine the ranking value of the first battery pack according to the battery pack information of the first battery pack; and sort the target battery pack and the first battery pack according to the ranking value of the target battery pack and the ranking value of the first battery pack.

[0093] Optional, such as Figure 4 As shown, in the battery pack encoding device 40 provided in the embodiment of the present application, the battery pack information includes the battery pack serial number, and at least one of the battery pack model, battery pack capacity, battery pack SOH, battery pack initial voltage and battery pack initial current.

[0094] Optional, such as Figure 4 As shown, in the battery pack encoding device 40 provided in the embodiment of the present application, the sending unit 401 is also used to send a coding confirmation message to the first battery pack through the CAN bus, and the coding confirmation message includes a target code.

[0095] The acquisition unit 402 is further configured to acquire the coding confirmation message sent by the first battery pack through the CAN bus to obtain the coding of the first battery pack.

[0096] The processing unit 403 is further configured to determine, when there is a second battery pack in the first battery pack, that there is a coding conflict between the target battery pack and the second battery pack, and that the coding of the second battery pack is the same as the target coding.

[0097] Optional, such as Figure 4 As shown, in the battery pack coding device 40 provided in the embodiment of the present application, the processing unit 403 is also used to update the target coding according to the battery pack information of the target battery pack and the battery pack information of the second battery pack until the updated target coding is different from the coding of the first battery pack.

[0098] Optional, such as Figure 4 As shown, in the battery pack encoding device 40 provided in the embodiment of the present application, the processing unit 403 is also used to send an encoding completion message to the host when there is no second battery pack in the first battery pack, and the encoding completion message includes a target code, so that the host establishes a communication connection with the target battery pack based on the target code.

[0099] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the present application embodiment provides a possible structural diagram of a battery pack. The battery pack is used to execute the battery pack encoding method executed by the battery pack encoding device in the above-mentioned embodiment. Figure 5 As shown, the battery pack 50 includes a processor 501, a memory 502 and a bus 503. The processor 501 and the memory 502 may be connected via the bus 503.

[0100] The processor 501 is the control center of the battery pack, and can be a processor or a general term for multiple processing elements. For example, the processor 501 can be a general-purpose central processing unit (CPU) or other general-purpose processors. Among them, the general-purpose processor can be a microprocessor or any conventional processor.

[0101] As an embodiment, the processor 501 may include one or more CPUs, such as Figure 5 CPU 0 and CPU 1 are shown in .

[0102] The memory 502 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0103] As a possible implementation, the memory 502 may exist independently of the processor 501, and the memory 502 may be connected to the processor 501 via a bus 503 to store instructions or program codes. When the processor 501 calls and executes the instructions or program codes stored in the memory 502, the battery pack encoding method provided in the embodiment of the present application can be implemented.

[0104] In another possible implementation, the memory 502 may also be integrated with the processor 501 .

[0105] The bus 503 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0106] It should be pointed out that Figure 5 The structure shown does not constitute a limitation on the battery pack 50. Figure 5 In addition to the components shown, the battery pack 50 may include Figure 5 More or fewer components, or combinations of certain components, or different arrangements of components may be shown.

[0107] As an example, combining Figure 4 The functions implemented by the sending unit 401, the acquiring unit 402 and the processing unit 403 in the battery pack encoding device 40 are similar to those Figure 5 The function of processor 501 in is the same.

[0108] Optional, such as Figure 5 As shown, the battery pack provided in the embodiment of the present application may further include a communication interface 504 .

[0109] The communication interface 504 is used to connect with other devices through a communication network. The communication network may be Ethernet, wireless access network, wireless local area network (WLAN), etc. The communication interface 504 may include an acquisition unit for receiving data and a sending unit for sending data.

[0110] In one design, in the battery pack provided in an embodiment of the present application, the communication interface can also be integrated into the processor.

[0111] Through the description of the above implementation methods, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional units is used as an example. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the device can be divided into different functional units to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0112] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When a computer executes the instructions, the computer executes each step in the method flow shown in the above method embodiment.

[0113] An embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the battery pack encoding method in the above method embodiment.

[0114] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, and a hard disk. Random Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), registers, hard disks, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any other form of computer-readable storage medium in a suitable combination of the above, or numerical values ​​in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an Application Specific Integrated Circuit (ASIC). In the embodiments of the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0115] Since the apparatus, device computer-readable storage medium, and computer program product in the embodiments of the present application can be applied to the above-mentioned method, the technical effects that can be obtained can also refer to the above-mentioned method embodiments, and the embodiments of the present application will not be described in detail here.

[0116] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A battery pack coding method, characterized in that: Applied to a target battery pack, the target battery pack is any battery pack in a photovoltaic system, and multiple battery packs in the photovoltaic system are connected via a CAN bus. The method includes: After the target battery pack is powered on, sending a negotiation request message to a first battery pack through the CAN bus, where the first battery pack is a battery pack other than the target battery pack among the multiple battery packs, and the negotiation request message includes battery pack information; Acquire a negotiation request message sent by the first battery pack through the CAN bus, and acquire battery pack information of the first battery pack from the negotiation request message; A target code is generated according to the battery pack information of the target battery pack and the battery pack information of the first battery pack, and the target code is configured on the target battery pack.

2. The battery pack coding method according to claim 1, characterized in that: The generating a target code according to the battery pack information of the target battery pack and the battery pack information of the first battery pack includes: Sort the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack to obtain an order of the target battery packs; The target codes are generated according to the sequence of the target battery packs.

3. The battery pack coding method according to claim 2, characterized in that: The step of sorting the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack includes: Determining a ranking value of the target battery pack according to the battery pack information of the target battery pack; determining a ranking value of the first battery pack according to the battery pack information of the first battery pack; The target battery pack and the first battery pack are sorted according to the sorting value of the target battery pack and the sorting value of the first battery pack.

4. The battery pack coding method according to claim 2, characterized in that: The battery pack information includes a battery pack serial number, and at least one of a battery pack model, a battery pack capacity, a battery pack state of health SOH, a battery pack initial voltage, and a battery pack initial current.

5. The battery pack coding method according to any one of claims 1 to 4, characterized in that: The method further comprises: Sending a coding confirmation message to the first battery pack via the CAN bus, wherein the coding confirmation message includes the target code; Acquire a coding confirmation message sent by the first battery pack through the CAN bus to obtain a coding of the first battery pack; In the case that there is a second battery pack in the first battery pack, it is determined that there is a coding conflict between the target battery pack and the second battery pack, and the coding of the second battery pack is the same as the target coding.

6. The battery pack coding method according to claim 5, characterized in that: The method further comprises: The target code is updated according to the battery pack information of the target battery pack and the battery pack information of the second battery pack until the updated target code is different from the code of the first battery pack.

7. The battery pack coding method according to claim 5, characterized in that: The method further comprises: In the case that the second battery pack does not exist in the first battery pack, a coding completion message is sent to a host, wherein the coding completion message includes the target code, so that the host establishes a communication connection with the target battery pack based on the target code.

8. A battery pack encoding device, characterized in that: Deployed on a target battery pack, the target battery pack is any battery pack in a photovoltaic system, multiple battery packs in the photovoltaic system are connected via a CAN bus, and the battery pack encoding device includes a sending unit, an acquiring unit, and a processing unit; The sending unit is configured to send a negotiation request message to a first battery pack through the CAN bus after the target battery pack is powered on, the first battery pack being a battery pack other than the target battery pack among the multiple battery packs, and obtain battery pack information of the first battery pack from the negotiation request message; The acquiring unit is configured to acquire, through the CAN bus, a negotiation request message sent by the first battery pack, wherein the negotiation request message includes battery pack information of the battery pack; The processing unit is used to generate a target code according to the battery pack information of the target battery pack and the battery pack information of the first battery pack, and configure the target code in the target battery pack.

9. A battery pack, characterized in that: including memory and processor; The memory is coupled to the processor; The memory is used to store computer program code, wherein the computer program code includes computer instructions; When the processor executes the computer instructions, the battery pack executes the battery pack encoding method as described in any one of claims 1-7.

10. A photovoltaic system, characterized in that: Comprising the battery pack as claimed in claim 9.