BMS host computer system
By establishing a bus communication connection between the BMS host computer and the BMS, using the tick count and CPU usage to generate dynamic seed data, and combining key data and encryption algorithm for identity authentication, the problem of low security in the connection between the BMS host computer and the BMS is solved, and effective prevention of replay attacks and unauthorized access is achieved, thereby improving the security and reliability of the system.
Patent Information
- Application Number
- CN202411650075.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-11-19
AI Technical Summary
The connection between the existing BMS host computer and the BMS is less secure and can easily be intercepted by a third party through a bus analyzer for secondary development.
Through the bus communication connection between the BMS host computer and the BMS, the seed data is dynamically determined using the tick number and CPU usage as random factors, and the encrypted seed result is generated by combining the key data and the preset encryption algorithm. Identity authentication and connection verification are performed to ensure that only the correct BMS host computer establishes a connection with the BMS.
It effectively prevents replay attacks, improves the connection security between the BMS host computer and the BMS, prevents unauthorized access, and ensures the specificity and reliability of the system.
Smart Images

Figure CN119602948B_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 implement functions such as monitoring the battery status of the BMS (slave computer), data collection, parameter calibration, and fault diagnosis.
[0003] In the existing technology, the BMS host computer is connected to the BMS through a communication protocol. However, since the general communication protocol is too simple, third-party personnel can intercept the data messages of the BMS host computer through a bus analyzer and conduct secondary development of 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 a bus communication;
[0006] 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;
[0007] The BMS is configured 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;
[0008] The BMS host computer is further configured to: receive the seed data returned by the BMS; determine a first encrypted seed result based on the key data and the seed data based on a preset encryption algorithm, and send the first encrypted seed result to the BMS;
[0009] The BMS is further configured to: determine a second encryption seed result based on the preset encryption algorithm, 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 and binding success message to the BMS;
[0010] The BMS host computer is further configured to receive an identification and binding success message sent by the BMS.
[0011] Optionally, determining the seed data according to a random factor includes:
[0012] Converting the number of ticks into a first multi-bit array and converting the CPU usage into a second multi-bit array;
[0013] Splitting the first multi-bit array and the second multi-bit array respectively according to a preset length to generate a plurality of first low-bit arrays and a plurality of second low-bit arrays;
[0014] According to a preset combination strategy, the first low-order array and the second low-order array are arranged to generate the seed data.
[0015] Optionally, the preset encryption algorithm includes:
[0016] Performing an addition operation on the key data and the seed data to generate added data;
[0017] Performing a bitwise AND operation on the added data and the key data to generate bitwise AND data;
[0018] 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.
[0019] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further configured to:
[0020] 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 based on the snapshot file information;
[0021] Receive the snapshot data frames of the BMS respectively, and when all reception is completed, send a snapshot close message to the BMS.
[0022] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further configured to:
[0023] According to the obtained regular file name and number, 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;
[0024] Receive each regular data frame of each group of sub-files in each regular file of the BMS respectively, and when all reception is completed, send a regular closing message to the BMS.
[0025] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further configured to:
[0026] 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;
[0027] 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.
[0028] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further configured to:
[0029] Send a connection message to the BMS and receive the current status data returned by the BMS;
[0030] Parsing the current state data to obtain parsed data;
[0031] When the received current status data reaches a preset amount, the connection message is resent to the BMS.
[0032] Optionally, before determining the key data of the BMS according to the connection instruction and sending a seed request message to the BMS, the BMS host computer is further configured to:
[0033] Perform bus initialization;
[0034] Obtaining a software update file and analyzing the software update file to obtain file information;
[0035] After receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to:
[0036] The BMS software is upgraded according to the file information.
[0037] Optionally, the BMS is further configured to:
[0038] When the first encrypted seed result and the second encrypted seed result are different, sending a binding failure identification message to the BMS host computer, and re-receiving the seed request message;
[0039] The BMS host computer is also used to:
[0040] Receive the identification binding failure message sent by the BMS.
[0041] Optionally, determining the key data of the BMS according to the connection instruction and sending a seed request message to the BMS includes:
[0042] When the BMS has key data, sending the seed request message to the BMS;
[0043] When the BMS does not have key data, a write key message is sent to the BMS, and after receiving a key write success message returned by the BMS, the request seed message is sent to the BMS.
[0044] The beneficial effects of the BMS host computer system of the present invention are:
[0045] The BMS host computer and the BMS are connected via bus communication, which ensures the quality and security of data transmission between the BMS host computer and the BMS. The seed data is then dynamically determined using random factors including tick count and CPU usage, so that each communication between the BMS host computer and the BMS generates different seed data. This effectively prevents replay attacks. Even if a third party intercepts the data from a particular communication, they cannot launch a second attack using the same data. This effectively defends against replay attacks and prevents third parties from intercepting the BMS host computer's data messages through a bus analyzer, thereby preventing secondary development of the BMS host computer. This ensures the security of the connection between the BMS host computer and the BMS. Then, the key data and seed data are 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, which increases 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
[0046] Figure 1 This is a schematic diagram of the structure of the BMS host computer system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, specific embodiments of the present invention are described in detail below with reference to 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 construed as being limited to the embodiments described herein. Instead, 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 for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0048] 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.
[0049] 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.
[0050] It should be noted that the modifications of "one" and "multiple" mentioned in the present invention are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0051] 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.
[0052] In response to the problems existing in the above-mentioned related technologies, this embodiment provides a BMS host computer system.
[0053] like Figure 1 As shown, an embodiment of 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 a bus communication;
[0054] 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.
[0055] 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.
[0056] Specifically, when connecting to a BMS, the user first issues a connection command or clicks the connect button. If the BMS does not receive the connection command, it must retrieve it. This requires the user to reissue the connection command or re-press the connect button. The BMS then determines the BMS key data and sends a seed request message to the BMS. Upon receiving the seed request message, the BMS generates the seed data and sends it to the BMS. The key data is fixed and does not appear on the communication line.
[0057] The BMS is configured 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.
[0058] 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 random factors including the number of ticks and CPU usage to ensure that the seed data is different for each connection, and then sends the seed data to the BMS upper computer to facilitate more secure identity authentication for both the BMS upper computer and the BMS. It should be noted that the random factors can be set according to actual conditions, including but not limited to the number of ticks and CPU usage, and can also include random numbers such as stack pointers and sub-second numbers.
[0059] The BMS host computer is further configured to: receive the seed data returned by the BMS; determine a first encrypted seed result based on the key data and the seed data based on a preset encryption algorithm, and send the first encrypted seed result to the BMS.
[0060] Specifically, the BMS host computer receives the seed data from the BMS. If it has not received the data, it will re-receive it until the seed data is received. Based on the preset encryption algorithm, the first encrypted seed result is determined according to the key data and the seed data. That is, the first encrypted seed result generated by the preset encryption algorithm is used as encrypted identity authentication to improve the security of the connection between the BMS host computer and the BMS. 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.
[0061] The BMS is further configured 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 and binding success message to the BMS.
[0062] 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, thereby determining 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 will be 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 operations such as battery status monitoring, data acquisition, parameter calibration, and fault diagnosis on the BMS.
[0063] The BMS host computer is further configured to receive an identification and binding success message sent by the BMS.
[0064] 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.
[0065] In this embodiment, the BMS host computer and the BMS are connected via 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 using random factors including the number of ticks and CPU utilization. Therefore, each communication between the BMS host computer and the BMS generates different seed data, which can effectively prevent replay attacks. Even if a third party intercepts the data of a certain communication, it cannot launch an attack again with the same data. This effectively resists replay attacks and prevents third parties from intercepting the BMS host computer's data messages through a bus analyzer and conducting secondary development on the BMS host computer, thus ensuring the security of the connection between the BMS host computer and the BMS. Then, the key data and seed data are 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, which increases 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.
[0066] Optionally, determining the seed data according to a random factor includes:
[0067] Converting the number of ticks into a first multi-bit array and converting the CPU usage into a second multi-bit array;
[0068] Splitting the first multi-bit array and the second multi-bit array respectively according to a preset length to generate a plurality of first low-bit arrays and a plurality of second low-bit arrays;
[0069] According to a preset combination strategy, the first low-order array and the second low-order array are arranged to generate the seed data.
[0070] Specifically, the number of ticks and the CPU usage rate are converted into multi-bit arrays, respectively. The multi-bit array 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. 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 the encryption operation 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.
[0071] Exemplarily, the present invention provides a specific embodiment to explain how to determine the seed data according to a random factor:
[0072] Set the high-dimensional data to a 32-bit array with a preset length of 4 bits. Then, there are 8 first-low-order arrays and 8 second-low-order arrays. 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:
[0073] Take the fifth first-lowest-order array of the tick number, that is, bits 16 to 19, and put them into bits 28-31 of the seed data; take the second second-lowest-order array of the CPU usage rate, that is, bits 4 to 7, and put them into bits 24-27 of the seed data; take the first first-lowest-order array of the tick number, that is, bits 0 to 3, and put them into bits 20-23 of the seed data; take the first second-lowest-order array of the CPU usage rate, that is, bits 0 to 3, and put them into bits 16-19 of the seed data; take the third first-lowest-order array of the tick number, that is, bits 8 to 11, and put them into bits 12-15 of the seed data; take the fourth first-lowest-order array of the tick number, that is, bits 12 to 15, and put them into bits 8-11 of the seed data; take the third second-lowest-order array of the CPU usage rate, that is, bits 8 to 11, and put them into bits 4-7 of the seed data; take the second first-lowest-order array of the tick number, that is, bits 4 to 7, and put them into the first 4 bits of the seed data, that is, bits 0-3. For example, if the tick count is 372693 and the CPU usage is 278, after converting to a 32-bit array:
[0074] The number of ticks is 0000 0000 0000 0101 1010 1111 1101 0101 (32 bits in total);
[0075] CPU usage is 0000 0000 0000 0000 0000 0001 0001 0110 (32 bits in total);
[0076] According to the preset combination strategy, the seed data is generated as follows:
[0077] 0101 0001 0101 0110 1111 1010 0001 1101 (32 bits in total).
[0078] Optionally, the preset encryption algorithm includes:
[0079] Performing an addition operation on the key data and the seed data to generate added data;
[0080] Performing a bitwise AND operation on the added data and the key data to generate bitwise AND data;
[0081] 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.
[0082] Specifically, the preset encryption algorithm can be set according to actual conditions. In this 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 encryption seed result or a second encryption seed result, wherein the preset encryption algorithm of the BMS host computer obtains the first encryption seed result, and the preset encryption algorithm of the BMS obtains the second encryption seed result.
[0083] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further configured to:
[0084] 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 based on the snapshot file information;
[0085] Receive the snapshot data frames of the BMS respectively, and when all reception is completed, send a snapshot close message to the BMS.
[0086] Specifically, after the BMS host computer is connected to the BMS, the BMS host computer can read the 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 a single group will continue to be received until all snapshot data frames of a 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.
[0087] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further configured to:
[0088] According to the obtained regular file name and number, 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;
[0089] Receive each regular data frame of each group of sub-files in each regular file of the BMS respectively, and when all reception is completed, send a regular closing message to the BMS.
[0090] Specifically, after the BMS host computer is connected to the BMS, the BMS host computer can read the historical routine data of the BMS. The name and number of the routine file can be obtained through the user interface of the BMS host computer, and according to the name and number of the routine file, a routine file open message is sent to the BMS to obtain the routine file information of the BMS. If the routine file information is not obtained, the routine file open message is resent. Then a routine read message is sent to the BMS to receive each routine data frame of each group of subfiles in each routine file of the BMS, wherein the BMS includes multiple routine files, and a single routine file includes multiple groups of subfiles, and each subfile includes at least one data frame. If the routine data frame of each group of subfiles is not received, continue to receive. If a single routine file is not received, resend the routine read message. If a single routine file is received, a routine 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 routine file open message; if all files are received, end the program.
[0091] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further configured to:
[0092] 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;
[0093] 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.
[0094] Specifically, after the BMS host computer is connected to the BMS, it can calibrate the BMS. First, it sends a factory settings unlock message and a calibration message to the BMS. Calibration messages include RTC time calibration messages, low power calibration messages, storage calibration messages, factory reset messages, current calibration messages, and sleep delay calibration messages. If it receives feedback that the unlock or calibration has failed, it resends the corresponding factory settings unlock message or calibration message to the BMS. If the calibration is successful, the corresponding procedure ends.
[0095] Optionally, after receiving the identification and binding success message sent by the BMS, the BMS host computer is further configured to:
[0096] Send a connection message to the BMS and receive the current status data returned by the BMS;
[0097] Parsing the current state data to obtain parsed data;
[0098] When the received current status data reaches a preset amount, the connection message is resent to the BMS.
[0099] Specifically, after the BMS host computer connects to the BMS, it can read the BMS's current status. First, it sends a connection message to the BMS and receives the current status data returned by the BMS. It then parses the current status data to obtain processed data. When the current status data reaches a preset number, it resends a connection message to the BMS. The preset number can be set based on actual conditions; for example, it can be set to 15. Current status data in the BMS host computer can be deleted to free up space.
[0100] Optionally, before determining the key data of the BMS according to the connection instruction and sending a seed request message to the BMS, the BMS host computer is further configured to:
[0101] Perform bus initialization;
[0102] Obtaining a software update file and analyzing the software update file to obtain file information;
[0103] After receiving the identification and binding success message sent by the BMS, the BMS host computer is further used to:
[0104] The BMS software is upgraded according to the file information.
[0105] Specifically, after the BMS host computer connects to the BMS, it can perform a software upgrade. First, before connecting to the BMS, the BMS host computer performs CAN initialization, obtains a software update file, and analyzes it to obtain file information. After the BMS host computer connects to the BMS, it performs a software upgrade based on the file information.
[0106] Optionally, the BMS is further configured to:
[0107] When the first encrypted seed result and the second encrypted seed result are different, sending a binding failure identification message to the BMS host computer, and re-receiving the seed request message;
[0108] The BMS host computer is also used to:
[0109] Receive the identification binding failure message sent by the BMS.
[0110] Specifically, when the first encryption seed result and the second encryption seed result are different, the BMS determines that the verification has failed, 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.
[0111] Optionally, determining the key data of the BMS according to the connection instruction and sending a seed request message to the BMS includes:
[0112] When the BMS has key data, sending the seed request message to the BMS;
[0113] When the BMS does not have key data, a write key message is sent to the BMS, and after receiving a key write success message returned by the BMS, the request seed message is sent to the BMS.
[0114] 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 writing fails, it needs to re-acquire the connection instruction and restart the execution steps to ensure the security of the connection.
[0115] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM). In this application, the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in a single location or distributed across multiple network elements. Some or all of these units can be selected based on actual needs to achieve the objectives of the embodiments of the present invention. Furthermore, the functional units in the various embodiments of the present invention can be integrated into a single processing unit, each unit can exist physically separately, or two or more units can be integrated into a single unit. These integrated units can be implemented in either hardware or software functional units.
[0116] 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 request seed message to the BMS; The BMS is configured 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 further configured to: receive the seed data returned by the BMS; determine a first encrypted seed result based on the key data and the seed data based on a preset encryption algorithm, and send the first encrypted seed result to the BMS; The BMS is further configured to: determine a second encryption seed result based on the preset encryption algorithm, 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 and binding success message to the BMS; The BMS host computer is further configured to: receive an identification and binding success message sent by the BMS; The step of determining the seed data according to the 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; Splitting the first multi-bit array and the second multi-bit array respectively according to a preset length 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.
2. 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.
3. 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 based on the snapshot file information; Receive the snapshot data frames of the BMS respectively, and when all reception is completed, send a snapshot close message to the BMS.
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: According to the obtained regular file name and number, 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; Receive each regular data frame of each group of sub-files in each regular file of the BMS respectively, and when all reception is completed, send a regular 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: 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.
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: Send a connection message to the BMS and receive the current status data returned by the BMS; Parsing the current state data to obtain parsed data; When the received current status data reaches a preset amount, the connection message is resent to the BMS.
7. 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 seed request message to the BMS, the BMS host computer is further configured 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.
8. 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 a binding failure identification message to the BMS host computer, and re-receiving the seed request message; The BMS host computer is also used to: Receive the identification binding failure message sent by the BMS.
9. 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 write key message is sent to the BMS, and after receiving a key write success message returned by the BMS, the request seed message is sent to the BMS.
Citation Information
Patent Citations
Intelligent device security access method and system
CN106330456A
Data transmission method and system, and electric vehicle
WO2024104218A1