Communication methods and devices

By adding attenuation and switching circuits to the communication device and processing circuits to process the signal, the problem of low accuracy in measuring the distance between the vehicle and the car key in Bluetooth technology is solved, enabling accurate unlocking and locking of the car door and reducing security risks.

CN115733504BActive Publication Date: 2025-11-14HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110991812.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-27
Publication Date
2025-11-14
Estimated Expiration
2041-08-27

AI Technical Summary

Technical Problem

Bluetooth technology has low accuracy in measuring the distance between a vehicle and a car key, making it difficult to accurately determine the distance range.

Method used

A first attenuation circuit and a switching circuit are added to the communication device. The signal received by the antenna is processed by the processing circuit, and the accurate distance range is determined by using different attenuation amounts and bit error rates.

Benefits of technology

It improves the accuracy of distance detection, ensuring that the doors automatically unlock or lock within the appropriate range, thus reducing safety hazards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115733504B_ABST
    Figure CN115733504B_ABST
Patent Text Reader

Abstract

This application discloses a communication method and apparatus that can accurately detect distance range based on communication. The communication apparatus includes a first attenuation circuit, a switching circuit, and a processing circuit. The first attenuation circuit reduces the power of the distance detection signal received by the antenna to obtain a first attenuated signal, which is transmitted by a terminal device. The first terminal of the switching circuit is connected to the processing circuit. When the second terminal of the switching circuit is connected to the antenna, the processing circuit processes the communication signal received by the antenna. When the second terminal of the switching circuit is connected to the first attenuation circuit, the processing circuit processes the first attenuated signal to obtain a first bit error rate of the first attenuated signal. The processing circuit also processes the first communication signal received by the antenna, which is transmitted by the terminal device. The processing circuit further determines the distance range to the terminal device based on the first bit error rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more specifically, to a communication method and apparatus. Background Technology

[0002] As vehicles become increasingly intelligent, mobile devices can also function as car keys. By judging the distance between the car key and the vehicle, it can ensure that the owner can automatically unlock and lock the car doors within a safe range, reducing the risk of security hazards.

[0003] Bluetooth technology can be used to measure the distance between a vehicle and its key. The vehicle can receive Bluetooth signals sent by the Bluetooth (BT) key and determine the distance between itself and the key based on the received signal strength indication (RSSI) of the Bluetooth signal and the positive correlation between different RSSI values ​​and distance. However, the accuracy of distance determination using RSSI is relatively low. Summary of the Invention

[0004] This application provides a communication method and apparatus that enables accurate measurement of distance range based on communication.

[0005] In a first aspect, a communication device is provided, comprising: a first attenuation circuit, a switching circuit, and a processing circuit; the first attenuation circuit is used to reduce the power of a distance detection signal received by an antenna to obtain a first attenuated signal, the distance detection signal being transmitted by a terminal device; a first terminal of the switching circuit is connected to the processing circuit; when the second terminal of the switching circuit is connected to the antenna, the processing circuit is used to process the communication signal received by the antenna; when the second terminal of the switching circuit is connected to the first attenuation circuit, the processing circuit is used to process the first attenuated signal to obtain a first bit error rate of the first attenuated signal; the processing circuit is further used to determine a first distance range with respect to the terminal device based on the first bit error rate.

[0006] In a communication device, a processing circuit processes the communication signals received by the antenna. By adding a first attenuation circuit and a switching circuit, and connecting the first attenuation circuit to the processing circuit via the switching circuit, an accurate distance range can be determined. In a communication device, the existing antenna is used to receive the distance detection signal, and the existing processing circuit processes the attenuated signal. By adding the attenuation circuit and the switching circuit, distance detection can be achieved, reducing the cost of accurate distance detection in the communication device.

[0007] In conjunction with the first aspect, in some possible implementations, the processing circuit is further configured to send a first indication message when the maximum value of the first distance range is less than a first preset distance.

[0008] The maximum value of the first distance range is less than the first preset distance, meaning the distance between the communication device and the terminal device is less than the first preset distance, indicating a relatively small distance between them. The receiving end of the first instruction information can perform specific operations based on the first instruction information.

[0009] For example, the communication device can be located inside the vehicle to determine when to unlock the door. During the door unlocking process, it is necessary to accurately determine the distance between the user and the vehicle. If the distance between the user and the vehicle is less than a first preset value, the door can be unlocked.

[0010] In conjunction with the first aspect, in some possible implementations, the device further includes a second attenuation circuit, which is used to reduce the power of the distance detection signal to obtain a second attenuated signal. The second attenuation amount of the power of the distance detection signal by the second attenuation circuit is different from the first attenuation amount of the power of the distance detection signal by the first attenuation circuit. When the second attenuation circuit is connected to the second terminal of the switching circuit, the processing circuit is further used to process the second attenuated signal to obtain a second bit error rate of the second attenuated signal. The processing circuit is further used to determine a second distance range with respect to the terminal device based on the second bit error rate.

[0011] Signal strength attenuation in space is directly proportional to transmission distance. The distance detection signal transmitted by the terminal device can have the same strength. By using multiple attenuation circuits with varying attenuation levels, the range of the defined distance can be narrowed.

[0012] In conjunction with the first aspect, in some possible implementations, the second attenuation amount is less than the first attenuation amount, and the processing circuit is further configured to send a second indication message when the minimum value of the second distance range is greater than or equal to a second preset distance.

[0013] The minimum value of the second distance range is greater than or equal to the second preset distance, meaning the distance between the communication device and the terminal device is greater than the second preset distance, indicating a relatively large distance between them. The receiving end of the second instruction information can perform specific operations based on this information.

[0014] For example, during the car door unlocking process, it is necessary to accurately determine the distance between the vehicle user and the vehicle. If the distance between the user and the vehicle is greater than or equal to a second preset value, the door can be unlocked. This ensures that the car door can be locked promptly when the user leaves the vehicle, preventing potential property damage due to the user forgetting to lock the door.

[0015] In conjunction with the first aspect, in some possible implementations, the processing circuit is further configured to, when the first bit error rate is within a preset range, determine the first distance range based on the first bit error rate and the first relationship information corresponding to the first attenuation circuit, wherein the first relationship information is used to represent the correspondence between the bit error rate and the distance, and the maximum value of the preset range is less than 1 and the minimum value is greater than 0.

[0016] Using relational information, the determined distance range can be a distance value. If the first bit error rate is within a preset range, the precise distance value between the device and the terminal can be determined based on the first relational information.

[0017] Communication devices may include multiple attenuation circuits. Different attenuation circuits attenuate the power of the distance detection signal to varying degrees. The range of accurate distance values ​​that can be determined can be increased by increasing the number of attenuation circuits.

[0018] In conjunction with the first aspect, in some possible implementations, the processing circuit is further configured to, when the second bit error rate is within a preset range, determine the second distance range based on the second bit error rate and the second relationship information corresponding to the second attenuation circuit, wherein the second relationship information is used to represent the correspondence between the bit error rate and the distance, and the maximum value of the preset range is less than 1 and the minimum value is greater than 0.

[0019] In conjunction with the first aspect, in some possible implementations, the antenna is a vehicle-to-everything (V2X) wireless communication antenna.

[0020] V2X signals have high power and long transmission distances. V2X antennas are used to transmit V2X signals. By using a V2X antenna as the antenna for receiving distance detection signals and appropriately setting the attenuation of the first attenuation circuit, the communication device can be made suitable for distance detection over a wider range, thus improving its versatility.

[0021] In conjunction with the first aspect, in some possible implementations, the antenna is a diversity component of the V2X antenna, which also includes a main component. The distance detection signal is received by the diversity component during a preset time period, which is the time period during which the main component transmits signals.

[0022] When the communication device processes the signal received by the V2X antenna, diversity can continue receiving V2X signals without stopping signal detection during the time the main set is transmitting V2X signals. The terminal device can transmit a distance detection signal during the same time the main set is transmitting V2X signals. Therefore, distance detection has a relatively low impact on V2X signal transmission.

[0023] In conjunction with the first aspect, in some possible implementations, the device further includes a control circuit for controlling the antenna or one of attenuation circuits connected to the second terminal of the switching circuit, the at least one attenuation circuit including the first attenuation circuit.

[0024] The control circuit adjusts the object connected to the second terminal of the switching circuit, thereby enabling the communication device to flexibly switch between communication and distance detection functions.

[0025] It should be understood that the control circuit, switching circuit, attenuation circuit, and processing circuit can be implemented using one or more chips. That is, the control circuit, switching circuit, attenuation circuit, and processing circuit can be respectively located on different chips, or multiple of the control circuit, switching circuit, attenuation circuit, and processing circuit can be integrated onto a single chip. This application does not impose any limitations on this.

[0026] In a second aspect, a mobile device is provided, comprising a communication device according to any implementation of the first aspect, wherein the mobile device is a vehicle.

[0027] The vehicle has ample space, which reduces the size requirements for onboard equipment. The communication device is located within the vehicle, facilitating the installation of the first attenuation circuit.

[0028] In conjunction with the second aspect, in some possible implementations, the mobile device further includes a door and an electronic control unit (ECU), and the processing circuit is further configured to send a first instruction message to the ECU when the maximum value of the first distance range is less than a first preset distance, and the electronic control unit (ECU) is configured to unlock the door according to the first instruction message.

[0029] The processing circuit sends an unlock instruction to the ECU, which can be understood as the processing circuit determining to unlock the car door.

[0030] In conjunction with the second aspect, in some possible implementations, the processing circuit is further configured to send a second instruction to the ECU when the minimum value of the second distance range is greater than or equal to a second preset distance, and the ECU is configured to lock the vehicle door according to the second instruction.

[0031] Specifically, the communication device further includes a second attenuation circuit, which is used to reduce the power of the distance detection signal to obtain a second attenuated signal. The second attenuation amount of the power of the distance detection signal by the second attenuation circuit is different from the first attenuation amount of the power of the distance detection signal by the first attenuation circuit. When the second attenuation circuit is connected to the second terminal of the switching circuit, the processing circuit is further used to process the second attenuated signal to obtain a second bit error rate of the second attenuated signal. The processing circuit is further used to determine a second distance range with the terminal device based on the second bit error rate. The processing circuit is further used to send second indication information to the ECU when the minimum value of the second distance range is greater than or equal to a second preset distance.

[0032] The processing circuit sends a second instruction to the ECU, which can be understood as the processing circuit determining to lock the door.

[0033] Thirdly, a communication device is provided, comprising a signal generation circuit, a switching circuit, and a first attenuation circuit. The signal generation circuit is used to generate an initial detection signal and a communication signal. A first terminal of the switching circuit is connected to the signal generation circuit. When a second terminal of the switching circuit is connected to an antenna, the communication signal is transmitted through the antenna. When the second terminal of the switching circuit is connected to the first attenuation circuit, the first attenuation circuit is used to reduce the power of the initial detection signal to obtain a first distance detection signal. The first distance detection signal is transmitted to a terminal device through the antenna. The first distance detection signal is used by the terminal device to determine a first bit error rate of the first distance detection signal and to determine a first distance range from the terminal device based on the first bit error rate.

[0034] In a communication device, a signal generation circuit generates a communication signal, which is then transmitted via an antenna. By adding a first attenuation circuit and a switching circuit to the communication device, the terminal device can determine an accurate distance range when the switching circuit connects the first attenuation circuit to the signal generation circuit. In this communication device, an initial distance detection signal is generated using the existing signal generation circuit, and the added first attenuation circuit attenuates this initial distance detection signal. The attenuated signal is then transmitted to the terminal device via the antenna, enabling the terminal device to detect distance and reducing the cost of accurate distance detection in the communication device.

[0035] In conjunction with the third aspect, in some possible implementations, the device further includes: a processing circuit; the processing circuit is configured to send first indication information based on a received first indication signal, wherein the first indication signal is sent when the terminal device determines that the maximum value of the first distance range is less than a first preset distance.

[0036] The first instruction could be, for example, an unlock instruction sent to the ECU. The ECU can then unlock the door based on this instruction. The communication device, the ECU, and the door can all be located in the same vehicle.

[0037] In conjunction with the third aspect, in some possible implementations, the device further includes a second attenuation circuit. When the second terminal of the switching circuit is connected to the second attenuation circuit, the second attenuation circuit is used to reduce the power of the initial detection signal to obtain a second distance detection signal. The second attenuation amount of the power of the initial detection signal by the second attenuation circuit is different from the first attenuation amount of the power of the initial detection signal by the first attenuation circuit. The second distance detection signal is transmitted to the terminal device through the antenna, and the second distance detection signal is used by the terminal device to determine a second distance range from the terminal device.

[0038] In conjunction with the third aspect, in some possible implementations, the second attenuation is less than the first attenuation, and the device further includes: a processing circuit; the processing circuit is configured to send second indication information according to the received second indication signal, wherein the second indication signal is sent when the terminal device determines that the minimum value of the second distance range is greater than or equal to a second preset distance.

[0039] In conjunction with the third aspect, in some possible implementations, the second distance range is determined by the terminal device based on the second bit error rate and the second relationship information corresponding to the second attenuation circuit. The bit error rate is within a preset range, the maximum value of the preset range is less than 1 and the minimum value is greater than 0, and the second relationship information is used to represent the correspondence between the bit error rate and the distance.

[0040] In conjunction with the third aspect, in some possible implementations, the first distance range is determined by the terminal device based on the first bit error rate and the first relationship information corresponding to the first attenuation circuit. The first bit error rate is within a preset range, the maximum value of the preset range is less than 1 and the minimum value is greater than 0, and the first relationship information is used to represent the correspondence between the bit error rate and the distance.

[0041] In conjunction with the third aspect, in some possible implementations, the antenna is a vehicle-to-everything (V2X) wireless communication antenna.

[0042] In conjunction with the third aspect, in some possible implementations, the diversity of the V2X antenna of the terminal device is used to receive the first distance detection signal, and the V2X antenna of the terminal device also includes a main set. The first distance detection signal is sent by the communication device in a first preset time period, which is the time period during which the main set is used to send the signal.

[0043] In conjunction with the third aspect, in some possible implementations, the device further includes a control circuit for controlling the first terminal of the switching circuit to connect to the signal generation circuit or one of the attenuation circuits in at least one attenuation circuit, the at least one attenuation circuit including the first attenuation circuit.

[0044] Fourthly, a mobile device is provided, the mobile device including the communication device in any implementation of the second aspect, the mobile device being a vehicle.

[0045] In conjunction with the fourth aspect, in some possible implementations, the mobile device further includes an electronic control unit (ECU) and a door, and the communication device further includes a processing circuit, which is used to send a first indication signal to the ECU according to a received first indication signal, wherein the unlocking signal is sent when the terminal device determines that the maximum value of the first distance range is less than a first preset distance; the ECU is used to unlock the door according to the first indication signal.

[0046] In conjunction with the fourth aspect, in some possible implementations, the processing circuit is further configured to send second indication information to the ECU based on the received second indication signal, wherein the locking indication information is used to instruct the ECU to control the door to lock, and the locking signal is sent by the terminal device when the minimum value of the second distance range with the communication device is greater than or equal to a second preset distance; the ECU is configured to lock the door based on the second indication information.

[0047] Specifically, the communication device may further include a second attenuation circuit, which is used to reduce the power of the initial detection signal to obtain a second distance detection signal when the second terminal of the switching circuit is connected to the antenna. The second attenuation amount of the power of the initial detection signal by the second attenuation circuit is different from the first attenuation amount of the power of the initial detection signal by the first attenuation circuit. The second distance detection signal is transmitted to the terminal device through the antenna. The second distance detection signal is used by the terminal device to determine a second distance range with the communication device. The communication device further includes a processing circuit, which is used to send second indication information to the ECU according to the received second indication signal. The second indication information is used to instruct the ECU to control the door locking. The second indication signal is sent when the terminal device determines that the minimum value of the second distance range is greater than or equal to a second preset distance.

[0048] Fifthly, a communication method is provided, applied to a processing circuit in a communication device, the communication device including a switching circuit and a first attenuation circuit, the first end of the switching circuit being connected to the processing circuit, and the second end of the switching circuit being connected to the antenna by default;

[0049] The method includes: receiving a trigger signal sent by a terminal device; controlling the second terminal of the switching circuit to connect to the first attenuation circuit according to the trigger signal, the first attenuation circuit being used to reduce the power of the distance detection signal received by the antenna to obtain a first attenuated signal, the distance detection signal being sent by the terminal device; processing the first attenuated signal to obtain a first bit error rate of the first attenuated signal; and determining a first distance range from the terminal device according to the first bit error rate.

[0050] In conjunction with the fifth aspect, in some possible implementations, the method further includes: sending a first indication message when the maximum value of the first distance range is less than a first preset distance.

