Method and device for preventing relay attacks

The mobile terminal device collects data through the motion sensor to form a moving track, and judges the distance difference between the vehicle and the key end, solving the problem that relay attacks in the prior art is difficult to prevent, and realizing the situation without relying on the external environment. Effectively prevent attacks.

CN115195661BActive Publication Date: 2025-02-25HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110377865.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-08
Publication Date
2025-02-25
Estimated Expiration
2041-04-08

AI Technical Summary

Technical Problem

Existing PEPS systems face the risk of high relay attacks, especially when precise geolocation information is not available, it is difficult to effectively prevent relay attacks.

Method used

Movement data is collected by the motion sensor in the mobile terminal device, forming a moving track, and determining the distance difference between the mobile terminal device and the vehicle stop position. If the distance difference exceeds the preset security threshold, it is determined that there may be a relay attack.

Benefits of technology

Without relying on the external environment, it effectively prevents relay attacks between the vehicle end and the key end, and improves the security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115195661B_ABST
    Figure CN115195661B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for preventing relay attacks. In the technical solution proposed in the present application, N motion data of a mobile terminal device from the time of parking to the second time of reconnecting to the vehicle or receiving an instruction for instructing to perform an anti-relay attack operation are obtained, and among the N motion data, M motion data are obtained by a motion sensor in the mobile terminal device, and then the moving trajectory of the mobile terminal device is determined by the N motion data, and the distance difference between the position of the mobile terminal device at the second moment and the vehicle stop position is determined by the moving trajectory. If the distance difference exceeds a preset safety threshold, it is determined that a relay attack may exist. This method can effectively prevent relay attacks between the vehicle end and the mobile terminal device without obtaining accurate geographic location information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle control technology, and in particular to a method and a device for preventing relay attacks. Background Art

[0002] The passive entry passive start (PEPS) system refers to a vehicle-side broadcast signal, and after receiving the signal, the key-side sends information to the vehicle-side. After the vehicle-side receives the information sent by the key-side, it authenticates the key-side and determines whether the key-side is within the preset range. If the key-side authentication is successful and the key-side is within the preset range, the vehicle can be unlocked. However, the current PEPS system faces a very high risk of relay attacks. Even if the key-side authorized for the vehicle-side is outside the effective distance of the vehicle, when the attacker uses a relay device to relay the information between the key-side and the vehicle-side and then amplify the communication distance, it is possible to open the car door and start the car to steal without the user's knowledge at a long distance.

[0003] One way to prevent relay attacks between the vehicle end and the key end is as follows: the key end obtains the geographical location of the key end at the time of unlocking (the key end receives the signal sent from the vehicle end) through the global positioning system, and calculates the distance between the address location and the geographical location where the vehicle stops. When the distance is greater than the safety distance, it is considered that a relay attack may exist. At this time, the key end can cut off the connection with the signal to prevent relay attacks.

[0004] However, this method is dependent on the external environment and cannot be used in any scenario, and thus cannot effectively prevent relay attacks. As an example, when the key end is located in an area where the GPS signal is weak (such as in an underground garage), the position of the key end cannot be determined, and thus cannot effectively prevent relay attacks.

[0005] Therefore, how to effectively prevent relay attacks between the vehicle end and the key end is a technical problem that needs to be solved urgently. Summary of the invention

[0006] The present application provides a method and a device for preventing relay attacks, which can effectively prevent relay attacks between a vehicle end and a key end without relying on an external environment.

[0007] In a first aspect, the present application provides a method for preventing relay attacks, the method being applied to a passive entry and start-up PEPS system, the PEPS system comprising a first subsystem and a second subsystem, the first subsystem being deployed in a vehicle, and the second subsystem being deployed in a mobile terminal device, the method comprising: acquiring M motion data collected by a motion sensor in the mobile terminal device, the M motion data corresponding one-to-one to M time periods, each of the M motion data comprising a method for obtaining a motion direction and a displacement of the mobile terminal device in the time period corresponding to each motion data, and M being a positive integer; determining a moving trajectory of the mobile terminal device in a target time period according to the N motion data, the N motion data The method comprises: comprising: comprising: M motion data, wherein the target time period refers to the time period from the first moment when the vehicle stops to the second moment, wherein the second moment includes the moment when the mobile terminal device reconnects with the vehicle or receives the moment when an instruction for instructing to perform an anti-relay attack operation, and the target time period includes N time periods, wherein the M time periods are M time periods out of N time periods, N is a positive integer, and M is a positive integer less than or equal to N; determining the distance difference between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment according to the movement trajectory; and determining that a relay attack exists on the vehicle when the target condition is met, wherein the target condition includes that the distance difference exceeds a preset safety threshold.

[0008] In the technical solution of the present application, when the mobile terminal device is connected to the vehicle again or receives an instruction for instructing to perform an anti-relay attack operation, the distance difference between the mobile terminal device and the vehicle stop position can be determined by the movement trajectory formed by the motion data of different time periods in the mobile terminal device, so that the relay attack between the vehicle end and the mobile terminal device can be effectively prevented without obtaining accurate geographic location information. In other words, the anti-relay attack method provided by the present application is completely independent of the surrounding environment and is not affected by the air wireless signal environment.

[0009] For example, for the anti-relay method based on geographic location, if there is no GNSS signal in a certain period of time, the network positioning method will be used to obtain the approximate location of a mobile terminal device, resulting in an inaccurate distance between the determined mobile terminal device and the vehicle stop position, and thus unable to effectively prevent relay attacks. If the mobile trajectory is used to determine the distance between the mobile terminal device and the vehicle stop position, even if there is no GNSS signal in the certain period of time, the mobile terminal device can obtain the corresponding trajectory vector through the motion sensor, and further, the distance difference between the mobile terminal device and the vehicle stop position can be determined based on the trajectory vector, thereby effectively preventing relay attacks between the vehicle end and the mobile terminal device.

[0010] In combination with the first aspect, in a possible implementation, M is less than N, wherein the method further includes: acquiring NM motion data, the NM motion data corresponding one-to-one to NM time periods, the NM time periods including time periods other than M time periods in the N time periods, the NM motion data including motion data other than M motion data in the N motion data, and each motion in the NM motion data containing the positioning information of the global navigation satellite system GNSS of the mobile terminal device at the starting time of the corresponding time period and the positioning information of the GNSS at the end time of the corresponding time period.

[0011] In the anti-relay attack method provided in the embodiment of the present application, during the entire movement process, when the mobile terminal device is able to detect a GNSS signal, the GNSS information is used to obtain a trajectory vector, which can further reduce the power consumption of the mobile terminal device.

[0012] In combination with the first aspect, in a possible implementation manner, M is equal to N.

[0013] In combination with the first aspect, in a possible implementation manner, each of the N motion data further includes information for obtaining the height of the mobile terminal device from a specified plane during a time period corresponding to each motion data.

