Calibration parameter security access method, device, system, equipment and storage medium

By generating dynamic keys in the battery management system and verifying key consistency, the risk of loss and tampering during calibration data access is resolved, ensuring the normal operation of the battery management system and the vehicle.

CN122268568APending Publication Date: 2026-06-23CONTEMPORARY AMPEREX TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In the prior art, there is a risk of loss and tampering of battery parameter calibration data during access and update, which affects the normal operation of the battery management system and the vehicle.

Method used

By receiving a secure access request from the host computer, generating a dynamic key, and verifying that the real-time key on the host computer is consistent with the local real-time key, a secure access channel is established to ensure that the access and update process of the calibration parameters is encrypted and secure.

Benefits of technology

Effectively prevents the loss and tampering of calibration parameters, ensuring the normal operation of the battery management system and the vehicle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122268568A_ABST
    Figure CN122268568A_ABST
Patent Text Reader

Abstract

The application discloses a kind of calibration parameter security access method, device, system, equipment and storage medium, the method includes: the access method of calibration parameter, characterized in that, method includes: receiving the security access request sent by host computer, dynamic key generation information is sent to host computer;The access request is used to request to access the battery parameter to be calibrated, and obtain decryption information;Local real-time key is generated based on dynamic key generation information;Receive the host computer side real-time key sent by host computer, and in the case where host computer side real-time key is consistent with local real-time key, it is determined that the channel decryption of access battery parameter to be calibrated succeeds;Host computer side real-time key is generated according to dynamic key generation information.The application can prevent calibration data loss and tampering, to ensure that battery management system normal operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of batteries, specifically to a method, apparatus, system, device, and storage medium for secure access to calibration parameters. Background Technology

[0002] With the rapid development of new energy vehicles, battery systems, as core components of these vehicles, have become a crucial area for research and improvement. For example, to enhance the power and safety performance of battery systems, it is necessary to continuously optimize and adjust battery parameters, and the adjusted data needs to be updated in the BMS (Battery Management System).

[0003] Currently, automobiles are becoming increasingly intelligent, and the Internet of Things is placing higher demands on data security. Secure access to and updates of battery parameters can ensure data security and reliability, providing strong support for vehicle performance optimization and safety assurance.

[0004] It should be noted that the above statements are only used to provide background information related to this application and do not necessarily constitute prior art. Summary of the Invention

[0005] In view of the above problems, embodiments of this application provide a method, apparatus, system, device and storage medium for secure access to calibration parameters, which can prevent calibration data loss and tampering, so as to ensure the normal operation of the battery management system.

[0006] In a first aspect, embodiments of this application provide a method for secure access to calibration parameters, the method comprising:

[0007] A method for accessing calibration parameters, characterized in that the method includes:

[0008] Upon receiving a security access request from the host computer, dynamic key generation information is sent to the host computer; the access request is used to request access to the battery parameters to be calibrated and to obtain decryption information.

[0009] Generate a local real-time key based on the dynamic key generation information;

[0010] The system receives the host computer-side real-time key sent by the host computer, and if the host computer-side real-time key is consistent with the local real-time key, it determines that the channel for accessing the battery parameters to be calibrated has been successfully decrypted; the host computer-side real-time key is generated according to the dynamic key generation information.

[0011] In this embodiment, after receiving a secure access request from the host computer, dynamic key generation information can be sent to the host computer to generate a host computer-side real-time key. A local real-time key is then generated based on the dynamic key generation information. The host computer-side real-time key and the local real-time key are then verified to be consistent. If the two keys match, the secure channel for accessing the battery parameters to be calibrated is confirmed to have been successfully decrypted. Thus, during the operation of the battery management system and during the driving of a vehicle using a battery as its power system, when the host computer accesses and updates the calibration parameters, it must first decrypt the channel for accessing the calibration parameters. Only after successful decryption can the calibration parameters be accessed and updated. This prevents the risk of loss or tampering of the calibration parameters in the battery management system, thereby ensuring the normal operation of the battery management system and the vehicle.

[0012] In some optional embodiments, the dynamic key generation information includes a random number, and the generation of a local real-time key based on the dynamic key generation information includes: determining a preset initial key and the random number sent to the host computer; and generating the local real-time key based on the random number and the initial key using a preset security algorithm.

[0013] In this embodiment, after receiving a security access request from the host computer, the battery management system generates a random number and sends it to the host computer. Furthermore, the battery management system needs to generate a local real-time key based on this random number and the initial key. Therefore, the random number sent to the host computer can be reconfirmed before generating the local real-time key, ensuring that both the host computer and the battery management system use the same random number to generate the real-time key, thereby further guaranteeing the correctness of decryption. Additionally, using a random number to generate the local real-time key increases the randomness of encryption, prevents pattern attacks, and enhances the unpredictability of the ciphertext.