[0051] In conjunction with the fifth aspect, in some possible implementations, the communication device further includes a second attenuation circuit, and the method further includes:

[0052] If the communication device meets the preset conditions, it controls the second terminal of the switching circuit to connect to the second attenuation circuit. The second attenuation circuit is used to reduce the power of the distance detection signal to obtain a second attenuated signal. The first attenuation amount of the power of the distance detection signal by the second attenuation circuit is different from the first attenuation amount of the power of the distance detection signal by the first attenuation circuit. The second attenuated signal is processed to obtain the second bit error rate of the second attenuated signal. Based on the second bit error rate, a second distance range with the terminal device is determined.

[0053] In conjunction with the fifth aspect, in some possible implementations, the second attenuation amount is less than the first attenuation amount, and the method further includes: sending a second indication message when the minimum value of the second distance range is greater than or equal to a second preset distance.

[0054] In conjunction with the fifth aspect, in some possible implementations, determining the first distance range from the terminal device based on the first bit error rate includes: when the first bit error rate is within a preset range, determining the first distance range based on the first bit error rate and the first relationship information corresponding to the first attenuation circuit, wherein the first relationship information is used to represent the correspondence between the bit error rate and the distance, and the maximum value of the preset range is less than 1 and the minimum value is greater than 0.

[0055] In conjunction with the fifth aspect, in some possible implementations, the antenna is a vehicle-to-everything (V2X) wireless communication antenna.

[0056] In conjunction with the fifth aspect, in some possible implementations, the antenna is a diversity of a V2X antenna, the V2X antenna also includes a main set, the distance detection signal is received by the diversity during a preset time period, the preset time period being the time period during which the main set transmits signals.

[0057] In conjunction with the fifth aspect, in some possible implementations, the communication device further includes a control circuit for controlling the antenna or one of attenuation circuits connected to the second terminal of the switching circuit, wherein the at least one attenuation circuit includes the first attenuation circuit.

[0058] A sixth aspect provides a communication method, the method comprising: receiving a first distance detection signal transmitted by a communication device via an antenna, the communication device comprising a signal generation circuit, a switching circuit, and a first attenuation circuit, a first terminal of the switching circuit being connected to the signal generation circuit, the first distance detection signal being obtained by the first attenuation circuit reducing the power of an initial detection signal when the second terminal of the switching circuit is connected to the first attenuation circuit, the initial detection signal being generated by the signal generation circuit, the signal generation circuit also being used to generate a communication signal, the communication signal being transmitted via the antenna when the second terminal of the switching circuit is connected to the antenna; and determining a first distance range from the first communication device based on a first bit error rate of the first distance detection signal.

[0059] In conjunction with the sixth aspect, in some possible implementations, the method further includes: sending a first indication message when the maximum value of the first distance range is less than a first preset distance.

[0060] In conjunction with the sixth aspect, in some possible implementations, the method further includes: receiving a second distance detection signal transmitted by the communication device through the antenna, the communication device further including a second attenuation circuit, the second distance detection signal being obtained by the second attenuation circuit reducing the power of an initial detection signal when the second terminal of the switching circuit is connected to the second attenuation circuit, the second attenuation amount of the power of the initial detection signal by the second attenuation circuit being different from the first attenuation amount of the power of the initial detection signal by the first attenuation circuit; and determining a second distance range from the first communication device based on a second bit error rate of the second distance detection signal.

[0061] In conjunction with the sixth aspect, in some possible implementations, the second attenuation amount is less than the first attenuation amount, and the method further includes: sending a second indication message when the minimum value of the distance range is greater than or equal to a second preset distance.

[0062] In conjunction with the sixth aspect, in some possible implementations, the second bit error rate is within a preset range, where the maximum value of the preset range is less than 1 and the minimum value is greater than 0. Determining the second distance range from the first communication device based on the second bit error rate of the second distance detection signal includes: determining the second distance range based on the second bit error rate and the second relationship information corresponding to the second attenuation circuit, wherein the second relationship information is used to represent the correspondence between the bit error rate and the distance.

[0063] In conjunction with the sixth aspect, in some possible implementations, the first bit error rate is within a preset range, the maximum value of the preset range is less than 1 and the minimum value is greater than 0, and determining the distance range based on the first bit error rate of the first distance detection signal includes: determining the distance range based on the first bit error rate and the first relationship information corresponding to the first attenuation circuit, wherein the first relationship information is used to represent the correspondence between the bit error rate and the distance.

[0064] In conjunction with the sixth aspect, in some possible implementations, the first distance detection signal is received using a vehicle wireless communication V2X antenna.

[0065] In conjunction with the sixth aspect, in some possible implementations, the first distance detection signal is received using diversity reception in the V2X antenna, which also includes a main set. The first distance detection signal is received by the diversity reception during a preset time period, which is the time period during which the main set transmits signals.

[0066] In conjunction with the sixth aspect, in some possible implementations, the first communication device is located in the vehicle.

[0067] In conjunction with the sixth aspect, in some possible implementations, the communication device further includes a control circuit for controlling the first terminal of the switching circuit to connect to one of the signal generation circuit or at least one attenuation circuit, wherein the at least one attenuation circuit includes the first attenuation circuit.

[0068] A seventh aspect provides a communication apparatus comprising modules for implementing the method described in any of the fifth or sixth aspects.

[0069] Eighthly, an electronic device is provided, including a processor and a communication interface, the communication interface being used for the electronic device to interact with other devices, wherein when program instructions are executed in the at least one processor, the electronic device causes the electronic device to implement the method described in either the fifth or sixth aspect.

[0070] The communication device may further include a memory for storing program instructions; when the program instructions are executed in the processor, the processor is configured to perform the method described in either the fifth or sixth aspect.

[0071] A ninth aspect provides a computer-readable medium storing program code for execution by a device, the program code including methods for performing any of the implementations of the fifth or sixth aspect.

[0072] In a tenth aspect, a computer program product containing instructions is provided, which, when run on a computer, causes the computer to perform the method in any one of the implementations of the fifth or sixth aspect described above.

[0073] Eleventhly, a chip is provided, the chip including a processor and a data interface, the processor reading instructions stored in a memory through the data interface and executing the method in any one of the implementations of the fifth or sixth aspect above.

[0074] Optionally, as one implementation, the chip may further include a memory storing instructions, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to perform the method in any of the fifth or sixth aspects.

[0075] The aforementioned chip can be a field-programmable gate array (FPGA) or an application-specific integrated circuit (ASIC).

[0076] In a twelfth aspect, a communication system is provided, comprising a terminal device and a communication apparatus as described in any one of the first or third aspects. Attached Figure Description

[0077] Figure 1 This is a functional block diagram of a vehicle to which this application embodiment applies.

[0078] Figure 2 This is a schematic diagram of a V2X scenario for a vehicle provided in an embodiment of this application.

[0079] Figure 3 This is a schematic structural diagram of a communication device provided in an embodiment of this application.

[0080] Figure 4 This is a schematic structural diagram of another communication device provided in the embodiments of this application.

[0081] Figure 5 This is a schematic flowchart of a car door unlocking method provided in an embodiment of this application.

[0082] Figure 6 This is a schematic structural diagram of another communication device provided in the embodiments of this application.

[0083] Figure 7 This is a schematic structural diagram of the communication device provided in the embodiments of this application during communication.

[0084] Figure 8 and Figure 9 This is a schematic structural diagram of the communication device provided in the embodiments of this application when performing distance detection.

[0085] Figure 10 This is a graph showing the relationship between signal strength and bit error rate.

[0086] Figure 11 This is a schematic flowchart of a distance detection method provided in an embodiment of this application.

[0087] Figure 12 This is a schematic flowchart of another door unlocking method provided in the embodiments of this application.

[0088] Figure 13 This is a schematic structural diagram of another communication device provided in the embodiments of this application.

[0089] Figure 14 This is a schematic structural diagram of the communication device provided in the embodiments of this application during communication.

[0090] Figure 15 and Figure 16 This is a schematic structural diagram of the communication device provided in the embodiments of this application when performing distance detection.

[0091] Figure 17 This is a schematic flowchart of another distance detection method provided in the embodiments of this application.

[0092] Figure 18 This is a schematic structural diagram of an attenuation circuit provided in an embodiment of this application.

[0093] Figure 19 This is a schematic structural diagram of another electronic device provided in the embodiments of this application. Detailed Implementation

[0094] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0095] Figure 1 This is a functional block diagram of a vehicle applicable to an embodiment of this application. The vehicle 100 can be a manually driven vehicle, or the vehicle 100 can be configured for fully or partially automated driving modes.

[0096] In one example, vehicle 100 can control itself while in autonomous driving mode, and can determine the current state of the vehicle and its surrounding environment through human intervention, determine the possible behaviors of at least one other vehicle in the surrounding environment, and determine the confidence level corresponding to the probability of the other vehicle performing the possible behavior, and control vehicle 100 based on the determined information. When vehicle 100 is in autonomous driving mode, vehicle 100 can be set to operate without human interaction.

[0097] The vehicle 100 may include various subsystems, such as a driving system 110, a sensing system 120, a control system 130, one or more peripheral devices 140, a power supply 160, and a computer system 150.

[0098] Optionally, vehicle 100 may include more or fewer subsystems, and each subsystem may include multiple components. Furthermore, each subsystem and component of vehicle 100 may be interconnected via wired or wireless means.

[0099] For example, the mobility system 110 may include components for providing powered motion to the vehicle 100.

[0100] For example, the sensing system 120 may include several sensors for sensing information about the environment surrounding the vehicle 100.

[0101] For example, control system 130 controls the operation of vehicle 100 and its components.

[0102] like Figure 1 As shown, vehicle 100 can interact with external sensors, other vehicles, other computer systems, or users through peripheral device 140; wherein peripheral device 140 may include wireless communication system 141.

[0103] like Figure 1The wireless communication system 141 can communicate wirelessly with one or more devices directly or via a communication network. For example, the wireless communication system 141 can use 3G cellular communication; such as code division multiple access (CDMA), EVDO, Global System for Mobile Communications (GSM) / General Packet Radio Service (GPRS), or 4G cellular communication, such as long term evolution (LTE); or 5G cellular communication. The wireless communication system 141 can communicate using Wi-Fi and wireless local area networks (WLANs).

[0104] In some embodiments, the wireless communication system 141 may communicate directly with the device using an infrared link, Bluetooth, or ZigBee protocol; other wireless protocols, such as various vehicle communication systems, may also be used. For example, the wireless communication system 141 may include one or more dedicated short range communications (DSRC) devices, which may include public and / or private data communications between the vehicle and / or roadside stations.

[0105] like Figure 1 As shown, power source 160 can provide power to various components of vehicle 100. In one embodiment, power source 160 can be a rechargeable lithium-ion battery or a lead-acid battery. One or more such battery packs can be configured to provide power to various components of vehicle 100.

[0106] In embodiments of this application, computer system 150 can control the functions of vehicle 100 based on inputs received from various subsystems (e.g., mobility system 110, sensing system 120, and control system 130). For example, computer system 150 can utilize inputs from control system 130 to control braking unit 133 to avoid obstacles detected by sensing system 120 and obstacle avoidance system 136. In some embodiments, computer system 150 is operable to provide control over many aspects of vehicle 100 and its subsystems.

[0107] Alternatively, one or more of these components may be installed separately from or associated with vehicle 100. For example, memory 152 may exist partially or completely separately from vehicle 100. The components may be communicatively coupled together in a wired and / or wireless manner.

[0108] Optionally, the components described above are merely examples. In actual applications, components in each of the above modules may be added or removed as needed. Figure 1 This should not be construed as a limitation on the embodiments of this application.

[0109] Optionally, vehicle 100 may be an autonomous vehicle traveling on a road, capable of identifying objects in its surrounding environment to determine adjustments to its current speed. These objects may be other vehicles, traffic control equipment, or other types of objects. In some examples, each identified object may be considered independently, and based on the object's individual characteristics, such as its current speed, acceleration, and distance from the vehicle, the speed adjustment to be made by the autonomous vehicle can be determined.

[0110] Optionally, the vehicle 100 or a computing device associated with the vehicle 100 (such as...) Figure 1 The computer system 150 and memory 152 can predict the behavior of the identified object based on the characteristics of the identified object and the state of the surrounding environment (e.g., traffic, rain, ice on the road, etc.).

[0111] Optionally, since each identified object depends on the behavior of others, the behavior of a single identified object can also be predicted by considering all identified objects together. Vehicle 100 can adjust its speed based on the predicted behavior of the identified objects. In other words, the autonomous vehicle can determine, based on the predicted behavior of the objects, that the vehicle will need to adjust to a steady state (e.g., accelerate, decelerate, or stop). In this process, other factors can also be considered in determining the speed of vehicle 100, such as the lateral position of vehicle 100 on the road, the curvature of the road, the proximity of static and dynamic objects, etc.

[0112] In addition to providing instructions to adjust the speed of the autonomous vehicle, the computing device can also provide instructions to modify the steering angle of the vehicle 100 so that the autonomous vehicle follows a given trajectory and / or maintains a safe lateral and longitudinal distance from objects near the autonomous vehicle (e.g., cars in adjacent lanes on the road).

[0113] The aforementioned vehicle 100 can be a car, truck, motorcycle, bus, ship, airplane, helicopter, lawnmower, recreational vehicle, amusement park vehicle, construction equipment, tram, golf cart, train, and handcart, etc., and this application embodiment does not impose any special limitations.

[0114] With the development of communication technology, the number of antennas that need to be installed on vehicles is increasing. In the era of 5G, vehicle antennas need to include 5G antennas, global navigation satellite system (GNSS) antennas, vehicle-to-everything (V2X) antennas, Bluetooth Low Energy (BLE) antennas (or Bluetooth (BT) antennas), wireless fidelity (WiFi) antennas, and remote keyless entry (RKE) antennas, etc.

[0115] 4G / 5G antennas can be used for vehicle-to-cellular communication, such as making voice calls. GNSS antennas can be used for vehicle-to-positioning satellite communication, obtaining the vehicle's current location information. WiFi antennas can be used for vehicle-to-device communication within the same WiFi environment for data exchange. BLE antennas can be used for vehicle-to-device communication using Bluetooth. RKE and BT antennas can be used for short-range data exchange between vehicles and other devices using Bluetooth technology and keys. V2X antennas can be used for vehicle-to-device communication with other devices.

[0116] Figure 2 This is a schematic diagram of a vehicle-to-everything (V2X) scenario.

[0117] V2X technology is a fundamental and key technology for realizing intelligent vehicles, autonomous driving, and intelligent transportation systems. V2X can include vehicle-to-network (V2N), vehicle-to-vehicle (V2V), vehicle-to-infrastructure (V2I), and vehicle-to-pedestrian (V2P). V2N communication is currently the most widely used form of vehicle networking. Its main function is to enable vehicles to connect to cloud servers via mobile networks and use applications such as navigation, entertainment, and anti-theft provided by the cloud servers. V2V communication can be used for information exchange and alerts between vehicles, with the most typical application being in vehicle-to-vehicle collision avoidance safety systems. Through V2I communication, vehicles can communicate with roads and even other infrastructure, such as traffic lights and roadblocks, to obtain road management information such as traffic light signal timing. V2P communication can be used for safety warnings to pedestrians or non-motorized vehicles on the road. In V2P scenarios, pedestrians, as traffic participants, often use mobile terminals as V2X message sending and receiving devices.

[0118] As vehicles become increasingly intelligent, mobile devices can also function as car keys. By judging the distance between the car key and the vehicle, it can ensure that the owner can automatically unlock and lock the car doors within a safe range, reducing the risk of security incidents.

[0119] Bluetooth technology can be used to measure the distance between a vehicle and its key. Bluetooth is a wireless communication technology between devices, enabling short-range (typically within 10 meters) data exchange between fixed devices, mobile devices, and personal area networks (PANs). Bluetooth can connect multiple devices, overcoming the challenge of data synchronization. Bluetooth uses ultra-high frequency (UHF) radio waves in the 2.4 to 2.485 GHz ISM band for communication.

[0120] The vehicle can receive Bluetooth signals sent by the Bluetooth (BT) car key and determine the distance between the vehicle and the Bluetooth key based on the received signal strength indication (RSSI) of the Bluetooth signal and the positive correlation between different RSSI values ​​and distance.

[0121] Since the RSSI value is positively correlated with distance and is determined based on empirical parameters such as the environmental attenuation factor, the distance determined using RSSI has low accuracy.

[0122] To address the aforementioned problems, this application provides a communication device.

[0123] Figure 3 This is a schematic flowchart of a communication device provided in an embodiment of this application.

[0124] The wireless communication system 141 may include an antenna and a communication device 300. The communication device 300 may be, for example, a telematics box (T-Box).

