BMS upper computer system
By introducing key data and seed data between the BMS host computer and the BMS, and dynamically determining the seed data using random factors, the problem of low connection security between the BMS host computer and the BMS in the prior art is solved, and higher connection security and system reliability are achieved.
Patent Information
- Application Number
- CN202411650075.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-19
AI Technical Summary
The connection between the existing BMS host computer and the BMS is relatively safe and is easily intercepted by third parties through the bus analyzer for secondary development.
By introducing key data and seed data between the BMS host computer and the BMS, the seed data is dynamically determined using the number of ticks and CPU usage as random factors, ensuring that different seed data are generated in each communication, thereby preventing playback attacks.
It effectively improves the connection security between the BMS host computer and the BMS, prevents unauthorized access, ensures that only the correct BMS host computer can establish contact with the designated BMS, and enhances the system's specificity and reliability.
Smart Images

Figure CN119602948A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of host computer control, and in particular to a BMS host computer system. Background Art
[0002] The BMS host computer refers to the computer software or system that communicates with the Battery Management System (BMS) to realize functions such as monitoring the battery status of the BMS (lower computer), data collection, parameter calibration, and fault diagnosis.
[0003] In the prior art, the BMS host computer is connected to the BMS through a communication protocol. However, since the general communication protocol is too simple, a third party can intercept the data message of the BMS host computer through a bus analyzer, thereby performing secondary development on the BMS host computer, resulting in low security of the connection between the BMS host computer and the BMS. Summary of the invention
[0004] The problem solved by the present invention is how to improve the security of the connection between the BMS host computer and the BMS.
[0005] In order to solve the above problems, the present invention provides a BMS host computer system, comprising: a BMS host computer and a BMS, wherein the BMS host computer and the BMS are connected via bus communication; The BMS host computer is used to: determine the key data of the BMS according to the connection instruction, and send a request seed message to the BMS; The BMS is used to: receive the seed request message; determine seed data based on the seed request message and a random factor, and send the seed data to the BMS host computer, wherein the random factor includes a tick number and a CPU usage rate; The BMS host computer is also used to: receive the seed data returned by the BMS; determine a first encrypted seed result based on the preset encryption algorithm, according to the key data and the seed data, and send the first encrypted seed result to the BMS; The BMS is further used to: determine a second encryption seed result based on the preset encryption algorithm, according to the key data and the seed data, and verify the first encryption seed result and the second encryption seed result; when the first encryption seed result and the second encryption seed result are the same, connect to the BMS host computer, and send an identification binding success message to the BMS; The BMS host computer is also used to: receive an identification and binding success message sent by the BMS.
[0006] Optionally, determining the seed data according to a random factor includes: Converting the number of ticks into a first multi-bit array and converting the CPU usage into a second multi-bit array; According to a preset length, the first multi-bit array and the second multi-bit array are respectively split to generate a plurality of first low-bit arrays and a plurality of second low-bit arrays; According to a preset combination strategy, the first low-order array and the second low-order array are arranged to generate the seed data.
[0007] Optionally, the preset encryption algorithm includes: Performing an addition operation on the key data and the seed data to generate added data; Performing a bitwise AND operation on the added data and the key data to generate bitwise AND data; An XOR operation is performed on the bit AND data and a preset constant to generate the first encryption seed result or the second encryption seed result.
[0008] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: Sending a snapshot open message to the BMS, receiving snapshot file information returned by the BMS, and sending a snapshot read message to the BMS according to the snapshot file information; Receive the snapshot data frames of the BMS respectively, and when all the reception is completed, send a snapshot closing message to the BMS.
[0009] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: According to the acquired regular file name and quantity, a regular file open message is sent to the BMS, regular file information returned by the BMS is received, and a regular read message is sent to the BMS; Respectively receive each regular data frame of each group of sub-files in each regular file of the BMS, and when all reception is completed, send a regular closing message to the BMS.
[0010] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: Sending a factory setting unlock message and a calibration message to the BMS, wherein the calibration message includes an RTC time calibration message, a low power calibration message, a storage calibration message, a factory reset message, a current calibration message, and a sleep delay calibration message; When receiving unlock failure feedback or calibration failure feedback from the BMS, the corresponding factory setting unlock message or calibration message is resent to the BMS.
[0011] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: Send a connection message to the BMS and receive current status data returned by the BMS; Parsing the current state data to obtain parsed processing data; When the received current status data reaches a preset amount, the connection message is resent to the BMS.
[0012] Optionally, before determining the key data of the BMS according to the connection instruction and sending a request seed message to the BMS, the BMS host computer is further used to: Perform bus initialization; Obtaining a software update file, and analyzing the software update file to obtain file information; After receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: The BMS software is upgraded according to the file information.
[0013] Optionally, the BMS is also used for: When the first encrypted seed result and the second encrypted seed result are different, sending an identification binding failure message to the BMS host computer, and receiving the request seed message again; The BMS host computer is also used for: Receive the identification binding failure message sent by the BMS.
[0014] Optionally, determining the key data of the BMS according to the connection instruction, and sending a seed request message to the BMS includes: When the BMS has key data, sending the seed request message to the BMS; When the BMS does not have key data, a key write message is sent to the BMS, and after receiving a key write success message returned by the BMS, the seed request message is sent to the BMS.
[0015] The beneficial effects of the BMS host computer system of the present invention are: The BMS host computer and BMS are connected through bus communication, which can ensure the quality and security of data transmission between the BMS host computer and BMS. Then, through the random factors including the number of ticks and CPU usage, the seed data is dynamically determined, so that each communication between the BMS host computer and BMS will generate different seed data, which can effectively prevent replay attacks. Even if a third party intercepts the data of a certain communication, it cannot use the same data to launch an attack again, thereby effectively resisting replay attacks and preventing third parties from intercepting the data message of the BMS host computer through a bus analyzer, thereby performing secondary development on the BMS host computer, and ensuring the security of the connection between the BMS host computer and BMS. The key data and seed data are then combined with a preset encryption algorithm to generate an encrypted seed result to verify the authenticity of the connected BMS host computer and the BMS identity, increasing the difficulty for illegal devices or software to impersonate legitimate users to connect. Only when the encryption seed results between the BMS host computer and the BMS match can the connection be successfully established, which helps prevent unauthorized access and ensures that only the correct BMS host computer can establish contact with the designated BMS, ensuring the specificity and reliability of the system, providing secondary protection for the connection between the BMS host computer and the BMS, and effectively improving the security of the connection between the BMS host computer and the BMS. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of the structure of a BMS host computer system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be interpreted as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0018] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0019] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to"; the term "based on" means "based at least in part on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optionally" means "optional embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0020] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0021] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0022] In view of the problems existing in the above-mentioned related technologies, this embodiment provides a BMS host computer system.
[0023] like Figure 1 As shown, a BMS host computer system provided by an embodiment of the present invention includes: a BMS host computer and a BMS, wherein the BMS host computer and the BMS are connected via bus communication; Specifically, the BMS host computer is the algorithm software for controlling the BMS, which can be run on a computer or other electronic device. The operating environment can be LabView, and it is connected to the BMS through a bus, for example, a CAN bus, and can use a CAN box, Ethernet, serial communication, etc.
[0024] The BMS host computer is used to: determine the key data of the BMS according to the connection instruction, and send a seed request message to the BMS.
[0025] Specifically, when the BMS host computer is connected to the BMS, first, the user needs to issue a connection instruction, or click the connection button to issue a connection instruction. If the BMS host computer does not receive the connection instruction, it needs to re-acquire the connection instruction, that is, the user re-issues the connection instruction or re-presses the motor connection button to issue a connection instruction. Then determine the BMS key data and send a request seed message to the BMS. At this time, the BMS receives the request seed message, generates the seed data, and sends the seed data to the BMS host computer. The key data is fixed and does not appear on the communication line.
[0026] The BMS is used to: receive the seed request message; determine seed data based on the seed request message and a random factor, and send the seed data to the BMS host computer, wherein the random factor includes a tick number and a CPU usage rate.
[0027] Specifically, the BMS needs to first send the broadcast data of the lower computer to match with the BMS upper computer, so as to determine and save the key data. If the key data is not determined, the broadcast data of the lower computer is resent until the key data is determined. Then the request seed message from the BMS upper computer is received. If the request seed message is not received, it is received again until the request seed message from the BMS upper computer is received. Based on the request seed message, the BMS determines the seed data according to the random factors including the number of ticks and the CPU usage rate to ensure that the seed data is different for each connection, and then sends the seed data to the BMS upper computer, so that both the BMS upper computer and the BMS can perform more secure identity authentication. It should be noted that the random factors can be set according to the actual situation, including but not limited to the number of ticks and the CPU usage rate, and can also include random numbers such as stack pointers and sub-second numbers.
[0028] The BMS host computer is also used to: receive the seed data returned by the BMS; determine a first encrypted seed result based on a preset encryption algorithm, according to the key data and the seed data, and send the first encrypted seed result to the BMS.
[0029] Specifically, the BMS host computer receives the seed data of the BMS. If it has not received the seed data, it will receive it again until the seed data is received. Based on the preset encryption algorithm, according to the key data and the seed data, the first encrypted seed result is determined, that is, the first encrypted seed result generated by the preset encryption algorithm is used as the encrypted identity authentication to improve the security of the connection between the BMS host computer and the BMS, and a message containing the first encrypted seed result is sent to the BMS. At this time, the BMS receives the first encrypted seed result and performs verification to determine the identity of the BMS host computer and the BMS.
[0030] The BMS is also used to: determine a second encryption seed result based on the preset encryption algorithm, according to the key data and the seed data, and verify the first encryption seed result and the second encryption seed result; when the first encryption seed result and the second encryption seed result are the same, connect to the BMS host computer and send an identification binding success message to the BMS.
[0031] Specifically, since the BMS host computer and the BMS are both equipped with the same preset encryption algorithm, the first encryption seed result and the second encryption seed result determined by the BMS host computer and the BMS based on the preset encryption algorithm, according to the key data and the seed data, should be the same during verification, so as to determine the correct identities of both the BMS host computer and the BMS. If a third party uses other devices to connect, and it does not have a corresponding preset encryption algorithm, then its encryption seed results are different, which will cause the verification to fail, and other third-party devices cannot be connected to the BMS or the BMS host computer. When the first encryption seed result and the second encryption seed result are the same, the verification is successful, the BMS can connect to the BMS host computer, and send an identification binding success message to the BMS to complete the connection. The BMS host computer can perform battery status monitoring, data collection, parameter calibration, and fault diagnosis operations on the BMS.
[0032] The BMS host computer is also used to: receive an identification and binding success message sent by the BMS.
[0033] Specifically, after successful verification, the connection between the BMS host computer and the BMS is realized, that is, identification and binding are realized, and the BMS host computer receives the identification and binding success message from the BMS; if the connection fails, the steps are re-executed to re-acquire the connection instruction.
[0034] In this embodiment, the BMS host computer and the BMS are connected through bus communication, which can ensure the quality and security of data transmission between the BMS host computer and the BMS. Then, the seed data is dynamically determined through random factors including the number of ticks and the CPU usage rate, so that each communication between the BMS host computer and the BMS will generate different seed data, which can effectively prevent replay attacks. Even if a third party intercepts the data of a certain communication, it cannot use the same data to launch an attack again, thereby effectively resisting replay attacks and preventing third parties from intercepting the data message of the BMS host computer through a bus analyzer, thereby performing secondary development on the BMS host computer, and ensuring the security of the connection between the BMS host computer and the BMS. The key data and seed data are then combined with a preset encryption algorithm to generate an encrypted seed result to verify the authenticity of the connected BMS host computer and the BMS identity, increasing the difficulty for illegal devices or software to impersonate legitimate users to connect. Only when the encryption seed results between the BMS host computer and the BMS match can the connection be successfully established, which helps prevent unauthorized access and ensures that only the correct BMS host computer can establish contact with the designated BMS, ensuring the specificity and reliability of the system, providing secondary protection for the connection between the BMS host computer and the BMS, and effectively improving the security of the connection between the BMS host computer and the BMS.
[0035] Optionally, determining the seed data according to a random factor includes: Converting the number of ticks into a first multi-bit array and converting the CPU usage into a second multi-bit array; According to a preset length, the first multi-bit array and the second multi-bit array are respectively split to generate a plurality of first low-bit arrays and a plurality of second low-bit arrays; According to a preset combination strategy, the first low-order array and the second low-order array are arranged to generate the seed data.
[0036] Specifically, the number of ticks and the CPU usage rate are converted into a multi-bit array, which is an array with a data volume greater than or equal to a first preset threshold, for example, a 32-bit array or a 64-bit array, so as to generate encrypted seed data. Then, according to the preset length, the first multi-bit array and the second multi-bit array are split respectively to generate multiple first low-order arrays and multiple second low-order arrays, where the low-order array is data with a data volume less than or equal to the second preset threshold, and the first preset threshold is greater than the second preset threshold. Finally, according to the preset combination strategy, the first low-order array and the second low-order array are arranged to implement encryption operations and generate seed data with higher confidentiality. It should be understood that the preset length and the preset combination strategy can be set according to actual conditions.
[0037] Exemplarily, the present invention provides a specific embodiment to explain how to determine the seed data according to the random factor: Set the high-dimensional data to a 32-bit array, and the preset length is 4 bits, then there are 8 first low-order arrays and 8 second low-order arrays, and arrange the first low-order arrays and the second low-order arrays in ascending order, that is, the first first low-order array is the array corresponding to the "0, 1, 2, 3" bits, and the third first low-order array is the array corresponding to the "8, 9, 10, 11" bits, for the convenience of subsequent explanation. Then, according to the preset combination strategy, rearrange the first low-order array and the second low-order array to generate seed data: Take the fifth first low-order array of the tick number, i.e., bits 16 to 19, and put them into bits 28 to 31 of the seed data; take the second second low-order array of the CPU usage rate, i.e., bits 4 to 7, and put them into bits 24 to 27 of the seed data; take the first first low-order array of the tick number, i.e., bits 0 to 3, and put them into bits 20 to 23 of the seed data; take the first second low-order array of the CPU usage rate, i.e., bits 0 to 3, and put them into bits 16 to 19 of the seed data; take the third first low-order array of the tick number, i.e., bits 8 to 11, and put them into bits 12 to 15 of the seed data; take the fourth first low-order array of the tick number, i.e., bits 12 to 15, and put them into bits 8 to 11 of the seed data; take the third second low-order array of the CPU usage rate, i.e., bits 8 to 11, and put them into bits 4 to 7 of the seed data; take the second first low-order array of the tick number, i.e., bits 4 to 7, and put them into the first 4 bits of the seed data, i.e., bits 0 to 3. For example, if the number of ticks is 372693 and the CPU usage is 278, after conversion to a 32-bit array: The number of ticks is 0000 0000 0000 0101 1010 1111 1101 0101 (32 bits in total); CPU usage is 0000 0000 0000 0000 0000 0001 0001 0110 (32 bits in total); According to the preset combination strategy, the seed data is generated as follows: 0101 0001 0101 0110 1111 1010 0001 1101 (32 bits total).
[0038] Optionally, the preset encryption algorithm includes: Performing an addition operation on the key data and the seed data to generate added data; Performing a bitwise AND operation on the added data and the key data to generate bitwise AND data; An XOR operation is performed on the bit AND data and a preset constant to generate the first encryption seed result or the second encryption seed result.
[0039] Specifically, the preset encryption algorithm can be set according to actual conditions. In the present embodiment, the preset encryption algorithm is to perform an addition operation on the key data and the seed data to generate added data; then perform a bitwise AND operation on the obtained added data and the key data to generate bitwise AND data; finally, perform an XOR operation on the bitwise AND data and a preset constant to generate a first encrypted seed result or a second encrypted seed result, wherein the preset encryption algorithm of the BMS host computer obtains the first encrypted seed result, and the preset encryption algorithm of the BMS obtains the second encrypted seed result.
[0040] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: Sending a snapshot open message to the BMS, receiving snapshot file information returned by the BMS, and sending a snapshot read message to the BMS according to the snapshot file information; Receive the snapshot data frames of the BMS respectively, and when all the reception is completed, send a snapshot closing message to the BMS.
[0041] Specifically, after the BMS host computer is connected to the BMS, the BMS host computer can read historical snapshot data of the BMS. First, the BMS host computer sends a snapshot open message to the BMS to obtain the snapshot file information of the BMS. If the snapshot file information is not obtained, the snapshot open message is resent until the snapshot file information is obtained. Then, according to the snapshot file information, a snapshot read message is sent to the BMS to receive each snapshot data frame of a single group of the BMS respectively until all snapshot data frames of all groups are received. If all snapshot data frames of a single group have not been received, the snapshot data frames of the single group will continue to be received until all snapshot data frames of the single group are received. If all snapshot data frames of all groups have not been received, the snapshot read message is resent. When all reception is completed, a snapshot close message is sent to the BMS.
[0042] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: According to the acquired regular file name and quantity, a regular file open message is sent to the BMS, regular file information returned by the BMS is received, and a regular read message is sent to the BMS; Respectively receive each regular data frame of each group of sub-files in each regular file of the BMS, and when all reception is completed, send a regular closing message to the BMS.
[0043] Specifically, after the BMS host computer is connected to the BMS, the BMS host computer can read the historical conventional data of the BMS. The name and number of conventional files can be obtained through the user interface of the BMS host computer, and according to the name and number of conventional files, a conventional file open message is sent to the BMS to obtain the conventional file information of the BMS. If the conventional file information is not obtained, the conventional file open message is resent. Then a conventional read message is sent to the BMS to receive each conventional data frame of each group of subfiles in each conventional file of the BMS, wherein the BMS includes multiple conventional files, and a single conventional file includes multiple groups of subfiles, each subfile includes at least one data frame. If the conventional data frame of each group of subfiles is not received, continue to receive. If a single conventional file is not received, resend the conventional read message. If a single conventional file is received, a conventional close message is sent, and at the same time, it is detected whether all files are received. If all files are not received, resend the conventional file open message; if all files are received, end the program.
[0044] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: Sending a factory setting unlock message and a calibration message to the BMS, wherein the calibration message includes an RTC time calibration message, a low power calibration message, a storage calibration message, a factory reset message, a current calibration message, and a sleep delay calibration message; When receiving unlock failure feedback or calibration failure feedback from the BMS, the corresponding factory setting unlock message or calibration message is resent to the BMS.
[0045] Specifically, after the BMS host computer is connected to the BMS, the BMS host computer can calibrate the BMS. First, send the factory setting unlock message and calibration message to the BMS, where the calibration message includes the RTC time calibration message, low power calibration message, storage calibration message, factory reset message, current calibration message, and sleep delay calibration message; when the unlock failure feedback or calibration failure feedback is obtained, resend the corresponding factory setting unlock message or calibration message to the BMS. When the calibration is successful, the corresponding program ends.
[0046] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: Send a connection message to the BMS and receive current status data returned by the BMS; Parsing the current state data to obtain parsed processing data; When the received current status data reaches a preset amount, the connection message is resent to the BMS.
[0047] Specifically, after the BMS host computer is connected to the BMS, the BMS host computer can read the current status of the BMS. First, send a connection message to the BMS to obtain the current status data returned by the BMS; then parse the current status data to obtain parsed processing data; when the current status data reaches the preset number, resend the connection message to the BMS. The preset number can be set according to the actual situation. For example, the preset number can be set to 15. The current status data in the BMS host computer can be deleted according to the actual situation to make room.
[0048] Optionally, before determining the key data of the BMS according to the connection instruction and sending a request seed message to the BMS, the BMS host computer is further used to: Perform bus initialization; Obtaining a software update file, and analyzing the software update file to obtain file information; After receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: The BMS software is upgraded according to the file information.
[0049] Specifically, after the BMS host computer is connected to the BMS, the BMS host computer can perform software upgrades on the BMS. First, before the BMS host computer is connected to the BMS, the BMS host computer first performs CAN initialization; obtains the software update file, and analyzes the software update file to obtain file information. After the BMS host computer is connected to the BMS, the BMS host computer performs software upgrades on the BMS according to the file information.
[0050] Optionally, the BMS is also used for: When the first encrypted seed result and the second encrypted seed result are different, sending an identification binding failure message to the BMS host computer, and receiving the request seed message again; The BMS host computer is also used for: Receive the identification binding failure message sent by the BMS.
[0051] Specifically, when the first encrypted seed result and the second encrypted seed result are different, the BMS determines that the verification fails, sends an identification binding failure message to the BMS host computer, and re-receives the request seed message to reconnect. At this time, the BMS host computer receives the identification binding failure message.
[0052] Optionally, determining the key data of the BMS according to the connection instruction, and sending a seed request message to the BMS includes: When the BMS has key data, sending the seed request message to the BMS; When the BMS does not have key data, a key write message is sent to the BMS, and after receiving a key write success message returned by the BMS, the seed request message is sent to the BMS.
[0053] Specifically, the BMS host computer checks whether the BMS has key data. If so, it only sends a request seed message to the BMS; if not, it sends a write key message to the BMS. After receiving the key, the BMS will return a write success message to the BMS host computer. After the BMS host computer determines that the key data is written successfully, it sends a request seed message to the BMS again; if the BMS host computer determines that the key data fails to be written, it needs to re-acquire the connection instruction and restart the execution steps to ensure the security of the connection.
[0054] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. In the present application, the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment of the present invention. In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0055] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will fall within the protection scope of the present invention.
Claims
1. A BMS host computer system, characterized in that: include: A BMS host computer and a BMS, wherein the BMS host computer and the BMS are connected via bus communication; The BMS host computer is used to: determine the key data of the BMS according to the connection instruction, and send a seed request message to the BMS; The BMS is used to: receive the seed request message; determine seed data based on the seed request message and a random factor, and send the seed data to the BMS host computer, wherein the random factor includes a tick number and a CPU usage rate; The BMS host computer is also used to: receive the seed data returned by the BMS; determine a first encrypted seed result based on the preset encryption algorithm, according to the key data and the seed data, and send the first encrypted seed result to the BMS; The BMS is further used to: determine a second encryption seed result based on the preset encryption algorithm, according to the key data and the seed data, and verify the first encryption seed result and the second encryption seed result; when the first encryption seed result and the second encryption seed result are the same, connect to the BMS host computer, and send an identification binding success message to the BMS; The BMS host computer is also used to: receive an identification and binding success message sent by the BMS.
2. The BMS host computer system according to claim 1, characterized in that: The step of determining the seed data according to the random factor comprises: Converting the number of ticks into a first multi-bit array and converting the CPU usage into a second multi-bit array; According to a preset length, the first multi-bit array and the second multi-bit array are respectively split to generate a plurality of first low-bit arrays and a plurality of second low-bit arrays; According to a preset combination strategy, the first low-order array and the second low-order array are arranged to generate the seed data.
3. The BMS host computer system according to claim 1, characterized in that: The preset encryption algorithm includes: Performing an addition operation on the key data and the seed data to generate added data; Performing a bitwise AND operation on the added data and the key data to generate bitwise AND data; An XOR operation is performed on the bit AND data and a preset constant to generate the first encryption seed result or the second encryption seed result.
4. The BMS host computer system according to claim 1, characterized in that: After receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: Sending a snapshot open message to the BMS, receiving snapshot file information returned by the BMS, and sending a snapshot read message to the BMS according to the snapshot file information; Receive the snapshot data frames of the BMS respectively, and when all the reception is completed, send a snapshot closing message to the BMS.
5. The BMS host computer system according to claim 1, characterized in that: After receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: According to the acquired regular file name and quantity, a regular file open message is sent to the BMS, regular file information returned by the BMS is received, and a regular read message is sent to the BMS; Respectively receive each regular data frame of each group of sub-files in each regular file of the BMS, and when all reception is completed, send a regular closing message to the BMS.
6. The BMS host computer system according to claim 1, characterized in that: After receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: Sending a factory setting unlock message and a calibration message to the BMS, wherein the calibration message includes an RTC time calibration message, a low power calibration message, a storage calibration message, a factory reset message, a current calibration message, and a sleep delay calibration message; When receiving unlock failure feedback or calibration failure feedback from the BMS, the corresponding factory setting unlock message or calibration message is resent to the BMS.
7. The BMS host computer system according to claim 1, characterized in that: After receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: Send a connection message to the BMS and receive current status data returned by the BMS; Parsing the current state data to obtain parsed processing data; When the received current status data reaches a preset amount, the connection message is resent to the BMS.
8. The BMS host computer system according to claim 1, characterized in that: Before determining the key data of the BMS according to the connection instruction and sending a request seed message to the BMS, the BMS host computer is further used to: Perform bus initialization; Obtaining a software update file, and analyzing the software update file to obtain file information; After receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to: The BMS software is upgraded according to the file information.
9. The BMS host computer system according to claim 1, characterized in that: The BMS is also used to: When the first encrypted seed result and the second encrypted seed result are different, sending an identification binding failure message to the BMS host computer, and receiving the request seed message again; The BMS host computer is also used for: Receive the identification binding failure message sent by the BMS.
10. The BMS host computer system according to claim 1, characterized in that: The step of determining the key data of the BMS according to the connection instruction and sending a seed request message to the BMS includes: When the BMS has key data, sending the seed request message to the BMS; When the BMS does not have key data, a key write message is sent to the BMS, and after receiving a key write success message returned by the BMS, the seed request message is sent to the BMS.
Citation Information
Patent Citations
Generation method of encryption keys
CN104660398A
Intelligent device security access method and system
CN106330456A
Equipment ID generation method and device and equipment ID processing method and device of electronic equipment
CN112787994A
LoRa sub-device secure reconnection method based on random key mechanism and communication system
CN115119203A
Intranet identity authentication method based on quantum random number generator
CN115242410A
Cited By
Control method and control device of battery management system and storage medium
CN121486414A
Dual-communication converged upper computer system
CN122226536A