[0014] In some optional embodiments, the step of generating the local real-time key based on the random number and the initial password using a preset security algorithm includes: expanding the initial key to obtain a round key; performing multiple rounds of encryption operations based on the random number, the initial key, and the round key to generate the local real-time key; each round of encryption operation includes one or more of byte substitution, row shifting, column mixing, and bitwise XOR operations.

[0015] In this embodiment, a round key is used to generate the real-time key. Different round keys can be used in each round, meaning each round uses an independent subkey. This prevents attackers from cracking the entire encryption process by analyzing a single key, increasing the difficulty of cracking. Furthermore, by changing the key expansion algorithm or the number of rounds, the security and performance of the algorithm can be flexibly adjusted.

[0016] In some optional embodiments, the dynamic key generation information includes a randomly selected encryption algorithm, and the generation of a local real-time key based on the dynamic key generation information includes: determining a preset initial key and the encryption algorithm sent to the host computer; and generating the local real-time key based on the initial key and the randomly selected encryption algorithm.

[0017] In this embodiment, the encryption algorithm sent to the host computer can be reconfirmed before generating the local real-time key, ensuring that the host computer and the battery management system use the same encryption algorithm to generate the real-time key, thereby further guaranteeing the correctness of decryption. Similarly, using a randomly selected encryption algorithm to generate the key for each decryption can also increase the randomness of the encryption algorithm, prevent pattern attacks, and enhance the unpredictability of the ciphertext.

[0018] In some optional embodiments, the method further includes: sending a decryption success message to the host computer and establishing a secure access channel with the host computer; receiving a data request sent by the host computer and performing the steps of asynchronously reading data or asynchronously writing data corresponding to the data request.

[0019] In this embodiment, after successful decryption, the battery management system (BMS) can send a notification to the host computer indicating that a secure access channel has been established. The host computer can then send a keep-connection request, a calibration request, or a flash request to the BMS to maintain the secure access channel. Specifically, if a calibration or flash request is sent, the address and value of the data to be calibrated must be sent. If a keep-connection request is sent, the BMS does not exit the current decryption process; the host computer and BMS are considered to remain connected. The host computer can continuously access the calibration data without needing to resend the address for reading data, and can also read and receive data from the BMS.

[0020] In some optional embodiments, the method further includes: if no data request or keep-connection request is received from the host computer within a preset time period, then disconnecting the secure access channel with the host computer.

[0021] In this embodiment, if no data request or connection keep-alive request is received from the host computer within a preset time period, the current decryption process can be safely exited, and the secure access channel between the host computer and the host computer will be disconnected. If the host computer needs to re-enter, it needs to decrypt again, thereby further enhancing the security of the calibration data.

[0022] Secondly, embodiments of this application provide a calibration parameter secure access device, the device comprising:

[0023] The request receiving module is used to receive a security access request sent by the host computer and send the dynamic key generation information to the host computer; the security access request is used to request access to the battery parameters to be calibrated and to obtain the dynamic key generation information;

[0024] A key generation module is used to generate a local real-time key based on the dynamic key generation information.

[0025] The decryption determination module is used to receive the host computer-side real-time key sent by the host computer, and determine that the channel for accessing the battery parameters to be calibrated has been successfully decrypted if the host computer-side real-time key is consistent with the local real-time key; the host computer-side real-time key is generated according to the dynamic key generation information.

[0026] Thirdly, embodiments of this application provide a calibration parameter secure access system, the system including a host computer and a battery management unit;

[0027] The battery management unit is configured to receive a security access request sent by a host computer, send the dynamic key generation information to the host computer, request access to the battery parameters to be calibrated, and obtain the dynamic key generation information; generate a local real-time key based on the dynamic key generation information; receive the host computer-side real-time key sent by the host computer, and determine that the channel for accessing the battery parameters to be calibrated has been successfully decrypted if the host computer-side real-time key is consistent with the local real-time key.

[0028] The host computer is used to send a security access request to the battery management unit, and after receiving the dynamic key generation information, it generates the host computer-side real-time key based on the dynamic key generation information.

[0029] Fourthly, embodiments of this application provide an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor running the computer program to implement the method as described in the first aspect.

[0030] Fifthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the method described in the first aspect.

[0031] The above description is merely an overview of the technical solutions of the embodiments of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0032] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiments below. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0033] Figure 1 This is a flowchart illustrating a method for secure access to calibration parameters provided in some embodiments of this application;

[0034] Figure 2 This is a schematic diagram of the specific process of step S400 in some embodiments of this application;

[0035] Figure 3 This is a schematic flowchart illustrating the secure access method for calibration parameters provided in other embodiments of this application.

[0036] Figure 4 Detailed flowcharts of the calibration parameter secure access method provided in some embodiments of this application;

[0037] Figure 5 This application provides schematic diagrams illustrating the framework of a secure access device for calibration parameters according to some embodiments.

[0038] Figure 6 This is a schematic diagram illustrating the framework of a secure access system for calibration parameters provided in some embodiments of this application.

[0039] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0040] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which embodiments of this application pertain; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the embodiments of this application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings of this application are intended to cover non-exclusive inclusion.

