Frequency hopping table generation method and system of wireless BMS and storage medium

By generating a unique frequency hopping table in the wireless BMS and using the unique identifier of the battery module and the XOR operation of the preset salt value, the signal collision problem between battery modules is solved, and the communication quality is improved.

CN120979478APending Publication Date: 2025-11-18SUNWODA MOBILITY ENERGY TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511350845.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In existing wireless BMS technology, the frequency hopping table generated by the master and slave nodes of multiple battery modules using the same network ID leads to signal collisions and a decrease in the signal-to-noise ratio of frequency channels, resulting in poor communication quality.

Method used

The unique identifier of the battery module is obtained through the master node, a unique network ID is generated using a hash algorithm, and a random number seed is obtained by bitwise XOR operation with a preset salt value. The seed is then input into a pseudo-random number generator to generate a random number sequence, forming a unique frequency hopping table to avoid signal collisions.

Benefits of technology

Each battery module has a unique frequency hopping table, which avoids multiple communication networks transmitting and receiving data on the same frequency, thus improving communication quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120979478A_ABST
    Figure CN120979478A_ABST
Patent Text Reader

Abstract

The invention discloses a frequency hopping table generation method and system of a wireless BMS (Battery Management System) and a storage medium. The method comprises the following steps: a main node obtains a unique identifier of a battery module; performing Hash algorithm operation on the unique identifier to obtain a network ID; performing bitwise XOR operation on the network ID and a preset salt value to obtain a random number seed; and inputting the random number seed into a pseudo-random number generator to obtain a random number sequence, and generating a frequency hopping table according to the random number sequence. According to the invention, the network ID is generated through the unique identifier of the battery module, so that each battery module has the unique network ID, and the frequency hopping table is generated through the unique network ID and the preset salt value, so that each battery module has the own frequency hopping table, the situation that a plurality of communication networks transmit and receive data at the same frequency point is avoided, and the communication efficiency is improved. Therefore, the problem that the signal collision and the signal-to-noise ratio of the channel corresponding to the frequency point are reduced is solved, and the communication quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power battery management technology, and in particular to a method, system, and storage medium for generating a frequency hopping table for a wireless BMS. Background Technology

[0002] Using power batteries as a power source has become the preferred choice for various electrical devices such as automobiles and ships. Typically, power batteries consist of multiple battery modules, which in turn consist of multiple individual battery cells. During operation, a Battery Management System (BMS) is often needed to monitor the operating status of individual battery cells, such as their temperature, pressure, and voltage.

[0003] Current BMS technologies mainly include wired and wireless BMS. In wireless BMS, the master and slave nodes of a battery module communicate by frequency hopping according to a frequency hopping table. However, currently, the network IDs (Identity Documents) embedded in different battery modules are the same, resulting in identical frequency hopping tables generated by different battery modules based on these network IDs. When multiple battery modules are installed within a single power battery, the master and slave nodes of different battery modules may switch to the same frequency when communicating by frequency hopping according to the frequency hopping table. This causes multiple communication networks to transmit and receive data on the same frequency, leading to signal collisions and a decrease in the signal-to-noise ratio of the channel corresponding to that frequency, resulting in poor communication quality.

[0004] Therefore, there is still an urgent need for a frequency hopping table generation method for wireless BMS that can improve communication quality. Summary of the Invention

[0005] The main objective of this invention is to propose a frequency hopping table generation method, system, and storage medium for a wireless BMS, thereby solving the problem of poor communication quality caused by multiple communication networks transmitting and receiving data at the same frequency point, resulting in signal collisions and a decrease in the signal-to-noise ratio of the channel corresponding to the frequency point.

[0006] To achieve the above objectives, this invention proposes a method for generating a frequency hopping table for a wireless BMS, the method comprising: The master node obtains the unique identifier of the battery module, wherein the unique identifier includes the MAC address; The network ID is obtained by performing a hash algorithm on the unique identifier. A random number seed is obtained by performing a bitwise XOR operation on the network ID and the preset salt value, wherein the preset salt value is a preset random string; The random number seed is input into a pseudo-random number generator to obtain a random number sequence, and a frequency hopping table is generated based on the random number sequence, wherein the frequency hopping table is used for frequency hopping communication with slave nodes.