[0125] The wireless communication system 141 may also include a gateway. The gateway is the central node for in-vehicle communication, connecting most of the electronic control units inside the vehicle, supporting various bus systems, and enabling cross-domain function integration, basic routing communication and protocol translation, extraction and integration of in-vehicle data, security deployment, and providing diagnostic communication services and connectivity services, thus making vehicle connectivity services a reality.

[0126] Telematics box (T-Box), also known as vehicle information box, is mainly used to provide gateways for interaction with other traffic participants.

[0127] The communication device 300 includes a first attenuation circuit 311, a processing circuit 320, and a switching circuit 330.

[0128] The first attenuation circuit 311 is used to reduce the power of the distance detection signal received by the antenna to obtain a first attenuated signal, wherein the distance detection signal is sent by the terminal device.

[0129] The first terminal of the switching circuit 330 is connected to the processing circuit 320.

[0130] When the antenna is connected to the second terminal of the switching circuit 330, the processing circuit 320 is used to process the communication signal received by the antenna. The communication signal can be sent by a terminal device that transmits distance detection signals, or it can be sent by other traffic participants in the V2X scenario.

[0131] When the second terminal of the switching circuit 330 is connected to the first attenuation circuit 311, the processing circuit 320 is further used to process the first attenuation signal to obtain the first bit error rate of the first attenuation signal.

[0132] The processing circuit 320 is also used to determine the distance range between the antenna and the terminal device based on the first bit error rate.

[0133] The communication device 300 can communicate with a terminal device using an antenna. The processing circuit 320 processes the communication signals received by the antenna. In the communication device 300, a first attenuation circuit 311 and a switching circuit 330 are added. Thus, when the switching circuit 330 is connected to the first attenuation circuit 311, the communication device 300 can calculate the bit error rate of the first attenuated signal obtained by attenuating the distance detection signal sent by the terminal device by the first attenuation circuit 311. Therefore, the distance range to the terminal device can be determined based on this bit error rate.

[0134] By processing the attenuated signal using the existing processing circuit, and by adding attenuation circuits and switching circuits, distance detection can be achieved, reducing the cost of accurate distance detection in communication devices.

[0135] The distance range can be a distance value or a distance interval.

[0136] Specifically, when the first bit error rate is equal to the preset bit error rate, the distance range between the communication device 300 and the terminal device can be determined to be the first preset distance; when the first bit error rate is less than the preset bit error rate, the distance range between the communication device 300 and the terminal device can be determined to be greater than the first preset distance; when the first bit error rate is greater than the preset bit error rate, the distance range between the communication device 300 and the terminal device can be determined to be less than the first preset distance.

[0137] The processing circuit 320 can also be used to determine the distance range based on the first bit error rate and the first relationship information corresponding to the first attenuation circuit when the first bit error rate is within a preset range. The first relationship information is used to represent the correspondence between the bit error rate and the distance. The maximum value of the preset range is less than 1 and the minimum value is greater than 0.

[0138] In the first relational information, the bit error rate and the distance can be correlated one-to-one. The preset bit error rate can be within a preset range. The preset bit error rate can be the bit error rate corresponding to the first preset distance.

[0139] The bit error rate within a preset range is highly sensitive to changes in distance. Therefore, the distance range determined using the bit error rate has high accuracy.

[0140] If the first bit error rate is greater than the maximum value of a preset range, the processing circuit 320 can determine that the distance range between the processor and the communication device is greater than the maximum distance value in the first relationship information. If the first bit error rate is less than the minimum value of a preset range, the processing circuit 320 can determine that the distance range between the processor and the communication device is less than the minimum distance value in the first relationship information.

[0141] It should be understood that the distance detection signal and the communication signal can be received by the communication device 300 using an antenna. In some embodiments, the communication device 300 may include an antenna.

[0142] It should be understood that the distance range determined by device 300 is the distance range between the antenna receiving the distance detection signal and the antenna transmitting the distance detection signal. The antenna transmitting the distance detection signal is generally located on the terminal device, and the distance range determined by device 300 can also be understood as the distance range between the antenna receiving the distance detection signal and the terminal device. If the distance between device 300 and the antenna receiving the distance detection signal is relatively short, for example, if device 300 and the antenna receiving the distance detection signal are located on the same device such as a mobile phone or vehicle, the distance range determined by device 300 can be understood as the distance range between device 300 or the device containing device 300 and the terminal device. The following explanation uses the distance between device 300 and the terminal device as an example.

[0143] The distance between device 300 and terminal equipment can also be understood as the distance between the antenna used to receive distance detection signals and terminal equipment.

[0144] Based on the distance range determined by device 300, operations such as unlocking and locking the vehicle doors can be performed. Device 300 can be located in the car key or in the vehicle. If device 300 is located in the vehicle, the car key can be a terminal device used to send distance detection signals. Communication device 300 can be one or more of the following: a vehicle, an in-vehicle device, a chip, etc.

[0145] The addition of the first attenuation circuit 311 to the communication device 300 increases its size. Since vehicles have ample space, placing the communication device 300 within the vehicle facilitates the installation of the first attenuation circuit 311. The device 300 can be located in a vehicle or other mobile device.

[0146] The processing circuit 320 is also configured to send a first indication message when the maximum value of the distance range is less than a first preset distance.

[0147] The first indication information can be sent to the electronic control unit (ECU). For different ECUs, the processing circuit 320 can send the same or different first indication information.

[0148] The ECU can be located in the control system 130.

[0149] An ECU includes a processor (such as a microcontroller unit (MCU)), memory, and input / output (I / O) interfaces. An ECU may also include one or more of the following: an analog-to-digital converter (A / D), a shaping integrated circuit, and a driver integrated circuit.

[0150] The first instruction can be used to instruct the doors and / or windows to unlock, and also to instruct the air conditioning or vehicle to start. The ECU controlling the doors and windows can unlock the doors and windows based on the received first instruction. Vehicle users can directly open the doors and windows when approaching the vehicle without any other operation, improving convenience.

[0151] Upon receiving the initial instruction, the ECU controlling the air conditioning can activate the air conditioning system. This allows the air conditioning to be turned on before the user enters the vehicle, ensuring the cabin temperature is adjusted to a comfortable level and improving the user experience.

[0152] Upon receiving the first instruction, the ECU controlling vehicle start-up can start the vehicle's engine. Generally, for vehicles that use fuels such as natural gas, diesel, or gasoline as their energy source, the vehicle cannot start immediately after the engine is started. The engine starts when the user is close to the vehicle, within a first preset distance, thus reducing the waiting time for the user after entering the cabin.

[0153] It should be understood that the first preset distance for unlocking car doors, unlocking car windows, turning on the air conditioning, and turning on the vehicle can be the same or different.

[0154] The terminal device can also send its identifier to the communication device 300. This identifier can be carried in the first distance detection signal, communication signal, or other signals. The processing circuit 320 can also send the terminal device identifier to the ECU. Generally, different vehicle users use different terminal devices. Different terminal device identifiers can correspond to different control strategies of the ECU. This ensures that the environment in the vehicle cabin is adjusted to suit the user's preferences or habits before the user enters the cabin.

[0155] For example, the ECU used to control the air conditioner can set different target temperatures for different terminal device identifiers. After receiving the first instruction information and the terminal device identifier sent by the processing circuit 320, the ECU can turn on the air conditioner and set it to the target temperature corresponding to the identifier of that terminal device.

[0156] The first instruction information can also be used to instruct the ECU to adjust the seat. Different seat configurations and positions can be set for different terminal device identifiers. After receiving the first instruction information and the terminal device identifier, the ECU controlling the seats in the vehicle cabin can adjust the seat to the configuration and position corresponding to the terminal device identifier.

[0157] The device 300 may include a second attenuation circuit. The second attenuation circuit can be used to reduce the power of the distance detection signal to obtain a second attenuated signal. The first attenuation amount of the power of the distance detection signal by the second attenuation circuit differs from the reduction amount of the power of the distance detection signal by the first attenuation circuit.

[0158] When the second attenuation circuit is connected to the second terminal of the switching circuit 330, the processing circuit 320 is further configured to process the second attenuation signal to obtain a second bit error rate of the second attenuation signal. The processing circuit 320 is further configured to determine the distance range based on the second bit error rate.

[0159] Specifically, the processing circuit 320 can be used to determine the distance range based on the second bit error rate and the second relationship information corresponding to the second attenuation circuit when the second bit error rate is within a preset range. The second relationship information is used to represent the correspondence between the bit error rate and the distance. The maximum value of the preset range is less than 1 and the minimum value is greater than 0.

[0160] If the second bit error rate is greater than the maximum value of the preset range, the terminal device can determine that the distance range between it and the communication device is greater than the maximum distance value in the second relationship information. If the second bit error rate is less than the minimum value of the preset range, the terminal device can determine that the distance range between it and the communication device is less than the minimum distance value in the second relationship information.

[0161] The processing circuit 320 can also be used to send a second indication message when the minimum value of the distance range is greater than or equal to a second preset distance.

[0162] The processing circuit 320 can also send the identifier of the terminal device.

[0163] The second instruction can be sent to the ECU. The ECU can then perform one or more of the following operations based on the second instruction: locking the doors, locking the windows, turning off the air conditioning, turning off the engine, and applying the parking brake.

[0164] Operations on the same object can be performed by the same ECU or different ECUs. For example, one ECU can be used to control the unlocking and locking of a car door. Operations on different objects can also be performed by the same ECU or different ECUs.

[0165] Different operations can correspond to the same or different second instruction information. Different operations can correspond to the same or different second preset distances.

[0166] For operations on the same object, the second preset distance can be greater than the first preset distance. For example, the first preset distance for unlocking a car door can be greater than the second preset distance for locking a car door.

[0167] The following explanation uses the unlocking and locking of car doors as an example.

[0168] The second preset distance can be greater than the first preset distance, thus forming hysteresis control and reducing the repeated unlocking and locking operations of the car door caused by distance measurement errors.

[0169] The device 300 may include multiple attenuation circuits, each of which can reduce the power of the distance detection signal to obtain an attenuated signal corresponding to that attenuation circuit. The second terminal of the switching circuit 330 may be sequentially connected to the multiple attenuation circuits. The processing circuit 320 can process the attenuated signal output from the attenuation circuit connected to the second terminal of the switching circuit 330 to obtain the bit error rate of the attenuated signal.

[0170] The order in which the second terminal of the switching circuit 330 is connected to multiple attenuation circuits can be preset or random.

[0171] The processing circuit 320 can determine the bit error rate that falls within a preset range from the multiple bit error rates obtained, and determine the distance range between itself and the terminal device based on the relationship information corresponding to the attenuation circuit connected to the second terminal of the switching circuit 330.

[0172] Different attenuation circuits correspond to different relational information, which is used to represent the relationship between distance and bit error rate.

[0173] When multiple bit error rates fall within a preset range, the processing circuit 320 can determine the distance range based on any one of them. Alternatively, the processing circuit 320 can utilize the relationship information between each bit error rate within the preset range and the attenuation circuit connected to the second terminal of the switching circuit 320 when determining that bit error rate, to determine the distance corresponding to each bit error rate within the preset range. The processing circuit 320 can calculate the average distance for each bit error rate within the preset range and use this average value as the distance range.

[0174] The preset range can be, for example, 5% to 95%.

[0175] Different attenuation circuits reduce the power of the distance detection signal by varying degrees; therefore, different attenuation circuits correspond to different ranges within which accurate distance detection is possible. The device 300 includes multiple attenuation circuits, thereby enabling accurate distance measurement over a relatively large distance range. Specifically, see [link to relevant documentation]. Figure 6 Explanation.

[0176] like Figure 10 As shown, when the signal strength is large, greater than P1, the bit error rate is 0; when the signal strength is between P1 and P2, the bit error rate decreases as the signal strength increases; when the signal strength is small, less than P2, the bit error rate is 100%. Signal strength P1 is greater than P2. The preset range of bit error rate corresponds to the range of signal strength [P1, P2].

[0177] Signals travel through space, and the signal strength attenuation in space is positively correlated with the transmission distance. The signal strength of the distance detection signal sent by the terminal device can be the same. Therefore, when the bit error rate of the attenuated signal obtained after attenuation by each attenuation circuit is within a preset range, the distance between the terminal device and the device 300 can be different.

[0178] For example, when the distance between the terminal device and the device 300 is within the range of [Y0, Y1], the bit error rate of the attenuated signal obtained after the distance detection signal received by the antenna passes through the attenuation circuit 1 is within a preset range; when the distance between the terminal device and the device 300 is within the range of [Y2, Y3], the bit error rate of the attenuated signal obtained after the distance detection signal received by the antenna passes through the attenuation circuit 2 is within a preset range.

[0179] In some embodiments, Y1 is less than Y2. When the device 300 includes only one attenuation circuit, attenuation circuit 1, if the bit error rate of the attenuated signal obtained through attenuation circuit 1 is 0, then it can be determined that the distance between the terminal device and the device 300 is greater than Y1.

[0180] When device 300 includes only attenuation circuit 1 and attenuation circuit 2, processing circuit 320 can determine the distance range between the terminal device and device 300 based on the bit error rate of the attenuated signal obtained through attenuation circuit 1 and the bit error rate of the attenuated signal obtained through attenuation circuit 2, thereby making the determined distance range smaller, i.e., the distance detection result more accurate. For example, if the bit error rate of the attenuated signal obtained through attenuation circuit 1 is 0 and the bit error rate of the attenuated signal obtained through attenuation circuit 2 is 100%, then it can be determined that the distance between the terminal device and device 300 is greater than Y1 and less than Y2. As another example, if the bit error rate of the attenuated signal obtained through attenuation circuit 1 is 0 and the bit error rate of the attenuated signal obtained through attenuation circuit 2 is 0, then it can be determined that the distance between the terminal device and device 300 is greater than Y2.

[0181] Furthermore, when the bit error rate of the attenuated signal obtained through attenuation circuit 1 is within a preset range, processing circuit 320 can determine the distance between the terminal device and device 300 based on the relationship information corresponding to attenuation circuit 1. Similarly, when the bit error rate of the attenuated signal obtained through attenuation circuit 2 is within a preset range, processing circuit 320 can determine the distance between the terminal device and device 300 based on the relationship information corresponding to attenuation circuit 2. Therefore, by setting multiple attenuation circuits in device 300, a wider range of accurate distance values ​​can be determined, improving the applicability of device 300.

[0182] The antenna can receive multiple distance detection signals. These distance detection signals can be periodically transmitted by the terminal device.

[0183] The time required for each attenuation circuit to reduce the power of the distance detection signal is very short, almost negligible. If each attenuation circuit reduces the power of the same distance detection signal to obtain different attenuated signals, these signals will arrive at the processing circuit 320 almost simultaneously, posing a significant challenge to the processing capability of the processing circuit 320.

[0184] When the distance detection signals are sent by the terminal device at different times, the processing circuit 320 can process each attenuation signal at different times. This reduces the processing capacity requirements of the processing circuit 320 and saves costs.

[0185] The device 300 may also include a control circuit for controlling an antenna or an attenuation circuit connected to the second terminal of the switching circuit 330.

[0186] When communication with other devices is required, the control circuit connects the second terminal of the control switch circuit 330 to the antenna, and the communication signal received by the antenna is transmitted to the processing circuit 320. The processing circuit 320 processes the communication signal received by the antenna.

[0187] The second terminal of the switching circuit can be connected to the antenna by default.

[0188] When distance detection with the terminal device is required, the control circuit controls the second terminal of the switch circuit 330 to connect to the first attenuation circuit 311. The distance detection signal received by the antenna is attenuated by the attenuation circuit and then processed by the processing circuit 320. The processing circuit 320 calculates the bit error rate of the attenuated signal output by the attenuation circuit and determines the distance range with the terminal device based on the bit error rate.

[0189] When the processing circuit 320 determines that the communication signal received by the antenna is a trigger signal, the control circuit can control the second terminal of the switching circuit 320 to connect to the first attenuation circuit 311. For example, when the processing circuit 320 determines that the communication signal received by the antenna is a trigger signal, the processing circuit 320 can send an indication message to the control circuit to instruct the control circuit to control the second terminal of the switching circuit 320.

[0190] The trigger signal can be used to indicate and control targets in the vehicle. For example, the trigger signal can be a control signal used to indicate that the door is unlocked, the window is unlocked, the air conditioner is turned on, or the vehicle is started. Alternatively, the trigger signal can be a signal sent by the terminal device during the process of establishing a connection between the terminal device and the device 300.

[0191] The control circuit adjusts the object connected to the second terminal of the switch circuit 330, so that the communication device can flexibly switch between communication function and distance detection function.

[0192] If the communication device meets the preset conditions, the processing circuit 320 can control the second terminal of the switching circuit 330 to connect to the second attenuation circuit through the control circuit.