[0042] In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0043] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0044] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0045] The following is an explanation of some of the technical terms used in this application:

[0046] The Battery Management Unit (BMU) is the core component of the Battery Management System (BMS). It is responsible for monitoring and managing the battery status. Through various sensors connected to the battery pack, it can collect key parameters such as battery voltage, current, and temperature in real time, monitor battery voltage, temperature, current, insulation status, etc., and perform calculations and performance analysis based on the collected key parameters to perform equalization management, thermal management, high-voltage power supply management, estimate remaining capacity, and battery health status.

[0047] Online calibration refers to the process of dynamically adjusting and optimizing calibration parameters during the operation of equipment or system by using real-time collected data and analysis results.

[0048] The calibration parameters mentioned above can be any battery parameters, including but not limited to charge / discharge power parameters, algorithm judgment thresholds, fault protection thresholds, and other data used to calibrate, verify, or adjust the performance of the battery system and algorithm. Examples include battery voltage, temperature, state of charge, charging rate, and discharge power. Those skilled in the art can set these parameters as needed. The specific values ​​of the calibration parameters can be called calibration values. These calibration values ​​can be threshold values ​​at which the calibration parameters reach certain indicators, such as the minimum operating temperature or temperature threshold of the battery, and the maximum current value allowed to pass through the battery during charging and discharging. It is understood that the same calibration parameters of a battery can have different calibration values ​​under different operating environments. For example, in a colder city A, the minimum operating temperature of the battery can be -30℃ or -40℃; while in a warmer city B, the minimum operating temperature of the battery can be -10℃ or 0℃.

[0049] A calibration parameter file is used to store and define calibration parameters and their calibration values, and may contain the calibration values ​​and storage addresses of the calibration parameters. In this embodiment, after the battery is first installed and used, an initial calibration parameter file can be generated based on the determined calibration parameters, calibration values, and their storage addresses. During battery use, a new calibration parameter file can be generated based on the updated calibration values ​​and their storage addresses.

[0050] The program flash memory (Pflash) of a battery management system is also the main memory of a microcontroller or embedded system. It is primarily used to store program code or read-only data, such as battery control algorithms, system configurations, and calibration programs, and can also store battery parameters. Pflash has faster read and write speeds, making it more suitable for storing frequently accessed program code and data.

[0051] The data flash memory area (Dflash) of the battery management system is mainly used to store non-volatile data, such as battery status data, historical data, calibration parameters, etc. Furthermore, Dflash has a long lifespan and durability, making it more suitable for storing this relatively static data.

[0052] Random-Access Memory (RAM) in a battery management system is a type of running memory used to temporarily store data. Unlike Flash and DRAM, RAM operations do not involve the complex processes of erasing and writing to specific states. It directly supports random access and fast read / write. RAM is volatile, meaning data is lost when power is off. It is dynamically stored; data is lost each time the device is powered off and refreshed upon power-on.

[0053] In asynchronous mode, tasks execute independently of each other. Tasks do not need to wait for another task to complete before they can begin their own operations. This method does not block task execution and can improve system responsiveness and processing efficiency. This differs from synchronous mode, where tasks must execute in a specific order; when one task makes a request, it must be completed before other tasks can begin.

[0054] Controller Area Network (CAN) is a serial communication protocol bus used for real-time applications and is widely used for communication between automotive controllers.

[0055] Ciphertext is the form in which plaintext has been processed by an encryption algorithm, transforming it into an unreadable format to protect the security of the original data. Plaintext refers to the original form of the data before encryption, that is, the unencrypted text or data.

[0056] In related technologies, when online calibration of battery parameters (hereinafter referred to as calibration parameters or calibration data) is required, the host computer and the battery management system often use the XCP (Universal Measurement and Calibration Protocol) communication protocol to access and update calibration data. This protocol, as an open data communication protocol, is widely used in the calibration and measurement of automotive electronics. However, this open protocol lacks encryption functionality, so when using the XCP protocol for communication, calibration data is at risk of being tampered with and leaked.

[0057] Based on the above reasons, this application proposes a secure access method for calibration parameters. This method can be applied to a battery management system (BMS), specifically executed by the BMS's battery management unit. In this method, the BMS receives a secure access request from a host computer, requesting access to the battery parameters to be calibrated and to obtain decryption information. The BMS can send dynamic key generation information to the host computer so that the host computer can generate a decryption key. Furthermore, the BMS generates a local real-time key based on the dynamic key generation information. This local real-time key can be verified to ensure consistency between the host computer's real-time key and the local real-time key. If both keys match, the channel for accessing the battery parameters to be calibrated is successfully decrypted, and a secure access channel can be established between the host computer and the BMS. Thus, during the operation of the BMS and during the driving of a vehicle using a battery as its power system, when the host computer accesses and updates the calibration parameters, it must first decrypt the access channel. Only after successful decryption can the calibration parameters be accessed and updated. This prevents the calibration parameters from being lost or tampered with, thereby ensuring the normal operation of the BMS and the vehicle.