[0014] In combination with the first aspect, in a possible implementation method, determining the distance between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment based on the mobile trajectory includes: obtaining the location information of the mobile terminal device determined by Bluetooth technology and / or wireless local area network communication technology; optimizing the mobile trajectory according to the location information to obtain a target mobile trajectory; and determining the distance difference between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment based on the target mobile trajectory.

[0015] In combination with the first aspect, in a possible implementation manner, the method further includes: disconnecting from the vehicle.

[0016] In a second aspect, the present application provides a device for preventing relay attacks, which is applied to a passive entry and startup PEPS system, wherein the PEPS system includes a first subsystem and a second subsystem, wherein the first subsystem is deployed in a vehicle, and the second subsystem is deployed in a mobile terminal device, wherein the device includes: a first acquisition module, for acquiring M motion data collected by a motion sensor in the mobile terminal device, wherein the M motion data correspond one-to-one to M time periods, wherein each of the M motion data includes a motion direction and a displacement of the mobile terminal device in the time period corresponding to each motion data, and M is a positive integer; a movement trajectory module, for determining a movement trajectory of the mobile terminal device in a target time period according to the N motion data, wherein the N motion data packets are The target time period includes the M motion data, the target time period refers to the time period from the first moment when the vehicle stops to the second moment, the second moment includes the moment when the mobile terminal device establishes a connection with the vehicle again or receives the moment when an instruction for instructing to perform an anti-relay attack operation is received, the target time period includes N time periods, the M time periods are M time periods out of N time periods, N is a positive integer, and M is less than or equal to N positive integers; a determination module is used to determine the distance difference between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment according to the movement trajectory; the determination module is also used to determine that the vehicle has a relay attack when a target condition is met, and the target condition includes that the distance difference exceeds a preset safety threshold.

[0017] In combination with the second aspect, in a possible implementation method, M is less than N, wherein the device also includes: a second acquisition module, used to acquire NM motion data, the NM motion data correspond one-to-one to NM time periods, the NM time periods include time periods in the N time periods except the M time periods, the NM motion data include motion data in the N motion data except the M motion data, and each motion in the NM motion data contains the positioning information of the global navigation satellite system GNSS of the mobile terminal device at the starting time of the corresponding time period and the positioning information of the GNSS at the end time of the corresponding time period.

[0018] In conjunction with the second aspect, in a possible implementation, M is equal to N.

[0019] In combination with the second aspect, in a possible implementation, each of the N motion data further includes information for obtaining the height of the mobile terminal device from a specified plane during a time period corresponding to each motion data.

[0020] In combination with the second aspect, in a possible implementation method, the determination module is also used to: obtain the location information of the mobile terminal device determined by Bluetooth technology and / or wireless local area network communication technology; optimize the moving trajectory according to the location information to obtain the target moving trajectory; determine the distance difference between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment according to the target moving trajectory.

[0021] In combination with the second aspect, in a possible implementation manner, the device further includes an output module, configured to disconnect from the vehicle.

[0022] In a third aspect, the present application provides an anti-relay attack device, comprising: a memory and a processor; the memory is used to store program instructions; the processor is used to call the program instructions in the memory to execute the anti-relay attack method as described in the first aspect or any possible implementation method thereof.

[0023] In a fourth aspect, the present application provides a chip comprising at least one processor and a communication interface, wherein the communication interface and the at least one processor are interconnected via a line, and the at least one processor is used to run a computer program or instruction to execute the method for preventing relay attacks as described in the first aspect or any possible implementation method thereof.

[0024] In a fifth aspect, the present application provides a computer-readable medium storing a program code for execution by a device, wherein the program code includes a method for executing the anti-relay attack method as described in the first aspect or any possible implementation thereof.

[0025] In a sixth aspect, the present application provides a computer program product comprising instructions, wherein the computer program product includes computer program code. When the computer program code runs on a computer, the computer executes the method for preventing relay attacks as described in the first aspect or any possible implementation method thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A schematic diagram of a PEPS system provided by one embodiment of the present application;

[0027] Figure 2 A schematic diagram of the architecture of a PEPS system provided by one embodiment of the present application;

[0028] Figure 3 A schematic diagram of the working principle of a PEPS system provided in one embodiment of the present application;

[0029] Figure 4 A schematic diagram of a relay attack system provided by one embodiment of the present application;

[0030] Figure 5 A schematic flow chart of a method for preventing relay attacks provided in one embodiment of the present application;

[0031] Figure 6 A schematic flow chart of a method for preventing relay attacks provided in another embodiment of the present application;

[0032] Figure 7 A structural schematic diagram of determining a relative distance provided by another embodiment of the present application;

[0033] Figure 8 A schematic flow chart of a method for preventing relay attacks provided in yet another embodiment of the present application;

[0034] Fig. 9 A structural schematic diagram of determining a relative distance provided in yet another embodiment of the present application;

[0035] Fig.10 A schematic diagram of the structure of a device for preventing relay attacks provided by one embodiment of the present application;

[0036] Fig.11 A schematic diagram of the structure of an apparatus for preventing relay attacks provided in another embodiment of the present application. DETAILED DESCRIPTION

[0037] For the sake of understanding, the relevant terms involved in this application are first explained.

[0038] 1. Digital Key

[0039] With the accelerated popularization of car networking, digital car key (or digital key) products have emerged. Through mobile terminals, such as mobile phones and wearable devices, functions such as unlocking the car and starting the engine can be realized, and the wireless communication module of the smart connected car can be used to realize the remote management of the digital car key life cycle and key sharing. On this basis, it can also expand to other sub-scenarios such as sharing with relatives and friends, time-sharing rental, car sharing, fleet management, express delivery and designated driver.

[0040] From the perspective of functions, digital keys can be divided into remote keyless entry (RKE) key function, near field communication (NFC) key function and passive entry and start (PEPS) key function according to the short-distance communication technology used and the user experience. The RKE key function requires the user to initiate the corresponding function control operation in the application (APP) after establishing short-distance communication with the vehicle through the mobile terminal. The whole process is independent of the network; the NFC key function does not require the user to operate on the mobile terminal. The relevant process can be triggered by simply placing the mobile terminal in the NFC card reading area of ​​the vehicle; the PEPS key function has the best experience. It does not require the user to perform any operation, and the mobile terminal does not need to have a network connection. When the mobile terminal establishes a short-distance communication connection with the car, the car locates the mobile terminal. The user walks to the preset range of the car with the mobile terminal, and the relevant control functions can be automatically executed. According to the scenario, the PEPS key function can usually be further divided into senseless entry and senseless start. For PEPS, it is necessary to solve the problem of the distance measurement and positioning accuracy of the vehicle to the mobile terminal carrying the key function. For the sake of user experience and safety, there are certain requirements for the distance measurement accuracy.