[0193] Optionally, the preset conditions of the communication device can be that when the car door is unlocked (i.e., the car door is unlocked), the car window is unlocked, the air conditioner is on, the parking brake is released, and the vehicle engine is started, the control circuit can control the second terminal of the switch circuit 330 to connect to the second attenuation circuit.

[0194] It should be understood that the control circuit, switching circuit 330, attenuation circuit, and processing circuit 320 can be implemented using one or more chips. That is, the control circuit, switching circuit 330, each attenuation circuit, and processing circuit 320 can be disposed on different chips, or multiple of the control circuit, switching circuit 330, attenuation circuit, and processing circuit 320 can be integrated onto a single chip. This application does not impose any limitations on this.

[0195] The switching circuit 330 can be an RF switch, also known as a microwave switch.

[0196] The switching circuit 330 may include an electromechanical switch. An electromechanical switch is a switch based on electromagnetic induction. It relies on mechanical contact as its switching mechanism.

[0197] The switching circuit 330 may also include a solid-state switch. Solid-state switches, also known as contactless switches, include switches based on semiconductor technology electronic switching devices, such as metal-oxide-semiconductor field-effect transistors (MOSFETs), diodes, bipolar transistors, etc.

[0198] The switching circuit 330 can be a single-pole multi-throw switch, which can transmit the output of any attenuation circuit or the output of the antenna in at least one attenuation circuit to the processing circuit 320.

[0199] The antenna used to receive the distance detection signal can be a V2X antenna. That is, the distance detection signal can be a V2X signal. V2X signals have higher power and are suitable for distance detection over a relatively large distance range. A V2X antenna can achieve communication over a relatively long distance (approximately 300 meters). By setting up a reasonable attenuation circuit, distance detection within 300 meters is possible.

[0200] Using a V2X antenna as the antenna for receiving distance detection signals allows the device 300 to be used over a wider distance range.

[0201] A V2X antenna includes a main set and a diversity set. The main set can be used to transmit or receive V2X signals, while the diversity set can be used to receive V2X signals simultaneously with the main set receiving V2X signals. Specifically, during the period when the main set connected to device 300 transmits V2X signals, the terminal device can transmit a distance detection signal, and the diversity set connected to device 300 can receive the distance detection signal.

[0202] This reduces the impact of distance detection on V2X signal transmission.

[0203] Figure 4 This is a schematic structural diagram of a communication device provided in an embodiment of this application.

[0204] The wireless communication system 141 may include an antenna and a communication device 300. The communication device 300 may be, for example, a T-Box.

[0205] The communication device 400 includes a signal generation circuit 410, a switching circuit 430, and a first attenuation circuit 421.

[0206] The signal generation circuit 410 is used to generate initial detection signals and communication signals.

[0207] The first terminal of the switching circuit 430 is connected to the signal generation circuit, and when the second terminal of the switching circuit is connected to the antenna, the communication signal is transmitted through the antenna.

[0208] When the second terminal of the switching circuit is connected to the antenna, the first attenuation circuit 421 is used to reduce the power of the initial detection signal to obtain a first distance detection signal.

[0209] The first distance detection signal is sent to the terminal device through the antenna. The first distance detection signal is used by the terminal device to determine the first bit error rate of the first distance detection signal and to determine the distance range between the antenna and the terminal device based on the first bit error rate.

[0210] Compared to device 300, device 400 is located at the transmitting end of the distance detection signal. That is, the transmitting end uses an attenuation circuit to attenuate the generated initial detection signal. Therefore, the receiving end can detect the distance based on the bit error rate of the attenuated signal.

[0211] The first communication signal generated by the signal generation circuit 410 can be transmitted using an antenna. A first attenuation circuit 421 and a switching circuit 430 are added to the device 400. The initial detection signal generated by the signal generation circuit 410 can be attenuated by the first attenuation circuit 421 to obtain a first distance detection signal. The first distance detection signal is transmitted to the terminal device via the antenna, so that the terminal device can determine the distance range between the antenna and the terminal device based on the bit error rate of the first distance detection signal.

[0212] An initial detection signal is generated using the existing signal generation circuit 410 used to generate communication signals. This initial detection signal is then attenuated by adding an attenuation circuit to obtain a first distance detection signal. This first distance detection signal is then transmitted using the existing antenna used to transmit communication signals. Therefore, the receiving end of the first distance detection signal can perform accurate distance detection based on its bit error rate. The attenuation circuit and switching circuit have relatively simple structures, and adding them has a minimal impact on the cost of the communication device.

[0213] The distance range can be a distance value or a distance interval.

[0214] It should be understood that the first distance detection signal and the communication signal can be transmitted to the terminal device using an antenna. The communication device 400 may include an antenna. Alternatively, the antenna may be located outside the communication device 400, and the signal output by the communication device 400 can be transmitted to the antenna. The distance range between the antenna and the terminal device can also be understood as the distance range between the device 400 and the terminal device.

[0215] It should be understood that the first distance detection signal and the communication signal may be received by the communication device 400 using an antenna. In some embodiments, the communication device 400 may include an antenna.

[0216] Device 400 can be located in a vehicle or other terminal equipment. Based on the distance range determined by device 400, operations such as unlocking and locking the vehicle doors can be performed. Device 400 can be located in a car key or in the vehicle. If device 400 is located in the vehicle, then the car key can be a terminal device used to receive the first distance detection signal. Communication device 400 can be one or more of the following: a vehicle, an in-vehicle device, a chip, etc.

[0217] The addition of the first attenuation circuit 421 to the communication device 400 increases its size. Since there is ample space in a vehicle, placing the communication device 400 inside the vehicle facilitates the installation of the first attenuation circuit 421.

[0218] The device 400 may further include processing circuitry. The processing circuitry is used to determine whether to unlock the vehicle door based on the received unlock signal. The unlock signal is sent by the terminal device when the maximum value of the distance range from the communication device is less than a first preset distance.

[0219] The terminal device can send a first indication signal to the communication device 400 when the distance between it and the communication device 400 is less than a first preset value.

[0220] The device 400 can receive the first indication signal using the antenna or other antenna connected to the first attenuation circuit 421.

[0221] The communication device 400 may be located in the vehicle. The first indication signal may be, for example, an unlock signal. The terminal device may send an unlock signal to the communication device to indicate that the door should be unlocked. The unlock signal and the first distance detection signal may be sent using the same or different communication technologies. For example, the terminal device may use Bluetooth technology to send the unlock signal.

[0222] The communication device 400 may further include a processing circuit. The processing circuit may send first indication information based on the first indication signal. The first indication signal may carry the first indication information, or the processing circuit may determine the first indication information based on the first indication signal.

[0223] For example, the processing circuit can send the first instruction information to multiple ECUs based on the first instruction information. The first instruction information sent to the door control ECU can be used to instruct the door control ECU to unlock the door. The first instruction information sent to the air conditioning control ECU can be used to instruct the door control ECU to turn on the air conditioning.

[0224] Figure 4The description assumes that device 400 is located in a vehicle. In some embodiments, device 400 may also be located in other terminal devices, and the terminal device receiving the first distance detection signal sent by 400 may be located in the vehicle. In this case, if the terminal device receiving the first distance detection signal sent by 400 determines that the distance between it and the communication device 400 is less than a first preset value, it may send first instruction information to multiple ECUs.

[0225] If the first bit error rate is within a preset range, the distance range can be determined by the terminal device based on the first bit error rate and the first relationship information corresponding to the first attenuation circuit. The maximum value of the preset range is less than 1 and the minimum value is greater than 0, and the first relationship information is used to represent the correspondence between the bit error rate and the distance.

[0226] The bit error rate within a preset range is highly sensitive to changes in distance. Therefore, the distance range determined using the bit error rate has high accuracy.

[0227] The device 400 may further include a second attenuation circuit. When the second terminal of the switching circuit 430 is connected to the antenna, the second attenuation circuit reduces the power of the initial detection signal to obtain a second distance detection signal. The second attenuation amount of the initial detection signal by the second attenuation circuit differs from the first attenuation amount of the initial detection signal by the first attenuation circuit 421.

[0228] The second distance detection signal is transmitted to the terminal device through the antenna. The second distance detection signal is used by the terminal device to determine the distance range between the terminal device and the device 400.

[0229] Specifically, when the second bit error rate is within a preset range, the terminal device can determine the distance range based on the second bit error rate and the second relationship information corresponding to the second attenuation circuit. The second relationship information represents the correspondence between the bit error rate and the distance. When the second bit error rate is greater than the maximum value of the preset range, the terminal device can determine that the distance range between it and the communication device is greater than the maximum distance in the second relationship information. When the second bit error rate is less than the minimum value of the preset range, the terminal device can determine that the distance range between it and the communication device is less than the minimum distance in the second relationship information.

[0230] Generally, the second attenuation is less than the first attenuation. The device 400 may further include a processing circuit. The processing circuit is used to send second indication information based on a received second indication signal, the second indication signal being sent when the terminal device determines that the minimum value of the distance range is greater than or equal to a second preset distance.

[0231] The second preset distance can be greater than the first preset distance, thus forming hysteresis control and reducing repeated operations caused by distance measurement errors.

[0232] The device 400 may include multiple attenuation circuits. The attenuation circuit connected to the second terminal of the switching circuit 430 can be used to reduce the power of the initial detection signal. The second terminal of the switching circuit 430 can be sequentially connected to the multiple attenuation circuits to obtain a distance detection signal output by each attenuation circuit. Different attenuation circuits reduce the power of the initial detection signal by different amounts. That is, the power of each distance detection signal is different.

[0233] Each distance detection signal is transmitted to the terminal device via an antenna. These distance detection signals can be used by the terminal device to determine the distance range to the antenna.

[0234] The terminal device can calculate the bit error rate (BER) of each attenuated signal and determine the BER values ​​that fall within a preset range. The order in which the second terminal of the switching circuit 430 is connected to multiple attenuation circuits can be preset. The terminal device can determine the attenuation circuit corresponding to the BER value within the preset range based on the preset order of the connection between the second terminal and the multiple attenuation circuits. The terminal device can determine the distance range between the terminal device and the device 400 based on the relationship information corresponding to the attenuation circuit and the BER values ​​within the preset range.

[0235] Different attenuation circuits correspond to different relational information, which is used to represent the relationship between distance and bit error rate.

[0236] Different attenuation circuits reduce the power of the distance detection signal by varying degrees; therefore, different attenuation circuits correspond to different ranges within which accurate distance detection is possible. The device 400 includes multiple attenuation circuits, thereby enabling accurate distance measurement over a relatively large distance range. Specifically, see [link to relevant documentation]. Figure 12 Explanation.

[0237] Multiple distance detection signals can be sent at different times. By sending these multiple distance detection signals at different times, the terminal device can receive and process them at different times, reducing the processing power requirements of the terminal device and increasing the applicability of device 400.

[0238] The device 400 may also include a control circuit. The control circuit is used to control the first terminal of the switching circuit 430 to be connected to the signal generation circuit 410 or an attenuation circuit.

[0239] When communicating with other devices, the control circuit controls the first terminal of the switch circuit 430 to connect to the signal generation circuit 410, which generates a communication signal. This communication signal is then transmitted to the other device via the antenna.

[0240] When distance detection with the terminal device is required, the control circuit connects the first terminal of the control switch circuit 430 to the attenuation circuit, and the signal generation circuit 410 generates an initial detection signal. The initial detection signal is then attenuated by the attenuation circuit, and the resulting distance detection signal is transmitted to the terminal device via the antenna. The terminal device then determines the distance range.

[0241] The control circuit adjusts the object connected to the first end of the switching circuit 430, so that the communication device 400 can flexibly switch between communication function and distance detection function.

[0242] The first terminal of the control circuit 430 can be connected to the signal generation circuit 410 by default.

[0243] In some embodiments, when the device 400 receives a trigger signal sent by the terminal device, the control circuit can control the first terminal of the switch circuit 430 to be connected to the first attenuation circuit 421.

[0244] For example, the trigger signal can be a request signal. Device 400 can receive a door unlocking request sent by the terminal device. Based on the door unlocking request, the control circuit controls the first terminal of the switch circuit 430 to connect to the first attenuation circuit 421. Alternatively, the trigger signal can also be a signal sent by the terminal device during the connection establishment process between device 400 and the terminal device.

[0245] The control circuit can also acquire the target's state. When the target's state meets preset conditions, the control circuit can control the first terminal of the switching circuit 430 to connect to the second attenuation circuit.

[0246] For example, the control circuit can acquire the status of the car door. When the car door is in the unlocked state, the control circuit can control the first terminal of the switch circuit 430 to connect to the second attenuation circuit.

[0247] The switching circuit 430 can be an RF switch, such as an electromechanical switch or a solid-state switch.

[0248] It should be understood that the control circuit, switching circuit 430, signal generation circuit 410, attenuation circuit, and processing circuit can be implemented using one or more chips. That is, the control circuit, switching circuit 430, signal generation circuit 410, various attenuation circuits, and processing circuits can be respectively located on different chips, or multiple of the control circuit, switching circuit 430, signal generation circuit 410, attenuation circuit, and processing circuit can be integrated onto a single chip. This application does not impose any limitations on this.

[0249] The antenna used to transmit the first distance detection signal can be a V2X antenna. That is, the first distance detection signal can be a V2X signal. V2X signals have higher power, and using a V2X antenna to transmit the first distance detection signal can be applied to a relatively large distance range. Generally, a V2X antenna can achieve communication over a relatively long distance (approximately 300 meters). By setting up a reasonable attenuation circuit, distances within 300 meters can be detected.

[0250] V2X antennas consist of a main antenna and a diversity antenna. The main antenna can be used to transmit or receive V2X signals, while the diversity antenna can be used to receive V2X signals. Generally, during the period when the main antenna is transmitting V2X signals, the diversity antenna can stop detecting signals and no longer receive V2X signals.

[0251] To reduce the impact of distance detection on other data transmissions, the terminal device can utilize the diversity of its V2X antennas to receive the first distance detection signal while the second V2X main antenna is transmitting communication signals. In other words, the first distance detection signal can be received by the diversity of the terminal device's V2X antennas within a preset time period, which can be the time period during which the main antenna of the terminal device is used to transmit signals.

[0252] Figure 5 This is a schematic flowchart of a car door unlocking method provided in an embodiment of this application.

[0253] The door unlocking method 500 includes steps S501 to S511.

[0254] The terminal device and the vehicle can already be paired via Bluetooth. Paired terminal devices and vehicles have a key that allows for encrypted data transmission via Bluetooth. For example, users can pair the vehicle and terminal device via Bluetooth after purchasing them.

[0255] In S501, the vehicle broadcasts V2X information.

[0256] Vehicles can periodically transmit signals via V2X antennas. Vehicles can activate V2X broadcasting upon startup. With V2X broadcasting enabled, vehicles can periodically transmit V2X signals.

[0257] In S502, the terminal device receives the V2X signal sent by the vehicle.

[0258] Afterwards, the terminal device can communicate with the vehicle via V2X.

[0259] It should be understood that V2X signals can carry vehicle identification, thereby enabling terminal devices to identify vehicles and conduct V2X communication with them based on the vehicle identification.

[0260] When a terminal device is within the coverage area of ​​a vehicle's V2X signal, the terminal device can receive the vehicle's V2X signal. It should be understood that any terminal device within the coverage area of ​​a vehicle's V2X signal can communicate with the vehicle via V2X.

[0261] In S503, the terminal device establishes a Bluetooth connection with the vehicle.

[0262] When the terminal device is within the vehicle's Bluetooth signal range, the vehicle can establish a Bluetooth connection with the paired terminal device. Afterward, the vehicle and the terminal device can use this key to encrypt and transmit information via Bluetooth.

[0263] Generally, the coverage area of ​​V2X signals is greater than that of Bluetooth signals. As the distance between the terminal device and the vehicle gradually decreases, the terminal device can receive V2X signals transmitted by the vehicle when it enters the V2X signal coverage area, enabling V2X communication with the vehicle. Subsequently, when the terminal device enters the vehicle's Bluetooth signal coverage area, it can establish a Bluetooth connection with the vehicle.

[0264] In S504, the terminal device performs user authentication.

[0265] For example, terminal devices can authenticate users using methods such as password authentication, facial recognition, and fingerprint recognition. Once user authentication is successful, S505 and S506 can be performed.

[0266] In some embodiments, users of the terminal device can complete user authentication by unlocking the terminal device's screen. If the terminal device is unlocked, user authentication may not be required.

[0267] Implementing S504 can unlock the doors without requiring anyone with a terminal device to approach the vehicle, thus improving security.