[0058] It should be noted that the technical solutions described in the embodiments of this application are applicable to various electrical devices that use batteries for power, such as mobile phones, portable devices, laptops, electric vehicles, electric toys, power tools, vehicles, ships and spacecraft, etc. For example, spacecraft include airplanes, rockets, space shuttles and spacecraft.

[0059] The method for secure access to calibration parameters provided in this application will be described in detail below with reference to the accompanying drawings. Please refer to... Figure 1 , Figure 1 This is a flowchart illustrating the secure access method for calibration parameters provided in an embodiment of this application, as shown below. Figure 1 As shown, the secure access method for calibration parameters may include the following steps:

[0060] Step S200: Receive a security access request from the host computer and send dynamic key generation information to the host computer;

[0061] Step S400: Generate a local real-time key based on the dynamic key generation information;

[0062] Step S600: Receive the host computer-side real-time key sent by the host computer, and if the host computer-side real-time key is consistent with the local real-time key, determine that the channel for accessing the battery parameters to be calibrated has been successfully decrypted.

[0063] The host computer can be understood as a computer application system that communicates with the battery management system. It is responsible for collecting, processing, storing, and displaying battery status information, and for configuring and controlling the battery management system. Specifically, the host computer can obtain real-time and historical data of the battery pack, including parameters such as battery voltage, current, and temperature, by communicating with the battery management unit (also known as the main controller) of the battery management system. It then displays the battery's operating status on an interactive interface and allows users to set and adjust battery parameters. Furthermore, the host computer can include a physical computer system, a cloud platform, or both, as long as it can perform the aforementioned functions of configuring and controlling the battery management system.

[0064] A dynamic key is a key used in encryption processes. Its characteristic is that a different key is used for each encryption, thereby improving security. Dynamic key generation information can be understood as the information used to generate the dynamic key, including but not limited to the encryption algorithm and required parameters. The real-time key on the host computer side is the dynamic key generated by the host computer based on the dynamic key generation information.

[0065] The access request is used to request access to the battery parameters to be calibrated and to obtain decryption information. In practical applications, when the host computer needs to read or update the calibration parameters, it can first initiate a secure access procedure, that is, send a secure access request to the battery management system to request decryption of the channel accessing the battery parameters to be calibrated and obtain the decryption information for decrypting that access channel.

[0066] It is understood that this method for securely accessing calibration parameters can be applied when the charging and discharging circuit of the battery to be calibrated is in a conductive state, i.e., the battery is under high voltage. This allows for online access and calibration of calibration parameters, enabling online access and calibration during vehicle operation or the operation of other electrical equipment. Of course, this method can also be applied when the charging and discharging circuit of the battery to be calibrated is in a disconnected state, i.e., the battery is under low voltage. In other words, even when the vehicle is parked or other electrical equipment is not in use, as long as the battery management system is on, the method provided in this embodiment can still be used to update the calibration parameters.

[0067] In an optional embodiment, the dynamic key generation information may include random numbers, meaning the dynamic key can be generated using random numbers. Accordingly, as... Figure 2 As shown, step S400 above may include the following specific steps: step S410, determining the preset initial key and the random number sent to the host computer; step S420, generating a local real-time key based on the random number and the initial password using a preset security algorithm.

[0068] The dynamic key, also known as a one-time password (OTP), is a temporary password used in the authentication process to enhance data access security. A preset initial key can be simultaneously preset in both the battery management system and the host computer. Both systems use the same encryption algorithm to generate a new real-time key based on the initial key. The preset security algorithm can be any secure algorithm capable of encrypting a random number and the initial key to obtain a new key, such as, but not limited to, AES encryption, hash encryption, etc.

[0069] Specifically, during the low-voltage power-on initialization of the battery management system, a set of initial keys with a preset byte length (e.g., 16 bytes, 32 bytes, etc.) can be defined, such as const uint8BMSCode

[16] = "ABCD-efgh-x12y". The calibration data is copied from Dflash to RAM. Since the characteristic of Flash is that erasure must be done in blocks, when a parameter needs to be calibrated online, it cannot be operated individually. Therefore, the calibration data is copied to RAM. When the program runs, it uses the data in RAM. RAM can be modified in real time and online, so the battery system and algorithm performance can be calibrated, verified or adjusted online. In addition, copying the calibration data to RAM and erasing the data in Dflash when the program runs will not affect the normal operation of the battery management system.

[0070] The low-voltage power-on state can be understood as the battery system starting up but the charging and discharging circuit being disconnected, i.e., the high-voltage disconnected state. At this time, the low-voltage electrical system of the vehicle, powered by the battery system, is activated. Here, "low voltage" usually refers to the voltage relative to the vehicle's high-voltage system. According to automotive industry standards and practices, a low-voltage electrical system typically refers to an electrical system with a voltage of around 12V or 48V. The high-voltage system of a vehicle typically ranges from 100V to 800V, with the specific voltage level depending on the vehicle's design and battery technology. "High-voltage power-on" generally refers to the state in which the vehicle's high-voltage electrical system is activated.