[0007] In some embodiments, the step of performing a hash algorithm operation on the unique identifier to obtain the network ID includes: Extract the unique identifier to obtain several byte elements, and perform a shift operation on the several byte elements to obtain a shift result; The network ID is obtained by taking the modulo of the shift result according to the hash algorithm.

[0008] In some embodiments, the step of extracting the unique identifier to obtain several byte elements and shifting the several byte elements to obtain a shift result includes: Extract the last 4 bytes of the unique identifier to obtain a 4-byte element, wherein each byte element includes an 8-bit integer; The 4-byte elements are labeled sequentially to obtain the 1st byte element, the 2nd byte element, the 3rd byte element, and the 4th byte element; The first byte element is shifted left by 24 bits, the second byte element is shifted left by 16 bits, the third byte element is shifted left by 8 bits, and the fourth byte element is not shifted left. These are then combined into a 32-bit integer to obtain the shift result.

[0009] In some embodiments, the step of performing a bitwise XOR operation on the network ID and a preset salt value to obtain a random number seed includes: Monitor the real-time status of the network channel and obtain network channel parameters, wherein the network channel parameters include received signal strength, interference level and bit error rate; The network channel parameters are quantized to obtain the preset salt value, wherein the quantization process refers to mapping the network channel parameters to quantifiable values; Perform a bitwise XOR operation on the network ID and the preset salt value to obtain the result; The result of the operation is masked to obtain the random number seed.

[0010] In some embodiments, the step of inputting the random number seed into a pseudo-random number generator to obtain a random number sequence includes: The random number seed is used as the initial state value of the pseudo-random number generator. The pseudo-random number generator is controlled to continuously recursively deduce the next state from the initial state to obtain the state values ​​of multiple states, and the multiple state values ​​are used as multiple random numbers. The random number sequence is generated based on the plurality of random numbers.

[0011] In some embodiments, generating a frequency hopping table based on the random number sequence includes: Create an empty list, scan each available channel, and count the total number of available channels to obtain the total number of available channels; Multiple frequency indexes are obtained by performing modulo operations on multiple random numbers based on the total number of available channels, wherein the modulo operation refers to calculating the remainder after dividing two numbers; Multiple frequency point indices are saved to the empty list to obtain the frequency hopping table.

[0012] In some embodiments, after generating the frequency hopping table based on the random number sequence, the method further includes: Obtain the generation time of the frequency hopping table and obtain the current time; Calculate the absolute difference between the generation time and the current time to obtain the time difference; Determine whether the time difference is greater than a preset time difference; If the time difference is greater than the preset time difference, the step of performing a bitwise XOR operation on the network ID and the preset salt value to obtain a random number seed is repeated.

[0013] In some embodiments, after generating the frequency hopping table based on the random number sequence, the method further includes: A valid time is generated based on the preset time difference, wherein the valid time refers to the validity period of the frequency hopping table; An update command is generated based on the frequency hopping table and the effective time. Send the update command to the slave node; If, within the effective time period, confirmation information of an updated frequency hopping table is received from the slave node in accordance with the update command, then frequency hopping communication is established with the slave node based on the frequency hopping table.

[0014] The present invention also proposes a frequency hopping table generation system for a wireless BMS, the frequency hopping table generation system for a wireless BMS comprising multiple battery modules, each battery module comprising a master node, and each master node in the battery module being capable of executing the frequency hopping table generation method for a wireless BMS as described above.

[0015] The present invention also proposes a storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, enable the processor to execute the frequency hopping table generation method for the wireless BMS described above.