[0268] In some embodiments, after S503, the terminal device may acquire a user instruction indicating whether the car door needs to be unlocked. For example, the terminal device may send a prompt to the user to unlock the car door; the prompt may be an image or sound. Based on the prompt, the user may issue a user instruction to the terminal device. The user instruction may be, for example, input from the user on the terminal device, or it may be voice input.

[0269] When the user indicates voice input, the terminal device can recognize the voice input through voiceprint recognition and other methods to authenticate the user's identity.

[0270] In some embodiments, S504 can be omitted, and S505 and S506 can be performed after a Bluetooth connection is established between the vehicle and the terminal device.

[0271] In S505, terminal devices broadcast distance detection signals via V2X.

[0272] In other words, the distance detection signal is a V2X signal.

[0273] The S505 can be performed multiple times. For example, the terminal device can periodically broadcast a distance detection signal via V2X.

[0274] In S506, the terminal device broadcasts an unlock signal via Bluetooth.

[0275] The unlock signal is used to instruct the vehicle to unlock its doors. The unlock signal is transmitted to the vehicle via encrypted Bluetooth.

[0276] It should be understood that an unlock signal can only be broadcast via Bluetooth after a Bluetooth connection is established between the terminal device and the vehicle. Therefore, the terminal device can proceed to S505 after S503, and the vehicle can proceed to S507 after S503.

[0277] In S507, the vehicle performs distance detection based on the received distance detection signal.

[0278] Terminal devices can utilize Figure 6 The communication device shown performs S507.

[0279] If the distance between the vehicle and the terminal device is determined to be not less than or equal to X11, steps S505 and S507 can be performed again based on the next received distance detection signal. In other words, the vehicle can receive the distance detection signal again and perform distance detection based on the second received distance detection signal.

[0280] The distance detection result obtained through S507 can indicate whether the distance between the vehicle and the terminal device is less than or equal to X11.

[0281] S508 is performed when the distance between the vehicle and the terminal equipment is less than or equal to X11.

[0282] In the S508, the vehicle unlocks its doors based on the received unlock signal.

[0283] After the vehicle unlocks its doors, it receives the distance detection signal again from the terminal device via V2X broadcast.

[0284] In S509, the vehicle performs distance detection based on the received distance detection signal.

[0285] The distance detection result obtained through S509 can indicate whether the distance between the vehicle and the terminal device is greater than X12.

[0286] Terminal devices can utilize Figure 6 The communication device shown performs S510. Generally, X12 is greater than or equal to X11, thus enabling hysteresis control and preventing repeated unlocking and locking of the doors due to distance detection errors.

[0287] If the vehicle determines that the distance to the terminal device is less than or equal to X12, execute S505 and S509 again, and re-determine whether the distance to the terminal device is greater than X12 based on the distance detection signal received again.

[0288] If the distance between the vehicle and the terminal device is determined to be greater than X12, proceed with S511.

[0289] In S510, the vehicle doors are locked.

[0290] The automatic closing of the car doors when the user is far from the vehicle provides safety.

[0291] After establishing a Bluetooth connection with the vehicle, the terminal device performs steps S505 and S506. Therefore, X11 is generally set to be less than the Bluetooth communication signal transmission distance.

[0292] It should be understood that distance X12 can be less than or equal to the Bluetooth communication signal transmission distance, or it can be greater than the Bluetooth communication signal transmission distance. In other words, when the distance between the vehicle and the terminal device is X12, the vehicle can be within or outside the Bluetooth coverage area of ​​the terminal device.

[0293] To save energy, the distance between the vehicle and the terminal device can be eliminated while the vehicle is in motion.

[0294] When the vehicle starts or accelerates to a first preset speed, it can send an instruction message to the terminal device via Bluetooth or V2X technology to instruct the terminal device to stop sending distance detection signals, cease S505, and stop S507 and S509. When the vehicle stops or accelerates to a second preset speed, it can send an instruction message to the terminal device via Bluetooth or V2X technology to instruct the terminal device to continue sending distance detection signals, and the vehicle can begin S507 and S509.

[0295] To achieve hysteresis control, the first preset speed can be greater than the second preset speed.

[0296] The terminal device can also detect its speed. When the terminal device's moving speed is greater than a first preset speed, step S505 stops. When the terminal device's moving speed is less than or equal to a second preset speed, step S505 begins.

[0297] The vehicle doors can be locked when starting or when the speed increases to a first preset speed. The doors can be locked again after a certain period of time after being unlocked. Distance detection is no longer required when the doors are locked.

[0298] Vehicles can utilize Figure 6 The communication device shown processes the distance detection signal sent by the terminal device to determine the distance between the vehicle and the terminal device.

[0299] Figure 6 This is a schematic structural diagram of a communication device provided in an embodiment of this application.

[0300] The communication device 600 includes an attenuation circuit 611, an attenuation circuit 612, a direct connection circuit 613, a switching circuit 620, a processing device 630, and a control device 640.

[0301] The first terminal of the attenuation circuit 611 is connected to the V2X receiving cable and is used to attenuate the power B1 of the signal received by the V2X receiving antenna. Attenuation of signal power is equivalent to attenuation of signal strength.

[0302] The first end of the attenuation circuit 612 is connected to the V2X receiving wire and is used to attenuate the power of the signal received by the V2X receiving antenna by B2.

[0303] The first end of the direct-connect circuit 613 is connected to the V2X receiving wire and is used to transmit the signal received by the V2X receiving antenna. That is to say, the direct-connect circuit 613 does not attenuate the signal received by the V2X receiving antenna.

[0304] The first terminal of the switching circuit 620 is connected to one of the ports of the second terminals of the attenuation circuit 611, the attenuation circuit 612, and the direct connection circuit 613. The second terminal of the switching circuit 620 is connected to the processing device 630.

[0305] The processing device 630 processes the received signal to determine the bit error rate of the information carried in the signal. The bit error rate of the information carried in the signal can also be understood as the bit error rate of the signal itself.

[0306] The control device 640 is used to control the first terminal of the switching circuit 620 to control the port connected to the first terminal of the switching circuit 620.

[0307] The processing device 630 can also be referred to as a processing circuit. The processing device 630 may include a surface acoustic wave (SAW), a low noise amplifier (LNA), a radio frequency integrated circuit (RFIC), a processor, etc.

[0308] The input signal to the processing unit 630 is an analog signal. The SAW (Signal Filter) is used to filter the input signal. The LNA (Low-Noise Amplifier) ​​is used to amplify the power of the input signal and reduce the noise level. The RFIC (Radio Frequency Identifier) ​​is used to convert the input analog signal into a digital signal. The processor is used to process the digital signal; the processor may be, for example, a digital signal processor (DSP).

[0309] With the first terminal of the switching circuit 620 connected to the second terminal of the direct-connect circuit 613, the V2X signal received by the V2X receiving antenna is transmitted directly to the processing device 630 without attenuation. The processing device 630 can determine whether the V2X signal transmission is abnormal based on the bit error rate of the information carried by the unattenuated V2X signal. If the bit error rate of the information carried by the unattenuated V2X signal is low, less than or equal to a preset value, an acknowledgment instruction is sent to the terminal device; if the bit error rate is high, greater than the preset value, the vehicle can send a retransmission instruction to the terminal device, or not send an acknowledgment instruction, to instruct the terminal device to retransmit the information carried in the V2X signal.

[0310] like Figure 7 As shown, in the case of V2X communication, the control device 640 controls the first terminal of the switch circuit 620 to connect to the second terminal of the direct connection circuit 613. The processing device 630 can process V2X signals that have not been attenuated by the attenuation circuit.

[0311] In order to perform S507 and S509, during the time period when the terminal device broadcasts the distance detection signal via V2X, the control device 640 controls the first terminal of the switch circuit 620 to connect to the attenuation circuit 611 or the attenuation circuit 612.

[0312] With the first terminal of the switching circuit 620 connected to the second terminal of the attenuation circuit 611, the V2X signal received by the V2X receiving antenna is attenuated by B1 before being transmitted to the processing device 630. The processing device 630 can determine the bit error rate of the V2X signal after attenuation B1.

[0313] With the first terminal of the switching circuit 620 connected to the second terminal of the attenuation circuit 612, the V2X signal received by the V2X receiving antenna is attenuated by B2 before being transmitted to the processing device 630. The processing device 630 can determine the bit error rate of the V2X signal after attenuation by B2.

[0314] When the first terminal of the switching circuit 620 is connected to the second terminal of either attenuation circuit 611 or attenuation circuit 612, the signal strength PR1 of the V2X signal transmitted to the processing device 630 can be expressed as:

[0315] PR1 = A1 - Bn - C1

[0316] Where A1 is the received signal strength of the V2X receiving antenna, Bn is the attenuation magnitude of the attenuation circuit (Bn can be B1 or B2), and C1 is the loss of the remaining paths. The fluctuation of the loss of the remaining paths, C1, is very small and can be considered a constant value. Ideally, C1 is 0.

[0317] Bit error rate (BER), also known as bit error rate, is a measure of the accuracy of data transmission. It represents the ratio of the number of erroneous bits to the total number of bits transmitted over a period of time.

[0318] The processing device processes the signal to obtain the bit error rate of the information carried in the signal. For example... Figure 10 As shown, when the signal strength is large, greater than P1, the bit error rate is 0; when the signal strength is between P1 and P2, the bit error rate decreases as the signal strength increases; when the signal strength is small, less than P2, the bit error rate is 100%. Signal strength P1 is greater than P2.

[0319] In other words, if the signal strength is between P1 and P2, then the signal strength is negatively correlated with the bit error rate.

[0320] Typically, terminal devices transmit V2X signals with a constant signal strength. As the signal travels through space, the signal strength attenuation is directly proportional to the transmission distance.

[0321] Therefore, the vehicle, acting as the receiver of V2X signals, utilizes an attenuation circuit to attenuate the V2X signals received by the V2X antenna, ensuring that the bit error rate (BER) of the attenuated V2X signal remains within a preset range. The signal strength of the attenuated V2X signal can be determined using the negative correlation between signal strength and BER. The minimum value of the preset range is greater than 0, and the maximum value is less than 100%. The minimum value of the preset range can be 2%, 3%, 5%, 10%, etc., and the maximum value can be 98%, 97%, 95%, 90%, etc.

[0322] Based on the signal strength PR1 of the attenuated V2X signal, the attenuation magnitude Bn of the attenuation circuit, and the transmitted V2X signal strength PT, the attenuation magnitude P3 of the V2X signal propagating in space can be determined. The attenuation magnitude P3 of the V2X signal propagating in space can be expressed as:

[0323] P3 = PT - (PR1 + Bn + C1)

[0324] Based on the positive correlation between signal strength attenuation in space and transmission distance, the transmission distance corresponding to the attenuation P3 of V2X signal in space can be determined, that is, the distance between the terminal device and the vehicle.

[0325] Compared to determining the distance based on the RSSI of the signal sent by the terminal device, determining the distance between the terminal device and the vehicle using the bit error rate of the signal provides higher distance accuracy.

[0326] Relationship information corresponding to each attenuation circuit can be established based on empirical values. The relationship information corresponding to each attenuation circuit is used to represent the correspondence between the bit error rate and the distance when using that attenuation circuit.

[0327] The terminal device transmits V2X signals at various distances. For each distance, the vehicle's communication device 600 uses different attenuation circuits to attenuate the received V2X signal and determines the bit error rate (BER) of the attenuated V2X signal. Within a preset BER range, for each attenuation circuit, the distances corresponding to different BER rates are recorded, thereby establishing relationship information for each attenuation circuit configuration. To reduce the complexity of subsequent processing, the preset BER range for each attenuation circuit can generally be the same when establishing the relationship information.

[0328] The remaining path losses C1 affect the actual measured bit error rate. In other words, the relationship information corresponding to each attenuation circuit established based on empirical values ​​covers the impact of the remaining path losses C1 on the bit error rate.

[0329] By utilizing the correlation between bit error rate and distance under different attenuation circuit conditions, distance detection can be performed to determine the distance between the vehicle and the terminal device.

[0330] To improve the range of distance detection, the number of attenuation circuits can be increased. Different attenuation circuits are used to attenuate the V2X signal to varying degrees.

[0331] It should be understood that different attenuation circuits correspond to different distance detection ranges. For example, attenuation circuit 611 has a distance detection range of [Y0, Y1], where Y0 is less than Y1. When the distance between the terminal device and the vehicle is between Y0 and Y1, the V2X receiving antenna in the vehicle receives the V2X signal sent by the terminal device and uses attenuation circuit 611 to attenuate the V2X signal sent by the terminal device. The bit error rate of the attenuated V2X signal is within a preset range. Therefore, the vehicle can use the correspondence between the bit error rate and distance under attenuation circuit 611 to detect the distance between itself and the terminal device based on the V2X signal sent by the terminal device. The maximum preset range distance corresponding to the bit error rate is Y1, and the minimum preset range distance corresponding to the bit error rate is Y0.

[0332] The attenuation circuit 611 has a distance detection range of [Y0, Y1], and the attenuation circuit 612 has a distance detection range of [Y2, Y3], where Y2 is less than Y3. It should be understood that the signal strength reduction caused by the attenuation circuit 612 is less than that caused by the attenuation circuit 611, i.e., B2 is less than B1.

[0333] If Y2 is equal to Y1, the vehicle can determine the distance to a terminal device located between Y0 and Y3. Y2 can also be slightly less than Y1.

[0334] If, when Y2 is greater than Y1, the vehicle uses attenuation circuit 612 to attenuate the V2X signal sent by the terminal device, and the bit error rate of the attenuated V2X signal is less than the minimum value of a preset range, and the vehicle uses attenuation circuit 611 to attenuate the V2X signal sent by the terminal device, and the bit error rate of the attenuated V2X signal is greater than the maximum value of a preset range, then the distance between the terminal device and the vehicle can be determined to be (Y1, Y2). If the bit error rate of the attenuated V2X signal obtained using attenuation circuits 612 and 611 is less than the minimum value of a preset range, then the distance between the terminal device and the vehicle can be determined to be less than Y0. If the bit error rate of the attenuated V2X signal obtained using attenuation circuit 612 is greater than the maximum value of a preset range, then the distance between the terminal device and the vehicle can be determined to be less than Y3.

[0335] The communication device 600 can be used to perform S507 and S509 in method 500. The distance detection range [Y0, Y1] corresponding to the attenuation circuit 611 may include X11, or [Y0, Y1] may include X11 and X12.

[0336] If the distance detection range [Y0, Y1] corresponding to the attenuation circuit 611 only includes X11, then S507 can be performed using the attenuation circuit 611. During the time period after S503 or S504 when the terminal device broadcasts the distance detection signal via V2X, which is the time period before S507 when S505 is performed, the control device 640 can control the first terminal of the switching circuit 620 to connect to the second terminal of the attenuation circuit 611, such as... Figure 8 As shown. For example, in S506, after receiving the Bluetooth broadcast unlock signal from the terminal device, the control device 640 can control the first terminal of the switching circuit 620 to connect to the second terminal of the attenuation circuit 612.

[0337] Figure 11 This is a schematic flowchart of a distance detection method provided in an embodiment of this application.

[0338] S507 can specifically include S5071 and S5072.

[0339] When the first terminal of the switching circuit 620 is connected to the second terminal of the attenuation circuit 611, the attenuation circuit 611 is used to attenuate the distance detection signal received by the V2X antenna to obtain a first attenuated signal.

[0340] When using attenuation circuit 611, the bit error rate corresponding to distance X11 is E11.

[0341] In S5071, the processing device 630 verifies the first attenuation signal to determine the bit error rate of the first attenuation signal.

[0342] The distance detection signal sent by the terminal device can carry preset information. The processing circuit 630 can compare the information in the first attenuation signal with the preset information to determine the bit error rate of the first attenuation signal.

[0343] Alternatively, the first distance detection signal sent by the terminal device carries a checksum. The processing circuit 630 can use this checksum to verify the information in the received first attenuated signal, thereby determining the bit error rate of the first attenuated signal.

[0344] In S5072, the processing device 630 determines the distance range between itself and the terminal device based on the relationship between the bit error rate of the first attenuated signal and the bit error rate E11 corresponding to the distance X11.

[0345] When the bit error rate is greater than E11, it can be determined that the distance between the terminal device and the vehicle is greater than X11; when the bit error rate is less than or equal to E11, it can be determined that the distance between the terminal device and the vehicle is less than or equal to X11.

[0346] The distance detection range [Y2, Y3] corresponding to the attenuation circuit 612 can include X12. Similar to the method of performing S507, S509 can be performed using the attenuation circuit 612.

[0347] After the vehicle unlocks its doors in S508, the vehicle can begin distance detection using the attenuation circuit 612. This refers to the period before S509 when the terminal device broadcasts the distance detection signal via V2X, which is the period between S508 and S505. During this time, the control device 640 can connect the first terminal of the switching circuit 620 to the second terminal of the attenuation circuit 612. Figure 9 As shown.