[0071] In this embodiment, after receiving a security access request from the host computer, the battery management system generates a random number and sends it to the host computer. Furthermore, the battery management system needs to generate a local real-time key based on this random number and the initial key. Therefore, the random number sent to the host computer can be reconfirmed before generating the local real-time key, ensuring that both the host computer and the battery management system use the same random number to generate the real-time key, thereby further guaranteeing the correctness of decryption. Additionally, using a random number to generate the local real-time key increases the randomness of encryption, prevents pattern attacks, and enhances the unpredictability of the ciphertext.

[0072] Furthermore, step S420 above, namely the step of generating a local real-time key based on a random number and an initial password using a preset security algorithm, can specifically include the following processes: expanding the initial key to obtain a round key; performing multiple rounds of encryption operations based on the random number, the initial key, and the round key to generate a local real-time key; each round of encryption operations includes one or more of the following: byte substitution, row shifting, column mixing, and bitwise XOR operations.

[0073] The round key is a specific subkey derived from the master key (initial encryption key) and used in each round of encryption operations. In other words, the round key is generated by the master key through a specific algorithm (called the key scheduling algorithm) to ensure consistency during encryption and decryption.

[0074] In this embodiment, a round key is used to generate the real-time key. Different round keys can be used in each round, meaning each round uses an independent subkey. This prevents attackers from cracking the entire encryption process by analyzing a single key, increasing the difficulty of cracking. Furthermore, by changing the key expansion algorithm or the number of rounds, the security and performance of the algorithm can be flexibly adjusted.

[0075] Specifically, a new key can be generated by encrypting the initial key and a random number using the AES128 algorithm. First, the initial key is expanded using the algorithm, and then multiple rounds of data encryption are performed to obtain the final real-time key.

[0076] It is understood that the above method of generating dynamic keys using random numbers is only one implementation method of this embodiment. This embodiment is not limited to this method. As long as dynamic keys can be generated, it is acceptable. For example, each time the host computer sends a security access request to the battery management system, the battery management system can randomly select an encryption algorithm from the preset encryption algorithm library and then generate a real-time key based on the initial key.

[0077] Accordingly, the dynamic key generation information may include a randomly selected encryption algorithm. The step S400 of generating a local real-time key based on the dynamic key generation information may also include the following processing: determining a preset initial key and an encryption algorithm to be sent to the host computer; generating a local real-time key based on the initial key and the randomly selected encryption algorithm.

[0078] The randomly selected encryption algorithm can be understood as an encryption algorithm randomly selected from the aforementioned preset encryption algorithm library. It can be any algorithm that can encrypt the initial key to generate a real-time key.

[0079] In this embodiment, the battery management system can also reconfirm the encryption algorithm sent to the host computer before generating the local real-time key, ensuring that both the host computer and the battery management system use the same encryption algorithm to generate the real-time key, thereby further guaranteeing the correctness of decryption. Similarly, using a randomly selected encryption algorithm to generate the key for each decryption can also increase the randomness of the encryption algorithm, prevent pattern attacks, and enhance the unpredictability of the ciphertext.

[0080] It is understandable that the above process of generating real-time keys can be used by the battery management system to generate local real-time keys, or by the host computer to generate host computer-side real-time keys. The above process is the process of generating local real-time keys. The process of generating host computer-side real-time keys can refer to the process of generating local real-time keys, and will not be repeated here.

[0081] In another alternative embodiment, such as Figure 3 As shown, after successfully decrypting the channel for accessing the battery parameters to be calibrated, the secure access method for the calibration parameters may further include the following steps: Step S700, sending a successful decryption message to the host computer and establishing a secure access channel with the host computer; Step S800, receiving a data request sent by the host computer and performing the asynchronous data reading or asynchronous data writing steps corresponding to the data request.

[0082] Asynchronous data reading or writing refers to reading or writing data in an asynchronous mode. Data requests can include data calibration or flushing requests, as well as data read requests.

[0083] In this embodiment, after successful decryption, the battery management system (BMS) can send a notification to the host computer indicating that a secure access channel has been established. The host computer can then send a keep-connection request, a calibration request, or a flash request to the BMS to maintain the secure access channel. Specifically, if a calibration or flash request is sent, the address and value of the data to be calibrated must be sent. If a keep-connection request is sent, the BMS does not exit the current decryption process; the host computer and BMS are considered to remain connected. The host computer can continuously access the calibration data without needing to resend the address for reading data, and can also read and receive data from the BMS.

[0084] Specifically, upon receiving a calibration data request, the calibration data can be updated to the RAM address corresponding to the variable. Writing the calibration data to DFlash takes a certain amount of time. If the sampling is in synchronous mode, the battery management system will be unable to sample and monitor the battery voltage, temperature, and current during this time period, and the vehicle will also be unable to drive normally. Therefore, asynchronous writing mode can be used to ensure the normal operation of the battery management system and the normal driving of the vehicle, thereby truly realizing the online calibration of calibration parameters.