[0041] The core of the digital key is the vehicle's identification of the mobile terminal and the judgment of the conditions corresponding to the relevant operations. For example, the vehicle's authentication of the PEPS key function is usually a combination of three conditions: key authentication, positioning, and anti-relay authentication. The judgment of the three conditions needs to be met at the same time. When the vehicle recognizes that there is a legitimate key in the connected mobile terminal, the mobile terminal is within the preset range, and there is no relay attack, the vehicle judges that the conditions are met and can automatically perform vehicle operations such as unlocking and ignition. For remote control keys, the vehicle usually needs to confirm that the key authentication has passed, the user verification has passed, and the corresponding vehicle control command verification has passed before executing the operation corresponding to the vehicle control command.

[0042] 2. Relay attack

[0043] The first unauthorized person is equipped with a transceiver and is located near the target vehicle. When the authorized vehicle user leaves the target vehicle, the first unauthorized person receives the signal originally sent to the authorized electronic key from the target vehicle, and then sends the signal to another transceiver equipped by the second unauthorized person at a longer distance. The other transceiver sends the received signal to the authorized electronic key. At this time, after the authorized electronic key receives the signal, it immediately responds with a valid signal that can be accepted by the passive entry system of the target vehicle. Thus, a short-range and a long-range unauthorized transceiver can relay the signal between the target vehicle and the authorized electronic key, thereby effectively increasing the transmission range of the signal. When the passive entry system of the target vehicle receives the valid signal, the first unauthorized person located near the target vehicle can enter the vehicle.

[0044] Figure 1 A schematic diagram of a PEPS system provided in one embodiment of the present application. Figure 1 As shown, the PEPS system of the present application may include a vehicle end 10 and a key end 20. In the embodiment of the present application, the key end 20 may also be referred to as a mobile terminal device, such as a smart phone, a tablet computer or other devices capable of wireless communication.

[0045] like Figure 2 As shown, the vehicle end 10 includes a first subsystem, which may include: a signal sending unit 101, a signal receiving unit 102, an authentication unit 103 and a judgment unit 104. The signal sending unit 101 is used to generate a signal and send the signal to the key end 20. The signal receiving unit 102 is used to receive the signal sent by the key end 20. The authentication unit 103 is used to authenticate the key end 20. The judgment unit 104 is used to judge whether the key end 20 enters a preset range.

[0046] The key end 20 includes a second subsystem, which may include: a signal receiving unit 201, a signal sending unit 202 and an authentication unit 203. The signal receiving unit 201 is used to receive a signal sent by the signal sending unit 101 of the vehicle end 10. The signal sending unit 202 is used to send a signal to the vehicle end 10. The authentication unit 203 is used to send authentication information that can prove the identity to the vehicle end 10.

[0047] for Figure 1The PEPS entry system shown has the following working logic: the vehicle end 10 broadcasts wirelessly in real time and sends a radio signal within a certain range. When the signal receiving unit 201 of the key end 20 scans the radio signal, a response signal is sent to the vehicle end 10 through the signal sending unit 202. After receiving the response signal sent by the key end 20, the signal receiving unit 102 of the vehicle end 10 sends a request message to obtain the identity of the key end 20 to the key end 20 through the signal sending unit 101. After receiving the request message, the key end 20 sends authentication information that can prove the identity to the vehicle end 10 through the authentication unit 203. After receiving the authentication information, the authentication unit 103 of the vehicle end 10 authenticates the key end 20 based on the authentication information. Further, the vehicle end 10 determines whether the distance between the key end 20 and the vehicle end 10 is within a preset range according to the position of the key end 20. If it is within the preset range of the vehicle end 10, the vehicle end 10 can be unlocked.

[0048] As an example, Figure 3 The working principle diagram of the PEPS system provided in one embodiment of the present application is shown in FIG. Figure 3 As shown, the vehicle end 10 sends out a radio response signal within a certain range (point P1 in the figure). When at least one key end 20 (such as mobile phone 1, mobile phone 2 and mobile phone 3 in the figure) is at point P1, it can scan the radio signal sent by the vehicle end 10. When the vehicle end 10 detects multiple key ends 20, the vehicle end 10 will first authenticate with the multiple key ends 20. When the vehicle end 10 recognizes that there is a legitimate key end 20, it will also determine whether the position of the legitimate key end 20 is within the preset range. If the legitimate key end 20 is within the preset unlocking range, the vehicle end 10 will be automatically unlocked.

[0049] However, for Figure 1 In the PEPS system shown, the vehicle end 10 and the key end 20 are vulnerable to relay attacks, resulting in a low security problem. Figure 4As shown, the attacker implements a remote attack through relays 403 and 404. For example, the key end 20 is at a relatively long distance from the vehicle end 10, that is, it is not within the range of the radio response signal emitted by the vehicle end 10. If the relay is not used, even if the key end is legal, it is not within the range of the radio response signal emitted by the vehicle end 10, so the vehicle end 10 will not be unlocked. However, if relays 403 and 404 are used, the radio response signal emitted by the vehicle end 10 can be sent to the key end 20 through routing. After scanning the wireless response signal, the key end 20 sends its authentication information, which is then sent to the vehicle end 10 through relays 404 and 403. Since the vehicle end 10 receives the authentication information from the relay 403, when the authentication information is legal, it will determine whether the position of the relay 403 is within the preset range. If it is within the preset range, the automatic unlocking of the vehicle end 10 can also be achieved. In this case, the communication distance is greatly extended, and the authentication information sent from the key end 20 to the vehicle end 10 does not need to be tampered with. As long as the signal is routed through two relays, the purpose of remotely controlling the vehicle end 10 can be achieved. Therefore, an attacker can control the vehicle end 10 through the relay attack without the driver's knowledge, such as opening the door, starting the car and stealing, which poses a huge threat and has low security.

[0050] It is to be noted here that Figure 4 The two relays shown are only an example, and the number of relays may be other numbers, which is not limited in the embodiments of the present application.

[0051] At present, the relay attack between the vehicle end 10 and the key end 20 can be prevented based on the geographic location. In this implementation, the key end avoids most long-distance relay scenarios by calculating the distance between its geographic location at the time of unlocking and the geographic location at the time of vehicle stopping. Figure 4For example, when the vehicle end 10 is turned off, there will be a flameout position (or vehicle stop position) information, such as coordinate information. Then, when the authorized user who owns the key end 20 leaves the vehicle end 10 and the distance between the key end 20 and the vehicle end 10 is greater than a certain distance, when the key end receives a trigger signal (for example, the key end receives a signal sent from the vehicle end or receives an instruction to instruct an anti-relay attack operation), the position information of the key end 20 at the time of being triggered is recorded as the second position information. If the attacker uses relays 403 and 404 to implement the attack, the key end 20 can receive the signal sent by the vehicle end 10 transmitted by the relay 404 even at a long distance. When the key end 20 is connected to the signal, the key end 20 can determine whether the distance between the current second position information and the flameout position information is greater than the safe distance. If the distance between the second position information and the initial position information is greater than the safe distance, it can be determined that a relay attack phenomenon exists. At this time, the key end 20 can cut off the connection with the signal sent by the vehicle end 10 transmitted by the relay 404, so that the vehicle end 10 will not be automatically unlocked.