[0348] The vehicle doors can be locked when starting or when the speed increases to a first preset speed. The doors can be locked again after a certain period of time after being unlocked. Distance detection is no longer required when the doors are locked.

[0349] When the door is unlocked, the control device 640 can control the first terminal of the switching circuit 620 to connect to the second terminal of the attenuation circuit 612. The control device 640 can acquire the status of the door. Alternatively, the processing device 630 can acquire the status of the door and, when the door is unlocked, instruct the control device 640 to control the first terminal of the switching circuit 620 to connect to the second terminal of the attenuation circuit 612.

[0350] When the first terminal of the switching circuit 620 is connected to the second terminal of the attenuation circuit 612, the attenuation circuit 612 is used to attenuate the distance detection signal received by the V2X antenna to obtain a second attenuated signal.

[0351] When using attenuation circuit 611, the bit error rate corresponding to distance X12 is E12.

[0352] The processing device 630 can verify the second attenuated signal to determine its bit error rate. Based on the relationship between the bit error rate of the second attenuated signal and the bit error rate E12 corresponding to distance X12, the processing device 630 can determine the distance range to the terminal device.

[0353] If the distance detection range [Y0, Y1] corresponding to the attenuation circuit 611 includes X11 and X12, then the attenuation circuit of the communication device 600 may only include the attenuation circuit 611, excluding the attenuation circuit 612. Based on the correspondence between the bit error rate of the attenuation circuit 611 and the distance, it can be determined that when using the attenuation circuit 611, the bit error rate corresponding to distance X11 is E11, and the bit error rate corresponding to distance X12 is E12. During S507 or S510, the control device 640 can control the first terminal of the switching circuit 620 to connect to the second terminal of the attenuation circuit 611.

[0354] During S507, the processing unit 630 can determine whether the bit error rate of the input signal is less than or equal to E11, thereby determining whether the distance between the terminal device and the vehicle is less than or equal to X11. If the processing unit 630 determines that the distance between the terminal device and the vehicle is less than or equal to X11, the processing unit 630 can send an unlocking command to the electronic control unit (ECU) to instruct the ECU to unlock the door.

[0355] During S510, the processing unit 630 can determine whether the bit error rate of the input signal is greater than E12, thereby determining whether the distance between the terminal device and the vehicle is greater than X12. If the processing unit 630 determines that the distance between the terminal device and the vehicle is greater than X12, the processing unit 630 can send a locking command to the ECU to instruct the ECU to lock the door.

[0356] To avoid erroneous operation, when the first end of the switching circuit 620 is connected to the direct connection circuit 613, that is, when the signal received by the V2X receiving antenna is transmitted to the processing device 630 through the direct connection circuit 613, no information may be sent to the ECU.

[0357] The control device 640 can connect the first terminal of the control switch circuit 620 to the attenuation circuit 611 and attenuation circuit 612 only when the distance between the vehicle and the terminal device is detected, that is, only when S507 and S510 are performed.

[0358] A V2X antenna in a vehicle can include a main antenna and a diversity antenna. The main antenna is used for both receiving and transmitting V2X signals, while the diversity antenna is used for receiving V2X signals. Typically, the diversity antenna is idle during the time the main antenna is transmitting V2X signals. Normally, the diversity antenna is turned off when the main antenna is transmitting V2X signals. Examples of V2X antenna resource allocation in a vehicle are shown in Table 1.

[0359] Table 1

[0360]

[0361] Different subframes represent different time-domain resources, and different subbands represent different frequency-domain resources. RX indicates that the antenna is used to receive signals, and TX indicates that the antenna is used to transmit signals. It should be understood that Table 1 is merely an example of V2X antenna resource allocation for a vehicle; the specific number and location of subframes used for transmitting signals can be allocated according to the application environment.

[0362] When the V2X antenna in a vehicle is used to receive distance detection signals, and the vehicle processes the received distance detection signals, the V2X antenna in the vehicle can adopt the resource allocation shown in Table 2.

[0363] Table 2

[0364]

[0365]

[0366] Diversity can be used as a V2X receiving antenna in range detection scenarios. During the subframe where the main signal is transmitted, diversity is used to receive the range detection signal. This reduces the impact of range detection on resource allocation.

[0367] The subband used for signal transmission by the main group and the subband used for receiving distance detection signals by the diversity group can be different to avoid affecting the transmission of other V2X signals. In other words, frequency division can be used to avoid interference between the distance detection signals received by the diversity group and the signals transmitted by the main group. For example, subframe 2 is the subframe used for signal transmission by the main group. In subframe 2, the main group transmits signals in subband 3, while the diversity group receives distance detection signals in one or more of subbands 1, 2, 4, and 5. That is, in subframe 2, the terminal device can transmit distance detection signals through one or more of subbands 1, 2, 4, and 5.

[0368] In subframe 2, control device 640 can control the first terminal of switching circuit 620 to connect to the second terminal of attenuation circuit 611 or the second terminal of attenuation circuit 612. In subframes 0, 1, and 3-9, control device 640 can control the first terminal of switching circuit 620 to connect to the second terminal of direct connection circuit 613.

[0369] The communication device 600 may also include more attenuation circuits. The control device 640 can control the switching circuit 620 to be connected to each attenuation circuit in sequence, so that the V2X signal attenuated by the attenuation circuit is transmitted to the processing device 630 to calculate the bit error rate of the attenuated V2X signal.

[0370] Therefore, distances X11 and X12 can be flexibly set. It should be understood that in method 500, distances X11 and X12 can be preset. Users can adjust distances X11 and X12. When adjusting distances X11 and X12, users can select distances X11 and X12 within the precise distance detection range of the communication device 600.

[0371] The precise distance detection range of the communication device 600 can include the distance values ​​from the relationship information corresponding to each attenuation circuit. In other words, the precise distance detection range of the communication device 600 can include the distance intervals from the relationship information corresponding to each attenuation circuit.

[0372] In some embodiments, the direct connection circuit 613 can also be used to determine distance detection. When the first terminal of the switching circuit 620 is connected to the direct connection circuit 613, the processing device 630 processes the V2X signal to determine the bit error rate (BER) of the V2X signal. Based on the BER of the V2X signal and the correspondence between the BER of the direct connection circuit 613 and the distance, the distance detection can be determined.

[0373] The terminal equipment transmits distance detection signals at positions L1, L2, L3, and L4 away from the vehicle. The vehicle sequentially uses each attenuation circuit to attenuate the received distance detection signals and determines the bit error rate of the attenuated distance detection signals, as shown in Table 3. The attenuation amounts of each attenuation circuit are B1 to Bn, increasing sequentially from B1 to Bn.

[0374] Table 3

[0375]

[0376] When the distance between the terminal device and the vehicle is L1, the bit error rate (BER) of the received distance detection signal is 0 when the vehicle uses attenuation circuits with attenuation amounts from B1 to Bn-2. When the vehicle uses an attenuation circuit with an attenuation amount of Bn, the BER of the attenuated distance detection signal is 100%. When the vehicle uses an attenuation circuit with an attenuation amount of Bn-1, the BER of the attenuated distance detection signal is N1. N1 can be within a preset range. The minimum value of the preset range is greater than 0, and the maximum value is less than 100%. The relationship between the BER and distance within the preset range using an attenuation circuit with an attenuation amount of Bn-1 can determine the distance L1 between the terminal device and the vehicle.

[0377] Bit error rates N2, N3, and N4 are all greater than 0 and less than or equal to 100%, all falling within the preset range. Distances L1 to L4 increase sequentially, as shown in Table 3. L1 to L4 can each belong to different distance detection ranges corresponding to different attenuation circuits. As the distance between the terminal device and the vehicle increases, the attenuation amount of the attenuation circuit within the preset range for the attenuated distance detection signal increases. The minimum value of the preset range can be 2%, 3%, 5%, 10%, etc. The maximum value of the preset range can be 98%, 97%, 95%, 90%, etc.

[0378] Figure 12 This is a schematic flowchart of a car door unlocking method provided in an embodiment of this application.

[0379] Compared to method 500, in door unlocking method 800, the vehicle sends an attenuation signal, and the terminal device performs distance detection based on the attenuation signal. The attenuation signal is sent by the vehicle after attenuating the V2X signal.

[0380] For S501-S504, please refer to the description of method 500.

[0381] S504 is followed by S805.

[0382] In S805a, the vehicle broadcasts distance detection signal 1 via V2X.

[0383] Unlike the distance detection signal sent by the terminal device in S505 of method 500, the distance detection signal 1 sent by the vehicle in S805 is obtained after attenuation. The distance detection signal is a V2X signal. The vehicle can utilize... Figure 12 The communication device 900 shown generates a distance detection signal 1.

[0384] The vehicle can periodically broadcast the distance detection signal 1. In other words, S805a can be performed periodically.

[0385] In S806, the terminal device performs distance detection based on distance detection signal 1.

[0386] The distance detection result is used to indicate whether the distance between the terminal device and the vehicle is less than or equal to X21.

[0387] If the distance between the terminal device and the vehicle is greater than X21, S805 and S806 can be performed again. The terminal device uses the distance detection signal 1 received again to re-determine whether the distance with the vehicle is less than or equal to X21.

[0388] If the distance between terminal devices is less than or equal to X21, proceed with S506.

[0389] In S506, the terminal device broadcasts an unlock signal via Bluetooth.

[0390] After the vehicle receives the unlock signal via Bluetooth, it proceeds to S508.

[0391] In the S508, the vehicle unlocks its doors.

[0392] After unlocking the car doors, the vehicle proceeds to S809.

[0393] In S805b, the vehicle broadcasts distance detection signal 2 via V2X.

[0394] Similar to distance detection signal 1 sent by the vehicle in S805a, distance detection signal 2 sent by the vehicle in S809 is also obtained after attenuation.

[0395] In S809, the terminal device performs distance detection based on the received distance detection signal 2.

[0396] The distance detection result can indicate whether the distance between the terminal device and the vehicle is greater than X22.

[0397] If the distance between the terminal device and the vehicle is less than or equal to X22, execute S805b and S809 again to perform distance detection based on the attenuated signal received again.

[0398] If the distance between the terminal device and the vehicle is greater than X22, proceed with S811.

[0399] In S811, the terminal device broadcasts a lock signal via Bluetooth.

[0400] After receiving the locking signal sent by the terminal equipment, the vehicle performs S511.

[0401] In S510, the vehicle locks its doors based on the received locking signal.

[0402] To achieve hysteresis control, the distance X21 must be less than X22.

[0403] Both the unlock and lock signals are transmitted via Bluetooth. Therefore, the distances X21 and X22 must be less than the Bluetooth communication signal transmission distance. In other words, when the distance between the vehicle and the terminal device is X22, the vehicle can be within the Bluetooth coverage range of the terminal device.

[0404] Figure 13 This is a schematic structural diagram of a communication device provided in an embodiment of this application.

[0405] The communication device 900 may be located in a vehicle. The communication device 900 includes an attenuation circuit 911, an attenuation circuit 912, a direct connection circuit 913, a switching circuit 920, a signal generation device 930, and a control device 940.

[0406] The signal generation device 930 is used to generate an initial detection signal.

[0407] The second terminal of the switching circuit 920 is connected to the signal generating device 930, and the first terminal of the switching circuit 920 is connected to the second terminal of the attenuation circuit 911, the second terminal of the attenuation circuit 912, or the second terminal of the direct connection circuit 913, for transmitting the initial detection signal to at least one of the attenuation circuit 911, the attenuation circuit 912, or the direct connection circuit 913.

[0408] The first terminals of attenuation circuit 911, attenuation circuit 912, and direct connection circuit 913 are all connected to the V2X transmitting antenna. Attenuation circuit 911 is used to attenuate the power of the initial detection signal by B1. Attenuation circuit 912 is used to attenuate the power of the initial detection signal by B2. Direct connection circuit 913 does not attenuate the initial detection signal.

[0409] The V2X transmitting antenna transmits the initial detection signal via attenuation circuit 911, attenuation circuit 912, or direct connection circuit 913.

[0410] The signal generation device 930 can also be referred to as a signal generation circuit. The signal generation device 930 may include a surface acoustic wave (SAW), a power amplifier (PA), a radio frequency integrated circuit (RFIC), a processor, etc.

[0411] The processor generates digital signals. The RFIC converts the digital signals to analog signals. The PA amplifies the input signals. The SAW performs filtering.

[0412] The control device 640 is used to control the first terminal of the switching circuit 620 to control the port connected to the first terminal.

[0413] When the first terminal of the switching circuit 920 is connected to the second terminal of the direct connection circuit 913, the V2X signal generated by the signal generation device 930 is transmitted directly to the V2X transmitting antenna without attenuation.

[0414] When transmitting communication signals, the first terminal of the switching circuit 920 is connected to the second terminal of the direct-connection circuit 913, such as... Figure 14 As shown. The first terminal of the switching circuit 920 can be connected by default to the second terminal of the direct-connect circuit 913.

[0415] When device 900 communicates with other devices via V2X, signal generation device 930 generates a communication signal, which is transmitted to the V2X transmitting antenna via direct connection circuit 913. The transmitting antenna then transmits the communication signal.

[0416] To perform S805a and S805b, the control device 640 controls the first terminal of the switch circuit 620 to connect to the attenuation circuit 611 or the attenuation circuit 612. The signal generation device 930 generates an initial detection signal.

[0417] When the first terminal of the control switch circuit 920 is connected to the second terminal of the attenuation circuit 911, the initial detection signal generated by the signal generation device 930 is attenuated by D1 and then transmitted to the V2X transmitting antenna for transmission.

[0418] The first terminal of the control switch circuit 920 of the control device 940 is connected to the second terminal of the attenuation circuit 912. After the initial detection signal generated by the signal generation device 930 is attenuated by D2, it is transmitted to the V2X transmitting antenna and transmitted through the V2X transmitting antenna.

[0419] The terminal device receives and processes the initial detection signal and calculates the bit error rate to determine the distance between the terminal device and the vehicle.

[0420] When the first terminal of the switching circuit 920 is connected to the second terminal of either the attenuation circuit 911 or the attenuation circuit 912, the signal strength PR2 of the V2X signal received by the terminal device can be expressed as:

[0421] PR2 = A2 - Dn - C2

[0422] Where A2 is the signal strength of the V2X signal generated by the signal generation device 930, Dn is the attenuation magnitude of the attenuation circuit (Dn can be D1 or D2), and C2 is the sum of path loss and signal spatial loss. Ideally, the path loss is 0.

[0423] For each attenuation circuit, the loss C2 is positively correlated with the signal transmission distance in space.

[0424] When the vehicle's communication device 600 attenuates the V2X signal using each attenuation circuit, the terminal device receives the attenuated V2X signal at various distances. The bit error rate (BER) of the attenuated V2X signal received by the terminal device is recorded for each attenuation circuit used by the communication device 600, thereby establishing a correlation between the BER and distance within a preset range for each attenuation circuit. Different attenuation circuits correspond to different distance detection ranges.

[0425] Therefore, based on the correspondence between the bit error rate and distance under the attenuation circuit, as well as the attenuation circuit used by the vehicle to attenuate the V2X signal and the bit error rate of the attenuated V2X signal received by the terminal device, the terminal device can determine the distance between the vehicle and the terminal device.

[0426] The distance detection range of the attenuation circuit 911 can include a distance X21, and the bit error rate corresponding to a distance X21 under the attenuation circuit 911 is E21. The distance detection range of the attenuation circuit 912 can include a distance X22, and the bit error rate corresponding to a distance X22 under the attenuation circuit 912 is E22.

[0427] In method 800, S805a, the first terminal of the switching circuit 920 in the communication device 900 is connected to the second terminal of the attenuation circuit 911. For example... Figure 15 As shown, the initial detection signal generated by the signal generation device 930 is attenuated by the attenuation circuit 911 to form the distance detection signal 1. The distance detection signal 1 is transmitted to the V2X transmitting antenna and then transmitted to the terminal device.

[0428] In some embodiments, when the vehicle receives a trigger signal sent by the terminal device, the control device 940 controls the first terminal of the switch circuit 920 to connect to the second terminal of the attenuation circuit 911.

[0429] For example, before proceeding with S805a, the vehicle can also receive an unlock request signal sent by the terminal device. Based on the unlock request signal, the control device 940 controls the first terminal of the switch circuit 920 to connect to the second terminal of the attenuation circuit 911.

[0430] Alternatively, the trigger signal may be a signal sent by the terminal device during the process of establishing a Bluetooth connection between the terminal device and the device 600.

[0431] Figure 17 This is a schematic flowchart of a distance detection method provided in an embodiment of this application.

[0432] The bit error rate corresponding to distance X21 under attenuation circuit 911 is E21.