[0016] The master node of this invention obtains the unique identifier of the battery module; performs a hash algorithm on the unique identifier to obtain the network ID; performs a bitwise XOR operation on the network ID and a preset salt value to obtain a random number seed; inputs the random number seed into a pseudo-random number generator to obtain a random number sequence, and generates a frequency hopping table based on the random number sequence; by generating the network ID through the unique identifier of the battery module, each battery module has a unique network ID; and by generating a frequency hopping table using the unique network ID plus the preset salt value, each battery module has its own frequency hopping table, avoiding the problem of signal collision and reduced signal-to-noise ratio of the channel corresponding to the frequency point caused by multiple communication networks transmitting and receiving data at the same frequency point, thus improving communication quality. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the frequency hopping table generation method for a wireless BMS in an embodiment of the present invention. Figure 2 This is another flowchart illustrating the frequency hopping table generation method for a wireless BMS in this embodiment of the invention. Figure 3 This is another flowchart illustrating the frequency hopping table generation method for a wireless BMS in this embodiment of the invention. Figure 4 This is another flowchart illustrating the frequency hopping table generation method for a wireless BMS in this embodiment of the invention. Figure 5 This is another flowchart illustrating the frequency hopping table generation method for a wireless BMS in this embodiment of the invention. Figure 6 This is another flowchart illustrating the frequency hopping table generation method for a wireless BMS in this embodiment of the invention. Figure 7 This is another flowchart illustrating the frequency hopping table generation method for a wireless BMS in this embodiment of the invention. Figure 8 This is another flowchart illustrating the frequency hopping table generation method for a wireless BMS in this embodiment of the invention. Figure 9 This is a schematic diagram of the frequency hopping table generation system for a wireless BMS according to an embodiment of the present invention; Figure 10 This is a schematic diagram of the frequency hopping table generation device for a wireless BMS according to an embodiment of the present invention.

[0018] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0019] The solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.

[0021] It should also be noted that when a component is described as "fixed to" or "set on" another component, it can be directly on the other component or there may be an intervening component present. When a component is described as "connected to" another component, it can be directly connected to the other component or there may be an intervening component present.

[0022] Furthermore, the use of terms such as "first" and "second" in this invention is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed by this invention.

[0023] To achieve the above objectives, this invention proposes a method for generating a frequency hopping table for a wireless BMS. The method for generating a frequency hopping table for a wireless BMS includes: Step S110: The master node obtains the unique identifier of the battery module; Step S120: Perform a hash algorithm operation on the unique identifier to obtain the network ID; Step S130: Perform a bitwise XOR operation on the network ID and the preset salt value to obtain a random number seed; Step S140: Input the random number seed into the pseudo-random number generator to obtain a random number sequence, and generate a frequency hopping table based on the random number sequence; The unique identifier includes the MAC address, the preset salt value is a preset random string, and the frequency hopping table is used for frequency hopping communication with slave nodes.

[0024] In this embodiment, refer to Figure 1 and Figure 9The frequency hopping table generation method for a wireless BMS can be applied to a frequency hopping table generation system for a wireless BMS. The frequency hopping table generation system for a wireless BMS includes multiple battery modules, each battery module including a master node. Each battery module consists of multiple individual battery cells, and each individual battery cell is configured with a slave node. The master node can communicate with the slave nodes of each individual battery cell to monitor each individual battery cell. In this embodiment, the master node is the main entity executing the method steps.

[0025] It's understandable that battery modules are typically used not individually, but rather in multiple units to form a power battery. When multiple battery modules are packaged into a small space, the communication between the master node of each battery module and the slave nodes of each individual battery cell can be interfered with by the communication of other battery modules. For example, currently, the network IDs built into different battery modules are the same, resulting in the same frequency hopping tables generated by different battery modules based on the network IDs. When multiple battery modules are installed in a single power battery, the master and slave nodes of different battery modules may switch to the same frequency for frequency hopping communication according to the frequency hopping tables. This causes multiple communication networks to transmit and receive data on the same frequency, leading to signal collisions and a decrease in the signal-to-noise ratio of the channel corresponding to the frequency, resulting in poor communication quality.

[0026] When the master node needs to communicate with the slave node, it can first obtain the unique identifier of the battery module. This unique identifier can be a MAC (Media Access Control, hardware controller) address. The unique identifier can be configured during battery module manufacturing. The battery module also includes a storage module, where the unique identifier can be stored. The master node can be electrically connected to the storage module, and can obtain the unique identifier from it.

[0027] After obtaining the unique identifier, the master node can process it using a hash algorithm. The master node can be configured with a hash algorithm. It can then perform calculations on the unique identifier using the hash algorithm to obtain the network ID. A hash algorithm, also known as a hashing algorithm, can transform an input of arbitrary length into an output of fixed length. For example, by performing calculations on the unique identifier using a hash algorithm, a fixed-length network ID can be obtained.

[0028] After obtaining the network ID, the master node can perform a bitwise XOR operation on the network ID and a preset salt value. The master node then uses this bitwise XOR operation to obtain a random number seed. The preset salt value is a pre-defined random string, which can be user-defined. For example, performing a bitwise XOR operation on the network ID and the preset salt value mixes the information from both, thus obtaining the random number seed.