[0052] However, the method of preventing relay attacks based on geographic location requires accurate geographic location information of the key end. A common method is to use the global navigation satellite system (GNSS) to obtain the geographic location information of the key end, but in many areas, the GNSS signal of the key end is very weak, resulting in inaccurate geographic location information, or the key end cannot even receive the GNSS signal, resulting in the inability to determine the geographic location information of the key end; in the absence of GNSS signals, one method to determine the geographic location information of the key end is to use network positioning, such as obtaining the approximate location information of the key end through base station information near the key end or public wireless fidelity (Wifi) information, but this method has very low accuracy and cannot provide effective prevention against relay attacks between the vehicle end and the key end.

[0053] In view of this, the present application provides a new method for preventing relay attacks. In the technical solution of the present application, the motion sensor in the mobile terminal device is used to determine the moving trajectory, and the moving trajectory of the mobile terminal device after leaving the vehicle end is recorded with the parking position (or the ignition off position) as the origin. Then when the mobile terminal device receives the response signal sent by the vehicle end, the relative distance between the current position of the mobile terminal device and the vehicle stop position is determined by the moving trajectory. If it exceeds a certain safety distance, it is determined that there may be a relay attack, so prevention is taken.

[0054] Furthermore, in the technical solution of the present application, in order to reduce the power consumption of the mobile terminal device, during the time period when the mobile terminal device is able to receive the GNSS satellite signal, the GNSS coordinates at the start time of receiving the GNSS satellite signal and the GNSS coordinates at the end time when the GNSS satellite signal is about to be lost are recorded, and then the trajectory vector of movement within the time period is obtained through the GNSS coordinates at the start time and the GNSS coordinates at the end time, and further the movement trajectory is obtained when the mobile terminal device receives the response signal sent by the vehicle.

[0055] Figure 5 A schematic flow chart of a method for preventing relay attacks provided by an embodiment of the present application. Figure 5 As shown, the method of this embodiment may include S501, S502, S503 and S504. The anti-relay attack method may be Figure 1 The PEPS system shown is performed at the key end.

[0056] S501, obtaining M motion data collected by a motion sensor in a mobile terminal device, wherein the M motion data correspond one-to-one to M time periods, and each of the M motion data includes information for obtaining a motion direction and a displacement of the mobile terminal device in the time period corresponding to each motion data, and M is a positive integer.

[0057] In this embodiment, the M motion data are collected by a motion sensor in the mobile terminal device. For example, the motion sensor may include an inertial measurement unit (IMU), an accelerometer, a gyroscope, a gravimeter, a magnetometer, a barometer, etc. in the mobile terminal device.

[0058] Among them, the motion data collected by the motion sensor can obtain the motion direction and displacement of the mobile terminal device in the corresponding time period. It can be understood that the two features of motion direction and displacement can describe the motion information of the mobile terminal device in a certain period of time. In this embodiment, the vector composed of multiple features including motion direction and displacement is also called a trajectory vector.

[0059] It can also be understood that, for a mobile terminal device, when it is moving, its movement direction and displacement may be different in different time periods. Therefore, the movement data in M ​​time periods can represent the movement information of the mobile terminal device in different time periods.

[0060] In one possible implementation, the moving direction can be obtained using a sensor such as an electronic compass, a gyroscope, or an IMU. The displacement can be obtained by multiplying the number of steps by the step length or integrating the speed, wherein the step length can be obtained by performing big data learning on a large amount of user data, which will not be described in detail in this embodiment.

[0061] There are many ways for sensors in mobile terminal devices to determine the direction of movement. For example, the first one is based on the compass principle, which mainly measures and combines the magnetic field and gravity acceleration to obtain the direction based on the compass principle; the other one is based on the gyroscope principle, which integrates the angular velocity obtained by the gyroscope to obtain the angle change increment, so as to obtain the direction at each moment under a given initial angle.

[0062] The mobile terminal device can also calculate the posture of the object based on the IMU, and then use the posture to calculate the displacement. The inertial measurement unit is usually composed of three single-axis accelerometers and three single-axis gyroscopes, and some IMUs also have a magnetometer. The accelerometer detects the acceleration signal of the object in the independent three-axis of the carrier coordinate system, and the gyroscope detects the angular velocity signal of the carrier relative to the navigation coordinate system. The specific implementation process can refer to the relevant technical description, which will not be repeated here.

[0063] It is noted here that each of the M motion data may also include information for obtaining the height of the mobile terminal device during the time period corresponding to each motion data, which is not limited in this embodiment of the present application.

[0064] S502, determining a movement trajectory of a mobile terminal device within a target time period based on N motion data, wherein the N motion data include M motion data, and the target time period refers to a time period from a first moment when the vehicle stops to a second moment, wherein the second moment includes a moment when the mobile terminal device reconnects to the vehicle or a moment when an instruction for instructing to perform an anti-relay attack operation is received, and the target time period includes N time periods, and the M time periods are M time periods out of N time periods, where N is a positive integer and M is a positive integer less than or equal to N.

[0065] In this embodiment, the N motion data refer to the motion data of the mobile terminal device in N time periods from the time when the vehicle stops to the time when the mobile terminal device reconnects with the vehicle or receives an instruction for instructing to perform an anti-relay attack operation. Among the N motion data, M motion data are collected by motion sensors.

[0066] The motion data in each time period can be used to obtain the trajectory vector of the mobile terminal device in the time period, such as the motion direction and displacement. Therefore, through N motion data, the N trajectory vectors of the mobile terminal device in N time periods from the time when the vehicle stops to the time when the mobile terminal device reconnects with the vehicle or receives the instruction for instructing to perform the anti-relay attack operation can be known, so that the movement trajectory of the mobile terminal device can be known.

[0067] As an example, when a user holding a mobile terminal device starts moving after the vehicle is parked, and passes by a hospital, a supermarket, a company and the user's residence in sequence, at this time, if the user re-establishes a connection with the vehicle at his residence, the mobile terminal device can determine the movement trajectory from the moment the vehicle is parked to the moment the mobile terminal device re-establishes a connection with the vehicle based on the obtained motion data for the time period from the parking location to the hospital, the motion data for the time period from the hospital to the supermarket, the motion data for the time period from the supermarket to the company, and the motion data from the company to the residence.