[0433] Step S806 includes S8061 and S8062.

[0434] In S8061, the terminal device verifies the distance detection signal 1 to determine the bit error rate of the distance detection signal 1.

[0435] In S8062, the terminal device determines the distance range between the terminal device and the vehicle based on the relationship between the bit error rate of the distance detection signal 1 and the magnitude of E21.

[0436] In other words, in S8062, the terminal device determines whether the distance between the terminal device and the vehicle is less than or equal to X21.

[0437] When the bit error rate of distance detection signal 1 is less than or equal to E21, the distance between the terminal device and the vehicle is determined to be less than or equal to X21; when the bit error rate of distance detection signal 1 is greater than E21, the distance between the terminal device and the vehicle is determined to be greater than X21.

[0438] In method 800, S805b, the first terminal of the switching circuit 920 in the communication device 900 is connected to the second terminal of the attenuation circuit 912. For example... Figure 16 As shown, the initial detection signal generated by the signal generation device 930 is attenuated by the attenuation circuit 912 to form the distance detection signal 2. The distance detection signal 2 is transmitted to the V2X transmitting antenna and then transmitted to the terminal device.

[0439] The vehicle doors can be locked when starting or when the speed increases to a first preset speed. The doors can be locked again after a certain period of time after being unlocked. Distance detection is no longer required when the doors are locked.

[0440] When the car door is unlocked, the control device 940 can connect the first terminal of the switching circuit 920 to the second terminal of the attenuation circuit 912. The control device 940 can then obtain the status of the car door.

[0441] The bit error rate (BER) corresponding to distance X22 under attenuation circuit 912 is E22. In S809, the terminal device determines whether the distance between the terminal device and the vehicle is less than or equal to X22 based on the relationship between the BER of the distance detection signal 2 and E22. When the BER of the distance detection signal 2 is less than or equal to E22, the distance between the terminal device and the vehicle is determined to be less than or equal to X22; when the BER of the distance detection signal 2 is greater than E22, the distance between the terminal device and the vehicle is determined to be greater than X22.

[0442] After S503, the control device 940 can control the first terminal of the switching circuit 920 to connect to the second terminal of the attenuation circuit 911. After the vehicle door is unlocked in S508, the control device 940 can control the first terminal of the switching circuit 920 to connect to the second terminal of the attenuation circuit 912.

[0443] A V2X antenna in a terminal device can include a main antenna and a diversity antenna. The main antenna is used for both receiving and transmitting V2X signals, while the diversity antenna is used for receiving V2X signals. Generally, the diversity antenna is idle during the time the main antenna is transmitting V2X signals. Typically, the diversity antenna is disabled when the main antenna is transmitting V2X signals. Examples of V2X antenna resource allocation in a terminal device are shown in Table 4.

[0444] Table 4

[0445]

[0446] Different subframes represent different time-domain resources, and different subbands represent different frequency-domain resources. RX indicates that the antenna is used to receive signals, and TX indicates that the antenna is used to transmit signals.

[0447] For example, subframe 2 is a transmit subframe. Subframes 0 to 1 and subframes 3 to 9 are all receive subframes. Table 1 is merely an example of V2X antenna resource allocation for terminal devices. The specific number and location of subframes used for transmitting signals can be allocated according to the application environment.

[0448] When the V2X antenna in the vehicle is used to transmit distance detection signals, and the terminal performs distance detection based on the received distance detection signals, the V2X antenna in the terminal can adopt the resource allocation method shown in Table 5.

[0449] Table 5

[0450]

[0451]

[0452] Diversity can be used as a V2X receiving antenna in distance detection scenarios. That is, diversity can receive the distance detection signal transmitted by the vehicle. In subframes where the main set transmits signals, diversity is used to receive the distance detection signal, thus avoiding interference with the transmission of other V2X signals.

[0453] In subframe 2, the control device 940 can control the first terminal of the switching circuit 920 to connect to the second terminal of the attenuation circuit 911 or the second terminal of the attenuation circuit 912. In subframes 0, 1, 3 to 9, the control device 940 can control the first terminal of the switching circuit 920 to connect to the second terminal of the direct connection circuit 913.

[0454] The communication device 900 may also include more attenuation circuits. The control device 940 can control the switching circuit 920 to connect to each attenuation circuit in a preset order, so that the distance detection signal generated by the signal generating device 930 passes through the attenuation circuit to form a distance detection signal. The distance detection signal is transmitted to the V2X transmitting antenna, and the V2X transmitting antenna transmits the distance detection signal.

[0455] The terminal device calculates the bit error rate (BER) of the received distance detection signal. Based on the correlation between the BER and distance for each attenuation circuit, and the BER of the distance detection signal under each attenuation circuit, the distance between the terminal device and the vehicle is determined. The attenuation amounts of each attenuation circuit for the distance detection signal are D1 to Dn, increasing sequentially. The terminal device receives the distance detection signal at distances L1, L2, L3, and L4 from the vehicle, respectively. The BER of the distance detection signal obtained by the vehicle using each attenuation circuit, calculated by the terminal device, is shown in Table 6.

[0456] Table 6

[0457]

[0458] When the distance between the terminal device and the vehicle is L1, the bit error rate (BER) of the distance detection signals corresponding to attenuation circuits with attenuation amounts from D1 to Dn-2 is 0; the BER of the distance detection signal corresponding to the attenuation circuit with attenuation amount Dn-1 is N1; and the BER of the distance detection signal corresponding to the attenuation circuit with attenuation amount Dn is 100%. N1 is greater than 0 and less than or equal to 100%. N1 can be within a preset range. The minimum value of the preset range is greater than 0, and the maximum value of the preset range is less than 100%. Therefore, the terminal device can determine the distance L1 between the terminal device and the vehicle by using the correspondence between the BER and distance within the preset range under the attenuation circuit with attenuation amount Dn-1.

[0459] Bit error rates N2, N3, and N4 are all within preset ranges. Distances L1 to L4 increase sequentially, as shown in Table 6. L1 to L4 can each belong to different distance detection ranges corresponding to different attenuation circuits. As the distance between the terminal device and the vehicle increases, the attenuation amount of the attenuation circuit within the preset range for the distance detection signal's bit error rate increases.

[0460] Figure 18 This is a schematic structural diagram of an attenuation circuit provided in an embodiment of this application.

[0461] The attenuation circuit 611 can be a π-type attenuator. The attenuation circuit 611 includes resistors R1, R2, and R3. The node where the first end of resistor R1 is connected to the first end of resistor R3 is one port of the attenuation circuit 1000, and the node where the second end of resistor R2 is connected to the second end of resistor R3 is the other port of the attenuation circuit 611. The second ends of resistor R1 and resistor R2 are grounded.

[0462] The attenuation amount n (unit: dB) is achieved using the attenuation circuit 611. Resistors R1, R2, and R3 (unit: ohms (Ω)) are set according to the following formula:

[0463]

[0464] Where A = 10 -n / 20 Z is the characteristic impedance. For example, when Z = 50Ω, in order to achieve an attenuation of n = 10dB, the resistors can be set as follows: R1 = 96Ω, R2 = 96Ω, and R3 = 71Ω.

[0465] Attenuation circuits 612, 911, and 912 can have the same or different circuit structures as attenuation circuit 611. For example, attenuation circuit 612 can have the same circuit structure as attenuation circuit 611, that is, the connection method of resistors R1, R2, and R3 in attenuation circuit 612 is the same as that in attenuation circuit 611, only the resistance values ​​of R1, R2, and R3 are different from those in attenuation circuit 611.

[0466] Figure 19 This is a schematic structural diagram of an electronic device provided in an embodiment of this application.

[0467] The electronic device 4000 includes a memory 4001, a processor 4002, a communication interface 4003, and a bus 4004. The memory 4001, processor 4002, and communication interface 4003 are interconnected via the bus 4004.

[0468] The memory 4001 can be a ROM, a static storage device, or RAM. The memory 4001 can store programs. When the program stored in the memory 4001 is executed by the processor 4002, the processor 4002 and the communication interface 4003 are used to execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0469] The processor 4002 may be a general-purpose CPU, microprocessor, ASIC, GPU, or one or more integrated circuits, used to execute relevant programs to achieve the functions required by the units in the data processing apparatus of this application embodiment, or to execute the methods, steps, and logic block diagrams disclosed in this application embodiment.

[0470] The processor 4002 can also be an integrated circuit chip with signal processing capabilities; for example, it can be a chip. In implementation, each step of the data processing method in this embodiment can be completed by the integrated logic circuitry in the processor 4002 or by software instructions.

[0471] The processor 4002 described above can also be a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 4001. The processor 4002 reads the information in memory 4001 and, in conjunction with its hardware, completes the functions required by the units included in the data processing apparatus of the embodiments of this application, or executes the data processing method of the method embodiments of this application.

[0472] The communication interface 4003 uses a transceiver device, such as, but not limited to, a transceiver, to enable communication between the device 4000 and other devices or communication networks. For example, an image to be processed can be acquired through the communication interface 4003.

[0473] Bus 4004 may include a pathway for transmitting information between various components of device 4000 (e.g., memory 4001, processor 4002, communication interface 4003).

[0474] It should be noted that although the above-described device 4000 only shows a memory, processor, and communication interface, those skilled in the art should understand that in specific implementations, device 4000 may also include other devices necessary for normal operation. Furthermore, depending on specific needs, those skilled in the art should understand that device 4000 may also include hardware devices for implementing other additional functions. Moreover, those skilled in the art should understand that device 4000 may only include the devices necessary for implementing the embodiments of this application, and may not necessarily include... Figure 19 All the devices shown.

[0475] In some embodiments, the device 4000 may implement the functions of the processing circuit 320 or the processing device 630.

[0476] The communication device further includes a device 4000, a switching circuit, and a first attenuation circuit. The first end of the switching circuit is connected to the processing circuit. When the second end of the switching circuit is connected to the antenna, the processor 4002 is used to process the communication signal received by the antenna. The first attenuation circuit is used to reduce the power of the distance detection signal received by the antenna to obtain a first attenuated signal. The distance detection signal is sent by the terminal device.

[0477] The processor 4002 is configured to process the first attenuation signal to obtain a first bit error rate of the first attenuation signal when the second terminal of the switching circuit is connected to the first attenuation circuit.

[0478] The processor 4002 is further configured to determine a first distance range from the terminal device based on the first bit error rate.

[0479] Optionally, the device 4000 is used to send a first indication message when the maximum value of the first distance range is less than a first preset distance.

[0480] Optionally, the communication device further includes a second attenuation circuit, which is used to reduce the power of the distance detection signal to obtain a second attenuated signal. The first attenuation amount of the power of the distance detection signal by the second attenuation circuit is different from the first attenuation amount of the power of the distance detection signal by the first attenuation circuit.

[0481] Optionally, the processor 4002 is further configured to process the second attenuation signal to obtain a second bit error rate of the second attenuation signal when the second terminal of the switching circuit is connected to the second attenuation circuit.

[0482] The processor 4002 is further configured to determine a second distance range from the terminal device based on the second bit error rate.

[0483] Optionally, the second attenuation is less than the first attenuation.

[0484] The processor 4002 is also configured to send a second indication message when the minimum value of the second distance range is greater than or equal to a second preset distance.

[0485] Optionally, the processor 4002 is further configured to, when the first bit error rate is within a preset range, determine the first distance range based on the first bit error rate and the first relationship information corresponding to the first attenuation circuit, wherein the first relationship information is used to represent the correspondence between the bit error rate and the distance, and the maximum value of the preset range is less than 1 and the minimum value is greater than 0.

[0486] Optionally, the antenna is a vehicle wireless communication (V2X) antenna.

[0487] Optionally, the antenna is a diversity of a V2X antenna, and the V2X antenna also includes a main set. The distance detection signal is received by the diversity set during a preset time period, which is the time period during which the main set transmits signals.

[0488] Optionally, the communication device further includes a control circuit for controlling the antenna or one of attenuation circuits connected to the second terminal of the switching circuit, wherein the at least one attenuation circuit includes the first attenuation circuit.

[0489] In other embodiments, the processing device 4000 may implement the functions of the terminal device in method 800.

[0490] The communication interface 4003 is used to receive a first distance detection signal transmitted by the communication device through an antenna. The communication device includes a signal generation circuit, a switching circuit, and a first attenuation circuit. A first terminal of the switching circuit is connected to the signal generation circuit. The first distance detection signal is obtained by the first attenuation circuit reducing the power of an initial detection signal when the second terminal of the switching circuit is connected to the first attenuation circuit. The initial detection signal is generated by the signal generation circuit. The signal generation circuit is also used to generate a communication signal. When the second terminal of the switching circuit is connected to the antenna, the communication signal is transmitted through the antenna.

[0491] The processor 4002 is configured to determine a first distance range with respect to the first communication device based on a first bit error rate of the first distance detection signal.

[0492] Optionally, the processor 4002 is further configured to send a first indication message when the maximum value of the first distance range is less than a first preset distance.

[0493] Optionally, the communication interface 4003 is further configured to receive a second distance detection signal transmitted by the communication device through the antenna. The communication device further includes a second attenuation circuit. The second distance detection signal is obtained by the second attenuation circuit reducing the power of the initial detection signal when the second terminal of the switching circuit is connected to the second attenuation circuit. The second attenuation amount of the power of the initial detection signal by the second attenuation circuit is different from the first attenuation amount of the power of the initial detection signal by the first attenuation circuit.

[0494] The processor 4002 is further configured to determine a second distance range from the first communication device based on the second bit error rate of the second distance detection signal.

[0495] Optionally, the processor 4002 is further configured to send a second indication message when the minimum value of the second distance range is greater than or equal to a second preset distance.

[0496] Optionally, the first bit error rate is within a preset range, wherein the maximum value of the preset range is less than 1 and the minimum value is greater than 0.

[0497] The processor 4002 is further configured to determine the first distance range based on the first bit error rate and the first relationship information corresponding to the first attenuation circuit, wherein the first relationship information is used to represent the correspondence between the bit error rate and the distance.

[0498] Optionally, the second bit error rate is within a preset range, wherein the maximum value of the preset range is less than 1 and the minimum value is greater than 0.

[0499] The processor 4002 is further configured to determine the second distance range based on the second bit error rate and the second relationship information corresponding to the second attenuation circuit, wherein the second relationship information is used to represent the correspondence between the bit error rate and the distance.

[0500] Optionally, the first distance detection signal is received using a vehicle wireless communication V2X antenna.

[0501] Optionally, the first distance detection signal is received using diversity reception in the V2X antenna, which also includes a main set. The first distance detection signal is received by the diversity reception during a preset time period, which is the time period during which the main set transmits signals.

[0502] Optionally, the communication device further includes a control circuit for controlling the first terminal of the switching circuit to connect to the signal generation circuit or one of the attenuation circuits in at least one attenuation circuit, wherein the at least one attenuation circuit includes the first attenuation circuit.

[0503] This application also provides a mobile device, including an antenna and the communication device 300 or communication device 400 described above.

[0504] The mobile device can be a vehicle.

[0505] Optionally, the mobile device further includes a door and an electronic control unit (ECU). The communication device further includes a processing circuit for sending a first instruction to the ECU when the maximum value of the first distance range is less than a first preset distance, and the ECU is used to unlock the door according to the first instruction.

[0506] Optionally, the processing circuit is further configured to send a second instruction to the ECU when the minimum value of the second distance range is greater than or equal to a second preset distance, and the ECU is configured to lock the vehicle door according to the second instruction.

[0507] This application also provides a communication method applied to a processing circuit in a communication device. The communication device further includes a switching circuit and a first attenuation circuit. A first terminal of the switching circuit is connected to the processing circuit. When the second terminal of the switching circuit is connected to the antenna, the processing circuit is used to process the communication signal received by the antenna. The first attenuation circuit is used to reduce the power of the distance detection signal received by the antenna to obtain a first attenuated signal. The distance detection signal is sent by a terminal device.

[0508] The method includes: when the first attenuation circuit is connected to the second terminal of the switching circuit, processing the first attenuation signal to obtain a first bit error rate of the first attenuation signal; and determining a first distance range from the terminal device based on the first bit error rate.

[0509] Optionally, the second terminal of the switching circuit is connected to the antenna by default, and the method further includes: processing a trigger signal received by the antenna, wherein the trigger signal is sent by the terminal device; and controlling the second terminal of the switching circuit to connect to the first attenuation circuit according to the trigger signal.

[0510] Optionally, the method further includes: sending a first indication message when the maximum value of the first distance range is less than a first preset distance.

[0511] Optionally, the communication device further includes a second attenuation circuit, which reduces the power of the distance detection signal to obtain a second attenuated signal. The first attenuation amount of the distance detection signal by the second attenuation circuit is different from the first attenuation amount of the distance detection signal by the first attenuation circuit.

