Charging management method and device, electronic equipment and medium
Through encrypted communication between the on-board charger, external charging pile and in-car battery control module, encrypted message information ensures the safety of the charging management process, the problem of low communication security of on-board charger is solved, and the entire vehicle battery is improved Management security.
Patent Information
- Application Number
- CN202411467800.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2024-12-24
AI Technical Summary
The communication between the on-board charger and the external charging pile is low and is easily disguised or tampered by the attacker, resulting in information leakage, overvoltage and overcurrent, and abnormal charging stops.
Encrypted message information is used to perform encrypted communication between the on-board charger and the external charging pile, and encrypted communication between the in-car battery control module and the external charging pile to ensure the security of information during the charging management process. The encrypted message information includes key seeds, encryption algorithm codes and encrypted data, and can only be encrypted and decrypted in the preset security information storage area.
It improves information security in charging management, reduces the possibility of attackers forgery or tampering with communication information, and improves the security of vehicle battery management.
Smart Images

Figure CN119176051A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle battery management, and in particular to a charging management method, device, electronic device and medium. Background Art
[0002] In electric vehicles, the charging of power batteries and storage batteries is the responsibility of the onboard charger (OBC). The onboard charger communicates with the external charging pile, the vehicle domain controller (VDC) in the vehicle, and the battery management system (BMS) in the vehicle to complete the charging.
[0003] However, the current communication security between the on-board charger and other objects is relatively low. For example, the external charging pile only needs to change the level of the wake-up pin of the on-board charger to wake up the on-board charger. There are security vulnerabilities in the charging management of the on-board charger. Attackers can easily disguise themselves as external charging piles to wake up the on-board charger or intervene in the in-vehicle communication network, tamper with the communication information in the charging management, and maliciously manage the battery pack, thereby causing information leakage, overvoltage and overcurrent, abnormal charging stop and other safety faults, secretly threatening the safety of the vehicle and its users.
[0004] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a charging management method, device, electronic device and medium to solve the problem of security vulnerabilities in charging management in the prior art.
[0006] A first aspect of an embodiment of the present application provides a charging management method, which is applied to a vehicle charger, comprising:
[0007] When receiving the wake-up information from the external charging pile, performing encrypted communication with the external charging pile based on the encrypted message information, and confirming the connection with the external charging pile based on the first result of the current encrypted communication;
[0008] When the connection confirmation with the external charging pile is completed, encrypted communication is performed with the in-vehicle battery control module and the external charging pile respectively based on the encrypted message information, and charging management is performed based on the second result of the current encrypted communication, so that the external charging pile charges the battery unit connected to the in-vehicle battery control module;
[0009] The encrypted message information includes a key seed, an encryption algorithm code and encrypted data. The encrypted data is obtained by encrypting the initial data using an encryption algorithm corresponding to the key seed and the encryption algorithm code. The encryption algorithm code and the encryption algorithm are obtained from a local preset security information storage area.
[0010] A second aspect of an embodiment of the present application provides a charging management device, including:
[0011] A connection confirmation module, configured to perform encrypted communication with the external charging pile based on the encrypted message information when receiving the wake-up information of the external charging pile, and to perform connection confirmation with the external charging pile based on the first result of the current encrypted communication;
[0012] The charging management module is used to perform encrypted communication with the in-vehicle battery control module and the external charging pile respectively based on the encrypted message information when the connection confirmation with the external charging pile is completed, and perform charging management based on the second result of the current encrypted communication, so that the external charging pile charges the battery unit connected to the in-vehicle battery control module;
[0013] The encrypted message information includes a key seed, an encryption algorithm code and encrypted data. The encrypted data is obtained by encrypting the initial data using an encryption algorithm corresponding to the key seed and the encryption algorithm code. The encryption algorithm code and the encryption algorithm are obtained from a local preset security information storage area.
[0014] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0015] According to a fourth aspect of an embodiment of the present application, a readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0016] Compared with the prior art, the beneficial effects of the embodiments of the present application include at least the following: the embodiments of the present application perform encrypted communication between the on-board charger and the external charging pile and the in-vehicle battery control module through encrypted message information, thereby realizing connection confirmation and charging management with the external charging pile. Since the encrypted message information includes a key seed, an encryption algorithm code and encrypted data, the encrypted data can only be encrypted and decrypted in a processor with a preset security information storage area. Therefore, the purpose of connection confirmation and charging management can only be achieved when there is a preset security information storage area in the on-board charger, the external charging pile and the in-vehicle battery control module. The encrypted message information of this scheme improves the information security in charging management, reduces the possibility of attackers forging or tampering with communication information and affecting the safety of the vehicle or battery in charging management, and improves the security of the battery management of the entire vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 It is a schematic diagram of an application scenario of an embodiment of the present application;
[0019] Figure 2 It is a flow chart of a charging management method provided in an embodiment of the present application;
[0020] Figure 3 It is a structural diagram of a preset message structure provided in an embodiment of the present application;
[0021] Figure 4 It is a flowchart of an encrypted communication process provided by an embodiment of the present application;
[0022] Figure 5 It is a structural diagram of a connection relationship provided in an embodiment of the present application;
[0023] Figure 6 It is a structural schematic diagram of a charging management device provided in an embodiment of the present application;
[0024] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0026] A charging management method, device, electronic device and medium according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0027] Figure 1 1 is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a server 104 and a network 105.
[0028] The first terminal device 101, the second terminal device 102 or the third terminal device 103 can be hardware or software. When the first terminal device 101, the second terminal device 102 or the third terminal device 103 is hardware, it can be various electronic devices with a display screen and supporting communication with the server 104, including but not limited to smart phones, tablet computers, laptop portable computers and desktop computers; when the first terminal device 101, the second terminal device 102 or the third terminal device 103 is software, it can be installed in the above electronic devices. The first terminal device 101, the second terminal device 102 or the third terminal device 103 can be implemented as multiple software or software modules, or as a single software or software module, which is not limited in the embodiment of the present application. Further, various applications can be installed on the first terminal device 101, the second terminal device 102 or the third terminal device 103, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.
[0029] The server 104 may be a server that provides various services, for example, a background server that receives a request sent by a terminal device that establishes a communication connection with the server, and the background server may receive and analyze the request sent by the terminal device, and generate a processing result. The server 104 may be a single server, or a server cluster composed of several servers, or a cloud computing service center, which is not limited in the present embodiment of the application.
[0030] It should be noted that the server 104 can be hardware or software. When the server 104 is hardware, it can be various electronic devices that provide various services for the first terminal device 101, the second terminal device 102, and the third terminal device 103. When the server 104 is software, it can be multiple software or software modules that provide various services for the first terminal device 101, the second terminal device 102, and the third terminal device 103, or it can be a single software or software module that provides various services for the first terminal device 101, the second terminal device 102, and the third terminal device 103, and the embodiment of the present application does not limit this.
[0031] The network 105 can be a wired network connected by coaxial cable, twisted pair and optical fiber, or it can be a wireless network that can interconnect various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), infrared, etc., which is not limited in the embodiments of the present application.
[0032] It should be noted that the specific types, quantities and combinations of the first terminal device 101, the second terminal device 102, the third terminal device 103, the server 104 and the network 105 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present application do not limit this.
[0033] Figure 2 It is a flow chart of a charging management method provided in an embodiment of the present application. Figure 2 The charging management method is performed by the on-board charger, which can be Figure 1 The first terminal device, the second terminal device, or the third terminal device is implemented. Figure 2 As shown, the charging management method includes:
[0034] S201: upon receiving the wake-up information from the external charging pile, performing encrypted communication with the external charging pile based on the encrypted message information, and confirming the connection with the external charging pile based on the first result of the current encrypted communication;
[0035] S202: When the connection confirmation with the external charging pile is completed, based on the encrypted message information, encrypted communication is performed with the in-vehicle battery control module and the external charging pile respectively, and charging management is performed based on the second result of the current encrypted communication, so that the external charging pile charges the battery unit connected to the in-vehicle battery control module;
[0036] The encrypted message information includes a key seed, an encryption algorithm code and encrypted data. The encrypted data is obtained by encrypting the initial data using an encryption algorithm corresponding to the key seed and the encryption algorithm code. The encryption algorithm code and the encryption algorithm are obtained from a local preset security information storage area.
[0037] It is understandable that the in-vehicle battery control module includes a vehicle controller VDC, a battery management system BMS and a DC-to-DC Converter (DCDC), all of which are connected to the vehicle charger, wherein the battery management system is also connected to the vehicle controller and the battery unit respectively. The connection relationship between the vehicle charger, the vehicle controller, the battery management system, the DC converter and the battery unit can be as follows: Figure 5 shown.
[0038] It is understandable that the wake-up information of the external charging pile is sent by the charging gun of the external charging pile to the on-board charger when the charging gun of the external charging pile is inserted into the charging port of the car. The wake-up information may include the level change information of the wake-up pin of the on-board charger, and may also include the message information about the connection request sent by the external charging pile to the on-board charger. The first encrypted communication and connection confirmation are performed based on the wake-up information, and the completion of the connection confirmation can be achieved by identifying specific initial data in the specific message information.
[0039] It can be understood that in this embodiment, the communication between the on-board charger and the external charging pile and the in-vehicle battery control module is all encrypted communication based on encrypted message information. After intercepting the encrypted message information, it is difficult for an external attacker to obtain the actual content data in the information, and it is also difficult to forge encrypted message information that can be normally used for encrypted communication in this scheme. Therefore, the security of the communication process of this scheme is significantly improved. The possibility of successful attack by external attackers in the process of connection confirmation and charging management with the external charging pile based on the encrypted communication is low, thereby improving the management safety of the battery.
[0040] It can be understood that the constituent elements of the encrypted message information in this embodiment include a key seed, an encryption algorithm code and encrypted data, wherein the data essence of the encrypted data is the actual content data to be transmitted when two parties communicate, and the actual content data before encryption is called initial data. The initial data is encrypted according to a specific encryption algorithm and key seed to obtain the encrypted actual content data, which is called encrypted data.
[0041] Among them, the key seed refers to a string of information used to generate a key in cryptography. It can be a random number, some passphrases, or numbers generated by certain algorithms. In actual use, a high-strength key seed can be generated by a random number generator, or a piece of information can be taken from a random number table as a key seed. The key seed is input into the key derivation function corresponding to the key algorithm to generate a key, which is used for encryption or decryption operations.
[0042] Among them, each key algorithm not only stipulates the key calculation principle expressed as a key derivation function, but also stipulates the specific values of the parameters of the key derivation function. One of the purposes of setting the key derivation function is to ensure that the process of deriving the key from the key seed is deterministic and complex to prevent reverse engineering. Even if the key seed remains unchanged, for two sets of key algorithms with different parameters of the key derivation function, the keys generated based on the key seed are also different.
[0043] It is understandable that the encryption algorithm is located in the local preset security information storage area. Each time encrypted data is generated, a fixed key seed and encryption algorithm can be used, or a key seed can be temporarily randomly generated, and an encryption algorithm can be temporarily obtained from the preset security information storage area to encrypt the initial data. The encrypted message information does not carry the encryption algorithm, but only carries an encryption algorithm code corresponding to the encryption algorithm. Each encryption algorithm in the preset security information storage area is fixedly corresponding to an encryption algorithm code, and the encryption algorithm code is used to indicate the specific encryption algorithm.
[0044] When receiving encrypted message information, according to the corresponding relationship in the local preset security information storage area, the encryption algorithm corresponding to the encryption algorithm code in the encrypted message information can be determined, and then the encrypted data in the encrypted message information can be decrypted. At this time, even if an external attacker intercepts the encrypted message information, since the external attacker does not know the information in the preset security information storage area, the specific encryption algorithm cannot be determined through the encryption algorithm code in the encrypted message information, and therefore the encrypted data cannot be decrypted. In other words, only devices that have passed security authentication and are configured with the same preset security storage area can perform encrypted communication.
[0045] It is understandable that since the key seed and encryption algorithm are temporarily and dynamically obtained each time encryption is performed, the key seed and encryption algorithm corresponding to each encrypted data are not necessarily the same, and the probability that the two are the same is very low. Therefore, even if an external attacker cracks the previously encrypted data, it is difficult to use the previously encrypted key seed and encryption algorithm to correctly decrypt other encrypted data, further improving the security of encrypted communications.
[0046] Further, in this embodiment, a process of encrypted communication based on encrypted message information includes the information sender encrypting the information, the information sender sending the encrypted information to the information receiving side, and the information receiving side decrypting the information, wherein the encryption of the information sender and the decryption of the information receiving side both require the use of a key seed and an encryption algorithm, and the encryption algorithm is not sent to the information receiving side along with the encrypted message information, but is represented by an encryption algorithm code representing the encryption algorithm in the encrypted message information, and when the information receiving side receives the encrypted message information, it will query its own local preset security information storage area, determine the encryption algorithm corresponding to the encryption algorithm code in the encrypted message information, and decrypt the encrypted data with the determined encryption algorithm and the key seed in the encrypted message information to obtain the initial data. It can be understood that the encryption and decryption actions here can be performed through a local hardware security module (HSM), and the preset security information storage area can also be set in the hardware security module, which is a hardware device that manages digital keys and performs encryption and decryption operations, and provides a secure environment to protect internal key information from being leaked, while ensuring the reliability and high performance of encryption and decryption operations.
[0047] Therefore, in an exemplary embodiment, the process of performing encrypted communication includes:
[0048] The HSM on the information sending side encrypts the initial data to obtain encrypted message information;
[0049] The information sending side sends the encrypted message information to the information receiving side;
[0050] The HSM on the information receiving side decrypts the encrypted message information to obtain the initial data.
[0051] It can be understood that the information sending side and the information receiving side in encrypted communication are specifically determined according to the communication link of the encrypted communication. The two communication endpoints of a communication link correspond to two communication objects. According to the direction of information transmission, the two communication objects serve as the information sending side and the information receiving side respectively. For example, the on-board charger and the external charging pile carry out encrypted communication. The two communication objects of the communication link are the on-board charger and the external charging pile respectively. One of them serves as the information sending side and the other serves as the information receiving side. Similarly, the on-board charger and the in-vehicle battery control module carry out encrypted communication. One of them serves as the information sending side and the other serves as the information receiving side.
[0052] Further, in an exemplary embodiment, data encryption includes:
[0053] Confirm initial data;
[0054] Obtaining an encryption algorithm and an encryption algorithm code corresponding to the encryption algorithm from a local preset security information storage area;
[0055] Generate key seeds;
[0056] Based on the encryption algorithm and the key seed, the initial data is encrypted to obtain encrypted data;
[0057] Generate encrypted message information corresponding to a preset message structure based on the key seed, encryption algorithm code and encrypted data.
[0058] Accordingly, in an exemplary embodiment, data decryption includes:
[0059] According to the preset message structure, determine the corresponding key seed, encryption algorithm code and encrypted data from the encrypted message information;
[0060] Obtaining an encryption algorithm corresponding to the encryption algorithm code from a local preset security information storage area;
[0061] Based on the encryption algorithm and key seed, the encrypted data is decrypted to obtain the initial data.
[0062] It can be understood that the subjects of encrypted communication in this embodiment include the on-board charger, the external charging pile, and the in-vehicle battery control module. These subjects are equipped with HSM, and each subject acts as the information sending side when sending encrypted message information to the outside, and acts as the information receiving side when receiving external encrypted message information. The encrypted communication in this embodiment mainly occurs between the on-board charger and the external charging pile, and between the on-board charger and the in-vehicle battery control module. The encrypted communication at the communication control level ultimately achieves the purpose of enabling the external charging pile to charge the battery unit in the vehicle through the high-voltage path of the in-vehicle battery control module.
[0063] It is understandable that the arrangement of the components of the encrypted message information can be artificially specified. The arrangement of the components in the encrypted message information specified here is a preset message structure that each encrypted message information must comply with during communication. In the case of an unknown preset message structure, the encrypted message information is difficult to be accurately parsed, thereby further increasing the difficulty of decryption for attackers. The encrypted communication in this embodiment can usually be carried out based on the CAN (Controller Area Network) bus protocol. Figure 3 FIG. 1 is a schematic diagram of a preset message structure. The encrypted message information is based on the CAN bus protocol. Different from the conventional CAN bus protocol message structure, the encrypted message information in this embodiment contains encrypted data, encryption algorithm code and key seed. These contents are arranged with the message fields of other CAN bus protocols to obtain the following: Figure 3 As shown in the structural diagram, according to the preset message structure, the encrypted message information includes a 4-byte message identification field CANID, a 1-byte length field LEN, a 2-byte address field ADDR, an 8-byte data field DATA, and a 2-byte check field CRC, wherein the CANID field includes: bit [31 ... 29] of the extended frame EFF, the remote frame RTR and the error frame ERR, bit [28 ... 14] of the key seed, bit [13 ... 0] of the encryption algorithm code, and both the address field and the data field can be used to store the corresponding encrypted data.
[0064] It can be understood that in this embodiment, when the message information of the communication is set as the encrypted message information including the encrypted data, the non-public preset message structure is the first layer of security protection; the key seed and the encryption algorithm encrypt the initial data to achieve the second layer of security protection; the encryption algorithm and the encryption algorithm code are stored in the preset security information storage area, and the encrypted message information carries the encryption algorithm code but does not carry the encryption algorithm. Only the communication subjects that are also configured with the security information storage area can carry out correct and effective encrypted communication, which realizes the third layer of security protection; each time encryption is performed, a new key seed is temporarily generated and the encryption algorithm is temporarily dynamically obtained, so that the possibility of the same encryption method used for each encrypted message is extremely low, which realizes the fourth layer of security protection. Through the above multi-layer protection, only the execution subject that is configured with undisclosed communication information such as the preset security information storage area and the preset message structure can realize correct encrypted communication, and the possibility of the encrypted communication in this scheme being cracked and maliciously used by the outside is greatly reduced.
[0065] Specifically, the wake-up information of the external charging pile is sent by the charging gun of the external charging pile to the on-board charger when the charging gun is inserted into the charging port of the car. The wake-up information can be represented by the level change of the wake-up pin of the on-board charger, that is, the level change caused by the mechanical connection when the charging gun is inserted into the charging port. In this case, the wake-up information includes: the level change information corresponding to the case where the real-time level state of the wake-up pin is switched to the wake-up state;
[0066] The wake-up state includes: the level state of the wake-up pin when the wake-up pin is connected to an external charging pile.
[0067] Alternatively, the wake-up information may also be represented by message information about a connection request sent by the external charging pile to the on-board charger. In this case, upon receiving the wake-up information of the external charging pile, encrypted communication is performed with the external charging pile based on the encrypted message information, and a process of confirming the connection with the external charging pile based on the first result of the current encrypted communication includes:
[0068] In the case of receiving the connection request message information sent by the external charging pile, generating connection response message information and sending it to the external charging pile, so that the external charging pile decrypts the connection response message information and generates corresponding authentication request message information; the connection response message information and the authentication request message information are both encrypted message information, the initial data corresponding to the connection response message information is the connection response data, the connection response data is determined based on the connection request message information, and the initial data corresponding to the authentication request message information is the authentication request data, and the authentication request data is determined based on the connection response data;
[0069] When receiving the authentication request message information sent by the external charging pile, generating authentication confirmation message information and sending it to the charging pile, so that the external charging pile performs connection confirmation based on the authentication confirmation message information;
[0070] The authentication confirmation message information is encrypted message information, and the initial data corresponding to the authentication confirmation message information is authentication confirmation data, and the authentication confirmation data is determined based on the authentication request data.
[0071] Among them, the connection confirmation process is actually the process of confirming whether the external charging pile and the on-board charger are configured with the same security information storage area through the key seed and encryption algorithm code. During the confirmation, the judgment basis can be based on whether the keys calculated by both parties based on the same key seed and encryption algorithm code are consistent, or whether the decrypted initial data conforms to the preset message field of the current process.
[0072] During the connection confirmation process, the connection request message information does not include encrypted data, which is used to request a connection based on the security information storage area from the on-board charger. It can be considered that the external charging pile is requesting a key, or requesting the current on-board charger to perform encrypted communication according to the key seed and encryption algorithm in the security information storage area.
[0073] Therefore, in an embodiment that considers communication security, when the on-board charger receives a connection request message information, it generates a connection response message information and sends it to the external charging pile. After receiving the connection response message information, the external charging pile generates an authentication request message information and sends it to the on-board charger. The on-board charger generates an authentication confirmation message information based on the authentication request message information, wherein the connection request message information, the connection response message information, the authentication request message information, and the authentication confirmation message information can all be encrypted message information, or at least one of the two message information sent by the same information sending side is an encrypted message information. If a message information is not an encrypted message information, that is, the message information carries the initial data in plain text, and the initial data is not encrypted into encrypted data, the key seed and encryption algorithm code in the message information can be carried as needed.
[0074] At this time, the information receiving side can confirm whether the information sending side is configured with the same security information storage area based on whether the encrypted message information can be decrypted normally and whether the initial data after decryption is the preset message field of the corresponding process. Once the encrypted message information cannot be decrypted or the initial data after decryption is not the preset message field of the corresponding process, it is considered that the information sending side is not configured with the same security information storage area as the information receiving side, and the information sending side has not passed the connection confirmation of the information receiving side.
[0075] In an embodiment considering communication efficiency, the on-board charger can directly parse the connection request from the connection request message information, and generate a connection response message information based on the connection request, and the connection response message information includes at least a key seed and an encryption algorithm code;
[0076] After receiving the connection response message information, the external charging pile uses the key seed and encryption algorithm code in the connection response message information to calculate the key, which can prove to the on-board charger whether the current external charging pile is configured with an authenticated security information storage area, and thus generates an authentication request message information including the key, the initial data of which is the authentication request data, which is the key;
[0077] After receiving the authentication request message, the on-board charger determines the key from it and compares it with the local key to see if they are consistent. Here, the local key refers to the key corresponding to the connection response message information calculated locally. If the two are consistent, it is determined that the connection is confirmed and an authentication confirmation message is sent, indicating that the on-board charger can perform subsequent operations.
[0078] In this embodiment, the initial data of the connection response message information is the connection response data, which is used to indicate the response of the on-board charger to the previous request. At this time, the connection response message information may include unencrypted initial data, or include encrypted data corresponding to the initial data. The authentication request message information and the authentication confirmation message information may be encrypted message information or unencrypted plaintext message information. The specific form and content fields may be set and selected according to actual needs, as long as the required content fields mentioned above are included.
[0079] Specifically, the encrypted communication process between the external charging pile and the on-board charger is as follows: Figure 4 As shown, Figure 4 The entire encrypted communication is triggered by the wake-up information, and the subsequent encrypted communications are all connection confirmation content. The wake-up information here can be the connection request message information or the level change of the wake-up pin. It can be set according to the actual situation. After the connection confirmation is completed, it is considered that the charging connection is established between the external charging pile and the on-board charger.
[0080] It can be understood that the in-vehicle battery control module includes a vehicle controller VDC, a battery management system BMS and a DC converter, all of which are connected to the on-board charger, wherein the battery management system is also connected to the vehicle controller and the battery unit respectively.
[0081] It is understood that the battery unit includes at least one of a vehicle storage battery and a power battery.
[0082] It is understandable that the connection relationship between the on-board charger, the vehicle controller, the battery management system, the DC converter, and the battery unit can be as follows: Figure 5 As shown, the connection here includes a communication connection and a high-voltage connection. The communication connection is used to realize encrypted communication between various entities. The communication connection can adopt a ring, star or other topological structure, which is not limited here; the high-voltage connection is used to establish a high-voltage circuit between an external charging pile, an on-board charger, a DC converter and a battery unit, so that the external charging pile charges the battery unit through the DC converter.
[0083] In fact, there may be other connection relationships between the above-mentioned in-vehicle battery control modules, such as the connection between the vehicle controller and the DC converter to perform low-voltage charging of the vehicle battery by the power battery. The settings are made according to actual conditions and user needs, and there is no restriction here.
[0084] Specifically, the charging management process includes:
[0085] The on-board charger wakes up the vehicle controller and battery management system;
[0086] The vehicle controller sends a charging request instruction to the on-board charger;
[0087] After receiving the charging request instruction, the on-board charger feeds back the connection confirmation information related to the current connection confirmation with the external charging pile and the charging parameters of the external charging pile to the battery management system;
[0088] The battery management system controls the charging relay of the high-voltage circuit to close and sends the maximum requested charging power to the on-board charger;
[0089] The on-board charger determines the target charging power and target charging current according to the charging power in the charging parameters, its own power capability and the maximum requested charging power;
[0090] The on-board charger controls the DC converter so that the external charging pile charges the battery unit according to the target charging power and target charging current through the DC converter;
[0091] The battery management system continuously obtains the real-time electrical parameters of the power supply to be tested. When the real-time electrical parameters such as the total battery voltage, the maximum voltage of a single cell or the charging current reach the charging cut-off condition, it sends a charging completion message to the vehicle controller.
[0092] After receiving the charging completion information, the vehicle controller makes a decision based on the vehicle status and sends a power-off command to the battery management system;
[0093] The battery management system controls the charger to disconnect according to the power-off instruction.
[0094] It is understandable that in the above-mentioned charging management process, all instructions and information involved are encrypted and communicated according to the encrypted message information, so as to ensure that the information in the charging management process is not leaked.
[0095] The method of the embodiment of the present application uses encrypted message information to perform encrypted communication between the on-board charger and the external charging pile and the in-vehicle battery control module, thereby realizing connection confirmation and charging management with the external charging pile. Since the encrypted message information includes a key seed, an encryption algorithm code and encrypted data, the encrypted data can only be encrypted and decrypted in a processor with a preset security information storage area. Therefore, the purpose of connection confirmation and charging management can only be achieved when there is a preset security information storage area in the on-board charger, the external charging pile and the in-vehicle battery control module. The encrypted message information of this scheme improves the information security in charging management, reduces the possibility of attackers forging or tampering with communication information and affecting the safety of the vehicle or battery in charging management, and improves the security of the battery management of the entire vehicle.
[0096] All the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here. It should be understood that the size of the sequence number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0097] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0098] Figure 6 Schematic diagram of a charging management device provided in an embodiment of the present application. Figure 6 As shown, the charging management device includes:
[0099] The connection confirmation module 601 is used to perform encrypted communication with the external charging pile based on the encrypted message information when the wake-up information of the external charging pile is received, and to perform connection confirmation with the external charging pile based on the first result of the current encrypted communication;
[0100] The charging management module 602 is used to perform encrypted communication with the in-vehicle battery control module and the external charging pile respectively based on the encrypted message information when the connection confirmation with the external charging pile is completed, and perform charging management based on the second result of the current encrypted communication, so that the external charging pile charges the battery unit connected to the in-vehicle battery control module;
[0101] The encrypted message information includes a key seed, an encryption algorithm code and encrypted data. The encrypted data is obtained by encrypting the initial data using an encryption algorithm corresponding to the key seed and the encryption algorithm code. The encryption algorithm code and the encryption algorithm are obtained from a local preset security information storage area.
[0102] The device of the embodiment of the present application performs encrypted communication between the on-board charger and the external charging pile and the in-vehicle battery control module through encrypted message information, thereby realizing connection confirmation and charging management with the external charging pile. Since the encrypted message information includes a key seed, an encryption algorithm code and encrypted data, the encrypted data can only be encrypted and decrypted in a processor with a preset security information storage area. Therefore, the purpose of connection confirmation and charging management can only be achieved when there is a preset security information storage area in the on-board charger, the external charging pile and the in-vehicle battery control module. The encrypted message information of this scheme improves the information security in charging management, reduces the possibility of attackers forging or tampering with communication information and affecting the safety of the vehicle or battery in charging management, and improves the security of the battery management of the entire vehicle.
[0103] In an exemplary embodiment, the wake-up information includes: level change information corresponding to a case where the real-time level state of the wake-up pin is switched to the wake-up state;
[0104] The wake-up state includes: the level state of the wake-up pin when the wake-up pin is connected to an external charging pile.
[0105] In an exemplary embodiment, the connection confirmation module is specifically used to:
[0106] In the case of receiving the connection request message information sent by the external charging pile, generating connection response message information and sending it to the external charging pile, so that the external charging pile decrypts the connection response message information and generates corresponding authentication request message information; the connection response message information and the authentication request message information are both encrypted message information, the initial data corresponding to the connection response message information is the connection response data, the connection response data is determined based on the connection request message information, and the initial data corresponding to the authentication request message information is the authentication request data, and the authentication request data is determined based on the connection response data;
[0107] When receiving the authentication request message information sent by the external charging pile, generating authentication confirmation message information and sending it to the charging pile, so that the external charging pile performs connection confirmation based on the authentication confirmation message information;
[0108] The authentication confirmation message information is encrypted message information, and the initial data corresponding to the authentication confirmation message information is authentication confirmation data, and the authentication confirmation data is determined based on the authentication request data.
[0109] In an exemplary embodiment, the in-vehicle battery control module includes a vehicle controller, a battery management system, and a DC converter, all of which are connected to the on-board charger;
[0110] The battery management system is also connected to the vehicle controller and the battery unit respectively.
[0111] In an exemplary embodiment, the process of performing encrypted communication includes:
[0112] The HSM on the information sending side encrypts the initial data to obtain encrypted message information;
[0113] The information sending side sends the encrypted message information to the information receiving side;
[0114] The HSM on the information receiving side decrypts the encrypted message information to obtain the initial data.
[0115] In an exemplary embodiment, data encryption includes:
[0116] Confirm initial data;
[0117] Obtaining an encryption algorithm and an encryption algorithm code corresponding to the encryption algorithm from a local preset security information storage area;
[0118] Generate key seeds;
[0119] Based on the encryption algorithm and the key seed, the initial data is encrypted to obtain encrypted data;
[0120] Generate encrypted message information corresponding to a preset message structure based on the key seed, encryption algorithm code and encrypted data.
[0121] In an exemplary embodiment, data decryption includes:
[0122] According to the preset message structure, determine the corresponding key seed, encryption algorithm code and encrypted data from the encrypted message information;
[0123] Obtaining an encryption algorithm corresponding to the encryption algorithm code from a local preset security information storage area;
[0124] Based on the encryption algorithm and key seed, the encrypted data is decrypted to obtain the initial data.
[0125] Figure 7 Schematic diagram of an electronic device 7 provided in an embodiment of the present application. Figure 7 As shown, the electronic device 7 of this embodiment includes: a processor 701, a memory 702, and a computer program 703 stored in the memory 702 and executable on the processor 701. When the processor 701 executes the computer program 703, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 701 executes the computer program 703, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0126] The electronic device 7 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 7 may include, but is not limited to, a processor 701 and a memory 702. Those skilled in the art will appreciate that Figure 7 The electronic device 7 is merely an example and does not limit the electronic device 7 , and may include more or less components than those shown in the figure, or different components.
[0127] The processor 701 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0128] The memory 702 may be an internal storage unit of the electronic device 7, for example, a hard disk or memory of the electronic device 7. The memory 702 may also be an external storage device of the electronic device 7, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 7. The memory 702 may also include both an internal storage unit of the electronic device 7 and an external storage device. The memory 702 is used to store computer programs and other programs and data required by the electronic device.
[0129] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0130] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium, such as a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. The readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0131] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A charging management method, characterized in that: Applied to vehicle chargers, including: When receiving the wake-up information of the external charging pile, based on the encrypted message information, perform encrypted communication with the external charging pile, and confirm the connection with the external charging pile based on the first result of the current encrypted communication; When the connection confirmation with the external charging pile is completed, based on the encrypted message information, encrypted communication is performed with the in-vehicle battery control module and the external charging pile respectively, and charging management is performed based on the second result of the current encrypted communication, so that the external charging pile charges the battery unit connected to the in-vehicle battery control module; The encrypted message information includes a key seed, an encryption algorithm code and encrypted data. The encrypted data is obtained by encrypting initial data using an encryption algorithm corresponding to the key seed and the encryption algorithm code. The encryption algorithm code and the encryption algorithm are obtained from a local preset security information storage area.
2. The method according to claim 1, characterized in that The wake-up information includes: level change information corresponding to the case where the real-time level state of the wake-up pin is switched to the wake-up state; The wake-up state includes: a level state of the wake-up pin when the wake-up pin is connected to the external charging pile.
3. The method according to claim 1, characterized in that In the case of receiving the wake-up information of the external charging pile, based on the encrypted message information, performing encrypted communication with the external charging pile, and confirming the connection with the external charging pile based on the first result of the current encrypted communication, the process includes: In the case of receiving the connection request message information sent by the external charging pile, generating connection response message information and sending it to the external charging pile, so that the external charging pile decrypts the connection response message information and generates corresponding authentication request message information; the connection response message information and the authentication request message information are both the encrypted message information, the initial data corresponding to the connection response message information is the connection response data, the connection response data is determined based on the connection request message information, and the initial data corresponding to the authentication request message information is the authentication request data, and the authentication request data is determined based on the connection response data; Upon receiving the authentication request message information sent by the external charging pile, generating authentication confirmation message information and sending it to the charging pile, so that the external charging pile performs connection confirmation based on the authentication confirmation message information; The authentication confirmation message information is the encrypted message information, the initial data corresponding to the authentication confirmation message information is authentication confirmation data, and the authentication confirmation data is determined based on the authentication request data.
4. The method according to claim 1, characterized in that: The in-vehicle battery control module includes a vehicle controller, a battery management system and a DC converter, all of which are connected to the on-board charger; The battery management system is also connected to the vehicle controller and the battery unit respectively.
5. The method according to any one of claims 1 to 4, characterized in that: The process of conducting encrypted communication includes: The hardware security module HSM on the information sending side encrypts the initial data to obtain the encrypted message information; The information sending side sends the encrypted message information to the information receiving side; The HSM on the information receiving side decrypts the encrypted message information to obtain the initial data.
6. The method according to claim 5, characterized in that The data encryption includes: confirming the initial data; Acquire the encryption algorithm and the encryption algorithm code corresponding to the encryption algorithm from the local preset security information storage area; generating the key seed; Encrypting the initial data based on the encryption algorithm and the key seed to obtain the encrypted data; The encrypted message information corresponding to the preset message structure is generated according to the key seed, the encryption algorithm code and the encrypted data.
7. The method according to claim 6, characterized in that The data decryption includes: According to the preset message structure, determining the corresponding key seed, the encryption algorithm code and the encrypted data from the encrypted message information; Acquire the encryption algorithm corresponding to the encryption algorithm code from the local preset security information storage area; Based on the encryption algorithm and the key seed, the encrypted data is decrypted to obtain the initial data.
8. A charging management device, characterized in that: include: A connection confirmation module, configured to perform encrypted communication with the external charging pile based on the encrypted message information when the wake-up information of the external charging pile is received, and to perform connection confirmation with the external charging pile based on the first result of the current encrypted communication; A charging management module, configured to, upon completion of the connection confirmation with the external charging pile, respectively perform encrypted communications with the in-vehicle battery control module and the external charging pile based on the encrypted message information, and perform charging management based on a second result of the current encrypted communication, so that the external charging pile charges the battery unit connected to the in-vehicle battery control module; The encrypted message information includes a key seed, an encryption algorithm code and encrypted data. The encrypted data is obtained by encrypting initial data using an encryption algorithm corresponding to the key seed and the encryption algorithm code. The encryption algorithm code and the encryption algorithm are obtained from a local preset security information storage area.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