[0068] It should be understood that the N motion data in the embodiment of the present application can also be continuously updated, that is, the movement trajectory can also be continuously updated, and the embodiment of the present application does not limit this.

[0069] S503: Determine, based on the movement trajectory, a distance difference between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment.

[0070] Since the N motion data are motion information obtained from the first moment when the vehicle stops to the moment when the connection with the vehicle is established again or the instruction for instructing to perform an anti-relay attack operation is received. Accordingly, the movement trajectory describes the displacement and direction of the mobile terminal device moving in N time periods from the first moment to the second moment. Therefore, after the movement trajectory of the mobile terminal device is obtained, the distance difference between the position of the mobile terminal device at the moment when the connection with the vehicle is established again or the instruction for instructing to perform an anti-relay attack operation is received and the position of the vehicle at the first moment can be obtained through the movement trajectory.

[0071] In one possible implementation, since the mobile trajectory is obtained through N motion data, the trajectory vectors corresponding to each of the N motion data can be added together to obtain a vector between the position at the first moment and the position at the second moment. The modulus of the vector is the distance difference between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment.

[0072] In another implementation, for the N trajectory vectors corresponding to the N motion data, the distance difference between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment can be obtained by real-time calculation. For example, there are three time periods from the first moment to the second moment. After obtaining the trajectory vector of the first time period, the trajectory vector of the second time period can be obtained by the trajectory vector of the first time period and the motion data of the second time period. After obtaining the trajectory vector of the second time period, the trajectory vector of the third time period can be obtained by the trajectory vector of the second time period and the motion data of the third time period. In other words, the motion data of the latest time period can be continuously superimposed on the trajectory vector to generate the latest trajectory vector.

[0073] S504: When a target condition is met, determining that a relay attack exists on the vehicle, wherein the target condition includes that the distance difference exceeds a preset safety threshold.

[0074] In the embodiment of the present application, a preset safety threshold is set to determine whether a relay attack may exist. For example, the safety threshold may be a preset distance threshold, which is not limited in the embodiment of the present application.

[0075] Take the example of a mobile terminal device reconnecting with a vehicle. After the vehicle stops, the mobile terminal device keeps moving and the distance between the mobile terminal device and the vehicle is greater than a certain distance. If the attacker uses a relay to implement the attack, the mobile terminal device can receive the signal from the vehicle transmitted by the relay even at a long distance and establish a connection with the vehicle. At this time, the mobile terminal device obtains the movement trajectory of N time periods through the motion data recorded from the time the vehicle stops to the time the connection is established again with the vehicle, and then calculates whether the distance difference between the current position information of the mobile terminal device and the position information of the vehicle when it stops is greater than the safety threshold based on the movement trajectory. If the distance is greater than the safety threshold, it means that the signal received by the mobile terminal device may not be sent by the vehicle, and there may be a relay attack.

[0076] Optionally, when the mobile terminal device determines that a relay attack may occur on the vehicle, the mobile terminal device may output prompt information for indicating that an attack occurs between the vehicle and the mobile terminal. For example, the prompt information may be a vibration or voice prompt of the mobile terminal device that indicates that a relay attack occurs between the vehicle and the mobile terminal device, or a user interface may be displayed to the user of the mobile terminal device to ask the user to confirm whether to operate the vehicle. This embodiment of the application does not limit this.

[0077] In the anti-relay attack method provided by the embodiment of the present application, when the mobile terminal device is connected to the vehicle again or receives an instruction for instructing to perform an anti-relay attack operation, a trajectory vector determined by N motion data is first obtained, and among the N motion data, M motion data are obtained by a motion sensor in the mobile terminal device. Then, the moving trajectory of the mobile terminal device is determined by the N motion data, and the distance between the position of the mobile terminal device at the time of reconnection to the vehicle and the stop position of the vehicle is determined by the moving trajectory. If the distance is greater than the preset safety distance threshold, it is determined that a relay attack may exist.

[0078] In the technical solution of the present application, when the mobile terminal device is connected to the vehicle again, the distance difference between the mobile terminal device and the vehicle stop position can be determined by the movement trajectory formed by the motion data of different time periods in the mobile terminal device, so that the relay attack on the vehicle side and the key side can be effectively prevented without obtaining accurate geographic location information. In other words, the anti-relay attack method provided by the present application is completely independent of the surrounding environment and is not affected by the air wireless signal environment.

[0079] For example, for the anti-relay method based on geographic location, if there is no GNSS signal in a certain period of time, the network positioning method will be used to obtain the approximate location of a mobile terminal device, resulting in an inaccurate distance between the mobile terminal device and the vehicle stop position, and thus unable to effectively prevent relay attacks. If the mobile trajectory is used to determine the distance between the mobile terminal device and the vehicle stop position, even if there is no GNSS signal in this period of time, the mobile terminal device can obtain the corresponding trajectory vector through the motion sensor, and further, the relative distance between the mobile terminal device and the vehicle stop position can be determined based on the trajectory vector, thereby effectively preventing relay attacks on the vehicle end and the key end.

[0080] Optionally, Figure 5 S503 in the illustrated embodiment may include: obtaining location information of the mobile terminal device determined through Bluetooth technology and / or wireless local area network communication technology; optimizing the movement trajectory according to the location information to obtain the target movement trajectory; determining the distance between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment according to the target movement trajectory.

[0081] In this embodiment, after obtaining the moving trajectory, the moving trajectory can also be optimized using the location information determined by Bluetooth technology and / or wireless local area network communication technology, for example, using the public Wifi or hotspot based on parking as a reference, or using the mobile phone to perform Bluetooth distance measurement on the signal source as a reference, to obtain a more accurate moving trajectory. Then, the distance between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment is determined by the optimized moving trajectory.

[0082] What is explained here is how to use the location information determined by Bluetooth technology and / or wireless local area network communication technology to optimize the movement trajectory and obtain a more accurate movement trajectory. Please refer to the relevant technical description, which will not be repeated here.

[0083] As an optional embodiment, Figure 5 M is equal to N in the illustrated embodiment.

[0084] Let's take M equal to N as an example. Figure 6 Another embodiment of the present application is a method for preventing relay attacks.

[0085] like Figure 6 As shown, the method of this embodiment may include S601, S602, S603, S604 and S605. The anti-relay attack method may be Figure 1 The PEPS system shown is performed at the key end.

[0086] S601, the mobile terminal device obtains vehicle stop information.

[0087] In this embodiment, the mobile terminal device obtains the motion data in different time periods starting from the moment when the vehicle stops. Therefore, before obtaining the motion data in different time periods, the mobile terminal device needs to know whether the vehicle stops.

