Battery encryption method, device, equipment, system, readable storage medium and product
By using asymmetric encryption verification in the battery encryption system, the problem of easy theft of new energy vehicle batteries is solved. It achieves one-to-one matching between the battery and the vehicle, ensuring that the battery can only be used in legitimate vehicles and preventing battery theft.
Patent Information
- Application Number
- CN202411721747.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-11-27
AI Technical Summary
New energy vehicle batteries are highly integrated and easily disassembled and reused. Existing anti-theft technologies cannot effectively warn or prevent battery theft if the camera or horn is damaged.
A battery encryption system is adopted, which ensures a one-to-one match between the vehicle and the battery through asymmetric encryption verification between the control module and the battery module. The target key is encrypted and decrypted using public and private keys, and a heartbeat verification is performed. Power is supplied only if the verification is successful; otherwise, power is stopped.
Effectively prevents battery theft, ensures that batteries can only be used in matched vehicles, avoids battery trading on the market, and guarantees battery safety.
Smart Images

Figure CN119561749B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to intelligent transportation in data processing, and in particular to a battery encryption method, device, equipment, system, readable storage medium and product. BACKGROUND
[0002] With the gradual development of new energy vehicles, more and more new energy vehicles gradually enter the life of users. Compared with the engine of traditional fuel vehicles, the battery of new energy vehicles has higher integration and is more easily disassembled and reused.
[0003] Therefore, how to realize the encryption and anti-theft of the battery of the new energy vehicle has become a problem to be solved. SUMMARY
[0004] The present disclosure provides a battery encryption method, device, equipment, system, readable storage medium and product for realizing the encryption and anti-theft of the battery of the new energy vehicle.
[0005] According to a first aspect of the present disclosure, a battery encryption method applied to a battery module is provided, comprising:
[0006] In response to a power supply request signal sent by a preset control module, a preset public key is sent to the control module;
[0007] Obtaining encrypted data sent by the control module, the encrypted data being obtained by the control module based on the preset public key encrypting a preset target key;
[0008] Decrypting the encrypted data by a private key corresponding to the preset public key to obtain the target key, and performing a legality verification operation on the target key;
[0009] In response to the target key passing the legality verification, performing a heartbeat verification operation with the control module based on the target key, and performing a power supply operation based on a verification result of the heartbeat verification operation.
[0010] According to a second aspect of the present disclosure, a battery encryption method applied to a control module is provided, comprising:
[0011] In response to vehicle starting, a power supply request signal is sent to a preset battery module;
[0012] Obtaining a preset public key sent by the battery module;
[0013] Encrypting a preset target key based on the preset public key to generate encrypted data, and sending the encrypted data to the battery module;
[0014] The target key is used to perform a heartbeat check operation with the battery module, and power transmission is performed based on a check result.
[0015] According to a third aspect of the present disclosure, a battery encryption method is provided, applied to a battery encryption system including a battery module and a control module, the battery module being in communication connection with the control module; the method includes:
[0016] In response to vehicle starting, the control module sends a power supply request signal to a preset battery module;
[0017] The battery module acquires the power supply request signal sent by the control module, and sends a preset public key to the control module;
[0018] The control module acquires the preset public key sent by the battery module, performs encryption operation on a preset target key based on the preset public key, generates encrypted data, and sends the encrypted data to the battery module;
[0019] The battery module decrypts the encrypted data by using a private key corresponding to the preset public key, acquires the target key, and performs legality check operation on the target key;
[0020] In response to the target key passing the legality check, the battery module and the control module perform a heartbeat check operation based on the target key, and perform power supply operation based on a check result of the heartbeat check operation.
[0021] According to a fourth aspect of the present disclosure, a battery encryption device is provided, applied to a battery module, including:
[0022] The sending module is configured to send a preset public key to the control module in response to a power supply request signal sent by a preset control module;
[0023] The acquiring module is configured to acquire encrypted data sent by the control module, the encrypted data being obtained by the control module after performing encryption on a preset target key based on the preset public key;
[0024] The decryption module is configured to decrypt the encrypted data by using a private key corresponding to the preset public key, acquire the target key, and perform legality check operation on the target key;
[0025] The power supply module is configured to perform a heartbeat check operation with the control module based on the target key in response to the target key passing the legality check, and perform power supply operation based on a check result of the heartbeat check operation.
[0026] According to a fifth aspect of this disclosure, a battery encryption device is provided for use in a control module, comprising:
[0027] The communication module is used to send a power supply request signal to the preset battery module in response to vehicle startup;
[0028] The data acquisition module is used to acquire the preset public key sent by the battery module;
[0029] An encryption module is used to perform encryption operations on a preset target key based on the preset public key, generate encrypted data, and send the encrypted data to the battery module.
[0030] The verification module is used to perform a heartbeat verification operation with the battery module based on the target key, and to perform a power transmission operation based on the verification result. The heartbeat verification operation is performed by the battery module after it determines that the target key has passed the legality verification.
[0031] According to a sixth aspect of this disclosure, a battery encryption system is provided, the battery encryption system including a battery module and a control module, the battery module and the control module being communicatively connected; the battery encryption system further includes:
[0032] The signal transmitting module is used to send a power supply request signal to the preset battery module in response to vehicle start-up;
[0033] The public key sending module is used to control the battery module to obtain the power supply request signal sent by the control module and send a preset public key to the control module;
[0034] The public key acquisition module is used to control the control module to acquire the preset public key sent by the battery module, perform encryption operation on the preset target key based on the preset public key, generate encrypted data, and send the encrypted data to the battery module.
[0035] The data decryption module is used to control the battery module to decrypt the encrypted data using a private key corresponding to the preset public key, obtain the target key, and perform a legality verification operation on the target key;
[0036] A heartbeat verification module is used to respond to the target key passing the validity verification, wherein the battery module and the control module perform a heartbeat verification operation based on the target key, and perform a power supply operation based on the verification result of the heartbeat verification operation.
[0037] According to a seventh aspect of this disclosure, an electronic device is provided, comprising:
[0038] At least one processor; and
[0039] The memory is in communication connection with the at least one processor; wherein
[0040] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of the first aspect or the second aspect or the third aspect.
[0041] According to an eighth aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method of the first aspect or the second aspect or the third aspect.
[0042] According to a ninth aspect of the present disclosure, a computer program product is provided, the computer program product comprising: a computer program stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to enable the electronic device to perform the method of the first aspect or the second aspect or the third aspect.
[0043] The technology according to the present disclosure can guarantee the safety of the battery of the new energy vehicle, and based on the battery encryption system, the battery module is controlled to stop power supply when the verification fails, so as to avoid the battery being stolen.
[0044] It should be understood that the contents described in this part are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0045] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:
[0046] Figure 1 A system architecture diagram based on the present disclosure;
[0047] Figure 2 A flowchart of the battery encryption method provided by the embodiments of the present disclosure;
[0048] Figure 3 A flowchart of the battery encryption method provided by another embodiment of the present disclosure;
[0049] Figure 4 A flowchart of the battery encryption method provided by another embodiment of the present disclosure;
[0050] Figure 5 A flowchart of the battery encryption method provided by another embodiment of the present disclosure;
[0051] Figure 6A flowchart of a battery encryption method provided for another embodiment of the present disclosure is shown in FIG. 6;
[0052] Figure 7 A flowchart of a battery encryption method provided for another embodiment of the present disclosure is shown in FIG. 6;
[0053] Figure 8 A flowchart of a battery encryption method provided for another embodiment of the present disclosure is shown in FIG. 6;
[0054] Figure 9 A flowchart of a battery encryption method provided for another embodiment of the present disclosure is shown in FIG. 6;
[0055] Figure 10 A flowchart of a battery encryption method provided for another embodiment of the present disclosure is shown in FIG. 6;
[0056] Figure 11 A flowchart of a battery encryption method provided for another embodiment of the present disclosure is shown in FIG. 6;
[0057] Figure 12 A flowchart of a battery encryption method provided for another embodiment of the present disclosure is shown in FIG. 6;
[0058] Figure 13 A flowchart of a battery encryption method provided for another embodiment of the present disclosure is shown in FIG. 6;
[0059] Figure 14 A flowchart of a battery encryption method provided for another embodiment of the present disclosure is shown in FIG. 6. DETAILED DESCRIPTION
[0060] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to assist in understanding, which should be considered in a descriptive sense only. It will thus be recognized by those of ordinary skill that various changes and modifications can be made to the embodiments described and illustrated herein without departing from the scope and spirit of the present disclosure. Also, for the purpose of clarity and the brevity, the description below omits the description of well-known functions and structures.
[0061] The present disclosure provides a battery encryption method, device, equipment, system, readable storage medium and product, which is applied to intelligent transportation in the field of data processing, so as to ensure the safety of new energy vehicle battery, control the battery to stop power supply when the verification fails based on the encryption system, and avoid the battery theft.
[0062] With the rapid development of new energy vehicles, the traditional vehicle anti-theft technology cannot completely cover the application scenarios of new energy vehicles. Compared with the engine of traditional fuel vehicles, the battery of new energy vehicles has higher integration and is more easily disassembled and reused.
[0063] The current market for battery theft prevention technology mainly presents the form of warning the thief through the vehicle external alarm sound, vehicle locking cannot drive and other ways. However, using the above method to prevent battery theft cannot output warning sound in the case of damaging the camera, damaging the sensor or damaging the loudspeaker of the thief. In addition, if the thief directly removes the battery, the loudspeaker has no power support, and the alarm will not be triggered, and the vehicle battery protection cannot be effectively performed.
[0064] In the process of solving the above technical problems, the inventor found through research that in order to be able to realize the protection of the new energy vehicle battery, a battery encryption system can be set. In the battery decryption system, the control module and the battery module can be used for encryption verification to ensure that the vehicle and the battery are matched one by one. Therefore, even if the battery is stolen, the battery cannot be used on other vehicles. The transaction of the battery on the market is solved from the root, and the battery theft is avoided.
[0065] Optionally, the public key, the private key and the target key can be pre-stored in the battery module. When the vehicle starts, the control system can send a handshake signal to the battery module. After verification, the battery module sends the public key to the control module. The control module encrypts the target key based on the public key and sends it to the battery module. After the target key is verified, the battery module can perform heartbeat verification with the control module. Based on the verification result, power supply is performed. When the verification fails, the power supply operation is stopped to ensure that the vehicle and the battery are matched one by one.
[0066] In order to enable the reader to understand the implementation principle of the present disclosure more deeply, the following Figures 1-14 The embodiment of the present disclosure is further refined.
[0067] Figure 1 The system architecture based on the present disclosure is shown in Figure 1 The system architecture based on the present disclosure includes a battery module 11 and a control module 12. The battery module 11 and the control module 12 are in communication connection. The battery module 11 pre-stores a preset public key 13, a private key 14 and a target key 15. The control module 12 pre-stores the target key 15.
[0068] Based on the above system architecture, when the vehicle starts, the control module 12 can send a power supply request signal to the battery module 11. In response to the power supply request signal, the battery module 11 sends a preset public key 13 to the control module 12. The control module 12 can perform an encryption operation on the target key 15 based on the preset public key 13, and feed back the encrypted data to the battery module 11. The battery module 11 can perform a decryption operation on the encrypted data, and perform a verification operation on the target key sent by the control module 12 based on the pre-stored target key 15. After verification, the battery module 11 can perform a heartbeat verification operation with the control module 12, and determine whether to continue the power supply operation based on the verification result.
[0069] Figure 2 The flowchart of the battery encryption method provided by the embodiments of the present disclosure is applied to a battery module, as shown in the figure, the method comprises: Figure 2
[0070] Step 201, in response to the power supply request signal sent by the preset control module, a preset public key is sent to the control module.
[0071] Step 202, obtain the encrypted data sent by the control module, the encrypted data is obtained by encrypting the preset target key based on the preset public key by the control module.
[0072] Step 203, the encrypted data is decrypted by the private key corresponding to the preset public key to obtain the target key, and the legality verification operation is performed on the target key.
[0073] Step 204, in response to the target key passing the legality verification, the heartbeat verification operation is performed between the target key and the control module based on the target key, and the power supply operation is performed based on the verification result of the heartbeat verification operation.
[0074] The execution subject of the embodiment is a battery encryption device. The battery encryption device can be coupled in the battery module.
[0075] In the embodiment, the battery module is in communication connection with the control module. The preset public key and the private key corresponding to the preset public key can be pre-set in the battery module. In addition, the target key can also be pre-set in the battery module and the control module. The target key can be any kind of preset key, or the target key can be the vin code of the current vehicle.
[0076] Among them, the battery module can be arranged in the battery installed in the new energy vehicle. The control module can be arranged in the new energy vehicle.
[0077] Optionally, in order to realize the battery encryption, when the vehicle starts, the control module can initiate a power supply request signal to the battery module, which can be a handshake signal, or can be any signal for requesting power supply, and the present disclosure does not limit it.
[0078] Further, in response to the power supply request signal, the battery module can send the preset public key to the control module.
[0079] It should be noted that when the vehicle starts for the first time, the battery module can send the preset public key to the control module. The control module can store the preset public key, so that the battery module can no longer send the preset public key to the control module. Alternatively, the control module can also not store the preset public key, and the battery module can send the preset public key to the control module every time the vehicle starts. The present disclosure does not limit it.
[0080] Further, in order to ensure the security of subsequent data interaction, after obtaining the preset public key, the control module can encrypt the pre-stored target key based on the preset public key to obtain encrypted data, and return the encrypted data to the battery module.
[0081] After the battery module obtains the encrypted data, the battery module can decrypt the encrypted data based on the private key corresponding to the preset public key to obtain the target key sent by the control module.
[0082] Optionally, in order to ensure the one-to-one relationship between the vehicle and the battery, after obtaining the target key, the target key can be further verified for legality to determine whether the control module is the control module matched with the battery, that is, it can be determined whether the vehicle currently installed with the battery is matched with the battery.
[0083] Further, after the legality verification of the target key is passed, the battery module can perform the power supply operation. Further, the control module and the battery module can also perform bidirectional heartbeat verification operation. In the verification process, the control module and the battery module can generate heartbeat packets and transmit them to the battery module and the control module respectively according to the preset transmission parameters. Therefore, the control module and the battery module can perform heartbeat verification based on the transmission frequency, decryption result and other information to determine whether to continue power supply.
[0084] In order to ensure the data security in the heartbeat verification process, the transmitted heartbeat packet can be encrypted by the target key.
[0085] The battery encryption method provided in the embodiment can ensure the one-to-one relationship between the vehicle and the battery, and can stop the power supply operation when the battery is installed in a vehicle that does not match, that is, the battery cannot be used after being stolen, thereby avoiding battery theft from the root.
[0086] Optionally, on the basis of any of the above embodiments, step 201 comprises:
[0087] In response to the handshake verification request triggered by the control module, performing a three-way handshake verification operation with the control module.
[0088] In response to the three-way handshake verification passing, sending a preset public key to the control module.
[0089] In the embodiment, the power supply request signal can be a handshake verification request.
[0090] Correspondingly, after the battery module obtains the handshake verification request sent by the control module, the battery module can perform a three-way handshake verification operation with the control module. After the three-way handshake verification passes, the battery module sends a preset public key to the control module.
[0091] The handshake verification operation between the battery module and the control module can be implemented by using an existing handshake verification method, and the present disclosure does not limit this.
[0092] The battery encryption method provided in the embodiment can effectively ensure the data security of the preset public key by sending the preset public key to the control module after the three-way handshake verification passes.
[0093] Optionally, on the basis of any of the above embodiments, step 203 comprises:
[0094] Comparing the target key sent by the control module with a pre-stored key.
[0095] If the target key is consistent with the pre-stored key, it is determined that the target key passes the legality verification.
[0096] If the target key is inconsistent with the pre-stored key, it is determined that the target key does not pass the legality verification, and the battery module is controlled not to perform a power transmission operation.
[0097] In the embodiment, in order to ensure the correspondence between the battery module and the control module, after obtaining the encrypted data sent by the control module, the target key sent by the control module can be compared with a pre-stored key.
[0098] If the target key is consistent with the pre-stored key, it indicates that the control module corresponds to the battery module, and thus it can be determined that the target key passes the legality check. Otherwise, it indicates that the control module does not match the battery module, that is, the battery does not match the vehicle in which the battery is installed. In order to ensure the safety of the battery, it can be determined that the target key fails the legality check, and the battery module is controlled not to perform the power transmission operation.
[0099] The battery encryption method provided in this embodiment can ensure the one-to-one relationship between the vehicle and the battery by performing the legality check on the target key. When the battery is installed in a mismatched vehicle, the power supply operation can be stopped, that is, the stolen battery cannot be used, and thus the battery theft is avoided from the root.
[0100] Figure 3 The flowchart of the battery encryption method provided in another embodiment of the present disclosure is shown in FIG. 4, which is based on any of the above embodiments. As shown in FIG. 4, step 204 includes: Figure 3
[0101] Step 301: obtaining at least one heartbeat packet sent by the control module, the heartbeat packet being obtained by encrypting a preset parameter based on the target key by the control module.
[0102] Step 302: performing a decryption operation on the at least one heartbeat packet based on the target key to obtain a decryption result.
[0103] Step 303: performing a heartbeat check operation according to the decryption result to obtain a check result.
[0104] Step 304: performing a power transmission operation in response to the check result being a check success.
[0105] Step 305: stopping the power transmission operation in response to the check result being a check failure.
[0106] In this embodiment, the battery module and the control module can perform a bidirectional heartbeat check operation. The control module can generate a heartbeat packet and transmit it to the battery module according to a preset transmission parameter, so that the battery module performs a heartbeat check operation on the control module.
[0107] Optionally, after obtaining the at least one heartbeat packet sent by the control module, since the heartbeat packet is obtained by encrypting a preset parameter based on the target key by the control module. Therefore, the heartbeat packet can be decrypted based on the pre-stored target in the battery module to obtain a decryption result. Thus, the heartbeat check operation can be performed based on the decryption result, or based on whether the pre-stored target key can be decrypted at present.
[0108] Optionally, if the verification passes, it is indicated that the battery module matches the control module, and power transmission can be performed. Otherwise, it is indicated that the battery module does not match the control module, and the battery may be stolen, so the power supply operation can be stopped to ensure the safety of the battery.
[0109] The battery encryption method provided in the embodiment can determine whether to continue power supply based on the transmission frequency and the decryption result. When the verification fails, the power supply is stopped, and the safety of the battery is further ensured.
[0110] Further, based on any of the above embodiments, step 303 comprises:
[0111] If the decryption result is decryption failure, it is determined that the verification result is verification failure.
[0112] If the decryption result is decryption success, the preset parameter obtained by decryption is compared with the heartbeat parameter generated based on the preset heartbeat information generation parameter.
[0113] If the preset parameter matches the heartbeat parameter, it is determined that the verification result is verification success.
[0114] If the preset parameter does not match the heartbeat parameter, it is determined that the verification result is verification failure.
[0115] In the embodiment, after the heartbeat packet is decrypted based on the target key pre-stored in the battery module to obtain a decryption result, the heartbeat verification operation can be performed based on the decryption result or based on whether the target key pre-stored in the battery module can be used to perform decryption at present.
[0116] Optionally, if the decryption result is decryption failure, it is indicated that the target key pre-stored in the battery module does not match the target key pre-stored in the control module, and it is determined that the verification result is verification failure.
[0117] If the decryption result is decryption success, the preset parameter obtained by decryption is compared with the heartbeat parameter generated based on the preset heartbeat information generation parameter. If the preset parameter matches the heartbeat parameter, it is determined that the verification result is verification success. If the preset parameter does not match the heartbeat parameter, it is determined that the verification result is verification failure.
[0118] The battery encryption method provided in the embodiment can determine whether to continue power supply based on the transmission frequency and the decryption result. When the verification fails, the power supply is stopped, and the safety of the battery is further ensured.
[0119] Figure 4A flowchart of a battery encryption method provided for another embodiment of the present disclosure is shown in FIG. 4. Based on any of the above embodiments, step 204 includes: Figure 4
[0120] Step 401: generating at least one heartbeat parameter according to a preset heartbeat information generation parameter.
[0121] Step 402: performing an encryption operation on each heartbeat parameter based on the target key to obtain at least one to-be-transmitted heartbeat packet.
[0122] Step 403: sequentially transmitting each to-be-transmitted heartbeat packet to the control module according to a preset time interval, so that the control module performs a heartbeat check operation on the battery module.
[0123] In this embodiment, the battery module and the control module can perform a bidirectional heartbeat check operation. The battery module can generate a to-be-transmitted heartbeat packet and transmit the to-be-transmitted heartbeat packet to the control module according to a preset transmission parameter, so that the control module performs a heartbeat check operation on the battery module.
[0124] Optionally, at least one preset parameter can be generated according to a preset heartbeat information generation parameter. The preset parameter can be a blank field, or can be a preset field, or the preset parameter can be an incrementing number each time, and the present disclosure does not limit this.
[0125] The battery module and the control module can both generate a preset parameter based on the heartbeat information generation parameter. Therefore, they can hold the same preset parameter for subsequent heartbeat check operations.
[0126] Further, in order to ensure data security and implement heartbeat check, for each preset parameter, a target key is used to perform an encryption operation on the preset parameter to obtain at least one to-be-transmitted heartbeat packet. Each to-be-transmitted heartbeat packet is sequentially transmitted to the control module according to a preset time interval, so that the control module performs a heartbeat check operation on the battery module.
[0127] Optionally, by sending the to-be-transmitted heartbeat packet according to the preset time interval, the control module can determine that the heartbeat check fails when the adjacent heartbeat packet receiving time interval does not match the preset time interval.
[0128] The battery encryption method provided in this embodiment can further ensure the security of the battery by performing a bidirectional heartbeat check operation between the battery module and the control module.
[0129] Figure 5 A flowchart of a battery encryption method provided for another embodiment of the present disclosure is shown in FIG. 4. Based on any of the above embodiments, step 204 includes:
[0130] Step 501, in response to the vehicle starting, sending a power supply request signal to the preset battery module.
[0131] Step 502, obtaining the preset public key sent by the battery module.
[0132] Step 503, based on the preset public key, encrypting the preset target key to generate encrypted data, and sending the encrypted data to the battery module.
[0133] Step 504, according to the target key, performing a heartbeat check operation with the battery module, and based on the check result, performing a power transmission operation, wherein the heartbeat check operation is performed after the target key is determined to pass the legality check by the battery module.
[0134] The execution subject of the embodiment is a battery encryption device. The battery encryption device can be coupled in the control module.
[0135] In the embodiment, the battery module is in communication connection with the control module. The battery module can be pre-provided with a preset public key and a private key corresponding to the preset public key. In addition, the battery module and the control module can also be pre-provided with a target key.
[0136] Optionally, in order to realize battery encryption, when the vehicle starts, the control module can initiate a power supply request signal to the battery module, which can be a handshake signal, or any signal used to request power supply, which is not limited by the present disclosure.
[0137] Further, after obtaining the power supply request signal, the battery module can send the preset public key to the control module.
[0138] It should be noted that when the vehicle starts for the first time, the battery module can send the preset public key to the control module. After obtaining the target key, the control module can store the preset public key, so that the battery module can no longer send the preset public key to the control module. Alternatively, the control module can also not store the preset public key, and the battery module can send the preset public key to the control module every time the vehicle starts. The present disclosure does not make any limitation.
[0139] Further, in order to ensure the security of subsequent data interaction, after obtaining the preset public key, the control module can perform encryption operation on the pre-stored target key based on the preset public key to obtain encrypted data, and return the encrypted data to the battery module.
[0140] After obtaining the encrypted data, the battery module can decrypt the encrypted data based on the private key corresponding to the preset public key to obtain the target key sent by the control module.
[0141] Optionally, in order to ensure the one-to-one relationship between the vehicle and the battery, after obtaining the target key, the target key can be subjected to a legality verification operation to determine whether the control module is a control module matched with the battery, that is, it can be determined whether the vehicle currently installed with the battery is matched with the battery.
[0142] Further, after the legality verification of the target key is passed, the battery module can perform a power supply operation. Further, the control module can perform a two-way heartbeat check operation with the battery module. In the check process, the control module and the battery module can each generate a heartbeat packet and transmit it to the battery module and the control module respectively according to preset transmission parameters. Therefore, the control module and the battery module can perform a heartbeat check based on transmission frequency, decryption result and other information to determine whether to continue power supply.
[0143] In order to ensure the safety of data in the heartbeat check process, the transmitted heartbeat packet can be encrypted by the target key.
[0144] Optionally, in the above any embodiment, the target key is a preset key, or the target key is a VIN code of the vehicle.
[0145] The battery encryption method provided in the embodiment can transmit the target key in an asymmetric encryption manner by sending a power supply request signal to the battery module when the vehicle starts, and can perform a power supply operation after the legality verification of the target key is passed, so as to ensure the one-to-one relationship between the vehicle and the battery, and can stop the power supply operation when the battery is installed in a mismatched vehicle, that is, the battery cannot be used after being stolen, so as to avoid battery theft from the root. In addition, in the power supply process, the heartbeat packet can be encrypted by the target key to implement the heartbeat check operation, and the power supply is stopped when the check fails, further ensuring the safety of the battery.
[0146] Figure 6 The flowchart of the battery encryption method provided in another embodiment of the disclosure is based on any of the above embodiments, as shown in Figure 6 The step 504 comprises:
[0147] Step 601, at least one preset parameter is generated according to a preset heartbeat information generation parameter.
[0148] Step 602, for each preset parameter, the target key is subjected to an encryption operation on the preset parameter to obtain at least one heartbeat packet.
[0149] Step 603, each heartbeat packet is transmitted to the battery module in turn according to a preset time interval, so that the battery module performs a heartbeat check operation on the control module.
[0150] In the embodiment, the battery module and the control module can perform a bidirectional heartbeat verification operation. The control module can generate a heartbeat packet and transmit it to the battery module according to preset transmission parameters, so that the battery module performs a heartbeat verification operation on the control module.
[0151] Optionally, at least one preset parameter can be generated according to a preset heartbeat information generation parameter. The preset parameter can be a blank field, or can be a preset field, or the preset parameter can be an incrementing number, and the present disclosure does not limit this.
[0152] Further, in order to ensure data security and implement heartbeat verification, for each preset parameter, the target key is used to perform an encryption operation on the preset parameter to obtain at least one heartbeat packet. Each heartbeat packet is transmitted to the battery module in turn according to a preset time interval, so that the battery module performs a heartbeat verification operation on the control module.
[0153] Optionally, by transmitting the heartbeat packet according to the preset time interval, the battery module can determine that the heartbeat verification fails when the adjacent heartbeat packet receiving time interval does not match the preset time interval.
[0154] The battery encryption method provided in the embodiment can determine whether to continue power supply based on the transmission frequency, decryption result, and other verification results by performing an encryption operation on the heartbeat packet based on the target key and performing a heartbeat verification based on the encrypted heartbeat packet. When the verification fails, the power supply is stopped, further ensuring the safety of the battery.
[0155] Figure 7 The flowchart of the battery encryption method provided in another embodiment of the present disclosure is based on any of the above embodiments, as shown in Figure 7 The step 504 includes:
[0156] Step 701, obtaining at least one to-be-transmitted heartbeat packet sent by the battery module, the to-be-transmitted heartbeat packet being obtained by encrypting a heartbeat parameter based on the target key by the battery module.
[0157] Step 702, performing a decryption operation on the at least one to-be-transmitted heartbeat packet by the target key to obtain a decryption result.
[0158] Step 703, comparing the decryption result with a preset parameter generated based on a preset heartbeat information generation parameter to obtain a verification result.
[0159] Step 704, in response to the verification result being a verification pass, performing a power transmission operation.
[0160] Step 705, in response to the check result being a check failure, the communication connection with the battery module is disconnected.
[0161] In the embodiment, the battery module and the control module can perform a bidirectional heartbeat check operation.
[0162] Optionally, the control module can also obtain at least one to-be-transmitted heartbeat packet sent by the battery module, the to-be-transmitted heartbeat packet being obtained by encrypting the heartbeat parameter based on the target key.
[0163] Further, after obtaining the to-be-transmitted heartbeat packet, the to-be-transmitted heartbeat packet can be decrypted based on the target key to obtain a decryption result. Thus, the heartbeat check operation can be implemented based on the decryption result or whether the pre-stored target key can be currently used for decryption.
[0164] Optionally, if the check passes, it indicates that the battery module and the control module match, and at this time, the power transmission operation can be performed. Otherwise, it indicates that the battery module and the control module do not match, and at this time, the battery may be at risk of being stolen, so the communication connection with the battery module can be disconnected to ensure the safety of the battery.
[0165] The battery encryption method provided in the embodiment can encrypt the heartbeat packet based on the target key, perform the heartbeat check based on the encrypted heartbeat packet, and determine whether to continue to supply power based on the check result such as the transmission frequency and the decryption result. When the check fails, the communication connection with the battery module is disconnected, further ensuring the safety of the battery.
[0166] Further, on the basis of any of the above embodiments, step 703 comprises:
[0167] If the decryption result is consistent with the preset parameter, it is determined that the check result is a check pass.
[0168] If the decryption result is inconsistent with the preset parameter, or the decryption result is a decryption failure, it is determined that the check result is a check failure.
[0169] In the embodiment, after obtaining the to-be-transmitted heartbeat packet sent by the battery module, the to-be-transmitted heartbeat packet can be decrypted based on the target key. Thus, the heartbeat check operation can be implemented based on the decryption result or whether the pre-stored target key can be currently used for decryption.
[0170] Optionally, if the decryption result is consistent with the preset parameter, it is determined that the check result is a check pass.
[0171] Conversely, if the decryption result is inconsistent with the preset parameter, or the decryption result is decryption failure, it is determined that the check result is check failure.
[0172] The battery encryption method provided in the embodiment determines whether to continue power supply based on the check result of the transmission frequency and the decryption result in the heartbeat check process. When the check fails, the communication connection with the battery module is disconnected, further ensuring the safety of the battery.
[0173] Figure 8 The flowchart of the battery encryption method provided in the embodiment of the present disclosure is applied to a battery encryption system, which includes a battery module and a control module, and the battery module is in communication connection with the control module. As shown in Figure 8 The method includes the following steps.
[0174] Step 801, in response to the start of the vehicle, the control module sends a power supply request signal to the preset battery module.
[0175] Step 802, the battery module acquires the power supply request signal sent by the control module, and sends a preset public key to the control module.
[0176] Step 803, the control module acquires the preset public key sent by the battery module, performs encryption operation on the preset target key based on the preset public key, generates encrypted data, and sends the encrypted data to the battery module.
[0177] Step 804, the battery module decrypts the encrypted data by using the private key corresponding to the preset public key, acquires the target key, and performs legality check operation on the target key.
[0178] Step 805, in response to the target key passing the legality check, the battery module and the control module perform heartbeat check operation based on the target key, and perform power supply operation based on the check result of the heartbeat check operation.
[0179] The execution subject of the embodiment is a battery encryption device, which can be coupled with a battery encryption system. The battery encryption system includes a battery module and a control module, and the battery module is in communication connection with the control module. The battery module can prestore a preset public key, a private key and a target key. The control module prestores the target key.
[0180] Based on the above system architecture, in response to the start of the vehicle, the control module sends a power supply request signal to the preset battery module. The power supply request signal can be a handshake signal, or it can be any kind of signal for requesting power supply, which is not limited in the present disclosure.
[0181] Further, the battery module can obtain the power supply request signal sent by the control module, and send a preset public key to the control module. After obtaining the preset public key, the control module can perform a storage operation on the preset public key, so that the battery module no longer needs to perform a sending operation of the preset public key to the control module in the future when the vehicle starts. Alternatively, the control module can also not store the preset public key, and the battery module can send the preset public key to the control module every time the vehicle starts. The present disclosure does not limit this.
[0182] The control module obtains the preset public key sent by the battery module, performs an encryption operation on the preset target key based on the preset public key, generates encrypted data, and sends the encrypted data to the battery module. The battery module decrypts the encrypted data by using a private key corresponding to the preset public key to obtain the target key. In order to ensure the one-to-one relationship between the vehicle and the battery, after obtaining the target key, a legality verification operation can also be performed on the target key to determine whether the control module is a control module matched with the battery, that is, it can be determined whether the vehicle currently installed with the battery is matched with the battery.
[0183] In response to the target key passing the legality verification, the battery module and the control module perform a heartbeat verification operation based on the target key, and perform a power supply operation based on the verification result of the heartbeat verification operation. Therefore, when the verification fails, the power supply is stopped, further ensuring the safety of the battery.
[0184] The battery encryption method provided by the embodiment can ensure the one-to-one relationship between the vehicle and the battery by setting a battery encryption system, transmitting the target key in the battery encryption system by using an asymmetric encryption mode, and performing a power supply operation after the legality verification of the target key passes, so that when the battery is installed in a vehicle that does not match, the power supply operation can be stopped, that is, the battery cannot be used after being stolen, so that the theft of the battery is avoided from the root. In addition, in the power supply process, the heartbeat packet can be encrypted by using the target key to perform a heartbeat verification operation, and the power supply is stopped when the verification fails, further ensuring the safety of the battery.
[0185] Figure 9 The flowchart of the battery encryption method provided by another embodiment of the present disclosure is based on any of the above embodiments, as shown in Figure 9 The method further includes:
[0186] In step 901, update data sent by a preset cloud server is obtained, wherein the update data includes an updated private key, an updated public key, and an updated key, and the update data is uploaded to the cloud server by a terminal device of a user when the vehicle performs a battery replacement operation.
[0187] Step 902: Update the current preset public key of the control module to the updated public key according to the updated data, and update the target key currently stored in the control module to the updated key according to the updated data.
[0188] Step 903: Update the current preset public key and private key of the battery module to the updated public key and updated private key according to the updated data, and switch the target key in the battery module to the updated key according to the updated data.
[0189] In this embodiment, when a new energy vehicle replaces its battery, in order to ensure battery safety, the user can update the preset public key, private key, and target key stored in the battery module, as well as update the target key in the control module.
[0190] Optionally, users can set update data in a pre-installed application on their terminal device. This update data includes an updated private key, an updated public key, and an updated private key. After completing the setup, the update data can be uploaded to a cloud server.
[0191] Accordingly, the application software installed in the new energy vehicle can obtain the updated data from the cloud server. Based on the updated data, the control module's current preset public key is updated to an updated public key, and the target key currently stored in the control module is updated to an updated key. Based on the updated data, the battery module's current preset public and private keys are updated to updated public and private keys, and the target key in the battery module is switched to the updated key.
[0192] This allows the battery module and control module to perform subsequent key verification and heartbeat verification operations based on the updated data, and then supply power after successful verification.
[0193] Figure 10 This is a schematic diagram illustrating an application scenario provided by an embodiment of this disclosure, such as... Figure 10 As shown, after replacing the vehicle battery, the user can initiate a data update request based on the pre-installed application software 1001 on the terminal device, and transmit the update data to the cloud server 1002 for storage. The update data includes an update private key, an update public key, and an update key. The pre-installed application software 1003 on the vehicle can retrieve this update data from the cloud server 1002. Based on this update data, it updates the encrypted data stored in the battery module 1004 and the control module 1005.
[0194] The battery encryption method provided in this embodiment can further ensure the security of the replaced battery by updating the preset public key, private key, and target key in a timely manner when the vehicle battery is replaced.
[0195] Figure 11 This is a schematic diagram of the structure of the battery encryption device provided in the embodiments of this disclosure, applied to a battery module, such as... Figure 11 As shown, the device includes: a sending module 1101, an acquisition module 1102, a decryption module 1103, and a power supply module 1104. The sending module 1101 is used to send a preset public key to the control module in response to a power supply request signal sent by a preset control module. The acquisition module 1102 is used to acquire encrypted data sent by the control module, wherein the encrypted data is obtained by the control module encrypting a preset target key based on the preset public key. The decryption module 1103 is used to decrypt the encrypted data using a private key corresponding to the preset public key to obtain the target key, and perform a validity verification operation on the target key. The power supply module 1104 is used to, in response to the target key passing the validity verification, perform a heartbeat verification operation with the control module based on the target key, and perform a power supply operation based on the verification result of the heartbeat verification operation.
[0196] Further, based on any of the above embodiments, the power supply module includes: an acquisition unit, configured to acquire at least one heartbeat packet sent by the control module, wherein the heartbeat packet is obtained by the control module after encrypting preset parameters based on the target key; a decryption unit, configured to decrypt the at least one heartbeat packet using the target key to obtain a decryption result; a verification unit, configured to perform a heartbeat verification operation based on the decryption result to obtain a verification result; a power supply unit, configured to perform a power transmission operation in response to a successful verification result; and a processing unit, configured to stop the power transmission operation in response to a failed verification result.
[0197] Further, based on any of the above embodiments, the verification unit includes: a first verification subunit, configured to determine that the verification result is a verification failure if the decryption result is a decryption failure; a second verification subunit, configured to compare the preset parameters obtained from the decryption with the heartbeat parameters generated based on preset heartbeat information generation parameters if the decryption result is a successful decryption; a determining subunit, configured to determine that the verification result is a verification success if the preset parameters match the heartbeat parameters; and a determining subunit, further configured to determine that the verification result is a verification failure if the preset parameters do not match the heartbeat parameters.
[0198] Further, based on any of the above embodiments, the power supply module includes: a generation unit, configured to generate at least one heartbeat parameter according to preset heartbeat information generation parameters; an encryption unit, configured to encrypt each heartbeat parameter based on the target key to obtain at least one heartbeat packet to be transmitted; and a transmission unit, configured to sequentially transmit each heartbeat packet to be transmitted to the control module at preset time intervals, so that the control module performs a heartbeat verification operation on the battery module.
[0199] Further, based on any of the above embodiments, the sending module includes: a verification unit, configured to perform a three-way handshake verification operation with the control module in response to a handshake verification request triggered by the control module; and a sending unit, configured to send a preset public key to the control module in response to the successful three-way handshake verification.
[0200] Further, based on any of the above embodiments, the power supply module includes: a comparison unit, configured to compare the target key sent by the control module with a pre-stored key; a processing unit, configured to determine that the target key passes the validity check if the target key matches the pre-stored key; and a control unit, configured to determine that the target key fails the validity check if the target key does not match the pre-stored key, and control the battery module not to perform power transmission operation.
[0201] Figure 12 This is a schematic diagram of the battery encryption device provided in an embodiment of the present disclosure, applied to a control module, such as... Figure 12 As shown, the device includes: a communication module 1201, a data acquisition module 1202, an encryption module 1203, and a verification module 1204. The communication module 1201 is used to send a power request signal to a preset battery module in response to vehicle startup. The data acquisition module 1202 is used to acquire a preset public key sent by the battery module. The encryption module 1203 is used to encrypt a preset target key based on the preset public key, generate encrypted data, and send the encrypted data to the battery module. The verification module 1204 is used to perform a heartbeat verification operation with the battery module based on the target key, and perform power transmission based on the verification result. The heartbeat verification operation is performed after the battery module determines that the target key has passed the validity verification.
[0202] Furthermore, based on any of the above embodiments, the target key is a preset key, or the target key is the vehicle's VIN code.
[0203] Furthermore, based on any of the above embodiments, the verification module comprises: a parameter generation unit, configured to generate at least one preset parameter according to preset heartbeat information; a data processing unit, configured to encrypt each preset parameter using the target key to obtain at least one heartbeat packet; and a data transmission unit, configured to sequentially transmit each heartbeat packet to the battery module at preset time intervals, so that the battery module performs a heartbeat verification operation on the control module.
[0204] Further, based on any of the above embodiments, the verification module includes: a data acquisition unit, configured to acquire at least one heartbeat packet to be transmitted sent by the battery module, wherein the heartbeat packet to be transmitted is obtained by the battery module encrypting heartbeat parameters based on the target key; a data decryption unit, configured to decrypt the at least one heartbeat packet to be transmitted using the target key to obtain a decryption result; a data comparison unit, configured to compare the data with the decryption result and preset parameters generated based on preset heartbeat information generation parameters to obtain a verification result; a transmission unit, configured to perform a power transmission operation in response to the verification result being a successful verification; and a connection processing unit, configured to disconnect the communication connection with the battery module in response to the verification result being a failed verification.
[0205] Further, based on any of the above embodiments, the data comparison unit includes: a first determination unit, configured to determine that the verification result is verified successfully if the decryption result is consistent with the preset parameters; and a second determination unit, configured to determine that the verification result is verified unsuccessfully if the decryption result is inconsistent with the preset parameters, or if the decryption result is a decryption failure.
[0206] Figure 13 This is a schematic diagram of the structure of a battery encryption system provided in an embodiment of this disclosure. The battery encryption system includes a battery module and a control module, and the battery module and the control module are communicatively connected. Figure 13As shown, the battery encryption system further includes a signal sending module 1301, a public key sending module 1302, a public key obtaining module 1303, and a data decryption module 1304. The signal sending module 1301 is configured to, in response to vehicle starting, control the control module to send a power supply request signal to the preset battery module. The public key sending module 1302 is configured to control the battery module to obtain the power supply request signal sent by the control module, and send a preset public key to the control module. The public key obtaining module 1303 is configured to control the control module to obtain the preset public key sent by the battery module, perform an encryption operation on a preset target key based on the preset public key, generate encrypted data, and send the encrypted data to the battery module. The data decryption module 1304 is configured to control the battery module to perform a decryption operation on the encrypted data by using a private key corresponding to the preset public key, obtain the target key, and perform a legality verification operation on the target key.
[0207] A heartbeat verification module is configured to, in response to the target key passing the legality verification, control the battery module and the control module to perform a heartbeat verification operation based on the target key, and perform a power supply operation based on a verification result of the heartbeat verification operation.
[0208] Further, on the basis of any of the above embodiments, the system further includes an update data obtaining module configured to obtain update data sent by a preset cloud server, wherein the update data includes an update private key, an update public key, and an update key, and the update data is uploaded to the cloud server by a terminal device of a user when the vehicle performs a battery replacement operation. A first update module is configured to update a preset public key currently stored in the control module to the update public key according to the update data, and update a target key currently stored in the control module to the update key according to the update data. A second update module is configured to update a preset public key and a private key currently stored in the battery module to the update public key and the update private key according to the update data, and switch the target key in the battery module to the update key according to the update data.
[0209] According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0210] According to embodiments of the present disclosure, the present disclosure also provides an electronic device, including:
[0211] at least one processor; and
[0212] a memory connected with the at least one processor in communication; wherein
[0213] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method in any of the above embodiments.
[0214] According to an embodiment of the present disclosure, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to perform the method in any of the above embodiments.
[0215] According to an embodiment of the present disclosure, the present disclosure further provides a computer program product, which comprises a computer program stored in a readable storage medium, and at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to enable the electronic device to perform the scheme provided in any of the above embodiments.
[0216] Figure 14 The structural schematic diagram of the electronic device provided by the embodiment of the present disclosure is shown. The electronic device 14 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.
[0217] As shown in Figure 14 The device 1400 includes a computing unit 1401 that can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1402 or a computer program loaded from a storage unit 1408 into a random access memory (RAM) 1403. In the RAM 1403, various programs and data required for the operation of the device 1400 can also be stored. The computing unit 1401, the ROM 1402, and the RAM 1403 are connected to each other through a bus 1404. An input / output (I / O) interface 1405 is also connected to the bus 1404.
[0218] A number of components in the device 1400 are connected to the I / O interface 1405, including: an input unit 1406, such as a keyboard, a mouse, etc.; an output unit 1407, such as various types of displays, speakers, etc.; a storage unit 1408, such as a magnetic disk, a magneto-optical disk, etc.; and a communication unit 1409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1409 allows the device 1400 to exchange information / data with other devices over a computer network, such as the Internet, and / or various telecommunication networks.
[0219] The computing unit 1401 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 1401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1401 performs various methods and processes described above, such as the battery encryption method. For example, in some embodiments, the battery encryption method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1408. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 1400 via the ROM 1402 and / or the communication unit 1409. When the computer program is loaded onto the RAM 1403 and executed by the computing unit 1401, one or more steps of the battery encryption method described above can be performed. Alternatively, in other embodiments, the computing unit 1401 can be configured to perform the battery encryption method by any other suitable means, such as by means of firmware.
[0220] Various implementations of the systems and techniques described above herein can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0221] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0222] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0223] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0224] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0225] The computer system can include clients and servers. This relationship can be. The servers are typically remote from the clients with the interactions typically taking place over a communication network. The relationship of client and server arises by interplay of both computers programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system. It solves the defects of large management difficulty and weak business scalability in traditional physical host and VPS (Virtual Private Server, or VPS for short) services. The server can also be a server of a distributed system, or a server combined with a blockchain.
[0226] It should be understood that the various forms of flow shown above can be reordered, steps added or removed. For example, the steps recited in the present disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technology solutions of the present disclosure are achieved, which are not limited herein.
[0227] The above detailed description does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.
Claims
1. A battery encryption method applied to a battery module, comprising: sending a preset public key to a control module in response to a power supply request signal sent by the control module; obtaining encrypted data sent by the control module, the encrypted data being obtained by encrypting a preset target key by the control module based on the preset public key; decrypting the encrypted data by a private key corresponding to the preset public key to obtain the target key, and performing a legality verification operation on the target key; performing a heartbeat verification operation on the control module based on the target key in response to the target key passing the legality verification, and performing a power supply operation based on a verification result of the heartbeat verification operation; the heartbeat verification operation based on the target key and the control module comprises: obtaining at least one heartbeat packet sent by the control module, the heartbeat packet being obtained by encrypting a preset parameter by the control module based on the target key; decrypting the at least one heartbeat packet by the target key to obtain a decryption result; performing a heartbeat verification operation according to the decryption result to obtain a verification result.
2. The method of claim 1, wherein, the power supply operation based on the verification result of the heartbeat verification operation comprises: performing an electric quantity transmission operation in response to the verification result being verification success; stopping the electric quantity transmission operation in response to the verification result being verification failure.
3. The method of claim 2, wherein, the heartbeat verification operation according to the decryption result to obtain a verification result comprises: if the decryption result is decryption failure, determining that the verification result is verification failure; if the decryption result is decryption success, comparing a preset parameter obtained by decryption with a heartbeat parameter generated based on a preset heartbeat information generation parameter; if the preset parameter matches the heartbeat parameter, determining that the verification result is verification success; if the preset parameter does not match the heartbeat parameter, determining that the verification result is verification failure.
4. The method of claim 1, wherein, the heartbeat verification operation based on the target key and the control module comprises: generating at least one heartbeat parameter according to a preset heartbeat information generation parameter; encrypting each heartbeat parameter based on the target key to obtain at least one to-be-transmitted heartbeat packet; transmitting each to-be-transmitted heartbeat packet to the control module in turn according to a preset time interval, so that the control module performs a heartbeat verification operation on the battery module.
5. The method according to any one of claims 1 to 4, wherein, the sending of the preset public key to the control module in response to the power supply request signal sent by the control module comprises: performing a three-way handshake verification operation with the control module in response to a handshake verification request triggered by the control module; sending the preset public key to the control module in response to the three-way handshake verification passing.
6. The method according to any one of claims 1-4, wherein, the legality verification operation on the target key comprises: comparing the target key sent by the control module with a pre-stored key; if the target key is consistent with the pre-stored key, determining that the target key passes the legality verification; if the target key is not consistent with the pre-stored key, determining that the target key does not pass the legality verification, and controlling the battery module to not perform an electric quantity transmission operation.
7. A battery encryption method applied to a control module, comprising: sending a power supply request signal to a preset battery module in response to vehicle starting; obtaining a preset public key sent by the battery module; performing encryption operation on a preset target key based on the preset public key to generate encrypted data, and sending the encrypted data to the battery module; performing heartbeat check operation with the battery module according to the target key, and performing power transmission operation based on the check result, wherein the heartbeat check operation is performed after the target key is determined to pass the legality check by the battery module; the heartbeat check operation with the battery module according to the target key comprises: sending at least one heartbeat packet to the battery module, so that the battery module performs decryption operation on the at least one heartbeat packet obtained by the battery module through the target key to obtain a decryption result, performs heartbeat check operation according to the decryption result to obtain a check result, and performs power supply operation based on the check result; the heartbeat packet is obtained by performing encryption on a preset parameter by the control module based on the target key.
8. The method of claim 7, wherein, The target key is a preset key, or the target key is a VIN code of the vehicle.
9. The method of claim 7, wherein, the heartbeat check operation with the battery module according to the target key, and performing power transmission operation based on the check result, comprises: generating at least one preset parameter according to a preset heartbeat information generation parameter; for each preset parameter, performing encryption operation on the preset parameter through the target key to obtain at least one heartbeat packet; transmitting each heartbeat packet to the battery module in turn according to a preset time interval, so that the battery module performs heartbeat check operation on the control module.
10. The method of claim 7, wherein, the heartbeat check operation with the battery module according to the target key, and performing power transmission operation based on the check result, comprises: obtaining at least one to-be-transmitted heartbeat packet sent by the battery module, wherein the to-be-transmitted heartbeat packet is obtained by performing encryption on a heartbeat parameter by the battery module based on the target key; performing decryption operation on the at least one to-be-transmitted heartbeat packet through the target key to obtain a decryption result; comparing the decryption result with a preset parameter generated based on a preset heartbeat information generation parameter to obtain a check result; performing power transmission operation in response to the check result being check passed; in response to the check result being check failed, disconnecting the communication connection with the battery module.
11. The method of claim 10, wherein, the comparison of the decryption result with the preset parameter generated based on the preset heartbeat information generation parameter to obtain the check result comprises: if the decryption result is consistent with the preset parameter, it is determined that the check result is check passed; if the decryption result is inconsistent with the preset parameter, or the decryption result is decryption failed, it is determined that the check result is check failed.
12. A battery encryption method applied to a battery encryption system, wherein the battery encryption system comprises a battery module and a control module, and the battery module is in communication connection with the control module; the method comprises: sending a power supply request signal to a preset battery module by the control module in response to vehicle starting; The battery module obtains the power supply request signal sent by the control module, and sends a preset public key to the control module; The control module obtains the preset public key sent by the battery module, performs encryption operation on a preset target key based on the preset public key, generates encrypted data, and sends the encrypted data to the battery module; The battery module decrypts the encrypted data by using a private key corresponding to the preset public key, obtains the target key, and performs legality verification operation on the target key; In response to the target key passing the legality verification, the battery module and the control module perform heartbeat verification operation based on the target key, and perform power supply operation based on a verification result of the heartbeat verification operation; The battery module and the control module perform heartbeat verification operation based on the target key, including: The battery module obtains at least one heartbeat packet sent by the control module, the heartbeat packet being obtained by the control module by encrypting a preset parameter based on the target key; The battery module decrypts the at least one heartbeat packet by using the target key, and obtains a decryption result; The battery module performs heartbeat verification operation according to the decryption result, and obtains a verification result.
13. The method of claim 12, further comprising: obtaining update data sent by a preset cloud server, wherein the update data includes an update private key, an update public key and an update key, and the update data is uploaded to the cloud server by a terminal device of a user when a vehicle performs battery replacement operation; updating a preset public key currently stored in the control module to the update public key according to the update data, and updating a target key currently stored in the control module to the update key according to the update data; updating a preset public key and a private key currently stored in the battery module to the update public key and the update private key according to the update data, and switching the target key in the battery module to the update key according to the update data.
14. A battery encryption device applied to a battery module, comprising: a sending module configured to send a preset public key to a control module in response to a power supply request signal sent by the control module; an obtaining module configured to obtain encrypted data sent by the control module, the encrypted data being obtained by the control module by encrypting a preset target key based on the preset public key; a decryption module configured to decrypt the encrypted data by using a private key corresponding to the preset public key, obtain the target key, and perform legality verification operation on the target key; a power supply module configured to perform heartbeat verification operation with the control module based on the target key in response to the target key passing the legality verification, and perform power supply operation based on a verification result of the heartbeat verification operation; wherein the power supply module comprises: an obtaining unit configured to obtain at least one heartbeat packet sent by the control module, the heartbeat packet being obtained by the control module by encrypting a preset parameter based on the target key; A decryption unit is configured to perform decryption on the at least one heartbeat packet by using the target key to obtain a decryption result. A verification unit is configured to perform heartbeat verification on the decryption result to obtain a verification result.
15. The apparatus of claim 14, wherein the power supply module further comprises: a power supply unit configured to perform power transmission in response to the verification result being verification success; a processing unit configured to stop the power transmission in response to the verification result being verification failure.
16. The apparatus of claim 15, wherein, The verification unit comprises: a first verification sub-unit configured to determine the verification result as verification failure if the decryption result is decryption failure; a second verification sub-unit configured to compare a preset parameter obtained by decryption with a heartbeat parameter generated based on preset heartbeat information generation parameters if the decryption result is decryption success; a determination sub-unit configured to determine the verification result as verification success if the preset parameter matches the heartbeat parameter; and the determination sub-unit is further configured to determine the verification result as verification failure if the preset parameter does not match the heartbeat parameter.
17. The apparatus of claim 14, wherein, The power supply module comprises: a generation unit configured to generate at least one heartbeat parameter according to preset heartbeat information generation parameters; an encryption unit configured to perform encryption on each heartbeat parameter based on the target key to obtain at least one to-be-transmitted heartbeat packet; and a transmission unit configured to transmit each to-be-transmitted heartbeat packet to the control module in sequence according to a preset time interval, so that the control module performs heartbeat verification on the battery module.
18. The apparatus of any of claims 14-17, wherein, The sending module comprises: a verification unit configured to perform three-way handshake verification with the control module in response to a handshake verification request triggered by the control module; and a sending unit configured to send a preset public key to the control module in response to the three-way handshake verification being passed.
19. The apparatus of any of claims 14-17, wherein, The power supply module comprises: a comparison unit configured to compare the target key sent by the control module with a pre-stored key; a processing unit configured to determine that the target key passes the legality verification if the target key is consistent with the pre-stored key; and a control unit configured to determine that the target key does not pass the legality verification if the target key is not consistent with the pre-stored key, and control the battery module to not perform power transmission.
20. A battery encryption apparatus applied to a control module, comprising: a communication module configured to send a power supply request signal to a preset battery module in response to vehicle starting; a data acquisition module configured to acquire a preset public key sent by the battery module; an encryption module configured to perform encryption on a preset target key based on the preset public key to generate encrypted data, and send the encrypted data to the battery module; a verification module configured to perform heartbeat verification between the target key and the battery module based on a verification result, and perform power transmission based on the verification result, wherein the heartbeat verification is performed after the target key is determined to pass the legality verification by the battery module. The check module is specifically configured to send at least one heartbeat packet to the battery module, so that the battery module performs decryption on the at least one heartbeat packet obtained by the target key pair, obtains a decryption result, performs a heartbeat check operation according to the decryption result, obtains a check result, and performs a power supply operation based on the check result. The heartbeat packet is obtained by encrypting a preset parameter based on the target key pair by the control module.
21. The apparatus of claim 20, wherein, The target key is a preset key, or the target key is a VIN code of a vehicle.
22. The apparatus of claim 20, wherein, The check module includes: A parameter generation unit configured to generate at least one preset parameter according to preset heartbeat information generation parameters; A data processing unit configured to encrypt the preset parameter by the target key pair to obtain at least one heartbeat packet for each preset parameter; A data transmission unit configured to sequentially transmit each heartbeat packet to the battery module at a preset time interval, so that the battery module performs a heartbeat check operation on the control module.
23. The apparatus of claim 20, wherein, The check module includes: A data acquisition unit configured to acquire at least one to-be-transmitted heartbeat packet sent by the battery module, the to-be-transmitted heartbeat packet being obtained by encrypting a heartbeat parameter based on the target key pair by the battery module; A data decryption unit configured to perform decryption on the at least one to-be-transmitted heartbeat packet by the target key pair to obtain a decryption result; A data comparison unit configured to compare the decryption result with a preset parameter generated according to preset heartbeat information generation parameters to obtain a check result; A transmission unit configured to perform an electric quantity transmission operation in response to the check result being a check pass; A connection processing unit configured to disconnect the communication connection with the battery module in response to the check result being a check failure.
24. The apparatus of claim 23, wherein, The data comparison unit includes: A first determination unit configured to determine that the check result is a check pass if the decryption result is consistent with the preset parameter; A second determination unit configured to determine that the check result is a check failure if the decryption result is inconsistent with the preset parameter or the decryption result is a decryption failure.
25. A battery encryption system, the battery encryption system including a battery module and a control module, the battery module being in communication connection with the control module; the battery encryption system further including: A signal sending module configured to send a power supply request signal to a preset battery module by the control module in response to vehicle starting; A public key sending module configured to control the battery module to acquire the power supply request signal sent by the control module, and send a preset public key to the control module; A public key acquisition module configured to control the control module to acquire the preset public key sent by the battery module, perform an encryption operation on a preset target key based on the preset public key, generate encrypted data, and send the encrypted data to the battery module; A data decryption module configured to control the battery module to perform a decryption operation on the encrypted data by a private key corresponding to the preset public key to obtain the target key, and perform a legality check operation on the target key. The heartbeat verification module is configured to, in response to the target key passing the legitimacy verification, perform a heartbeat verification operation on the battery module and the control module based on the target key, and perform a power supply operation based on a verification result of the heartbeat verification operation. The heartbeat verification module is specifically configured to acquire at least one heartbeat packet sent by the control module, the heartbeat packet being obtained by encrypting a preset parameter based on the target key by the control module; and perform a decryption operation on the at least one heartbeat packet based on the target key by the battery module to obtain a decryption result. The battery module performs a heartbeat verification operation based on the decryption result to obtain a verification result.
26. The system of claim 25, further comprising: an update data acquisition module configured to acquire update data sent by a preset cloud server, wherein the update data includes an update private key, an update public key and an update key, and the update data is uploaded to the cloud server by a terminal device of a user when a battery replacement operation is performed; a first update module configured to update a preset public key of the control module to the update public key according to the update data, and update a target key currently stored in the control module to the update key according to the update data; a second update module configured to update a preset public key and a preset private key of the battery module to the update public key and the update private key according to the update data, and switch the target key in the battery module to the update key according to the update data.
27. An electronic device, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6 or 7-11 or 12-13.
28. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-6 or 7-11 or 12-13.
29. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any one of claims 1-6 or 7-11 or 12-13.
Citation Information
Patent Citations
Battery encryption system based on asymmetric cryptographic algorithm and method thereof
CN108808136A
Method and system for establishing communication
CN108881105A