[0512] The method further includes: when the second attenuation circuit is connected to the second terminal of the switching circuit, processing the second attenuation signal to obtain a second bit error rate of the second attenuation signal; and determining a second distance range from the terminal device based on the second bit error rate.

[0513] Optionally, the second attenuation is less than the first attenuation.

[0514] The method further includes sending a second indication message when the minimum value of the second distance range is greater than or equal to a second preset distance.

[0515] Optionally, determining the first distance range from the terminal device based on the first bit error rate includes: when the first bit error rate is within a preset range, determining the first distance range based on the first bit error rate and the first relationship information corresponding to the first attenuation circuit, wherein the first relationship information is used to represent the correspondence between the bit error rate and the distance, and the maximum value of the preset range is less than 1 and the minimum value is greater than 0.

[0516] Optionally, the antenna is a vehicle wireless communication (V2X) antenna.

[0517] Optionally, the antenna is a diversity of a V2X antenna, and the V2X antenna also includes a main set. The distance detection signal is received by the diversity set during a preset time period, which is the time period during which the main set transmits signals.

[0518] Optionally, the communication device further includes a control circuit for controlling the antenna or one of attenuation circuits connected to the second terminal of the switching circuit, wherein the at least one attenuation circuit includes the first attenuation circuit.

[0519] This application embodiment also provides a communication method, the method comprising: receiving a first distance detection signal transmitted by a communication device through an antenna, the communication device comprising a signal generation circuit, a switching circuit, and a first attenuation circuit, a first terminal of the switching circuit being connected to the signal generation circuit, the first distance detection signal being obtained by the first attenuation circuit reducing the power of an initial detection signal when the second terminal of the switching circuit is connected to the first attenuation circuit, the initial detection signal being generated by the signal generation circuit, the signal generation circuit also being used to generate a communication signal, the communication signal being transmitted through the antenna when the second terminal of the switching circuit is connected to the antenna; and determining a first distance range from the first communication device based on a first bit error rate of the first distance detection signal.

[0520] Optionally, the method further includes: sending a first indication message when the maximum value of the first distance range is less than a first preset distance.

[0521] Optionally, the method further includes: receiving a second distance detection signal transmitted by the communication device through the antenna, wherein the communication device further includes a second attenuation circuit, the second distance detection signal being obtained by the second attenuation circuit reducing the power of an initial detection signal when the second terminal of the switching circuit is connected to the second attenuation circuit, the second attenuation amount of the power of the initial detection signal by the second attenuation circuit being different from the first attenuation amount of the power of the initial detection signal by the first attenuation circuit; and determining a second distance range from the first communication device based on a second bit error rate of the second distance detection signal.

[0522] Optionally, if the second attenuation is less than the first attenuation, the method further includes: sending a second indication message when the minimum value of the second distance range is greater than or equal to a second preset distance.

[0523] Optionally, the second bit error rate is within a preset range, wherein the maximum value of the preset range is less than 1 and the minimum value is greater than 0. Determining the second distance range with the first communication device based on the second bit error rate of the second distance detection signal includes: determining the second distance range based on the second bit error rate and the second relationship information corresponding to the second attenuation circuit, wherein the second relationship information is used to represent the correspondence between the bit error rate and the distance.

[0524] Optionally, the first distance detection signal is received using a vehicle wireless communication V2X antenna.

[0525] Optionally, the first distance detection signal is received using diversity reception in the V2X antenna, which also includes a main set. The first distance detection signal is received by the diversity reception during a preset time period, which is the time period during which the main set transmits signals.

[0526] Optionally, the communication device further includes a control circuit for controlling the first terminal of the switching circuit to connect to the signal generation circuit or one of the attenuation circuits in at least one attenuation circuit, wherein the at least one attenuation circuit includes the first attenuation circuit.

[0527] This application also provides a processing apparatus, including the functional modules of the above-described communication method.

[0528] This application also provides a computer program storage medium, characterized in that the computer program storage medium has program instructions, which, when executed, cause the method described above to be executed.

[0529] This application also provides a chip system, characterized in that the chip system includes at least one processor, and when program instructions are executed in the at least one processor, the method described above is executed.

[0530] This application also provides a communication system, including any one of communication devices 300, 400, 600, and 900, and a terminal device.

[0531] It should be understood that the processor in the embodiments of this application can be a central processing unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

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

[0533] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as 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, all or part of the processes or functions described in the embodiments of this application are generated. 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. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. 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 includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0534] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.

[0535] 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 refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0536] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply 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 this application.

[0537] Those skilled in the art will recognize that the units and algorithm steps of the various examples 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 implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0538] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0539] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

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

[0541] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0542] If the aforementioned functions are implemented as 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 this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0543] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A communication device, characterized in that, include: The first attenuation circuit, switching circuit, and processing circuit; The first attenuation circuit is used to reduce the power of the distance detection signal received by the antenna to obtain a first attenuated signal, wherein the distance detection signal is sent by the terminal device; The first terminal of the switching circuit is connected to the processing circuit. When the antenna is connected to the second terminal of the switching circuit, the processing circuit is used to process the communication signal received by the antenna; When the first attenuation circuit is connected to the second terminal of the switching circuit, the processing circuit is used to process the first attenuation signal to obtain the first bit error rate of the first attenuation signal. The processing circuit is further configured to determine a first distance range from the terminal device based on the first bit error rate.

2. The apparatus according to claim 1, characterized in that, The processing circuit is further configured to send a first indication message when the maximum value of the first distance range is less than a first preset distance.

3. The apparatus according to claim 1 or 2, characterized in that, The device also includes a second attenuation circuit. The second attenuation circuit is used to reduce the power of the distance detection signal to obtain a second attenuated signal. The second attenuation amount of the power of the distance detection signal by the second attenuation circuit is different from the first attenuation amount of the power of the distance detection signal by the first attenuation circuit. When the second terminal of the switching circuit is connected to the second attenuation circuit, the processing circuit is further configured to process the second attenuation signal to obtain the second bit error rate of the second attenuation signal. The processing circuit is further configured to determine a second distance range from the terminal device based on the second bit error rate.

4. The apparatus according to claim 3, characterized in that, The second attenuation is less than the first attenuation. The processing circuit is further configured to send a second indication message when the minimum value of the second distance range is greater than or equal to a second preset distance.

5. The apparatus according to claim 1 or 2, characterized in that, The processing circuit is further configured to, when the first bit error rate is within a preset range, determine the first distance range based on the first bit error rate and the first relationship information corresponding to the first attenuation circuit, wherein the first relationship information is used to represent the correspondence between the bit error rate and the distance, and the maximum value of the preset range is less than 1 and the minimum value is greater than 0.

6. The apparatus according to claim 1 or 2, characterized in that, The antenna is a vehicle-to-everything (V2X) wireless communication antenna.

7. The apparatus according to claim 6, characterized in that, The antenna is a diversity component of the V2X antenna, which also includes a main component. The distance detection signal is received by the diversity component within a preset time period, which is the time period during which the main component transmits signals.

8. The apparatus according to claim 1 or 2, characterized in that, The device further includes a control circuit for controlling the antenna or one of attenuation circuits connected to the second terminal of the switching circuit, wherein the at least one attenuation circuit includes the first attenuation circuit.

9. A mobile device, characterized in that, The device includes any one of claims 1-8, wherein the mobile device is a vehicle.

10. The mobile device according to claim 9, characterized in that, The mobile device also includes doors and an electronic control unit (ECU). The processing circuit is specifically used to send a first indication message to the ECU when the maximum value of the first distance range is less than a first preset distance. The electronic control unit (ECU) is used to unlock the vehicle door according to the first instruction information.

11. The mobile device according to claim 10, characterized in that, The processing circuit is specifically used to send a second indication message to the ECU when the minimum value of the second distance range is greater than or equal to a second preset distance. The ECU is also used to instruct the ECU to control the door locking according to the second instruction information.

12. A communication device, characterized in that, Includes a signal generation circuit, a switching circuit, and a first attenuation circuit. The signal generation circuit is used to generate initial detection signals and communication signals; The first terminal of the switching circuit is connected to the signal generation circuit, and the communication signal is transmitted through the antenna when the second terminal of the switching circuit is connected to the antenna. When the second terminal of the switching circuit is connected to the first attenuation circuit, the first attenuation circuit is used to reduce the power of the initial detection signal to obtain a first distance detection signal. The first distance detection signal is sent to the terminal device through the antenna. The first distance detection signal is used by the terminal device to determine the first bit error rate of the first distance detection signal and to determine the first distance range with the communication device based on the first bit error rate.

13. The apparatus according to claim 12, characterized in that, The device further includes: a processing circuit; The processing circuit is used to send first indication information based on the received first indication signal, wherein the first indication signal is sent by the terminal device when it determines that the maximum value of the first distance range is less than a first preset distance.

14. The apparatus according to claim 12 or 13, characterized in that, The device also includes a second attenuation circuit. When the second attenuation circuit is connected to the second terminal of the switching circuit, the second attenuation circuit is used to reduce the power of the initial detection signal to obtain a second distance detection signal. The second attenuation amount of the power of the initial detection signal by the second attenuation circuit is different from the first attenuation amount of the power of the initial detection signal by the first attenuation circuit. The second distance detection signal is transmitted to the terminal device through the antenna, and the second distance detection signal is used by the terminal device to determine a second distance range with the communication device.

15. The apparatus according to claim 14, characterized in that, The second attenuation is less than the first attenuation, and the device further includes: a processing circuit; The processing circuit is used to send second indication information based on the received second indication signal, wherein the second indication signal is sent by the terminal device when it determines that the minimum value of the second distance range is greater than or equal to a second preset distance.

16. The apparatus according to claim 14, characterized in that, The second distance range is determined by the terminal device based on the second bit error rate and the second relationship information corresponding to the second attenuation circuit. The second bit error rate is within a preset range, where the maximum value of the preset range is less than 1 and the minimum value is greater than 0. The second relationship information is used to represent the correspondence between the bit error rate and the distance.

17. The apparatus according to claim 12 or 13, characterized in that, The antenna is a vehicle-to-everything (V2X) wireless communication antenna.

18. The apparatus according to claim 12 or 13, characterized in that, The device further includes a control circuit for controlling the first terminal of the switching circuit to be connected to the signal generation circuit or one of the attenuation circuits in at least one attenuation circuit, wherein the at least one attenuation circuit includes the first attenuation circuit.

19. A mobile device, characterized in that, The communication device includes any one of claims 12-18, wherein the mobile device is a vehicle.

20. The mobile device according to claim 19, characterized in that, The mobile device also includes an electronic control unit (ECU) and doors. The communication device further includes a processing circuit, which is used to send first indication information to the ECU according to the received first indication signal. The first indication signal is sent when the terminal device determines that the maximum value of the first distance range with the communication device is less than a first preset distance. The ECU is used to unlock the vehicle door according to the first indication signal.

21. The mobile device according to claim 20, characterized in that, The processing circuit is further configured to send second indication information to the ECU based on the received second indication signal. The second indication information is used to instruct the ECU to control the door to lock. The second indication signal is sent by the terminal device when it determines that the minimum value of the second distance range with the communication device is greater than or equal to the second preset distance. The ECU is used to lock the vehicle door according to the second instruction information.

22. A communication method, characterized in that, A processing circuit is used in a communication device, the communication device including a switching circuit and a first attenuation circuit, wherein a first terminal of the switching circuit is connected to the processing circuit; and a second terminal of the switching circuit is connected by default to an antenna. The method includes: Receive trigger signals sent by terminal devices; According to the trigger signal, the second terminal of the switching circuit is connected to the first attenuation circuit. The first attenuation circuit is used to reduce the power of the distance detection signal received by the antenna to obtain a first attenuated signal. The distance detection signal is sent by the terminal device. The first attenuated signal is processed to obtain the first bit error rate of the first attenuated signal; Based on the first bit error rate, a first distance range from the terminal device is determined.

23. The method according to claim 22, characterized in that, The method further includes: If the maximum value of the first distance range is less than the first preset distance, send the first indication information.

24. The method according to claim 22 or 23, characterized in that, The communication device also includes a second attenuation circuit. The method further includes: If the communication device meets the preset conditions, it controls the second terminal of the switching circuit to connect to the second attenuation circuit. The second attenuation circuit is used to reduce the power of the distance detection signal to obtain a second attenuated signal. The second attenuation amount of the power of the distance detection signal by the second attenuation circuit is different from the first attenuation amount of the power of the distance detection signal by the first attenuation circuit. The second attenuated signal is processed to obtain the second bit error rate of the second attenuated signal; Based on the second bit error rate, a second distance range from the terminal device is determined.

25. The method according to claim 24, characterized in that, The second attenuation is less than the first attenuation, and the method further includes: If the minimum value of the second distance range is greater than or equal to the second preset distance, a second indication message is sent.

26. The method according to claim 22 or 23, characterized in that, Determining the first distance range from the terminal device based on the first bit error rate includes: When the first bit error rate is within a preset range, the first distance range is determined based on the first bit error rate and the first relationship information corresponding to the first attenuation circuit. The first relationship information is used to represent the correspondence between the bit error rate and the distance. The maximum value of the preset range is less than 1 and the minimum value is greater than 0.

27. The method according to claim 22 or 23, characterized in that, The antenna is a vehicle-to-everything (V2X) wireless communication antenna.

28. The method according to claim 27, characterized in that, The antenna is a diversity of V2X antenna, and the V2X antenna also includes a main set. The distance detection signal is received by the diversity set during a preset time period, which is the time period during which the main set is used to transmit signals.

29. A communication method, characterized in that, The method includes: A first distance detection signal is received by a communication device transmitted via an antenna. The communication device includes a signal generation circuit, a switching circuit, and a first attenuation circuit. A first terminal of the switching circuit is connected to the signal generation circuit. The first distance detection signal is obtained by the first attenuation circuit reducing the power of an initial detection signal when the second terminal of the switching circuit is connected to the first attenuation circuit. The initial detection signal is generated by the signal generation circuit. The signal generation circuit is also used to generate a communication signal. When the second terminal of the switching circuit is connected to the antenna, the communication signal is transmitted through the antenna. A first distance range with respect to the communication device is determined based on the first bit error rate of the first distance detection signal.

30. The method according to claim 29, characterized in that, The method further includes: If the maximum value of the first distance range is less than the first preset distance, send the first indication information.

31. The method according to claim 29 or 30, characterized in that, The method further includes: The communication device receives a second distance detection signal transmitted through the antenna. The communication device also includes a second attenuation circuit. The second distance detection signal is obtained by the second attenuation circuit reducing the power of the initial detection signal when the second terminal of the switching circuit is connected to the second attenuation circuit. The second attenuation amount of the power of the initial detection signal by the second attenuation circuit is different from the first attenuation amount of the power of the initial detection signal by the first attenuation circuit. The second distance range with respect to the communication device is determined based on the second bit error rate of the second distance detection signal.

32. The method according to claim 31, characterized in that, The second attenuation is less than the first attenuation, and the method further includes: If the minimum value of the second distance range is greater than or equal to the second preset distance, a second indication message is sent.

33. The method according to claim 31, characterized in that, The second bit error rate is within a preset range, wherein the maximum value of the preset range is less than 1 and the minimum value is greater than 0. Determining the second distance range from the communication device based on the second bit error rate of the second distance detection signal includes: The second distance range is determined based on the second bit error rate and the second relationship information corresponding to the second attenuation circuit. The second relationship information is used to represent the correspondence between the bit error rate and the distance.

34. The method according to claim 29 or 30, characterized in that, The first distance detection signal is received using the vehicle's wireless communication V2X antenna.

35. The method according to claim 34, characterized in that, The first distance detection signal is received using diversity reception in the V2X antenna, which also includes a main set. The first distance detection signal is received by the diversity reception during a preset time period, which is the time period during which the main set transmits signals.

36. The method according to claim 29 or 30, characterized in that, The communication device further includes a control circuit, which controls the first terminal of the switching circuit to be connected to the signal generation circuit or one of the attenuation circuits in at least one attenuation circuit, wherein the at least one attenuation circuit includes the first attenuation circuit.

37. An electronic device, characterized in that, The electronic device includes a communication interface and a processor. The communication interface is used for the electronic device to interact with other devices, and the processor is used to execute program instructions to implement the method as described in any one of claims 22-36.

38. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code for execution by the device, the program code including methods for performing any one of claims 22-36.

39. A chip, characterized in that, The chip includes a processor and a data interface. The processor reads instructions stored in the memory through the data interface to execute the method as described in any one of claims 22-36.

Citation Information

Patent Citations

  • Radio equipment with gain changeover antenna

    JP1998079683A

  • Communication system and program therefor

    JP2008133643A

  • Vehicle locating system utilizing global positioning

    US6298306B1