[0029] After obtaining the random number seed, the master node can generate a random number sequence based on the seed and then generate a frequency hopping table based on the random number sequence. The frequency hopping table is used for frequency hopping communication with the slave nodes. For example, the random number seed can be processed using a linear congruential method to generate a random number sequence. The random numbers in the sequence are then mapped to channels, and a frequency hopping table is generated based on the mapped channels.

[0030] In this embodiment, the master node obtains the unique identifier of the battery module; the unique identifier is hashed to obtain the network ID; the network ID and a preset salt value are XORed to obtain a random number seed; the random number seed is input into a pseudo-random number generator to obtain a random number sequence, and a frequency hopping table is generated based on the random number sequence. The frequency hopping table is used for frequency hopping communication with the slave nodes. By generating the network ID using the unique identifier of the battery module, each battery module has a unique network ID. The frequency hopping table generated by adding the preset salt value to the unique network ID ensures that each battery module has its own frequency hopping table, avoiding signal collisions and a decrease in the signal-to-noise ratio of the channel corresponding to the frequency point caused by multiple communication networks transmitting and receiving data at the same frequency point, thus improving communication quality.

[0031] In some embodiments, the aforementioned process of hashing the unique identifier to obtain the network ID includes: Step S150: Extract the unique identifier to obtain several byte elements, and perform a shift operation on the several byte elements to obtain the shift result; Step S151: Take the modulo of the shift result according to the hash algorithm to obtain the network ID.

[0032] In this embodiment, refer to Figure 2 When the master node executes step 120, it extracts a portion of the bytes from the unique identifier for processing. The unique identifier can be a MAC address, which can include 6 bytes, typically represented in hexadecimal characters. For example, a MAC address can be [A0, B1, C2, D3, E4, F5]. The master node extracts several bytes from the unique identifier; for example, extracting the first three bytes yields [A0, B1, C2], or extracting the last four bytes yields [C2, D3, E4, F5].

[0033] Since several bytes have the same number of bits, if the master node needs to combine these bytes, it needs to shift the bytes to obtain the shifted result. For example, a MAC address can be [A0, B1, C2, D3, E4, F5]; after extracting the last four bytes, we get [C2, D3, E4, F5]. Shifting these four bytes will give us C2D3E4F5.

[0034] After the master node receives the shift result, it can perform a modulo operation on the shift result using a hash algorithm to obtain the network ID. For example, based on a preset maximum network ID value, the shift result is moduloed using a hash algorithm to output a fixed-length network ID, and the value of the network ID does not exceed the maximum network ID value. The maximum network ID value can be set according to the network protocol used.

[0035] In some embodiments, the aforementioned extraction of the unique identifier to obtain several byte elements, and the shifting of the several byte elements to obtain the shift result, includes: Step S160: Extract the last 4 bytes of the unique identifier to obtain 4-byte elements, where each byte element includes an 8-bit integer; Step S161: Mark the 4-byte elements in sequence to obtain the 1st byte element, the 2nd byte element, the 3rd byte element, and the 4th byte element; In step S162, the first byte element is shifted left by 24 bits, the second byte element is shifted left by 16 bits, the third byte element is shifted left by 8 bits, and the fourth byte element is not shifted left. These are then combined into a 32-bit integer to obtain the shift result.

[0036] In this embodiment, refer to Figure 3 When the master node executes step S150, it extracts the last 4 bytes. When the master node extracts the unique identifier, it extracts the last 4 bytes (i.e., the last four byte elements) of the unique identifier, thus obtaining 4 byte elements. Each byte element includes an 8-bit integer (binary), meaning that the integer in this embodiment refers to a binary integer. For example, the unique identifier can be a MAC address, which is generally represented by hexadecimal characters. That is, the MAC address can be [A0, B1, C2, D3, E4, F5]; extracting the last four byte elements yields [C2, D3, E4, F5].

[0037] Where [C2, D3, E4, F5] are hexadecimal numbers, which, when converted to binary, result in [1100 0010, 1101 0011, 1110 0100, 1111 0101]. For example, if [C2] is a single byte element, then when [C2] is converted from hexadecimal to binary, it becomes an 8-bit integer [1100 0010].