[0085] In addition, in practical applications, situations may occur such as host computer malfunctions, erroneously triggering security access requests, or temporarily canceling access to calibration parameters. In such cases... Figure 3 As shown, the battery management system can disconnect the secure access channel with the host computer. That is, the calibration parameter secure access method also includes the following steps: Step S900, if no data request or connection keep-alive request is received from the host computer within a preset time period, the current decryption process can be safely exited, and the secure access channel with the host computer is disconnected. If the host computer needs to enter again, it needs to decrypt again, which can further enhance the security of calibration data.

[0086] Specifically, the host computer can send a calibration data download request to the battery management system via a 4G cellular network, and then convert the 4G cellular data into CAN data via RDB. The calibration data download request may include, but is not limited to, the CAN message ID, the number of bytes requested, and the address of the requested data. The data returned by the battery management system may include, but is not limited to, the response result and the new calibration values ​​of the calibration parameters.

[0087] In practical applications, when writing data to the DFlash, an asynchronous sampling mode can be used. The battery management system writes data to the DFlash every time it receives a preset number of bytes. Then, it checks the register for write completion every preset time interval. If the write is complete, it continues receiving data until all data reception and writing are complete. This achieves synchronous updates of calibration data during driving, i.e., real-time online updates of calibration parameters. Furthermore, since the battery management system uses data in RAM during operation, and given the volatility of RAM, the updated calibration values ​​can be copied to RAM upon the next low-voltage power-on. Thus, the updated calibration values ​​take effect every time a low-voltage power-on occurs.

[0088] The specific values ​​of the preset bytes and preset duration can be set by those skilled in the art based on the file format of the calibration parameter file, and this embodiment does not specifically limit them. For example, if the new calibration parameter file adopts the Intel hex file format, the preset bytes can be 256. The preset duration can be, but is not limited to, 10 milliseconds, 8 milliseconds, and 15 milliseconds.

[0089] In another specific embodiment, in conjunction with the appendix Figure 4 The flowchart shown here illustrates the specific process of the secure access method for calibration parameters, and provides a detailed description of the aforementioned secure access method for calibration parameters.

[0090] like Figure 4 As shown, when the BMU is initialized at low voltage, a set of 16-byte initial keys can be defined first, such as const uint8 BMSCode

[16] = "ABCD-efgh-x12y". The calibration data is copied from Dflash to RAM. Since the characteristic of Flash is that erasure must be done in blocks, when a parameter needs to be calibrated online, it cannot be operated individually. Therefore, the calibration data is copied to RAM. The program uses the data in RAM during runtime. RAM can be modified in real time and online, so the battery system and algorithm performance can be calibrated, verified or adjusted online. In addition, copying the calibration data to RAM and erasing the data in Dflash during program runtime will not affect the normal operation of the battery management system.

[0091] During BMU program execution, if a security access request is received from a host computer or cloud platform, the BMU generates a 16-byte random number using a timer and sends the random number to the host computer or cloud platform. The purpose of using a random number is to help increase the randomness of encryption, prevent pattern attacks, and enhance the unpredictability of ciphertext.

[0092] Then, the BMU can generate a local real-time key by encrypting the initial key and a random number using the AES128 algorithm. First, the initial key is expanded by algorithm, from a 4*4 initial key to a 4*(4*11) round key, such as ExternBMSCode[4]

[44] , and then 10 rounds of data encryption are performed. In the first round of encryption, the random number and the initial key are mixed by bitwise XOR operation.

[0093] What follows are nine rounds of repeated encryption operations, each round consisting of the following four steps:

[0094] 1) Byte Substitution: Each byte in the initial 16-byte data block (a 4x4 matrix) computed in the first round is replaced using a fixed lookup table (S-box). The S-box is a non-linear transformation that provides the complexity required for the encryption process.

[0095] 2) Row shifting: After replacing the bytes, the first row of the 16-byte data block (a 4x4 matrix) is left unprocessed. The second row is shifted 1 byte to the left, the third row is shifted 2 bytes to the left, and the fourth row is shifted 3 bytes to the left.

[0096] 3) Column mixing: Define a matrix, such as UInt8 B4[4][4]={0x02,0x01,0x01,0x03;0x03,0x02,0x01,0x01;0x01,0x03,0x02,0x01;0x01,0x01,0x03,0x02;}, and perform matrix multiplication with the 16-byte data block (a 4x4 matrix) after it has been shifted.

[0097] 4) Round key addition: The 16-byte data block after column mixing is bitwise XORed with the corresponding extended round key. For example, ExternBMSCode[4][4~7] is used in the first round, and ExternBMSCode[4][8~11] is used in the second round. The 10th round is similar to the previous 9 rounds. The column mixing step is canceled in the 10th round, that is, it only includes byte substitution, row shifting and round key addition. The final key after the 10th round is obtained.