[0088] In one possible implementation, the vehicle may send a notification of a vehicle status change or a vehicle lock change to the mobile terminal device, for example, the vehicle sends a message to the mobile terminal device that the navigation destination has been reached or the vehicle has been turned off or locked.

[0089] S602: The mobile terminal device uses a motion sensor to start recording a movement trajectory of the mobile terminal device after parking.

[0090] In this embodiment, the motion data of each time period is obtained by the motion sensor. For example, the time from the moment the mobile terminal device leaves the parking position to the moment it connects to the vehicle again includes N time periods in total. Then, the motion sensor can obtain N motion data, and further obtain the trajectory vector determined by the N motion data. Then, the movement trajectory of the mobile terminal device after leaving the parking position can be known through the trajectory vector. The specific implementation process can be referred to Figure 5 Description of the illustrated embodiment.

[0091] S603, when the mobile terminal device is connected to the vehicle again, anti-relay detection is triggered, and based on the recorded movement trajectory of the mobile terminal device, the relative distance between the location of the mobile terminal device when it is connected to the vehicle again and the parking location is determined.

[0092] As an example, Figure 7 As shown in the figure, after the vehicle stops, the trajectory vector of the mobile terminal device in the first time period, the trajectory vector of the second time period, the trajectory vector of the third time period, the trajectory vector of the fourth time period, and the trajectory vector of the fifth time period are respectively shown in the figure, wherein the trajectory vector in each time period includes the direction and displacement of the mobile terminal device in the time period. For details, please refer to Figure 5 The description of the embodiment shown is not repeated here. When the mobile terminal device moves to a certain position (such as the position of the approaching point again in the figure) at a certain moment and connects to the vehicle, the anti-relay detection is triggered, that is, based on the trajectory vector of the first time period, the trajectory vector of the second time period, the trajectory vector of the third time period, the trajectory vector of the fourth time period, the trajectory vector of the fifth time period and the trajectory vector of the sixth time period of the time period where the approaching point is located, the relative distance between the mobile terminal device at the approaching point position and the vehicle stop position is determined.

[0093] In one implementation, the trajectory vector of the first time period, the trajectory vector of the second time period, the trajectory vector of the third time period, the trajectory vector of the fourth time period, the trajectory vector of the fifth time period, and the trajectory vector of the sixth time period may be added together to obtain the relative distance, such as Figure 7 The dotted line in represents the relative distance between the approaching point again and the vehicle stopping position.

[0094] It is noted here that the triggering of anti-relay detection in the embodiment of the present application is explained by taking the mobile terminal device being connected to the vehicle again as an example, and it may also be that the mobile terminal device receives an instruction for an anti-relay operation, and the present application does not impose any restrictions on this.

[0095] S604: Determine whether a relay attack may occur based on a preset safety threshold. For example, the safety threshold is a safety distance threshold. If the relative distance between the location of the mobile terminal device and the parking location when it is connected to the vehicle again is greater than the preset safety distance threshold, a relay attack may occur. The specific process can be found in Figure 5 Description of the illustrated embodiment.

[0096] S605, when a relay attack is detected, the user is reminded or required to confirm or authenticate the identity or the connection with the vehicle is cut off.

[0097] For example, after a mobile terminal device detects a possible relay attack, it can alert the user by vibrating or ringing the mobile terminal device, or ask the user to confirm or authenticate through the user interface (UI) of the mobile terminal device, thereby preventing relay attacks. Alternatively, it can prevent relay attacks by cutting off the connection with the vehicle so that the vehicle cannot receive the authentication information sent by the mobile terminal device. For specific implementation methods, please refer to Figure 5 The description of S504 in the illustrated embodiment will not be repeated here.

[0098] In the anti-relay attack method provided in the embodiment of the present application, when the mobile terminal device is connected to the vehicle again, all N motion data are obtained through the motion sensor in the mobile terminal device. Therefore, during the entire movement process, it is not necessary to determine the location information of the mobile terminal device, nor is it necessary to know the location information of the vehicle. That is, only the motion data collected by the motion sensor is needed to determine whether there is a relay attack phenomenon, that is, the dependence on external environmental conditions and the vehicle side is small.

[0099] As an optional embodiment, Figure 5 In the shown embodiment, M is less than N, and the method also includes: acquiring NM motion data, the NM motion data corresponding one-to-one to NM time periods, the NM time periods including time periods other than M time periods in the N time periods, the NM motion data including motion data other than M motion data in the N motion data, and each of the NM motion data containing positioning information of the global navigation satellite system GNSS of the mobile terminal device at the starting time of the corresponding time period and positioning information of the GNSS at the end time of the corresponding time period.

[0100] In this embodiment, among the N time periods from the first moment the vehicle stops to the moment the mobile terminal device re-establishes a connection with the vehicle, in addition to M time periods where motion data is obtained through motion sensors, there are NM time periods where motion data is not obtained through motion sensors. The motion data of the NM time periods include the GNSS positioning information of the mobile terminal device at the start time of the corresponding time period and the GNSS positioning information at the end time of the corresponding time period.

[0101] Let's take NM equal to 1 as an example. Figure 8 The anti-relay attack method when M is less than N is introduced in detail.

[0102] like Figure 8 As shown, the method of this embodiment may include S801, S802, S803, S804, S805, S806, S807 and S809. The anti-relay attack method may be Figure 1 The PEPS system shown is performed at the key end.

[0103] S801, the mobile terminal device obtains vehicle stop information.

[0104] The implementation of this step can refer to Figure 6 S601 in the illustrated embodiment will not be described in detail here.

[0105] S802, taking the parking position as the origin, obtaining motion data in different time periods through the motion sensor of the mobile terminal device.

[0106] In this embodiment, after the mobile terminal device learns that the vehicle has stopped, it starts to obtain motion data in different time periods through the motion sensor. In this embodiment, there are M pieces of motion data recorded by the motion sensor. The specific implementation process can be referred to Figure 5 Description of the illustrated embodiment.

[0107] S803, when the mobile terminal device detects a sufficiently strong GNSS signal, it records the positioning information of the GNSS signal at the start time of the corresponding time period and stops recording the trajectory vector obtained based on the motion sensor.

[0108] S804, when the mobile terminal device detects that the GNSS signal is about to be lost, it records the positioning information of the GNSS signal at the end time of the corresponding time period, and simultaneously starts recording the trajectory vector obtained based on the motion sensor.

[0109] In this embodiment, if the mobile terminal device detects a sufficiently strong GNSS signal, it stops recording the trajectory vector obtained based on the motion sensor during the period corresponding to the GNSS signal, and records the positioning information at the start time of detecting the GNSS signal, that is, the initial GNSS coordinates. When the mobile terminal device detects that the GNSS signal is about to be lost, for example, when the number of satellites decreases and the signal-to-noise ratio deteriorates to a certain extent, the mobile terminal device is triggered to record the positioning information of the GNSS signal at the end time of the corresponding period, that is, the GNSS coordinates at the end time, and at the same time triggers the mobile terminal device to record the trajectory vector obtained based on the motion sensor.