[0038] After the master node receives the 4-byte element, it can mark the 4-byte element. The master node marks the 4-byte element in sequence to obtain the 1st byte element, the 2nd byte element, the 3rd byte element, and the 4th byte element. For example, when the 4-byte element is [1100 0010, 1101 0011, 1110 0100, 1111 0101], the 1st byte element can be [1100 0010], the 2nd byte element can be [1101 0011], the 3rd byte element can be [1110 0100], and the 4th byte element can be [1111 0101].

[0039] Since the first, second, third, and fourth bytes have the same number of bits, a shift operation is needed to combine them. The master node shifts the first byte left by 24 bits, the second byte left by 16 bits, the third byte left by 8 bits, and does not shift the fourth byte left, combining these results into a 32-bit integer to obtain the shifted result.

[0040] For example: before the shift, the first byte could be [1100 0010], the second byte [1101 0011], the third byte [1110 0100], and the fourth byte [1111 0101]; after the shift operation, it is shown in Table 1: Table 1 In other words, by shifting the first byte element left by 24 bits, the second byte element left by 16 bits, the third byte element left by 8 bits, and without shifting the fourth byte element left, the master node can combine the first, second, third, and fourth byte elements into a 32-bit integer, thus obtaining the shifted result.

[0041] After obtaining the shift result, the master node can perform a modulo operation on the shift result using a hash algorithm to obtain the network ID. If the maximum network ID value is an 8-bit integer (i.e., eight 1s, equal to 256 in decimal), the master node can first convert the shift result to decimal, i.e., converting the binary [1100 0010 1101 0011 1110 0100 1111 0101] to decimal to obtain [3268666613]. Taking the modulo of [3268666613] (3268666613 % 256) yields the decimal number 197. Converting the decimal number 197 to binary gives [1100 0101], which is the network ID [1100 0101].

[0042] In some embodiments, the aforementioned bitwise XOR operation between the network ID and the preset salt value to obtain a random number seed includes: Step S170: Monitor the real-time status of the network channel and obtain network channel parameters; Step S171: Quantize the network channel parameters to obtain a preset salt value; Step S172: Perform a bitwise XOR operation on the network ID and the preset salt value to obtain the result. Step S173: Perform a masking operation on the calculation result to obtain a random number seed; Among them, network channel parameters include received signal strength, interference level and bit error rate, and quantization processing refers to mapping the network channel parameters to quantifiable values.

[0043] In this embodiment, refer to Figure 4 When executing step S130, the master node can set a preset salt value based on the real-time status of the network channel. The master node can monitor the network channel in real time, thereby monitoring its real-time status. By monitoring the real-time status of the network channel, the master node obtains network channel parameters, which may include received signal strength, interference level, bit error rate, etc. For example, the master node can perform a full-band scan of available network channels in real time to obtain parameters such as received signal strength, interference level, and bit error rate for each network channel. Received signal strength reflects the background noise and potential interference intensity of the network channel. Interference level can be used to identify narrowband or broadband interference sources through spectrum analysis. Bit error rate can be used to calculate the packet transmission failure rate.

[0044] After obtaining the network channel parameters, the master node can quantize these parameters to obtain a preset salt value. For example, the received signal strength, interference level, and bit error rate can be weighted and combined into a single value, and then the obtained single value can be mapped to a range from zero to the maximum network ID value to obtain the preset salt value.

[0045] After the master node obtains the preset salt value, it can perform a bitwise XOR operation on the network ID and the preset salt value to obtain the result. Then, it performs a masking operation on the result to obtain a random number seed. The masking operation can limit the bit width of the seed value to ensure that the obtained random number seed meets the requirements.

[0046] In some embodiments, the aforementioned inputting a random number seed into a pseudo-random number generator to obtain a random number sequence includes: Step S180: Use the random number seed as the initial state value of the pseudo-random number generator. Step S181: Control the pseudo-random number generator to continuously recursively deduce the next state from the initial state to obtain the state values ​​of multiple states, and use the multiple state values ​​as multiple random numbers; Step S182: Generate a random number sequence based on multiple random numbers.

[0047] In this embodiment, refer to Figure 5 When executing step S140, the master node generates a random number sequence using a pseudo-random number generator. After obtaining the random number seed, the master node can initialize the pseudo-random number generator based on the random number seed. The master node uses the random number seed as the initial state value of the pseudo-random number generator.