[0098] Similarly, after receiving the random number sent by the BMU, the host computer or cloud platform can generate a host-side real-time key using the same algorithm as the BMU, and send this host-side real-time key to the BMU. Upon receiving the host-side real-time key, the BMU checks if it matches the local real-time key. If they match, it sends a decryption success message; otherwise, it sends a decryption failure message to the host computer or cloud platform. If the host computer or cloud platform receives a decryption failure message, it displays "decryption failed" and exits the calibration and flashing process. If decryption is successful, it can send data calibration and flashing requests.

[0099] After successful BMU decryption, the host computer or cloud platform needs to send a keep-alive request or a calibration or write request. If the BMU does not receive a request within 60 seconds, it will exit the decryption process for security reasons, and will need to re-enter the decryption process. When the BMU receives a calibration request, it updates the calibration data to the RAM address corresponding to the variable. When it receives a measurement request, it uploads the corresponding variable data from RAM to the host computer or cloud platform. Upon receiving a request to read a parameter block, it can read data from RAM or Flash, and then send the read data to the host computer or cloud platform, which saves the parameter file. When the BMU receives a write request, it writes the data to Flash. It is important to note that the asynchronous read / write driver for Dflash is started when writing or reading data blocks. This is because erasing all calibration data in Dflash, writing all new calibration data to Flash, or reading all calibration data from Flash takes time for the BMU to execute. If the sampling is in synchronous mode, battery voltage, temperature, and current cannot be sampled and monitored, and the vehicle will not be able to operate normally.

[0100] In summary, the calibration parameter secure access method provided in this embodiment, upon receiving a secure access request from the host computer, can send dynamic key generation information to the host computer to generate a host computer-side real-time key; and generate a local real-time key based on the dynamic key generation information. Then, it verifies whether the host computer-side real-time key and the local real-time key are consistent. If the two keys are consistent, it is determined that the secure channel for accessing the battery parameters to be calibrated has been successfully decrypted. Thus, during the operation of the battery management system and during the driving of a vehicle using a battery as its power system, when the host computer accesses and updates the calibration parameters, it needs to decrypt the channel for accessing the calibration parameters before successful decryption. This prevents the risk of loss or tampering of calibration parameters in the battery management system, thereby ensuring the normal operation of the battery management system and the vehicle.

[0101] Based on the same concept as the above-described secure access method for calibration parameters, this application also provides a secure access device for calibration parameters, used to implement the above-described secure access method for calibration parameters, such as... Figure 5 As shown, the device includes:

[0102] The request receiving module is used to receive the security access request sent by the host computer and send dynamic key generation information to the host computer; the security access request is used to request access to the battery parameters to be calibrated and to obtain the dynamic key generation information;

[0103] The key generation module is used to generate local real-time keys based on dynamic key generation information;

[0104] The decryption determination module is used to receive the host computer-side real-time key sent by the host computer, and determine that the channel for accessing the battery parameters to be calibrated has been successfully decrypted if the host computer-side real-time key is consistent with the local real-time key; the host computer-side real-time key is generated based on the dynamic key generation information.

[0105] It is understood that the calibration parameter secure access device provided in this embodiment is used to execute the above-described calibration parameter secure access method, so it can at least achieve the beneficial effects that the above-described calibration parameter secure access method can achieve. Moreover, the various embodiments of the above-described calibration parameter secure access method are also applicable to this calibration parameter secure access device, and will not be described again here.

[0106] Based on the same concept as the above-described secure access method for calibration parameters, this application also provides a secure access system for calibration parameters, such as... Figure 6 As shown, the system includes a host computer and a battery management unit. The battery management unit is used to receive a security access request sent by the host computer, and to send the dynamic key generation information to the host computer. The security access request is used to request access to the battery parameters to be calibrated and to obtain the dynamic key generation information. It also generates a local real-time key based on the dynamic key generation information, and receives the host computer-side real-time key sent by the host computer. If the host computer-side real-time key matches the local real-time key, it determines that the channel for accessing the battery parameters to be calibrated has been successfully decrypted. The host computer is used to send a security access request to the battery management unit, and after receiving the dynamic key generation information, to generate the host computer-side real-time key based on the dynamic key generation information.

[0107] It is understood that the calibration parameter secure access system provided in this embodiment is also used to execute the above-described calibration parameter secure access method. Therefore, it can at least achieve the beneficial effects that the above-described calibration parameter secure access method can achieve. Furthermore, the various embodiments of the above-described calibration parameter secure access method are also applicable to this calibration parameter secure access device, and will not be described in detail here.

[0108] This application also provides an electronic device for performing the above-described method for secure access to calibration parameters. Please refer to... Figure 7 This illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 7 As shown, the electronic device 7 includes: a processor 701, a memory 702, a memory 703, and a communication interface 704. The processor 701, the communication interface 704, and the memory 702 are connected through the memory 703. The memory 702 stores a computer program that can run on the processor 701. When the processor 701 runs the computer program, it executes the calibration parameter secure access method provided in any of the foregoing embodiments of this application.

