A backup method for communication failure of a digital key master module
By periodically testing the wireless communication function of the main module and switching to the backup module connection, the problem of Bluetooth communication failure of the main module in the digital key system was solved, thereby improving the stability of the system and ensuring the reliability of its functions.
Patent Information
- Application Number
- CN202411938434.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2044-12-26
AI Technical Summary
In the digital key system, the failure of the main module's Bluetooth communication renders the entire system unusable and lacks stability.
The wireless communication function of the main module is periodically tested. If an abnormality is detected, the system switches to the backup module to wirelessly connect with the control device. Once the main module returns to normal, the system switches back to the main module and uses the emergency communication root key to generate a temporary session key to ensure stable communication.
In the event of a communication failure in the main module, the basic functions of the digital key system are ensured to be available, thereby improving the stability of the system and ensuring the normal operation of functions such as vehicle locking/unlocking and starting.
Smart Images

Figure CN119889018B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital key system technology, and in particular to a backup method for when the communication of the digital key master module fails. Background Technology
[0002] With the increasing popularity of digital keys, the stability of digital key systems has become a crucial issue. Among the many stability factors, the failure of Bluetooth communication in the main module of a digital key will render the entire digital key system unusable. Therefore, the stability of Bluetooth communication is particularly important, and corresponding backup solutions need to be designed to improve the stability of the system.
[0003] In other words, the stability of digital keys in existing technologies is insufficient. Summary of the Invention
[0004] The purpose of this invention is to provide a backup method for communication failure of the digital key master module, so as to solve the problem of insufficient stability of digital keys in the prior art.
[0005] To address the aforementioned technical problems, this invention provides a backup method for a digital key master module communication failure. The backup method includes: establishing a wireless connection between the master module and a control device; periodically detecting whether the wireless communication function of the master module is abnormal; if the wireless communication function of the master module is abnormal, establishing a wireless connection between the master module and the control device using a backup module; and if the wireless communication function of the master module recovers from an abnormal state to a normal state, disconnecting the wireless connection between the backup module and the control device, and then establishing a wireless connection between the master module and the control device.
[0006] Optionally, the step of periodically detecting whether the wireless communication function of the main module is abnormal includes: periodically generating a first random number and sending it to the wireless communication unit of an auxiliary module other than the wireless communication unit of the main module; the auxiliary module adding the first random number to the broadcast data; the main module obtaining the first random number based on wireless communication; and if the main module times out in obtaining the first random number, then determining that the wireless communication function of the main module is abnormal; otherwise, determining that the wireless communication function of the main module is normal.
[0007] Optionally, the step of periodically detecting whether the wireless communication function of the main module is abnormal based on the auxiliary module includes: if the main module times out acquiring all the first random numbers broadcast by the auxiliary modules, then the wireless communication function of the main module is determined to be abnormal; if the main module does not time out acquiring at least one of the first random numbers broadcast by the auxiliary modules, then the wireless communication function of the main module is determined to be normal.
[0008] Optionally, the backup method for communication failure of the digital key master module further includes: when the master module and the control device connect wirelessly for the first time, the control device sends an emergency communication root key to the master module based on a secure channel; the emergency communication root key is used to generate a temporary session key, and when the control device outputs control commands, it verifies the identity through the temporary session key.
[0009] Optionally, the backup method for the failure of the digital key master module communication further includes: periodically updating the emergency communication root key when the master module is working normally.
[0010] Optionally, if the wireless communication function of the main module malfunctions, the step of wirelessly connecting the backup module with the control device includes: generating a second random number; generating a first intermediate key based on the second random number and the emergency communication root key; transmitting the second random number, the first intermediate key, and the identification code to the backup module to activate the backup module into emergency mode; the backup module generating a third random number; adding the second random number, the third random number, and the identification code to the broadcast data; and the control device wirelessly connecting to the backup module based on the identification code; generating a second intermediate key based on the second random number and the emergency communication root key; and generating the temporary session key based on the second intermediate key and the third random number.
[0011] Optionally, when the control device outputs a control command, the step of verifying identity through the temporary session key includes: the control device encrypting the control command based on the temporary session key and sending the ciphertext to the backup module; the backup module decrypting the ciphertext based on the first intermediate key and the third random number; if decryption is successful, the control command is sent to the controlled object to drive the controlled object to perform an action; if decryption fails, the response is rejected.
[0012] Optionally, the steps of periodically detecting whether the wireless communication function of the main module is abnormal, and the steps of switching between the main module and the backup module, are executed by the MCU or by the backup module.
[0013] Optionally, the wireless connection between the main module, the backup module, and the control device is via Bluetooth.
[0014] Optionally, the control device is a smartphone or a smart tablet.
[0015] Compared with existing technologies, the present invention provides a backup method for a digital key master module communication failure, comprising: wirelessly connecting the master module to a control device; periodically detecting whether the wireless communication function of the master module is abnormal; if the wireless communication function of the master module is abnormal, wirelessly connecting the master module to the control device via a backup module; and if the wireless communication function of the master module recovers from an abnormal state to a normal state, disconnecting the backup module from the control device and wirelessly connecting the master module to the control device. With this configuration, when a failure of the master module's wireless communication function is detected, the backup module will be actively activated for wireless communication to ensure the availability of the basic functions of the digital key, and will automatically return to normal after the master module recovers. One embodiment of the present invention is applied to a vehicle's Bluetooth digital key system, which can guarantee the basic vehicle control functions such as locking / unlocking and starting the vehicle, improve the stability of the digital key system, and solve the problem of insufficient stability of digital keys in existing technologies. Attached Figure Description
[0016] Those skilled in the art will understand that the accompanying drawings are provided to better understand the invention and do not constitute any limitation on the scope of the invention. Wherein:
[0017] Figure 1 This is a flowchart illustrating a backup method for a digital key master module communication failure according to an embodiment of the present invention.
[0018] Figure 2 This is a schematic diagram of the overall process of a backup method for a digital key master module communication failure according to an embodiment of the present invention;
[0019] Figure 3 This is a flowchart illustrating whether the wireless communication function of the main module is abnormal according to an embodiment of the present invention.
[0020] Figure 4 This is a schematic diagram illustrating the process of wirelessly connecting a backup module and a control device according to an embodiment of the present invention.
[0021] In the attached image:
[0022] 1-Vehicle control module; 2-Main module; 21-MCU; 22-Wireless communication unit; 23-NFC unit; 24-UWB unit; 3-Backup module; 31-Wireless communication unit; 32-UWB unit; 4-Auxiliary module; 41-Wireless communication unit; 42-UWB unit; 5-Control device. Detailed Implementation
[0023] To make the objectives, advantages, and features of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the drawings are all in a very simplified form and are not drawn to scale, and are only used to facilitate and clarify the explanation of the embodiments of this invention. Furthermore, the structures shown in the drawings are often part of the actual structures. In particular, different figures may emphasize different aspects and may sometimes use different scales.
[0024] As used in this invention, the singular forms “a,” “an,” and “the” include plural objects; the term “or” is generally used to mean “and / or”; the term “a number” is generally used to mean “at least one”; and the term “at least two” is generally used to mean “two or more”. Furthermore, the terms “first,” “second,” and “third” are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as “first,” “second,” or “third” may explicitly or implicitly include one or at least two of that feature. “One end” and “the other end,” as well as “proximal end” and “distal end,” generally refer to two corresponding parts, including not only endpoints. The terms “installed,” “connected,” and “joined” should be interpreted broadly, for example, as a fixed connection, a detachable connection, or an integral part; a mechanical connection or an electrical connection; a direct connection or an indirect connection through an intermediate medium; or a connection within two elements or an interaction between two elements. Furthermore, as used in this invention, the phrase "one element is disposed on another element" generally only indicates that there is a connection, coupling, cooperation, or transmission relationship between the two elements, and the connection, coupling, cooperation, or transmission between the two elements can be direct or indirect through an intermediate element. It should not be construed as indicating or implying a spatial positional relationship between the two elements, i.e., one element can be located arbitrarily inside, outside, above, below, or to one side of the other element, unless otherwise explicitly stated. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0025] The core idea of this invention is to provide a backup method for communication failure of the digital key master module, so as to solve the problem of insufficient stability of digital keys in the prior art.
[0026] The following description refers to the accompanying drawings.
[0027] Please refer to Figure 1 This embodiment provides a backup method for when the communication of the digital key master module fails. The backup method for when the communication of the digital key master module fails includes:
[0028] S100 is based on wireless connection between the main module and the control device.
[0029] S200, periodically detect whether the wireless communication function of the main module is abnormal.
[0030] S300, if the wireless communication function of the main module is abnormal, then the backup module is used to wirelessly connect with the control device.
[0031] And, in step S400, if the wireless communication function of the main module recovers from an abnormal state to a normal state, the wireless connection between the backup module and the control device is disconnected, and the wireless connection between the main module and the control device is restored.
[0032] In one specific embodiment, the wireless connection between the main module, the backup module, and the control device is via Bluetooth. The control device is a smartphone or a smart tablet. The backup method for communication failure of the digital key main module is applied to vehicles. For ease of understanding, this embodiment will be used as an example in the following description. It is understood that, based on the design concept of this invention, the above-described backup method for communication failure of the digital key main module can also be applied to other controlled objects, such as smart home appliances, factory equipment, medical devices, construction machinery, etc., and the control device is not limited to smartphones and smart tablets, and can also play a beneficial role in improving the stability of wireless connections.
[0033] like Figure 2As shown, the digital key system involves the following modules: vehicle control module 1, main module 2, backup module 3, auxiliary module 4, and control device 5. In the actual architecture, the backup module is actually a special auxiliary module, but for clarity, it is referred to by a specific name here. The vehicle control module 1 is connected to the main module 2 via CAN (bus), CANFD (variable rate bus), or Ethernet to transmit upper-layer control signals. The main module 2 includes an MCU 21, a wireless communication unit 22, an NFC (Near Field Communication) unit 23, and a UWB (Ultra-Wideband) unit 24. The NFC unit 23 and the UWB unit 24 are not directly related to this embodiment and will not be described in detail. In this embodiment, it is assumed that the wireless communication unit 22 may fail, while the failure of the MCU 21 is not within the scope of this embodiment. The main module 2 is connected to the backup module 3 and the auxiliary module 4 via PCAN, LIN (PCAN and LIN are connection methods with specific meanings, which can be understood by those skilled in the art based on common knowledge, and will not be described in detail here). Both the backup module 3 and the auxiliary module 4 have their own wireless communication unit 31 (or 41) and UWB unit 32 (or 42). The UWB unit 32 (or 42) is not particularly relevant to this embodiment and will not be described in detail. The main module 2 is wirelessly connected to the control device 5 via the wireless communication unit 22, or the backup module 3 is wirelessly connected to the control device 5 via the wireless communication unit 31.
[0034] like Figure 2 As shown, when a fault occurs, the digital key system operates according to the following steps: S01, the Bluetooth module fails, causing the main digital key link to be interrupted. S02, the MCU heartbeat detection activates the backup module. And, S03, the backup module switches to broadcast mode and takes over the main module's key communication link. Figure 2 In the diagram, the location of each step indicates the device that performs that step. Of course, in different embodiments, other devices may be used to perform the relevant steps. Later in the text... Figure 3 and Figure 4 The placement of the text in the middle steps can also be understood using this approach.
[0035] Furthermore, the core of this embodiment is how to promptly convert a specific auxiliary module into a backup module when the main module's Bluetooth communication fails, and to establish a backup secure Bluetooth communication channel with the mobile phone through a well-designed security scheme, so as to ensure that the digital key can use basic vehicle control functions, such as locking and unlocking the doors and starting the vehicle.
[0036] Please refer to Figure 3The following steps are used to check if the main module's wireless communication function is abnormal: S11, the MCU generates a first random number RND1 and broadcasts it to all auxiliary modules, and also sends it to its own wireless communication unit for filtering. S12, the first random number RND1 is sent to all auxiliary modules via PCAN or LIN. S13, the auxiliary modules add the first random number RND1 to their broadcast data. S14, the main module searches for the broadcast data from the auxiliary modules, parses the data, and sends it to the MCU. Finally, S15, the MCU uses the read random number from the auxiliary modules' broadcast data to determine if the main module's Bluetooth is functioning correctly.
[0037] The above process can be summarized as follows: Step S200, the step of periodically detecting whether the wireless communication function of the main module is abnormal, includes: periodically generating a first random number and sending it to the wireless communication unit of an auxiliary module other than the wireless communication unit of the main module; the auxiliary module adding the first random number to the broadcast data; the main module obtaining the first random number based on wireless communication; and if the main module times out in obtaining the first random number, it is determined that the wireless communication function of the main module is abnormal; otherwise, it is determined that the wireless communication function of the main module is normal.
[0038] Furthermore, the following design should be considered in this scheme: there should be no fewer than two auxiliary modules to avoid misjudgments in case of auxiliary module malfunctions. The MCU can only determine that the main module's Bluetooth communication is abnormal and activate the backup mode if all random numbers are timed out.
[0039] That is, the step of periodically detecting whether the wireless communication function of the main module is abnormal based on the auxiliary modules includes: if the main module times out acquiring all the first random numbers broadcast by the auxiliary modules, then the wireless communication function of the main module is determined to be abnormal; if the main module does not time out acquiring at least one of the first random numbers broadcast by the auxiliary modules, then the wireless communication function of the main module is determined to be normal. In a preferred embodiment, the number of auxiliary modules is at least two.
[0040] Please refer to Figure 4 The following solutions can be used to establish secure communication between mobile devices and backup modules:
[0041] S20, Securely store the emergency communication root key K (issued to the vehicle during the initial communication between the mobile phone and the vehicle). Upon initial use between the mobile device and the main module, the mobile device should issue the emergency communication root key K through the secure channel established between the main module and the mobile device. To ensure security, this key should preferably be updated during subsequent authentication processes between the main module and the device. This key should preferably support the AES or SM4 algorithm. After receiving the key K, the main module should store it in a secure area.
[0042] S21, MCU heartbeat monitoring generates a second random number RND2, activating the backup module. When the main module MCU detects a Bluetooth malfunction, it generates a random number RND2 and uses RND2 with K to generate a temporary key K1. This key derivation method can be, but is not limited to, AES128_CBC(RND,K)_9797M2. The main module then sends RND2, K1, and the vehicle identification number to the backup module, activating it and putting it into emergency mode.
[0043] S22, the backup module switches to broadcast mode, generates a third random number RND3, and adds RND2, RND3, and the vehicle identification number to the broadcast. Upon receiving RND2, RND3, and the vehicle identification number, the backup module activates emergency mode, actively switches the broadcast mode to a scannable and connectable mode (pairing mode can use JustWork), and generates the random number RND3. Then, it adds this random number RND2, RND3, and the vehicle identification number to the backup module's broadcast.
[0044] S23, the mobile phone initiates a connection and generates a temporary session key using the preset K and RND2, RND3. The mobile device connects to the target backup module using the vehicle identification code, obtains RND2+RND3, derives K1 using K and RND2, and then derives the temporary session key SK using RND3 and K1. This key derivation method can be, but is not limited to, AES128_CBC(RND2,K1)_9797M2.
[0045] S24, encrypt the vehicle control command using a temporary session key and send it to the backup module. The mobile device subsequently uses SK to encrypt the vehicle control command (including but not limited to unlocking / locking, starting authorization, etc.) and send it to the backup module.
[0046] S25: After decrypting the vehicle control data using the temporary session key, it is sent to the main module MCU. The backup module then decrypts the data and sends it to the main module MCU for execution.
[0047] S26, the main module MCU converts the vehicle control command into a CAN signal and sends it to the vehicle control module.
[0048] The above process can be summarized as follows: The backup method for communication failure of the digital key master module further includes: when the master module and the control device connect wirelessly for the first time, the control device sends an emergency communication root key to the master module based on a secure channel; the emergency communication root key is used to generate a temporary session key, and when the control device outputs control commands, it verifies the identity through the temporary session key.
[0049] Preferably, the backup method for communication failure of the digital key master module further includes: periodically updating the emergency communication root key when the master module is working normally.
[0050] If the main module's wireless communication function malfunctions, the step of wirelessly connecting the backup module with the control device includes: generating a second random number; generating a first intermediate key based on the second random number and the emergency communication root key; transmitting the second random number, the first intermediate key, and the identification code to the backup module to activate the backup module into emergency mode; the backup module generating a third random number; adding the second random number, the third random number, and the identification code to the broadcast data; and the control device wirelessly connecting to the backup module based on the identification code; generating a second intermediate key based on the second random number and the emergency communication root key; and generating the temporary session key based on the second intermediate key.
[0051] In one embodiment, the algorithms for generating the first intermediate key and the second intermediate key are the same.
[0052] In the absence of an attacker (or a situation similar to a mistaken connection), the first intermediate key and the second intermediate key should, in fact, be the same string. This application uses two concepts to describe this: first, considering the presence of an attacker, the contents of the first and second intermediate keys would differ; second, the first and second intermediate keys are independently calculated by the backup module and the control device, respectively, and the paths to their calculations are different.
[0053] When the control device outputs a control command, the step of verifying identity through the temporary session key includes: the control device encrypting the control command based on the temporary session key and sending the ciphertext to the backup module; the backup module decrypting the ciphertext based on the first intermediate key and the third random number; if decryption is successful, the control command is sent to the controlled object to drive the controlled object to perform an action; if decryption fails, the response is rejected. Decryption failure corresponds to the presence of an attacker, or other smartphones mistakenly connecting near the vehicle.
[0054] In the above embodiments, the steps of periodically detecting whether the wireless communication function of the main module is abnormal, and the steps of switching between the main module and the backup module, are executed by the MCU. This configuration eliminates the need for additional hardware costs; for example, an auxiliary module can be set as a backup module. In other embodiments, the above steps can also be executed by the backup module. The physical architecture design can also support independent deployment of the backup module, with the backup module detecting whether the main module is functioning correctly. These detection methods include, but are not limited to, detecting that the main module has not broadcast within multiple broadcast cycles.
[0055] In summary, this embodiment provides a backup method for a digital key master module communication failure. The backup method includes: wirelessly connecting the master module to the control device; periodically detecting whether the master module's wireless communication function is abnormal; if the master module's wireless communication function is abnormal, wirelessly connecting the master module to the control device via a backup module; and if the master module's wireless communication function recovers from the abnormal state to normal, disconnecting the backup module from the control device and then wirelessly connecting the master module to the control device. With this configuration, when a failure in the master module's wireless communication function is detected, the backup module will be actively activated for wireless communication to ensure the availability of the digital key's basic functions and will automatically return to normal after the master module recovers. One embodiment of this invention is applied to a vehicle's Bluetooth digital key system, ensuring basic vehicle control functions such as locking / unlocking and vehicle starting, improving the stability of the digital key system, and solving the problem of insufficient stability in existing digital keys. Other embodiments of this invention can also be applied to other digital key systems and achieve the same beneficial effects.
[0056] The above description is only a description of preferred embodiments of the present invention and is not intended to limit the scope of the present invention in any way. Any changes or modifications made by those skilled in the art based on the above disclosure shall fall within the protection scope of the present invention.
Claims
1. A backup method for a digital key master module communication failure, characterized in that, The backup methods for communication failure of the digital key master module include: Based on wireless connection between the main module and control equipment; Periodically check whether the wireless communication function of the main module is abnormal; If the main module's wireless communication function malfunctions, then a wireless connection is established between the backup module and the control device; and, If the wireless communication function of the main module recovers from an abnormal state to a normal state, the wireless connection between the backup module and the control device is disconnected, and the wireless connection between the main module and the control device is restored. The step of periodically detecting whether the wireless communication function of the main module is abnormal includes: A first random number is periodically generated and sent to the wireless communication unit of the auxiliary module other than the wireless communication unit of the main module; The auxiliary module adds the first random number to the broadcast data; The main module obtains the first random number based on wireless communication; and If the main module times out acquiring all the first random numbers broadcast by the auxiliary modules, the main module is deemed to have an abnormal wireless communication function; if the main module does not time out acquiring at least one of the first random numbers broadcast by the auxiliary modules, the main module is deemed to have a normal wireless communication function. The backup method for communication failure of the digital key master module also includes: When the main module and the control device establish their first wireless connection, the control device sends an emergency communication root key to the main module via a secure channel; and... The emergency communication root key is used to generate a temporary session key. When the control device outputs control commands, it verifies the identity through the temporary session key. If the wireless communication function of the main module malfunctions, the step of wirelessly connecting the backup module with the control device includes: Generate a second random number, and generate a first intermediate key based on the second random number and the emergency communication root key; The second random number, the first intermediate key, and the identification code are transmitted to the backup module, activating the backup module to enter emergency mode. The backup module generates a third random number, and adds the second random number, the third random number, and the identification code to the broadcast data; and, The control device wirelessly connects to the backup module based on the identification code; it generates a second intermediate key based on the second random number and the emergency communication root key, and generates the temporary session key based on the second intermediate key and the third random number.
2. The backup method for communication failure of the digital key master module according to claim 1, characterized in that, The backup method for the failure of the digital key master module communication also includes: when the master module is working normally, periodically updating the emergency communication root key.
3. The backup method for communication failure of the digital key master module according to claim 2, characterized in that, When the control device outputs control commands, the step of verifying identity through the temporary session key includes: The control device encrypts the control command based on the temporary session key and sends the ciphertext to the backup module; The backup module decrypts the ciphertext based on the first intermediate key and the third random number. If the decryption is successful, a control command is sent to the controlled object to drive the controlled object to take action; if the decryption fails, the module refuses to respond.
4. The backup method for communication failure of the digital key master module according to claim 1, characterized in that, The steps of periodically detecting whether the wireless communication function of the main module is abnormal, and the steps of switching between the main module and the backup module, are executed by the MCU or by the backup module.
5. The backup method for communication failure of the digital key master module according to claim 1, characterized in that, The main module, the backup module, and the control device are wirelessly connected via Bluetooth.
6. The backup method for communication failure of the digital key master module according to claim 1, characterized in that, The control device is a smartphone or a smart tablet.
Citation Information
Patent Citations
End-to-end session key consultation method and system for supporting lawful interception
CN102045210A
Digital key system monitoring method, device and equipment and storage medium
CN115150007A
Key generation method and device, communication equipment and storage medium
CN117795917A
On-board dual-system communication link backup method and device and electronic equipment
CN118101554A
Vehicle control method, device, equipment and medium
CN118450374A