[0048] After the master node initializes the pseudo-random number generator, it can control the generator to generate a random number sequence based on the random number seed. The master node controls the generator to recursively calculate the next state from the initial state using a recursive formula, and then outputs the state value as a random number. The next state is then updated to the initial state, and the process repeats, recursively calculating the next state from the initial state and outputting the state value as a random number. This generates multiple random numbers, which the master node then combines to obtain the random number sequence.

[0049] In some embodiments, the aforementioned generation of the frequency hopping table based on the random number sequence includes: Step S190: Create an empty list, scan each available channel, and count the total number of available channels to obtain the total number of available channels; Step S191: Perform modulo operations on multiple random numbers according to the total number of available channels to obtain multiple frequency point indices; Step S192: Save multiple frequency point indices to an empty list to obtain a frequency hopping table; The modulo operation refers to calculating the remainder after dividing two numbers.

[0050] In this embodiment, refer to Figure 6 When executing step S140, the master node can generate a frequency hopping table based on the total number of available channels. The master node first creates an empty list. This empty list can be used to store the generated frequency point indices. After creating the empty list, the master node can obtain the total number of available channels through protocol configuration or spectrum scanning. For example, if the total number of available channels is 80.

[0051] After obtaining the total number of available channels, the master node can perform modulo operations on multiple random numbers based on the total number of available channels to obtain multiple frequency indexes. For example, the master node maps each random number to the range of 0-79 (corresponding to a total of 80 available channels). Assume the decimal random number sequence is [10398, 37344, 62226, 45408, 12369], and the total number of available channels is 80. 10398 % 80 = 38, which gives frequency index 38; similarly, 37344 % 80 = 24, 62226 % 80 = 66, 45408 % 80 = 8, 12369 % 80 = 9, which gives frequency index 24, frequency index 66, frequency index 8, and frequency index 9; where, in this embodiment, % represents the modulo operator, which means finding the remainder when two numbers are divided; for example, 10398 % 80 means finding the remainder when 10398 is divided by 80.

[0052] After the master node obtains multiple frequency indexes, it can save these indexes to an empty list, thus obtaining the frequency hopping table.

[0053] In some embodiments, after generating the frequency hopping table based on the random number sequence, the method further includes: Step S200: Obtain the generation time of the frequency hopping table and obtain the current time; Step S201: Calculate the absolute difference between the generated time and the current time to obtain the time difference; Step S202: Determine whether the time difference is greater than the preset time difference; Step S203: If the time difference is greater than the preset time difference, repeat the step of performing a bitwise XOR operation on the network ID and the preset salt value to obtain a random number seed.

[0054] In this embodiment, refer to Figure 7 After executing step S140, the master node can also periodically update the frequency hopping table. The master node can obtain the generation time of the frequency hopping table, i.e., the time when the frequency hopping table is generated. Simultaneously, the master node also obtains the current time in real time. After obtaining the generation time and the current time, the master node can calculate the absolute difference between the generation time and the current time, thus obtaining the time difference. After obtaining the time difference, the master node can determine whether the time difference is greater than a preset time difference. The preset time difference can be a pre-set update cycle for the frequency hopping table, and can be customized according to actual needs.

[0055] If the master node determines that the time difference is greater than the preset time difference, it can repeatedly perform the step of XORing the network ID and the preset salt value to obtain the random number seed, thereby generating a new frequency hopping table. If the master node determines that the time difference is less than or equal to the preset time difference, it can wait for the time difference to become greater than the preset time difference, and then repeat the step of XORing the network ID and the preset salt value to obtain the random number seed.

[0056] In some embodiments, after generating the frequency hopping table based on the random number sequence, the method further includes: Step S210: Generate a valid time based on a preset time difference; Step S211: Generate an update command based on the frequency hopping table and the effective time; Step S212: Send an update command to the slave node; Step S213: If, within the valid time, confirmation information of the updated frequency hopping table is received from the slave node according to the update command, then frequency hopping communication is carried out with the slave node according to the frequency hopping table. Among them, the effective time refers to the validity period of the frequency hopping table.