[0109] The memory 702 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this device network element and at least one other network element is achieved through at least one communication interface 704 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0110] The memory 703 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. The memory 702 is used to store programs. After receiving an execution instruction, the processor 701 executes the program. The calibration parameter secure access method disclosed in any of the aforementioned embodiments of this application can be applied to the processor 701, or implemented by the processor 701.

[0111] The processor 701 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 701 or by instructions in software form. The processor 701 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 702. Processor 701 reads the information in memory 702 and, in conjunction with its hardware, completes the steps of the above method.

[0112] The electronic device provided in this application embodiment and the calibration parameter secure access method provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.

[0113] This application also provides a computer-readable storage medium corresponding to the calibration parameter secure access method provided in the foregoing embodiments, which stores a computer program (i.e., a program product) thereon. When the computer program is run by a processor, it executes the calibration parameter secure access method provided in any of the foregoing embodiments.

[0114] It should be noted that computer-readable storage media may include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, optical disc or other optical and magnetic storage media, etc., which will not be elaborated here.

[0115] The computer-readable storage medium provided in this application embodiment and the calibration parameter secure access method provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0116] This application also provides a computer program product corresponding to the calibration parameter secure access method provided in the foregoing embodiments, including a computer program that is executed by a processor to implement the above-described calibration parameter secure access method.

[0117] The computer program product provided in this application embodiment is based on the same inventive concept as the calibration parameter secure access method provided in this application embodiment, and has the same beneficial effects as the method implemented by the computer program being executed by a processor.

[0118] It is understood that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, these will not be repeated here.

[0119] Those skilled in the art will understand that in the methods described above in specific embodiments, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined based on its function and possible internal logic.

[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application. In particular, as long as there is no structural conflict, the various technical features mentioned in the embodiments can be combined in any way. This application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A method of accessing calibrated parameters, characterized by, The method includes: Upon receiving a security access request from the host computer, dynamic key generation information is sent to the host computer; the access request is used to request access to the battery parameters to be calibrated and to obtain decryption information. Generate a local real-time key based on the dynamic key generation information; The system receives the host computer-side real-time key sent by the host computer, and if the host computer-side real-time key is consistent with the local real-time key, it determines that the channel for accessing the battery parameters to be calibrated has been successfully decrypted; the host computer-side real-time key is generated according to the dynamic key generation information.

2. The method of claim 1, wherein, The dynamic key generation information includes random numbers, and the generation of a local real-time key based on the dynamic key generation information includes: Determine the preset initial key and the random number sent to the host computer; Based on the random number and the initial password, the local real-time key is generated using a preset security algorithm.

3. The method of claim 2, wherein, The process of generating the local real-time key based on the random number and the initial password using a preset security algorithm includes: The initial key is expanded to obtain the round key; The local real-time key is generated by performing multiple rounds of encryption operations based on the random number, the initial key, and the round key; each round of encryption operation includes one or more of the following: byte substitution, row shifting, column mixing, and bitwise XOR operation.

4. The method of claim 1, wherein, The dynamic key generation information includes a randomly selected encryption algorithm, and the generation of a local real-time key based on the dynamic key generation information includes: Determine the preset initial key and the encryption algorithm sent to the host computer; The local real-time key is generated based on the initial key and the randomly selected encryption algorithm.

5. The method according to any one of claims 1 to 4, wherein The method further includes: Send a message indicating successful decryption to the host computer and establish a secure access channel with the host computer; Receive the data request sent by the host computer and execute the steps of asynchronously reading data or asynchronously writing data corresponding to the data request.

6. The method of claim 5, wherein, The method further includes: If no data request or connection keep-alive request is received from the host computer within a preset time period, the secure access channel with the host computer is disconnected.

7. A parameter calibration security access device, characterized by The device includes: The request receiving module is used to receive a security access request sent by the host computer and send the dynamic key generation information to the host computer; the security access request is used to request access to the battery parameters to be calibrated and to obtain the dynamic key generation information; A key generation module is used to generate a local real-time key based on the dynamic key generation information. The decryption determination module is used to receive the host computer-side real-time key sent by the host computer, and determine that the channel for accessing the battery parameters to be calibrated has been successfully decrypted if the host computer-side real-time key is consistent with the local real-time key; the host computer-side real-time key is generated according to the dynamic key generation information.

8. A parameter calibration security access system, characterized by, The system includes a host computer and a battery management unit; The battery management unit is used to receive a security access request sent by the host computer and send the dynamic key generation information to the host computer. The secure access request is used to request access to the battery parameters to be calibrated and to obtain dynamic key generation information; Based on the dynamic key generation information, a local real-time key is generated; and the host computer-side real-time key sent by the host computer is received, and if the host computer-side real-time key is consistent with the local real-time key, the channel for accessing the battery parameters to be calibrated is successfully decrypted. The host computer is used to send a security access request to the battery management unit, and after receiving the dynamic key generation information, it generates the host computer-side real-time key based on the dynamic key generation information.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method as described in any one of claims 1-6.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by a processor to implement the method as described in any one of claims 1-6.