[0110] As an example, Fig. 9 As shown, starting from the moment the vehicle stops, the mobile terminal device does not detect GNSS signals in the first three periods of movement, so the motion data of each period collected by the motion sensor in the mobile terminal device is used to obtain the corresponding trajectory vector of the first period, the trajectory vector of the second period, and the trajectory vector of the third period. When the mobile terminal device moves to the initial moment of the fourth period and detects a GNSS signal, the initial GNSS coordinates can be recorded and the movement trajectory can be stopped. When the mobile terminal device continues to move and detects that the GNSS signal is about to be lost, the GNSS coordinates at the end moment are recorded and the trajectory vector recorded based on the motion sensor is restarted. For example, in the fifth period, the motion sensor is continued to be used to obtain the trajectory vector corresponding to the period.

[0111] S805 , obtaining a trajectory vector of the mobile terminal device when there is a GNSS signal based on the positioning information of the GNSS signal at the start time of the corresponding time period and the positioning information of the GNSS signal at the end time of the corresponding time period.

[0112] In one possible implementation, the vector difference between the initial GNSS coordinates in the corresponding time period and the GNSS coordinates at the end time can be calculated to obtain the trajectory vector corresponding to the time period with GNSS signals. Fig. 9 As shown, there is a GNSS signal in the fourth period. After obtaining the initial GNSS coordinates of the fourth period and the GNSS coordinates at the end time, the vector difference between the two points can be calculated to obtain the trajectory vector of the mobile terminal device in the fourth period, such as Fig. 9 The double dotted line in .

[0113] S806, when the mobile terminal device is connected to the vehicle again, anti-relay detection is triggered, and the relative distance between the position of the mobile terminal device when it is connected to the vehicle again and the parking position is determined based on the trajectory vectors of each time period recorded by the motion sensor and the trajectory vectors obtained in the presence of a GNSS signal.

[0114] When the mobile terminal device moves to a certain position at a certain moment (such as the re-approaching point position in the figure) and connects to the vehicle, the anti-relay detection is triggered, that is, the relative distance between the mobile terminal device at the approaching point position and the vehicle stop position is determined based on the trajectory vector of the first time period, the trajectory vector of the second time period, the trajectory vector of the third time period, the trajectory vector of the fourth time period and the trajectory vector of the time period where the re-approaching point is located.

[0115] The implementation method of determining the relative distance between the approach point position of the mobile terminal device and the vehicle stop position according to the trajectory vector can refer to Figure 5 or Figure 6 The description of the illustrated embodiment will not be repeated here.

[0116] It is noted here that the triggering of anti-relay detection in the embodiment of the present application is explained by taking the mobile terminal device being connected to the vehicle again as an example, and it may also be that the mobile terminal device receives an instruction for an anti-relay operation, and the present application does not impose any restrictions on this.

[0117] S807: Determine whether a relay attack may occur based on a preset security threshold.

[0118] The process of this step can be referred to Figure 6 The description of S604 in the illustrated embodiment will not be repeated here.

[0119] S808, when a relay attack is detected, the user is reminded or required to confirm or authenticate the identity or the connection with the vehicle is cut off.

[0120] The process of this step can be referred to Figure 6 The description of S605 in the illustrated embodiment will not be repeated here.

[0121] It should be noted that the embodiment of the present application only illustrates one time period with GNSS signal. There may be multiple time periods with GNSS signal. The specific implementation method is similar to that of the embodiment of the present application, and the embodiment of the present application does not limit this.

[0122] In the anti-relay attack method provided in the embodiment of the present application, during the entire movement process, when the mobile terminal device is able to detect a GNSS signal, the GNSS information is used to obtain a trajectory vector, which can further reduce the power consumption of the mobile terminal device.

[0123] Optionally, after S808 in the above embodiment, S809 may be further included: sending a prompt message to the vehicle to let the vehicle know that a relay attack may exist, so as to perform an operation to prevent the relay attack.

[0124] Optionally, each of the N pieces of motion data in the above embodiment may further include information for obtaining the height of the mobile terminal device from a specified plane during the time period corresponding to each piece of motion data.

[0125] As an implementable method, a barometer or the like may be used to record changes in altitude to enrich the scene. Furthermore, whether a relay attack occurs may be determined by changes in altitude, which is not limited in the embodiments of the present application.

[0126] It is explained here that after the embodiment of the present application obtains the trajectory vector between the position of the mobile terminal device at the second moment and the parking origin through the mobile trajectory, in addition to obtaining the difference in distance between the current position at the second moment and the vehicle end, the direction angle between the current position at the second moment and the vehicle end can also be obtained, that is, the specific position of the vehicle end can be determined. Furthermore, the relative position of the vehicle and the terminal device can be prompted through the mobile terminal device, thereby facilitating the user to find the vehicle.

[0127] Fig.10 A schematic diagram of the structure of an apparatus for preventing relay attacks provided in one embodiment of the present application. Fig.10 The anti-relay attack device shown can be used to execute the anti-relay attack method described in any one of the aforementioned embodiments.

[0128] like Fig.10 As shown, the apparatus 1000 for preventing relay attacks in this embodiment includes: a first acquisition module 1001 , a movement track module 1002 , and a determination module 1003 .

[0129] Among them, the first acquisition module 1001 is used to obtain M motion data collected by the motion sensor in the mobile terminal device, and the M motion data correspond one-to-one to M time periods. Each of the M motion data includes the motion direction and displacement of the mobile terminal device in the time period corresponding to each motion data, and M is a positive integer.

[0130] The mobile trajectory module 1002 is used to determine the mobile trajectory of the mobile terminal device within the target time period based on N motion data, the N motion data include the M motion data, the target time period refers to the period from the first moment when the vehicle stops to the second moment, the second moment includes the moment when the mobile terminal device establishes a connection with the vehicle again or receives the moment when the instruction for instructing to perform an anti-relay attack operation, the target time period includes N time periods, the M time periods are M time periods out of N time periods, N is a positive integer, and M is a positive integer less than or equal to N.

[0131] The determination module 1003 is used to determine the distance difference between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment based on the movement trajectory; the determination module is also used to determine that the vehicle is subject to a relay attack when the target condition is met, and the target condition includes that the distance difference exceeds a preset safety threshold.

[0132] As an example, the first acquisition module 1001 can be used to execute Figures 5 to 8 The step of acquiring motion data collected by the motion sensor in any one of the methods for preventing relay attacks described in the foregoing. For example, the acquisition module 1001 is used to execute S501.

