Vehicle relay attack prevention method, system, storage medium and electronic device
By using the relative position information from the motion sensor built into the smart key and the vehicle controller, the system automatically enters an anti-relay attack mode, solving the problem of vulnerability of the keyless start function and enabling convenient and safe vehicle start-up.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SAIC MOTOR
- Filing Date
- 2025-01-02
- Publication Date
- 2026-07-03
AI Technical Summary
Existing keyless start functions are vulnerable to relay attacks, resulting in insufficient vehicle security and inconvenience for users.
By detecting the key's movement status and stationary duration using the built-in motion sensor in the smart key, and combining this with the relative position positioning information from the vehicle controller, the system automatically enters an anti-relay attack mode to prevent unauthorized starting attempts.
It improves the convenience and safety of starting the vehicle, reduces unauthorized starting attempts, enhances system security, and avoids the risk of the key being stolen after it is away from the vehicle.
Smart Images

Figure CN122340485A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent vehicle control technology, and more specifically, to a method, system, storage medium, and electronic device for preventing vehicle relay attacks. Background Technology
[0002] Currently, with the rapid development of the automotive industry and the application of advanced technologies in automobiles, people's demands for car use are also increasing, and convenient keyless start has become one of the standard features of vehicles. However, the current keyless start function is easily vulnerable to relay attacks. This attack method involves one attacker approaching the car owner with a signal relay device, while another attacker, carrying a different signal relay device, remains near the target vehicle. By triggering the keyless entry or keyless start function on the vehicle, the signal relay device near the vehicle transmits the intercepted signal to the signal relay device near the car owner to trigger the original car key. Then, the signal relay device near the car owner transmits the signal back to the vehicle, achieving a "bridging" effect, thereby cracking the car door lock or starting the vehicle.
[0003] In related technologies, while a solution to prevent relay attacks by keeping the key stationary is proposed, this solution only activates the keyless start function after the smart key is detected leaving the vehicle, and the key remains in a passive triggering state. Furthermore, for keys that are stationary due to being in a pocket or other reasons, shaking them is required to activate them, which is inconvenient for starting the vehicle. Therefore, these technologies present a technical problem of insufficient vehicle security due to relay attacks.
[0004] No effective solution has yet been proposed to address the technical problem of insufficient vehicle security due to relay attacks in related technologies. Summary of the Invention
[0005] This application provides a method, system, storage medium, and electronic device for preventing vehicle relay attacks.
[0006] According to one embodiment of this application, a method for preventing relay attacks on a vehicle is provided, comprising: obtaining parameter ranges set for motion sensors under different key calibration scenarios, wherein the different key calibration scenarios include at least a stationary scenario; determining a current motion parameter value from the current sensing information of the motion sensor, and determining the parameter range to which the current motion parameter value belongs as a target value range; when it is determined that the current key calibration scenario corresponding to the target value range is the stationary scenario, sending a location query command to the vehicle-side controller according to the stationary duration of the smart key in the stationary scenario; entering an anti-relay attack mode based on the received response message from the vehicle-side controller, and controlling the vehicle to start in the anti-relay attack mode, wherein the response message includes at least relative position positioning information fed back by the vehicle-side controller based on the location query command, and the received result includes at least successful reception.
[0007] In an exemplary embodiment, before obtaining the parameter range set for the motion sensor under different key calibration scenarios, the method further includes: determining different sensitivity resolutions supported by the motion sensor, wherein the motion sensor has different sensitivities when detecting the motion state of the smart key under the different sensitivity resolutions; determining a target sensitivity resolution with the highest sensitivity from the different sensitivity resolutions, and obtaining the historical acceleration detected by the motion sensor under the target sensitivity resolution from the historical sensing information of the motion sensor; determining the key calibration scenario of the motion sensor according to the key state corresponding to the historical acceleration, setting the parameter range corresponding to the key calibration scenario according to the value range of the historical acceleration, and setting the sensitivity threshold corresponding to the key calibration scenario.
[0008] In one exemplary embodiment, the different key calibration scenarios further include the motion scenario of the smart key. Determining the key calibration scenario of the motion sensor based on the key state corresponding to the historical acceleration includes: when it is determined that the key state indicates that the smart key is stationary, setting the key calibration scenario of the motion sensor to the stationary scenario; when it is determined that the key state indicates that the smart key is being carried, setting the key calibration scenario of the motion sensor to the motion scenario.
[0009] In an exemplary embodiment, before determining the current motion parameter value from the current sensing information of the motion sensor, the method further includes: determining a target noise filter value corresponding to the current key calibration scenario from noise filter values set for the different key calibration scenarios, wherein the target noise filter value includes one of the following: a first noise filter value when the current key calibration scenario is the stationary scenario, a second noise filter value when the current key calibration scenario is the key calibration scenario, and the first noise filter value is less than the second noise filter value; and using the target noise filter value to perform noise reduction processing on the current sensing information.
[0010] In one exemplary embodiment, entering an anti-relay attack mode based on the reception result of the reply message from the vehicle-mounted controller includes: entering the anti-relay attack mode when it is determined that the reception result indicates that no reply message from the vehicle-mounted controller has been received, and stopping the response to the keyless unlocking unlocking request and the keyless start activation request in the anti-relay attack mode.
[0011] In an exemplary embodiment, when it is determined that the current key calibration scenario corresponding to the target value range is the static scenario, a location query instruction is sent to the vehicle controller based on the static duration of the smart key in the static scenario, including: when it is determined that the current key calibration scenario corresponding to the target value range is the static scenario, comparing the static duration with a preset duration corresponding to the static scenario; and when it is determined that the static duration is greater than the preset duration, sending a location query instruction to the vehicle controller.
[0012] In an exemplary embodiment, the smart key is further provided with a lock control button, and the method further includes: generating a lock control command based on the target object's operation on the lock control button, wherein the lock control command includes one of the following: an unlock command, a lock command; reading the sensor status information of the motion sensor based on the lock control command; and reconfiguring the motion sensor until the configuration status information is successfully compared if it is determined that the sensor status information and the stored configuration status information fail to match.
[0013] In one exemplary embodiment, a vehicle anti-relay attack method is also provided, applied to a vehicle-side controller, wherein an information transmission channel has been established between the vehicle-side controller and a smart key for starting the vehicle based on a vehicle communication protocol, comprising: receiving a location query instruction from the smart key through the information transmission channel, wherein the location query instruction is sent when the smart key has been idle for a period exceeding a preset duration; finding the relative location information of the smart key according to the location query instruction, and sending the relative location information to the smart key.
[0014] In one exemplary embodiment, finding the relative location information of the smart key according to the location query instruction includes: determining the Received Signal Strength Indicator (RSSI) value corresponding to the location query instruction; if the RSSI value is greater than a strength threshold, determining that the relative location information is inside the vehicle; if the RSSI value is less than a strength threshold, determining that the relative location information is outside the vehicle.
[0015] In an exemplary embodiment, before sending the relative location information to the smart key, the method further includes: determining first identity information of the object to which the vehicle belongs, and determining second identity information of the object to which the smart key belongs; and sending the relative location information to the smart key if the first identity information and the second identity information are confirmed to be consistent.
[0016] According to another aspect of the embodiments of this application, a vehicle anti-relay attack system is also provided, including: a smart key for the vehicle and a vehicle-side controller for executing the above-described vehicle anti-relay attack method.
[0017] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described vehicle anti-relay attack method when it is run.
[0018] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described vehicle anti-relay attack method through the computer program.
[0019] In this embodiment, the parameter range set for the motion sensor under different key calibration scenarios is obtained, wherein the different key calibration scenarios include at least a stationary scenario; the current motion parameter value is determined from the current sensing information of the motion sensor, and the parameter range to which the current motion parameter value belongs is determined as the target value range; when it is determined that the current key calibration scenario corresponding to the target value range is the stationary scenario, a location query command is sent to the vehicle-side controller according to the stationary duration of the smart key in the stationary scenario; based on the received response message from the vehicle-side controller, the system enters an anti-relay attack mode, wherein the response message includes at least the relative position positioning information fed back by the vehicle-side controller based on the location query command, and the received result includes at least successful reception; this application uses the motion sensor built into the smart key to detect the key's motion state, and combines the stationary duration and relative position positioning information to achieve intelligent switching of the vehicle's anti-relay attack mode. This method not only improves the convenience of vehicle starting but also enhances system security and avoids unauthorized starting attempts. The technical solution of this application solves the technical problem of insufficient vehicle security due to relay attacks in related technologies, improving security while enabling normal vehicle startup. In practical applications, it can effectively enhance vehicle security and intelligence, providing users with a more convenient and secure vehicle usage experience. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram of the hardware environment for a vehicle anti-relay attack method according to an embodiment of this application;
[0023] Figure 2 This is a flowchart of a vehicle anti-relay attack method according to an embodiment of this application;
[0024] Figure 3 This is a flowchart of another vehicle anti-relay attack method according to an embodiment of this application;
[0025] Figure 4 This is a schematic diagram of the control logic of the smart key and vehicle controller according to an embodiment of this application;
[0026] Figure 5 This is a schematic diagram of information interaction according to an embodiment of this application;
[0027] Figure 6 This is a schematic diagram illustrating the logical relationship between the key calibration scenario and acceleration according to an embodiment of this application;
[0028] Figure 7 This is a flowchart illustrating a vehicle anti-relay attack method according to an embodiment of this application;
[0029] Figure 8 This is a structural block diagram of a vehicle anti-relay attack system according to an embodiment of this application. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] According to one aspect of the embodiments of this application, a method for preventing vehicle relay attacks is provided. This method is widely used in vehicle equipment control applications such as vehicle relay attack prevention, automated control vehicles, and semi-automated control vehicles. Optionally, in this embodiment, the above-mentioned method for preventing vehicle relay attacks can be applied to applications such as... Figure 1 The hardware environment shown consists of vehicle control device 102 and server 104. Figure 1As shown, server 104 is connected to vehicle control device 102 via a network and can be used to provide services (such as application services) to terminals or clients installed on terminals. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.
[0033] The aforementioned networks may include, but are not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth, high-frequency protocol network, low-frequency protocol network.
[0034] This embodiment provides a vehicle anti-relay attack method applied to the aforementioned smart key. The smart key is equipped with at least a motion sensor and is used to start the vehicle. An information transmission channel has been established between the smart key and the vehicle's terminal controller based on a vehicle communication protocol. The information transmission channel is used for information interaction between the smart key and the terminal controller. Figure 2 This is a flowchart of a vehicle anti-relay attack method according to an embodiment of this application, which includes the following steps:
[0035] Step S202: Obtain the parameter range set for the motion sensor under different key calibration scenarios, wherein the different key calibration scenarios include at least a static scenario;
[0036] Optionally, in a stationary scenario, steps such as querying the key's location, verifying the key's identity, unlocking the vehicle, and starting the vehicle can also be performed. This entire process requires no manual operation from the user, improving vehicle convenience and security. Specifically, querying the key's location refers to the smart key sending a key location query command to the vehicle controller after establishing a communication connection. The vehicle controller then obtains the smart key's relative location information based on the query command and sends it back to the smart key.
[0037] Step S204: Determine the current motion parameter value from the current sensing information of the motion sensor, and determine the parameter range to which the current motion parameter value belongs as the target value range;
[0038] Step S206: If it is determined that the current key calibration scenario corresponding to the target value range is the static scenario, a location query command is sent to the vehicle controller according to the static duration of the smart key in the static scenario.
[0039] Step S208: Enter the anti-relay attack mode based on the received result of the reply message from the vehicle controller, wherein the reply message includes at least the relative position positioning information fed back by the vehicle controller based on the position query command, and the received result includes at least successful reception.
[0040] It should be noted that in the anti-relay attack mode, the smart key stops responding to keyless unlocking requests and keyless start requests.
[0041] Through the above steps, the parameter range set for the motion sensor under different key calibration scenarios is obtained, wherein the different key calibration scenarios include at least a stationary scenario; the current motion parameter value is determined from the current sensing information of the motion sensor, and the parameter range to which the current motion parameter value belongs is determined as the target value range; when it is determined that the current key calibration scenario corresponding to the target value range is the stationary scenario, a location query command is sent to the vehicle-side controller according to the stationary duration of the smart key in the stationary scenario; based on the received response message from the vehicle-side controller, the system enters the anti-relay attack mode, wherein the response message includes at least the relative position positioning information fed back by the vehicle-side controller based on the location query command, and the received result includes at least successful reception; this application detects the movement state of the key through the motion sensor built into the smart key, and combines the stationary duration and relative position positioning information to automatically enter the anti-relay attack mode when the user approaches the vehicle, without requiring manual operation by the user, thus realizing intelligent switching of the vehicle's anti-relay attack mode. This method not only improves the convenience of vehicle starting but also enhances system security and avoids unauthorized starting attempts. The technical solution of this application solves the technical problem of insufficient vehicle security due to relay attacks in related technologies, improving security while enabling normal vehicle startup. In practical applications, it can effectively enhance vehicle security and intelligence, providing users with a more convenient and secure vehicle usage experience.
[0042] In practical applications, the technical solution of this application not only effectively improves the safety and intelligence level of vehicles, but also intelligently adjusts its working mode according to user habits and environmental conditions, providing users with a more convenient and safer vehicle usage experience. For example, in scenarios where users are frequently in motion, the smart key can intelligently identify the movement state, avoiding accidental triggering of vehicle control during movement; when a user enters the vehicle with the smart key, the vehicle-side controller can accurately determine the location of the smart key, enabling keyless start of the vehicle. Furthermore, addressing the problem of relay attacks on traditional keyless entry and keyless start systems, the technical solution of this application reduces the probability of intentional theft of the vehicle after the key has left the vehicle, protecting users from property loss.
[0043] In one embodiment, combined Figure 4 The vehicle control process under anti-relay attack mode is explained. Specifically, anti-relay attack mode includes keyless entry and keyless start. Figure 4 The vehicle anti-relay attack system shown includes an external antenna, an internal antenna, a main controller (corresponding to the vehicle-side controller mentioned above), a start button, and a key (corresponding to a smart key).
[0044] The external antenna is installed in locations such as the door handles and trunk to detect the key. The internal antenna is installed inside the vehicle to detect whether the key is inside. The main controller sends a 125kHz low-frequency signal to the key and receives a 433MHz high-frequency signal from the key, encrypting and decoding the signal and verifying data validity. It also uses the RSSI value to determine whether the key is inside or outside the vehicle. The start button allows the user to switch power modes or start the engine after the key authentication is successful. The key, after receiving the 125kHz low-frequency signal from the main controller, sends a 433MHz high-frequency signal back to the main controller, encrypting and decoding the signal and verifying data validity. For example, Figure 5 As shown, low-frequency signals can be transmitted based on low-frequency protocols, and high-frequency signals can be transmitted based on high-frequency protocols.
[0045] In this field, the theoretical basis and functional characteristics of keyless entry and keyless start dictate that the key is a passive device. It only passively emits a high-frequency signal when activated by the vehicle-side controller at a low frequency or when the customer presses the key button. The key itself cannot actively determine its relative position to the vehicle. Only when the vehicle-side controller queries via a low-frequency antenna can it determine whether the key is inside or outside the vehicle, and this information is stored in the vehicle-side controller. In other words, for keyless entry and keyless start, the key is always in a passive triggering state; the key itself does not possess the ability to determine or identify its relative position.
[0046] To address these issues, this application improves upon the current limitations and user experience of key functionality. It proposes that, when the key is stationary, it should not respond to keyless entry and start functions when outside the vehicle, yet its start function should not be affected when inside the vehicle. Based on these functional requirements, the innovation of this application lies in enabling the key to actively initiate interaction with the vehicle. This changes the inherent passive nature of the key, allowing it to actively determine its own position and solving the problem of starting the vehicle when the key is stationary inside the vehicle.
[0047] Specifically, this application addresses the structural composition of a smart key by adding a miniature motion sensor to the smart key's circuit board. The motion sensor is electrically connected to multiple pins of the key's main control chip, enabling serial peripheral interface communication and high / low level signal interaction. The motion sensor detects the key's movement; when the movement reaches a threshold, a trigger pin is pulled low, transmitting the movement status to the main control chip. The serial peripheral interface serves as a data communication line, providing an effective data channel for configuring the motion sensor's internal registers. During the key's main control chip software development, calibrated key parameters are permanently stored as data in an EEPROM (Electrically Erasable Programmable Read-Only Memory). When the key is powered on and initialized, the main control chip writes the data from the EEPROM to the motion sensor's internal registers via the serial peripheral interface. Based on this structurally improved smart key, this application creatively achieves a passive-to-active + passive key conversion by modifying the key and vehicle-side software. Ultimately, the key can indirectly obtain location information both inside and outside the vehicle.
[0048] The specific interaction process of this application is as follows: After the key is stationary for a certain period of time, the key actively sends a high-frequency signal to query the location. After receiving this high-frequency signal, the vehicle controller transmits the queried relative location information to the key through a low-frequency signal.
[0049] High-frequency signals include, but are not limited to, the typical civilian frequency band requirement of 433MHz, or the 315MHz band required by some export markets. Low-frequency signals include, but are not limited to, the typical frequency band of 125kHz. For example... Figure 4 As shown, the low-frequency and high-frequency protocol channels are essential physical channels for keyless start vehicles. This application does not modify the existing high-frequency and low-frequency physical channel physical layers, but makes full use of the high-frequency and low-frequency channel resources, redefines the high-frequency and low-frequency radio frequency protocols, and cleverly implements new functions in conjunction with the designed system interaction strategy.
[0050] Considering the above protocol stipulates that the controller needs to receive a specific function code before actively querying and responding to the key's location information, the location query command in this application specifically includes the key's identity information, the vehicle's identity information, and the key's current location information. Based on the above protocol, the vehicle-side controller can also be configured to confirm the identity information before responding to ensure the security of data interaction. This application's design logic based on the key's movement state can identify the key's movement state. Combined with the key's usage scenarios, this ensures that automotive-grade products will not misjudge in a large number of applications, and it conforms to customer usage habits without causing functional failures.
[0051] In one exemplary embodiment, before obtaining the parameter range set for the motion sensor under different key calibration scenarios, different sensitivity resolutions supported by the motion sensor can be determined, wherein the sensitivity of the motion sensor in detecting the motion state of the smart key is different under the different sensitivity resolutions; a target sensitivity resolution with the highest sensitivity is determined from the different sensitivity resolutions, and the historical acceleration detected by the motion sensor under the target sensitivity resolution is obtained from the historical sensing information of the motion sensor; the key calibration scenario of the motion sensor is determined according to the key state corresponding to the historical acceleration, the parameter range corresponding to the key calibration scenario is set according to the value range of the historical acceleration, and the sensitivity threshold corresponding to the key calibration scenario is set. By adjusting the sensitivity of the motion sensor, the motion state of the smart key can be detected more accurately, avoiding false positives and false negatives, and improving the stability and accuracy of motion state detection.
[0052] Sensitivity resolution indicates the degree of sensitivity of the detection; the higher the resolution, the less sensitive the detection, and vice versa. For example, sensitivity resolutions can be set to 0.1, 1, and 10, and the resolution with the best detection sensitivity can be selected. The sensitivity threshold can then be set based on the range of sensitivity at this resolution, and corresponding scenes can be set at different thresholds. Acceleration magnitude can characterize the speed of motion and can also be used to set scenes.
[0053] In one exemplary embodiment, the different key calibration scenarios further include the movement scenario of the smart key. The process of determining the key calibration scenario of the motion sensor based on the key state corresponding to the historical acceleration may include: setting the key calibration scenario of the motion sensor to the stationary scenario when the key state indicates that the smart key is stationary; and setting the key calibration scenario of the motion sensor to the movement scenario when the key state indicates that the smart key is being carried in motion. This strategy of distinguishing different scenarios allows the smart key to intelligently adjust its working mode according to the user's actual usage, improving the user experience. Application scenarios include movement scenarios such as running or cycling while carrying the smart key, and stationary scenarios such as the smart key being placed on a panel.
[0054] Optionally, in one embodiment, the smart key, modified based on the characteristics of the motion sensor, can transmit X-axis, Y-axis, and Z-axis acceleration values in real time via high-frequency signals in different scenarios. After parsing the high-frequency signals, the three-axis acceleration parameters for different scenarios are obtained, thus acquiring objective physical motion parameters without any processing. This makes the key's state observable and allows for the quantification of the direction and magnitude of the motion. This provides a foundation for data acquisition and determining the key's motion state.
[0055] Since the key itself does not move, its motion depends on external factors. Considering both dynamic and static scenarios, as well as the characteristics of people and vehicles, this application extracts 18 scenarios as shown in Table 1, and repeatedly collects the key's three-axis acceleration for each scenario. By collecting a large amount of acceleration data at different sensitivity resolutions of the motion sensor to form a normal distribution feature, the key's motion characteristics are identified, thereby obtaining the sensitivity threshold and sensitivity resolution required in this application. The key calibration scenarios and corresponding parameter ranges are provided below with reference to Table 1.
[0056] Serial Number Scene Parameter range Require 1 Place it on the table 1-2 quiet 2 Take the key from the table 9-11 move 3 Take the key off the wall 9-11 move 4 Pick up the key from the ground 9-11 move 5 From sitting to standing (keys in jacket pocket) 15-18 move 6 From sitting to standing (keys in pants pocket) 15-19 move 7 Walking (with remote key in hand) 4-5 move 8 Walking (keys in jacket pocket) 4-5 move 9 Walking (keys in pants pocket) 5-6 move 10 Walking (keys in backpack) 8-10 move 11 Walking (keys in shoulder bag) 9-12 move 12 Walking (keys in handbag) 9-12 move 13 Driving at speeds above 15 km / h (key on the dashboard) 8-10 move 14 Driving at speeds above 15 km / h (key in driver's jacket pocket) 8-18 move 15 Driving at speeds above 15 km / h (key in driver's trouser pocket) 8-18 move 16 Driving speeds above 15 km / h (key in passenger's jacket pocket) 8-18 move 17 Driving at speeds above 15 km / h (key in passenger's trouser pocket) 8-18 move 18 Driving at speeds above 15 km / h (key in seat) 8-18 move
[0057] For example, such as Figure 6 As shown, when the key is calibrated as “the key is placed on the table” (i.e., scenario 1 in Table 1), its acceleration range is [1, 2].
[0058] In an exemplary embodiment, before determining the current motion parameter value from the current sensing information of the motion sensor, a target noise filter value corresponding to the current key calibration scenario is further determined from the noise filter values set for the different key calibration scenarios. The target noise filter value includes one of the following: a first noise filter value when the current key calibration scenario is the static scenario, or a second noise filter value when the current key calibration scenario is the key calibration scenario, wherein the first noise filter value is less than the second noise filter value. The target noise filter value is used to denoise the current sensing information. This denoising process effectively reduces the impact of environmental noise on motion state detection, improving the accuracy of motion state detection. Application scenarios include environments with high noise levels where smart keys need to accurately detect their own motion state. This application proposes a data denoising processing method, for example, for keys in a static scenario, using a relatively high value from the middle of a normal distribution as a noise filter value to effectively filter out environmental influences.
[0059] In one exemplary embodiment, entering an anti-relay attack mode based on the received response message from the vehicle controller can be achieved through the following steps: if the received result indicates that no response message has been received from the vehicle controller, the anti-relay attack mode is entered, and in the anti-relay attack mode, responses to keyless unlocking requests and keyless start requests cease. This automatic mode switching function allows users to enter the anti-relay attack mode without manually operating the smart key when approaching the vehicle, greatly improving the convenience of vehicle use. Application scenarios include situations where users approach the vehicle with the smart key and need to quickly start the vehicle.
[0060] Alternatively, if the received result indicates that a reply message from the vehicle controller has been received, the relative location information is determined from the reply message. If the relative location information is determined to be inside the vehicle, then the non-relay attack prevention mode is entered.
[0061] In an exemplary embodiment, when it is determined that the current key calibration scenario corresponding to the target value range is the stationary scenario, a process based on the stationary duration of the smart key in the stationary scenario can also be implemented: If it is determined that the current key calibration scenario corresponding to the target value range is the stationary scenario, the stationary duration is compared with a preset duration corresponding to the stationary scenario; if it is determined that the stationary duration is greater than the preset duration, a location query command is sent to the vehicle controller. By setting a preset duration, the location query command can be avoided from being accidentally triggered when the smart key is briefly stationary, improving the stability and accuracy of the system. Application scenarios include situations where the user carries the smart key and is briefly stationary, such as waiting for an elevator or traffic light, to avoid accidental operation.
[0062] Optionally, if it is determined that the resting time is less than the preset time, the timing continues.
[0063] In one exemplary embodiment, the smart key also includes a lock control button. Further, a lock control command is generated based on the target object's operation of the lock control button, wherein the lock control command includes one of the following: an unlock command, a lock command; the sensor status information of the motion sensor is read based on the lock control command; if the comparison between the sensor status information and the stored configuration status information fails, the motion sensor is reconfigured until the configuration status information is successfully compared. Through the operation of the lock control button, the user can manually control the vehicle's door locks. Simultaneously, by comparing the sensor status information and the configuration status information, the normal operation of the motion sensor can be ensured, improving the system's stability and security. Application scenarios include situations where the user needs to manually control the vehicle door locks, or where manual reconfiguration is required when the motion sensor malfunctions.
[0064] Optionally, in one embodiment, in the event that the keyless entry / unlocking and locking functions fail, and the customer unlocks and locks the vehicle by pressing a button on the key, each time the customer presses a button on the remote key to remotely unlock or lock the vehicle, the main control chip is triggered to read the value of the motion sensor's internal register via a serial peripheral interface and compare it with the data in the EEPROM. If the comparison fails, the motion sensor will be reconfigured to ensure functional robustness. When multiple configuration failures occur, a fault protection mode is entered, and the key no longer responds to the motion sensor's low-level state, permanently reverting to a normal key with all functions enabled without restriction. This embodiment adds an innovative robustness strategy. It removes the restriction on key functionality due to incorrect motion sensor register configuration, improving the security and effectiveness of vehicle starting.
[0065] The comparison process described above can be further explained as follows: After detecting the movement of the key, the motion sensor sends a signal to the main control chip. The main control chip communicates with the motion sensor via a serial peripheral interface (SPI). SPI (Serial Peripheral Interface) is a commonly used communication protocol that allows the main control chip to exchange data with external devices (such as sensors). The main control chip sends a command to the motion sensor via SPI, requesting to read the value of its internal register. The internal register contains the sensor's status information, such as whether motion has been detected. The main control chip compares the value read from the motion sensor with the configuration data stored in the EEPROM. If the EEPROM is configured to show motion when acceleration is detected, but the sensor's register value indicates no motion has been detected, the comparison will fail. If the comparison fails, the main control chip sends a new configuration command to the motion sensor via SPI to ensure that its register value matches the configuration in the EEPROM. The configuration command may include, for example, adjusting the sensor's sensitivity or updating its internal logic to correctly respond to key movement. Once the motion sensor is reconfigured and its register values match the configuration in the EEPROM, the main control chip performs corresponding actions, such as sending acceleration values. In this embodiment, the main control chip continuously checks the sensor's status and adjusts it according to the stored configuration information to ensure the system functions as expected.
[0066] Optionally, the anti-relay attack scheme proposed in this application can also be implemented through UWB (Ultra-Wideband) technology. UWB technology completely changes the traditional technical architecture and communication principle of keyless entry and keyless start. It achieves communication by sending and receiving nanosecond-level pulse signals. These pulse signals have high time resolution and can be used for precise distance measurement and positioning, thereby achieving anti-relay attack.
[0067] Specifically, UWB devices can achieve precise time synchronization, and any unauthorized device whose signal cannot be accurately synchronized will be identified as abnormal. If the distance between devices detected by UWB technology does not match the expectation, communication can be refused. The strength and direction of the UWB signal can be used to detect the source of the signal, helping to identify illegal relay attacks. UWB systems can employ dynamic key technology, using a different key for each communication, so even if an attacker intercepts a communication, it cannot be used for a subsequent attack. It is evident that UWB technology, due to its high data transmission rate and precise time resolution, makes it much more difficult to crack. Furthermore, the short-pulse characteristics of UWB signals give them better concealment when propagating in space, reducing the risk of interception. In keyless entry and start systems for automobiles, UWB technology can be used for two-way authentication between the vehicle and the key, ensuring that only authorized users can unlock the vehicle or start the engine.
[0068] This embodiment also provides a vehicle anti-relay attack method, applied to the aforementioned vehicle controller, wherein an information transmission channel has been established between the vehicle controller and the smart key used to start the vehicle based on a vehicle communication protocol. Figure 3 This is a flowchart of a vehicle anti-relay attack method according to an embodiment of this application, which includes the following steps:
[0069] Step S302: Receive a location query command from the smart key through the information transmission channel, wherein the location query command is sent when the smart key has been idle for a period of time exceeding a preset time.
[0070] Step S304: Locate the relative location information of the smart key according to the location query instruction, and send the relative location information to the smart key.
[0071] In this embodiment, the vehicle controller receives a location query command from the smart key through the information transmission channel. This location query command is sent when the smart key has been stationary for a preset period. The vehicle controller then locates the relative position of the smart key based on the location query command and sends this information to the smart key. By receiving the location query command and providing relative position information, the vehicle controller achieves intelligent interaction with the smart key, improving the convenience and security of vehicle starting. Application scenarios can include situations where the vehicle controller needs to accurately determine the location of the smart key when a user approaches the vehicle with it.
[0072] In an exemplary embodiment, the process of finding the relative location information of the smart key according to the location query instruction may include: determining the Received Signal Strength Indicator (RSSI) value corresponding to the location query instruction; if the RSSI value is greater than a strength threshold, determining that the relative location information is inside the vehicle; if the RSSI value is less than the strength threshold, determining that the relative location information is outside the vehicle. By determining the RSSI value, it is possible to accurately determine whether the smart key is inside the vehicle, avoiding unauthorized start attempts and improving system security. Application scenarios include situations where a user enters the vehicle with the smart key and needs to start the vehicle.
[0073] RSSI is a method for measuring wireless signal strength, commonly used in wireless communication systems such as Wi-Fi and Bluetooth. By measuring the strength of the received signal, the distance between the signal source (such as a key) and the receiver (such as a vehicle) can be determined.
[0074] The following embodiments illustrate a process for determining whether a key is inside or outside the vehicle based on its RSSI value:
[0075] 1. The key (Bluetooth device) will periodically send Bluetooth signals, the signal strength of which will decrease as the distance increases.
[0076] 2. The Bluetooth receiver in the vehicle receives the signal sent by the key and measures the signal strength (RSSI value).
[0077] 3. Analyze the received RSSI value and compare it with a preset strength threshold. The strength threshold is derived from experiments and experience and is used to distinguish between situations where the key is inside and outside the vehicle.
[0078] 4. If the RSSI value is higher than the strength threshold, the system will assume that the key is inside the vehicle; if the RSSI value is lower than the strength threshold, the system will assume that the key is outside the vehicle.
[0079] 5. Perform corresponding operations based on the judgment result, such as unlocking the car door or reminding the owner of the key location.
[0080] It should be noted that RSSI values are affected by a variety of factors, such as signal interference, obstacles, and environment. Therefore, in practical applications of determining key location using RSSI values, other sensors and algorithms can be combined to improve the accuracy of positioning.
[0081] In one exemplary embodiment, before sending the relative location information to the smart key, a first identity information of the vehicle's owner and a second identity information of the smart key's owner can be determined. If the first and second identity information are confirmed to be consistent, the relative location information is sent to the smart key. This identity verification ensures the compatibility between the vehicle and the smart key, preventing potential security risks and improving system security. Application scenarios include situations where a user attempts to start the vehicle with the smart key, requiring verification of the smart key and vehicle compatibility. The technical solution of this application is not only applicable to private cars but also to various car-sharing and company vehicle scenarios, possessing broad application prospects.
[0082] To better understand the process of the above-mentioned vehicle anti-relay attack method, the implementation flow of the above-mentioned vehicle anti-relay attack method will be described below in conjunction with optional embodiments, but it is not intended to limit the technical solution of the embodiments of this application.
[0083] This embodiment provides a method for preventing vehicle relay attacks, which pre-calibrates key parameters such as noise filtering values and motion sensor sensitivity thresholds. Figure 7 This is a schematic diagram of the control logic of the smart key and vehicle controller according to embodiments of this application, such as... Figure 7 As shown, the specific steps are as follows:
[0084] Step 1: Is the key stationary? If yes, proceed to Step 2. Otherwise, restart. The motion sensor detects acceleration to determine the key's movement state. When an acceleration threshold is reached, a trigger pin is pulled low, transmitting the movement state to the main control chip within the key. The main control chip then identifies the low-level pin to determine whether the key is moving or stationary.
[0085] Step 2: The timer continues counting down.
[0086] Step 3: Determine if the timeout has occurred. If so, proceed to Step 4. Otherwise, continue timing. The timer is the duration the key remains stationary outside the vehicle.
[0087] Step 4: Send a high-frequency location request signal. If the set inactivity time has elapsed, first send a location query command to the vehicle via a high-frequency signal.
[0088] Step 5: Determine if a low-frequency feedback signal is received. If yes, proceed to step 6. Otherwise, proceed to step 7. After receiving the instruction to query the location, the vehicle-side controller transmits the queried relative location information to the key via a low-frequency antenna carrier.
[0089] Step 6: Check if the key is outside the car. If yes, proceed to Step 7. Otherwise, proceed to Step 9.
[0090] Step 7: Disable the key functions.
[0091] Because high-frequency and low-frequency radio frequency signals have limited transmission distances, communication cannot be established if the key is not near the vehicle. Therefore, if no response is received from the vehicle controller regarding the location query command, the key is assumed to be outside the vehicle, and some key functions can be disabled, ceasing to respond to keyless entry and keyless start requests. In this state, the key can avoid attacks from relay devices.
[0092] Step 8: Reset the timer.
[0093] Step 9, no functional restrictions.
[0094] If some key functions are disabled, when a user approaches the vehicle with the key, a movement scenario is triggered. As soon as the key moves, the functions return to normal. This prevents relay attacks and malicious theft if the user leaves the key in a fixed location indoors at night. During the day, the key functions normally when used for normal vehicle use, without affecting the user's experience. When the key detects its relative location inside the vehicle, its functions are not restricted; it functions as a normal smart key, and can start the vehicle whether stationary or not. If the key's relative location is detected inside the vehicle, its functions will not be restricted regardless of how long it has been stationary, ensuring the vehicle can be started normally whenever the key is inside.
[0095] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a vehicle control device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0096] Figure 8 This is a structural block diagram of a vehicle anti-relay attack system according to an embodiment of this application; as shown... Figure 8 As shown, it includes: a smart key 82 for the vehicle and a vehicle-mounted controller 84. The smart key is equipped with at least a motion sensor and is used to start the vehicle. An information transmission channel has been established between the smart key and the vehicle-mounted controller based on a vehicle communication protocol, and the information transmission channel is used for information interaction between the smart key and the vehicle-mounted controller.
[0097] The smart key is also used to acquire parameter ranges set for the motion sensor under different key calibration scenarios, wherein the different key calibration scenarios include at least a stationary scenario; determine the current motion parameter value from the current sensing information of the motion sensor, and determine the parameter range to which the current motion parameter value belongs as the target value range; when it is determined that the current key calibration scenario corresponding to the target value range is the stationary scenario, send a location query command to the vehicle controller according to the stationary duration of the smart key in the stationary scenario; enter the anti-relay attack mode according to the reception result of the reply message from the vehicle controller, wherein the reply message includes at least the relative position positioning information fed back by the vehicle controller based on the location query command, and the reception result includes at least successful reception.
[0098] The vehicle-mounted controller is used to receive a location query command from the smart key through the information transmission channel, wherein the location query command is sent when the smart key has been stationary for a period of time exceeding a preset time; it searches for the relative location information of the smart key according to the location query command, and sends the relative location information to the smart key.
[0099] Through the aforementioned system, intelligent control of vehicle starting is achieved through intelligent interaction between the smart key and the vehicle controller, improving the convenience and safety of vehicle use. Specifically, the system obtains the parameter range set for the motion sensor under different key calibration scenarios via the smart key, wherein the different key calibration scenarios include at least a stationary scenario; it determines the current motion parameter value from the current sensing information of the motion sensor, and determines the parameter range to which the current motion parameter value belongs as the target value range; if it is determined that the current key calibration scenario corresponding to the target value range is the stationary scenario, it sends a location query command to the vehicle controller according to the stationary duration of the smart key in the stationary scenario; based on the received response message from the vehicle controller, it enters an anti-relay attack mode, wherein the response message includes at least the relative position positioning information fed back by the vehicle controller based on the location query command, and the received result includes at least successful reception.
[0100] This application utilizes a motion sensor built into the smart key to detect the key's movement state. Combined with the duration of stillness and relative position information, it intelligently switches the vehicle's anti-relay attack mode. This not only improves the convenience of starting the vehicle but also enhances system security, preventing unauthorized starting attempts. The technical solution of this application addresses the technical problem of insufficient vehicle security due to relay attacks in related technologies, improving security while ensuring normal vehicle starting. In practical applications, it can effectively enhance vehicle security and intelligence, providing users with a more convenient and secure vehicle usage experience.
[0101] This application also receives a location query command from the smart key via a vehicle-side controller. This location query command is sent when the smart key has been stationary for a preset period. The vehicle-side controller then locates the relative location information of the smart key based on the location query command and sends this information back to the smart key. By receiving the location query command and providing relative location information, the vehicle-side controller achieves intelligent interaction with the smart key, improving the convenience and security of vehicle starting.
[0102] Optionally, in one embodiment, the vehicle anti-relay attack system, in addition to the vehicle-side controller, external and internal antennas, and smart key, may also include the following subsystems to form the system skeleton, enabling joint control of vehicle functions via a network. Specifically, the subsystems are as follows:
[0103] Engine control systems, such as the engine control unit, enable engine ignition, fuel supply, and emission control, ensuring efficient and stable engine operation.
[0104] For example, the transmission control system in an automatic transmission control module is used to control the timing of gear shifts in a vehicle to ensure a smooth driving experience.
[0105] Braking systems such as Anti-lock Braking System (ABS), Electronic Stability Program (ESP), and Brake Assist System (BAS) use sensors to monitor wheel speed and other parameters to prevent the vehicle from losing control during braking.
[0106] Steering systems such as Electric Power Steering (EPS) and Active Steering provide assistance and control in driving direction, improving handling and safety.
[0107] Suspension systems such as Electronic Control Suspension (ECS) are used to automatically adjust suspension stiffness according to road conditions and driving modes to improve ride comfort.
[0108] The airbag control unit is used to monitor the vehicle's collision status, control the deployment of airbags, and protect the safety of occupants.
[0109] Electronic stability systems such as Traction Control System (TCS) and Hill-start Assist Control (HAC) are used to ensure vehicle stability in complex road conditions.
[0110] Driver assistance systems such as Adaptive Cruise Control (ACC), Blind Spot Detection (BSD), and Autonomous Emergency Braking (AEB) are used to provide active safety features.
[0111] An infotainment system that includes in-vehicle audio, navigation, Bluetooth connectivity, and a touchscreen control center is used to provide entertainment and information for drivers and passengers.
[0112] Communication systems such as Local Interconnect Network (LIN) and Controller Area Network (CAN) are used to enable communication between the inside and outside of the vehicle.
[0113] Battery Management Systems (BMS), such as generator control units, are used to ensure the efficient distribution and management of electrical energy.
[0114] The air conditioning and climate control system adjusts the air conditioning system according to the interior temperature and settings to provide a comfortable riding environment.
[0115] Vehicle lighting control systems, such as automatic headlights and turn signal control, are used to control the turning lights on and off based on ambient light and turn signals.
[0116] Anti-theft systems, including burglar alarms and central locking control units, are used to prevent vehicle theft.
[0117] For example, a digital dashboard's instrument panel and display system are used to provide key information about the vehicle's operating status.
[0118] In-vehicle monitoring systems, such as reversing cameras and 360-degree surround view systems, are used to help drivers observe the environment around the vehicle.
[0119] Emergency call systems such as eCall and iCall are used to automatically or manually trigger emergency calls when an accident occurs, allowing for timely assistance.
[0120] In an exemplary embodiment, the smart key is further configured to: determine different sensitivity resolutions supported by the motion sensor, wherein the motion sensor has different sensitivities when detecting the motion state of the smart key at the different sensitivity resolutions; determine a target sensitivity resolution with the highest sensitivity from the different sensitivity resolutions, and obtain the historical acceleration detected by the motion sensor at the target sensitivity resolution from the historical sensing information of the motion sensor; determine a key calibration scenario for the motion sensor based on the key state corresponding to the historical acceleration, set a parameter range corresponding to the key calibration scenario based on the value range of the historical acceleration, and set a sensitivity threshold corresponding to the key calibration scenario.
[0121] In one exemplary embodiment, the smart key is further configured to: when it is determined that the key state indicates that the smart key is stationary, set the key calibration scenario of the motion sensor to the stationary scenario; and when it is determined that the key state indicates that the smart key is being carried in motion, set the key calibration scenario of the motion sensor to the motion scenario.
[0122] In an exemplary embodiment, the smart key is further configured to, before determining the current motion parameter value from the current sensing information of the motion sensor, determine a target noise filter value corresponding to the current key calibration scenario from noise filter values set for the different key calibration scenarios, wherein the target noise filter value includes one of the following: a first noise filter value when the current key calibration scenario is the static scenario, a second noise filter value when the current key calibration scenario is the key calibration scenario, and the first noise filter value is less than the second noise filter value; the target noise filter value is used to perform noise reduction processing on the current sensing information.
[0123] In an exemplary embodiment, the smart key is further configured to enter an anti-relay attack mode based on the reception result of the reply message from the vehicle controller through the following steps: if it is determined that the reception result indicates that no reply message from the vehicle controller has been received, the smart key enters the anti-relay attack mode and stops responding to the keyless unlocking unlock request and the keyless start start request in the anti-relay attack mode.
[0124] In an exemplary embodiment, the smart key is further configured to: when it is determined that the current key calibration scenario corresponding to the target value range is the static scenario, compare the static duration with the preset duration corresponding to the static scenario; and when it is determined that the static duration is greater than the preset duration, send a location query command to the vehicle controller.
[0125] In one exemplary embodiment, the smart key is further provided with a lock control button, and the smart key is further used to generate a lock control command based on the target object's operation of the lock control button, wherein the lock control command includes one of the following: an unlock command, a lock command; reading the sensor status information of the motion sensor based on the lock control command; and reconfiguring the motion sensor until the configuration status information is successfully compared when it is determined that the sensor status information and the stored configuration status information fail to match.
[0126] In an exemplary embodiment, the vehicle-side controller is further configured to: determine the Received Signal Strength Indicator (RSSI) value corresponding to the location query command; if the RSSI value is greater than a strength threshold, determine that the relative location information is inside the vehicle; if the RSSI value is less than a strength threshold, determine that the relative location information is outside the vehicle.
[0127] In an exemplary embodiment, the vehicle controller is further configured to: determine first identity information of the object to which the vehicle belongs and second identity information of the object to which the smart key belongs before sending the relative location information to the smart key; and send the relative location information to the smart key if the first identity information and the second identity information are consistent.
[0128] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.
[0129] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:
[0130] S1, obtain the parameter range set for the motion sensor under different key calibration scenarios, wherein the different key calibration scenarios include at least a static scenario;
[0131] S2, determine the current motion parameter value from the current sensing information of the motion sensor, and determine the parameter range to which the current motion parameter value belongs as the target value range;
[0132] S3, when it is determined that the current key calibration scenario corresponding to the target value range is the static scenario, a location query command is sent to the vehicle controller according to the static duration of the smart key in the static scenario.
[0133] S4, based on the received result of the reply message from the vehicle controller, enter the anti-relay attack mode, wherein the reply message includes at least the relative position positioning information fed back by the vehicle controller based on the position query command, and the received result includes at least successful reception.
[0134] Alternatively, in this embodiment, the storage medium may also be configured to store program code for performing the following steps:
[0135] S1, receive a location query command from the smart key through the information transmission channel, wherein the location query command is sent when the smart key has been idle for a period of time exceeding a preset time.
[0136] S2, locate the relative location information of the smart key according to the location query instruction, and send the relative location information to the smart key.
[0137] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0138] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0139] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0140] S1, obtain the parameter range set for the motion sensor under different key calibration scenarios, wherein the different key calibration scenarios include at least a static scenario;
[0141] S2, determine the current motion parameter value from the current sensing information of the motion sensor, and determine the parameter range to which the current motion parameter value belongs as the target value range;
[0142] S3, when it is determined that the current key calibration scenario corresponding to the target value range is the static scenario, a location query command is sent to the vehicle controller according to the static duration of the smart key in the static scenario.
[0143] S4, based on the received result of the reply message from the vehicle controller, enter the anti-relay attack mode, wherein the reply message includes at least the relative position positioning information fed back by the vehicle controller based on the position query command, and the received result includes at least successful reception.
[0144] Alternatively, in this embodiment, the processor may also be configured to perform the following steps via a computer program:
[0145] S1, receive a location query command from the smart key through the information transmission channel, wherein the location query command is sent when the smart key has been idle for a period of time exceeding a preset time.
[0146] S2, locate the relative location information of the smart key according to the location query instruction, and send the relative location information to the smart key.
[0147] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0148] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0149] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0150] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for preventing vehicle relay attacks, characterized in that, Applied to smart keys, the smart key is equipped with at least a motion sensor. The smart key is used to start the vehicle. An information transmission channel has been established between the smart key and the vehicle's on-board controller based on a vehicle communication protocol. This information transmission channel is used for information interaction between the smart key and the on-board controller, including: Obtain the parameter range set for the motion sensor under different key calibration scenarios, wherein the different key calibration scenarios include at least a static scenario; The current motion parameter value is determined from the current sensing information of the motion sensor, and the parameter range to which the current motion parameter value belongs is determined as the target value range; If the current key calibration scenario corresponding to the target value range is determined to be the static scenario, a location query command is sent to the vehicle controller according to the static duration of the smart key in the static scenario. The vehicle enters the anti-relay attack mode based on the received response message from the vehicle controller, wherein the response message includes at least the relative location information fed back by the vehicle controller based on the location query command, and the received result includes at least successful reception.
2. The vehicle anti-relay attack method according to claim 1, characterized in that, Before obtaining the parameter range set for the motion sensor in different key calibration scenarios, the method further includes: The motion sensor is determined to support different sensitivity resolutions, wherein the motion sensor has different sensitivities when detecting the motion state of the smart key at the different sensitivity resolutions; The target sensitivity resolution with the highest sensitivity is determined from the different sensitivity resolutions, and the historical acceleration detected by the motion sensor at the target sensitivity resolution is obtained from the historical sensing information of the motion sensor. The key calibration scenario of the motion sensor is determined based on the key state corresponding to the historical acceleration. The parameter range corresponding to the key calibration scenario is set according to the value range of the historical acceleration, and the sensitivity threshold corresponding to the key calibration scenario is set.
3. The vehicle anti-relay attack method according to claim 2, characterized in that, The different key calibration scenarios also include the motion scenario of the smart key. The key calibration scenario of the motion sensor is determined based on the key state corresponding to the historical acceleration, including: When the key state is determined to indicate that the smart key is stationary, the key calibration scenario of the motion sensor is set to the stationary scenario; When the key state is determined to indicate that the smart key is being carried or moved, the key calibration scenario of the motion sensor is set to the motion scenario.
4. The vehicle anti-relay attack method according to claim 1, characterized in that, Before determining the current motion parameter value from the current sensing information of the motion sensor, the method further includes: The target noise filter value corresponding to the current key calibration scenario is determined from the noise filter values set for the different key calibration scenarios, wherein the target noise filter value includes one of the following: a first noise filter value when the current key calibration scenario is the static scenario, a second noise filter value when the current key calibration scenario is the key calibration scenario, and the first noise filter value is less than the second noise filter value; The target noise filter value is used to denoise the current sensing information.
5. The vehicle anti-relay attack method according to claim 1, characterized in that, Based on the received response message from the vehicle-mounted controller, the system enters an anti-relay attack mode, including: If the received result indicates that no reply message has been received from the vehicle controller, the system enters the anti-relay attack mode and stops responding to keyless unlocking requests and keyless start requests in the anti-relay attack mode.
6. The vehicle anti-relay attack method according to claim 1, characterized in that, If the current key calibration scenario corresponding to the target value range is determined to be the stationary scenario, a location query command is sent to the vehicle controller based on the stationary duration of the smart key in the stationary scenario, including: If it is determined that the current key calibration scenario corresponding to the target value range is the static scenario, compare the static duration with the preset duration corresponding to the static scenario; If the set resting time is determined to be longer than the preset time, a location query command is sent to the vehicle controller.
7. The vehicle anti-relay attack method according to claim 1, characterized in that, The smart key is also equipped with a lock control button, and the method further includes: A lock control command is generated based on the target object's operation of the lock control button, wherein the lock control command includes one of the following: an unlock command, a lock command; The sensor status information of the motion sensor is read based on the locking command; If the sensor status information and the stored configuration status information fail to match, the motion sensor is reconfigured until the configuration status information matches successfully.
8. A method for preventing vehicle relay attacks, characterized in that, Applied to a vehicle-side controller, wherein an information transmission channel has been established between the vehicle-side controller and the smart key used to start the vehicle based on a vehicle communication protocol, including: The system receives a location query command from the smart key through the information transmission channel, wherein the location query command is sent when the smart key has been idle for a period of time exceeding a preset time; the system finds the relative location information of the smart key according to the location query command, and sends the relative location information to the smart key.
9. The vehicle anti-relay attack method according to claim 8, characterized in that, The location query command retrieves the relative location information of the smart key, including: Determine the Received Signal Strength Indicator (RSSI) value corresponding to the location query command; If the RSSI value is determined to be greater than the intensity threshold, the relative position positioning information is determined to be inside the vehicle; If the RSSI value is determined to be less than the intensity threshold, the relative position positioning information is determined to be outside the vehicle.
10. The vehicle anti-relay attack method according to claim 8, characterized in that, Before sending the relative location information to the smart key, the method further includes: Determine the first identity information of the object to which the vehicle belongs, and determine the second identity information of the object to which the smart key belongs; If the first identity information and the second identity information are confirmed to be consistent, the relative location information is sent to the smart key.
11. A vehicle anti-relay attack system, characterized in that, include: A smart key for a vehicle, a vehicle-mounted controller, for performing the method described in any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 10.
13. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 10 through the computer program.