[0057] In this embodiment, refer to Figure 8 After executing step S140, the master node can also set the validity period for updating the frequency hopping table on the slave node. After generating the frequency hopping table, the master node can also generate the validity period for the table; the master node generates the validity period based on a preset time difference. After generating the validity period, the master node can generate an update command based on the frequency hopping table and the validity period. Then, the update command is sent to the slave node.

[0058] After receiving the update command, the slave node can parse it to obtain the frequency hopping table and its validity period. Within the validity period, the slave node needs to update the frequency hopping table according to the completed command, for example, by replacing the original frequency hopping table stored in the slave node with the one specified in the update command. After the update is complete, the slave node sends a confirmation message to the master node confirming that the frequency hopping table has been updated.

[0059] If the master node receives confirmation of the updated frequency hopping table from the slave node within the valid time frame, it can communicate with the slave node via frequency hopping according to the update command. If the master node does not receive confirmation of the updated frequency hopping table from the slave node within the valid time frame, it cannot communicate with the slave node via frequency hopping.

[0060] This invention obtains the unique identifier of the battery module through the master node, performs a hash algorithm on the unique identifier to obtain the network ID, performs a bitwise XOR operation on the network ID and a preset salt value to obtain a random number seed, inputs the random number seed into a pseudo-random number generator to obtain a random number sequence, and generates a frequency hopping table based on the random number sequence. The frequency hopping table is used for frequency hopping communication with the slave nodes. By generating the network ID through the unique identifier of the battery module, each battery module has a unique network ID. The frequency hopping table generated by adding the preset salt value to the unique network ID ensures that each battery module has its own frequency hopping table, avoiding the problem of signal collision and reduced signal-to-noise ratio of the channel corresponding to the frequency point caused by multiple communication networks transmitting and receiving data at the same frequency point, thus improving the communication quality.

[0061] The present invention also proposes a frequency hopping table generation system for a wireless BMS, the frequency hopping table generation system for a wireless BMS comprising multiple battery modules, each battery module comprising a master node, and each master node in the battery module being capable of executing the frequency hopping table generation method for a wireless BMS as described above.

[0062] In this embodiment, refer to Figure 9 The frequency hopping table generation system of the wireless BMS includes multiple battery modules, each containing a master node. Each battery module consists of multiple individual battery cells, and each individual battery cell is equipped with a slave node. The master node can communicate with the slave nodes of each individual battery cell to monitor each individual battery cell.

[0063] The frequency hopping table generation device for a wireless BMS in this embodiment of the invention can be a processor capable of running a frequency hopping table generation method for a wireless BMS; there is at least one processor. For example... Figure 10 As shown, the frequency hopping table generation device for the wireless BMS may include: a processor 1001 (e.g., CPU), a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to establish communication between these components. The user interface 1003 may include a display screen and an input unit, such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM or a stable, non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0064] Those skilled in the art will understand that Figure 10The structure of the frequency hopping table generation device for a wireless BMS shown does not constitute a limitation on the frequency hopping table generation device for a wireless BMS. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0065] like Figure 10 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and computer programs.

[0066] exist Figure 10 In the frequency hopping table generation device for the wireless BMS shown, the network interface 1004 is mainly used to connect to the backend server and communicate with the backend server; the user interface 1003 is mainly used to connect to the client (user terminal) and communicate with the client; and the processor 1001 can be used to call the computer program stored in the memory 1005. When the computer program is called and executed by the processor 1001, it implements the steps of the frequency hopping table generation method for the wireless BMS described above.

[0067] The present invention also proposes a storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, enable the processor to execute the frequency hopping table generation method for the wireless BMS described above.

[0068] The above description is only a part or preferred embodiment of the present invention. Neither the text nor the drawings should limit the scope of protection of the present invention. All equivalent structural transformations made using the content of the present invention specification and drawings under the overall concept of the present invention, or direct / indirect applications in other related technical fields, are included within the scope of protection of the present invention.

Claims

1. A method for generating a frequency hopping table for a wireless BMS, characterized in that, The frequency hopping table generation method of the wireless BMS comprises: The master node acquires a unique identifier of a battery module, wherein the unique identifier comprises a MAC address; The unique identifier is subjected to a hash algorithm operation to obtain a network ID; The network ID and a preset salt value are subjected to a bitwise XOR operation to obtain a random number seed, wherein the preset salt value is a preset random string; The random number seed is input into a pseudo-random number generator to obtain a random number sequence, and a frequency hopping table is generated according to the random number sequence, wherein the frequency hopping table is used for frequency hopping communication with a slave node.