[0133] As another example, the movement trajectory module 1002 can be used to perform Figures 5 to 8 The step of determining the movement trajectory within the target time period in any one of the methods for preventing relay attacks described in the foregoing. For example, the movement trajectory module 1002 is used to execute S503 or S602.

[0134] As another example, the determination module 1003 may be used to perform Figures 5 to 8 The step of determining the relative distance (or distance difference) between the position of the mobile terminal device when it is connected to the vehicle again and the parking position in any one of the methods for preventing relay attacks described in the foregoing. For example, the determination module 1003 is used to execute S503 or S603.

[0135] In one possible implementation, M is less than N, wherein the apparatus further includes: a second acquisition module 1004, for acquiring NM motion data, the NM motion data corresponding one-to-one to NM time periods, the NM time periods including time periods other than the M time periods in the N time periods, the NM motion data including motion data other than the M motion data in the N motion data, and each motion in the NM motion data containing positioning information of the global navigation satellite system GNSS of the mobile terminal device at the starting time of the corresponding time period and positioning information of the GNSS at the end time of the corresponding time period.

[0136] In one possible implementation, M is equal to N.

[0137] In a possible implementation manner, each of the N motion data further includes information for obtaining the height of the mobile terminal device from a specified plane during a time period corresponding to each motion data.

[0138] In a possible implementation, the determination module 1003 is also used to: obtain the location information of the mobile terminal device determined by Bluetooth technology and / or wireless local area network communication technology; optimize the movement trajectory according to the location information to obtain the target movement trajectory; determine the distance between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment according to the target movement trajectory.

[0139] In a possible implementation, the device 1000 further includes an output module 1005 for disconnecting from the vehicle.

[0140] Fig.11 A schematic diagram of the structure of an apparatus for preventing relay attacks provided in another embodiment of the present application. Fig.11 The device shown can be used to execute the method for preventing relay attacks described in any of the aforementioned embodiments.

[0141] like Fig.11 As shown, the device 1100 of this embodiment includes: a memory 1101, a processor 1102, a communication interface 1103 and a bus 1104. The memory 1101, the processor 1102 and the communication interface 1103 are connected to each other through the bus 1104.

[0142] The memory 1101 may be a read only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM). The memory 1101 may store a program. When the program stored in the memory 1101 is executed by the processor 1102, the processor 1102 is used to execute the program. Figure 5 The individual steps of the method are shown.

[0143] Processor 1102 can adopt a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits to execute relevant programs to implement the method of inferring lanes or the method of training lane inference models in the method embodiment of the present application.

[0144] The processor 1102 may also be an integrated circuit chip having signal processing capabilities. In the implementation process, each step of the method for planning an autonomous driving vehicle in the embodiment of the present application may be completed by an integrated logic circuit of hardware in the processor 1102 or by instructions in the form of software.

[0145] The processor 1102 may also be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0146] The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1101, and the processor 1102 reads the information in the memory 1101, and completes the functions required to be executed by the units included in the temperature measuring device of the present application in combination with its hardware, for example, it can execute Figure 5 or Figure 8 The various steps / functions of the illustrated embodiment.

[0147] The communication interface 1103 may use, but is not limited to, a transceiver or other transceiver device to implement communication between the apparatus 1100 and other devices or a communication network.

[0148] The bus 1104 may include a path for transmitting information between various components of the device 1100 (eg, the memory 1101 , the processor 1102 , and the communication interface 1103 ).

[0149] It should be understood that the device 1100 shown in the embodiment of the present application may be an electronic device, or may also be a chip configured in the electronic device.

[0150] It should be understood that the processor in the embodiment of the present application may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0151] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0152] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0153] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0154] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0155] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0156] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0157] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0158] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0159] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0160] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0161] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.

[0162] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for preventing relay attacks, characterized in that: The method is applied to a passive entry and start PEPS system, the PEPS system includes a first subsystem and a second subsystem, the first subsystem is deployed in a vehicle, and the second subsystem is deployed in a mobile terminal device, the method includes: Acquire M motion data collected by a motion sensor in the mobile terminal device, wherein the M motion data correspond to M time periods one by one, each of the M motion data includes information for obtaining a motion direction and a displacement of the mobile terminal device in the time period corresponding to each motion data, and M is a positive integer; Determine the movement trajectory of the mobile terminal device within the target time period according to N motion data, the N motion data include the M motion data, the target time period refers to the time period from the first moment when the vehicle stops to the second moment, the second moment includes the moment when the mobile terminal device establishes a connection with the vehicle again or receives the moment when an instruction for instructing to perform an anti-relay attack operation is received, the target time period includes N time periods, the M time periods are M time periods among the N time periods, N is a positive integer, and M is a positive integer less than or equal to N; Determine, according to the movement trajectory, a distance difference between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment; When a target condition is met, determining that the vehicle is under relay attack, wherein the target condition includes that the distance difference exceeds a preset safety threshold; M is less than N, wherein the method further comprises: Acquire NM motion data, the NM motion data correspond one-to-one to NM time periods, the NM time periods include time periods among the N time periods except the M time periods, the NM motion data include motion data among the N motion data except the M motion data, and each motion in the NM motion data includes positioning information of the global navigation satellite system GNSS of the mobile terminal device at the starting time of the corresponding time period and positioning information of the GNSS at the ending time of the corresponding time period.

2. The method according to claim 1, characterized in that Each of the N motion data further includes information for obtaining the height of the mobile terminal device from a specified plane during the time period corresponding to each motion data.

3. The method according to claim 2, characterized in that Determining the distance between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment according to the movement trajectory includes: Acquire location information of the mobile terminal device determined by Bluetooth technology and / or wireless local area network communication technology; Optimizing the moving trajectory according to the position information to obtain a target moving trajectory; The distance difference between the position of the mobile terminal device at the second moment and the position of the vehicle at the first moment is determined according to the target movement trajectory.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Disconnect from the vehicle.

5. A device for preventing relay attacks, characterized in that: The device comprises functional modules for executing the method according to any one of claims 1 to 4.

6. A device for preventing relay attacks, characterized in that: include: Memory and processor; The memory is used to store program instructions; The processor is used to call the program instructions in the memory to execute the method for preventing relay attacks according to any one of claims 1 to 4.

7. A chip, characterized in that: The system comprises at least one processor and a communication interface, wherein the communication interface and the at least one processor are interconnected via a line, and the at least one processor is used to run a computer program or instruction to execute the method according to any one of claims 1 to 4.

8. A computer-readable medium, characterized in that The computer-readable medium stores a program code for computer execution, the program code including instructions for executing the method according to any one of claims 1 to 4.

9. A computer program product, comprising computer program code, characterized in that: When the computer program code is executed on a computer, the computer is caused to implement the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Portable device and communication control method applied to portable device

    JP2020041301A

  • Position recording device

    KR101549144B1