2. The frequency hopping table generating method of a wireless BMS according to claim 1, wherein, The unique identifier is subjected to a hash algorithm operation to obtain a network ID, comprising: A plurality of byte elements are extracted from the unique identifier, and a plurality of the byte elements are subjected to a shift processing to obtain a shift result; The shift result is subjected to a modulo operation according to the hash algorithm to obtain the network ID.

3. The frequency hopping table generating method of a wireless BMS according to claim 2, wherein, The unique identifier is extracted to obtain a plurality of byte elements, and a plurality of the byte elements are subjected to a shift processing to obtain a shift result, comprising: The last 4 bytes of the unique identifier are extracted to obtain 4 byte elements, wherein each 1 byte element comprises an 8-bit integer; The 4 byte elements are sequentially marked to obtain a 1st byte element, a 2nd byte element, a 3rd byte element and a 4th byte element; The 1st byte element is left shifted by 24 bits, the 2nd byte element is left shifted by 16 bits, the 3rd byte element is left shifted by 8 bits, and the 4th byte element is not left shifted, and are combined into a 32-bit integer to obtain the shift result.

4. The frequency hopping table generating method of a wireless BMS according to claim 3, wherein, The network ID and a preset salt value are subjected to a bitwise XOR operation to obtain a random number seed, comprising: The real-time state of a network channel is monitored to acquire network channel parameters, wherein the network channel parameters comprise a received signal strength, an interference level and a bit error rate; The network channel parameters are subjected to a quantization processing to obtain the preset salt value, wherein the quantization processing refers to mapping the network channel parameters to quantifiable numerical values; The network ID and the preset salt value are subjected to a bitwise XOR operation to obtain an operation result; The operation result is subjected to a mask operation to obtain the random number seed.

5. The frequency hopping table generating method of a wireless BMS according to claim 4, wherein, The random number seed is input into a pseudo-random number generator to obtain a random number sequence, comprising: The random number seed is taken as an initial state value of an initial state of the pseudo-random number generator; The pseudo-random number generator is controlled to continuously recursively obtain a next state from the initial state to obtain state values of a plurality of states, and a plurality of the state values are taken as a plurality of random numbers; The random number sequence is generated according to the plurality of random numbers.

6. The frequency hopping table generating method of a wireless BMS according to claim 5, wherein, The frequency hopping table is generated according to the random number sequence, comprising: An empty list is created, and a total number of available channels is obtained by scanning each available channel; A plurality of frequency point indexes are obtained by performing a modulo operation on a plurality of the random numbers according to the total number of available channels, wherein the modulo operation refers to calculating the remainder after two numbers are divided; The plurality of frequency point indexes are saved to the empty list to obtain the frequency hopping table.

7. The frequency hopping table generating method of a wireless BMS according to claim 1, wherein, After the frequency hopping table is generated according to the random number sequence, the method further comprises: The generation time of the frequency hopping table is acquired, and a current time is acquired; calculating an absolute difference between the generation time and the current time to obtain a time difference; determining whether the time difference is greater than a preset time difference; if the time difference is greater than the preset time difference, repeating the step of performing a bitwise XOR operation between the network ID and a preset salt value to obtain a random seed.

8. The frequency hopping table generating method of a wireless BMS according to claim 7, wherein, After the frequency hopping table is generated according to the random number sequence, the method further includes: generating a valid time according to the preset time difference, wherein the valid time refers to a valid period of the frequency hopping table; generating an update command according to the frequency hopping table and the valid time; sending the update command to a slave node; if, within the valid time, confirmation information of an updated frequency hopping table fed back by the slave node according to the update command is received, then frequency hopping communication is performed according to the frequency hopping table and the slave node.

9. A frequency hopping table generation system for a wireless BMS, characterized by, The frequency hopping table generation system of the wireless BMS includes a plurality of battery modules, and each battery module includes a master node. Each master node can perform the frequency hopping table generation method of the wireless BMS according to any one of claims 1 to 8.

10. A storage medium, characterized by The storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, the processor can perform the frequency hopping table generation method of the wireless BMS according to any one of claims 1 to 8.