Distance measurement method, device, equipment, medium and product

By encoding Bluetooth connection requests, establishing a long-distance Bluetooth connection, and combining time-of-flight and phase difference distance measurement technology, the limitations of close-range measurement in the existing technology are solved, and the precise distance measurement of long-distance equipment is achieved, satisfying the satisfaction of The ranging requirements for special scenarios are reduced and cost and power consumption are reduced.

CN119211833APending Publication Date: 2024-12-27VIVO MOBILE COMM CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411296472.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing technology can only realize distance measurement between close-range Bluetooth devices, which is difficult to meet users' long-range distance measurement needs, especially in special scenarios such as rescue.

Method used

By encoded data using target encoding in Bluetooth connection requests, it can transmit longer distances, thereby establishing Bluetooth connections between long-distance devices, and combining time-of-flight and phase difference distance measurement technology to realize long-distance devices distance measurement.

Benefits of technology

The distance measurement between Bluetooth devices with a distance of more than 1 km is realized, which meets the long-distance ranging needs, reduces costs, and dynamically adjusts the physical layer during the communication process to ensure the communication code rate and save power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211833A_ABST
    Figure CN119211833A_ABST
Patent Text Reader

Abstract

The invention discloses a distance measurement method and device, equipment, a medium and a product, and belongs to the technical field of communication. The distance measurement method is applied to first electronic equipment, and comprises the following steps: sending a Bluetooth connection request to second electronic equipment under the condition of receiving a Bluetooth low-power-consumption data packet broadcasted by the second electronic equipment; wherein the Bluetooth connection request is obtained by encoding according to a target encoding mode; under the condition that the first electronic equipment establishes Bluetooth connection with second electronic equipment, sending a first signal to the second electronic equipment through a coding physical layer to which the target coding mode belongs; according to the flight time of the first signal between the first electronic equipment and the second electronic equipment and the phase difference between the first signal and the second signal, the distance between the first electronic equipment and the second electronic equipment is determined, and the second signal is a signal sent to the first electronic equipment by the second electronic equipment in response to the first signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and specifically relates to a ranging method, device, equipment, medium and product. Background Art

[0002] In some special scenarios, such as rescue scenarios, it is usually necessary to know the distance between the rescuer and the rescued in order to better implement the rescue strategy. For example, in these special scenarios, Bluetooth technology can be used to determine the distance between different devices.

[0003] However, the existing ranging solutions can only achieve short-range ranging, that is, they can only measure the distance between Bluetooth devices that are relatively close. This has certain limitations and is difficult to meet users' long-range ranging needs. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a distance measurement method, device, equipment, medium and product, which can solve the technical problem that the related technology can only achieve short-range distance measurement and is difficult to meet the user's long-range distance measurement needs.

[0005] In a first aspect, an embodiment of the present application provides a ranging method, which is applied to a first electronic device, and the method includes:

[0006] Upon receiving a Bluetooth low energy data packet broadcasted by the second electronic device, sending a Bluetooth connection request to the second electronic device; wherein the Bluetooth connection request is encoded according to a target encoding method, and the target encoding method is any one of at least two encoding methods included in the encoding physical layer of the first electronic device;

[0007] When the first electronic device establishes a Bluetooth connection with the second electronic device, sending a first signal to the second electronic device through a coding physical layer to which the target coding method belongs;

[0008] The distance between the first electronic device and the second electronic device is determined based on the flight time of the first signal between the first electronic device and the second electronic device and the phase difference between the first signal and the second signal. The second signal is a signal sent by the second electronic device to the first electronic device in response to the first signal.

[0009] In a second aspect, an embodiment of the present application provides a distance measuring device, which is applied to a first electronic device, and the device includes:

[0010] A sending module, configured to send a Bluetooth connection request to the second electronic device when receiving a Bluetooth low energy data packet broadcast by the second electronic device; wherein the Bluetooth connection request is encoded according to a target encoding method, and the target encoding method is any one of at least two encoding methods included in the encoding physical layer of the first electronic device; when the first electronic device establishes a Bluetooth connection with the second electronic device, a first signal is sent to the second electronic device through the encoding physical layer to which the target encoding method belongs;

[0011] The determination module is used to determine the distance between the first electronic device and the second electronic device based on the flight time of the first signal between the first electronic device and the second electronic device, and the phase difference between the first signal and the second signal, wherein the second signal is a signal sent by the second electronic device to the first electronic device in response to the first signal.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0013] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0014] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the steps of the method described in the first aspect.

[0015] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the method described in the first aspect.

[0016] In an embodiment of the present application, when a Bluetooth low energy data packet broadcasted by a second electronic device is received, a Bluetooth connection request is sent to the second electronic device, wherein the Bluetooth connection request is obtained by encoding in accordance with a target encoding method, and the target encoding method is any one of at least two encoding methods included in the encoding physical layer of the first electronic device; when the first electronic device establishes a Bluetooth connection with the second electronic device, a first signal is sent to the second electronic device through the encoding physical layer to which the target encoding method belongs; according to the flight time of the first signal between the first electronic device and the second electronic device, and the phase difference between the first signal and the second signal, the distance between the first electronic device and the second electronic device is determined, and the second signal is a signal sent by the second electronic device to the first electronic device in response to the first signal. Before sending a Bluetooth connection request to the second electronic device, the first electronic device of the embodiment of the present application first encodes the Bluetooth connection request in accordance with the encoding method included in the encoding physical layer of the first electronic device, so that the encoded Bluetooth connection request can be transmitted over a longer distance, thereby establishing a Bluetooth connection between long-distance devices, and on this basis, the distance measurement between long-distance devices is realized in combination with the distance measurement technology, meeting the user's long-distance ranging needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic diagram of a scene of a distance measurement method provided in an embodiment of the present application;

[0018] Figure 2 A flow chart of a distance measurement method provided in an embodiment of the present application;

[0019] Figure 3 A schematic diagram of a signal transmitted between a first electronic device and a second electronic device provided in an embodiment of the present application;

[0020] Figure 4 A flowchart of another distance measurement method provided in an embodiment of the present application;

[0021] Figure 5 A schematic diagram of a process of establishing a connection between a first electronic device and a second electronic device provided in an embodiment of the present application;

[0022] Figure 6 A schematic diagram of a communication process after a first electronic device and a second electronic device establish a connection provided in an embodiment of the present application;

[0023] Figure 7 A schematic diagram of the structure of a distance measuring device provided in an embodiment of the present application;

[0024] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0025] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0027] The terms "first", "second", etc. in the specification of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are usually a class, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0028] As mentioned above, in some special scenarios such as rescue scenarios, in order to better implement rescue strategies, it is necessary for rescuers to know the distance to the rescued person. In these special scenarios, there may be network signal interruption or no network signal. Therefore, the technology of using Bluetooth technology to determine the distance between different devices has been widely used.

[0029] However, the existing ranging solutions can only achieve short-range ranging, that is, they can only measure the distance between Bluetooth devices that are relatively close. This has certain limitations and is difficult to meet users' long-range ranging needs.

[0030] To this end, the embodiments of the present application provide a ranging method, device, equipment, medium and product, which can solve the technical problem that the related technology can only achieve short-range ranging and is difficult to meet the user's long-range ranging needs.

[0031] The distance measurement method, device, equipment, medium and product provided in the embodiments of the present application are described in detail below through specific embodiments and their application scenarios.

[0032] The distance measurement method provided in the embodiment of the present application can be applied to scenarios where the distance between different Bluetooth devices needs to be measured, for example, the distance between two Bluetooth devices with a distance of more than 1 km can be measured. One specific application scenario is a rescue scenario, and another specific application scenario is a beacon tower scenario. In actual application, more scenarios can also be included.

[0033] Figure 1 A schematic diagram of a scene of a distance measurement method provided in an embodiment of the present application, the scene may include an electronic device 100 and an electronic device 101, wherein the electronic device 100 and the electronic device 101 may each include multiple, Figure 1 Take an electronic device 100 and an electronic device 101 as an example.

[0034] The electronic device 100 and the electronic device 101 may be devices with Bluetooth function, such as mobile phones, wearable devices, and vehicle-mounted terminals.

[0035] Figure 2 A flow chart of a distance measurement method provided in an embodiment of the present application, which can be applied to Figure 1 The electronic device 100 or the electronic device 101 is shown.

[0036] like Figure 2 As shown, the ranging method may include the following steps:

[0037] S210: When receiving a Bluetooth low energy data packet broadcasted by a second electronic device, send a Bluetooth connection request to the second electronic device.

[0038] The Bluetooth connection request is encoded according to a target encoding method, and the target encoding method is any one of at least two encoding methods included in the encoding physical layer of the first electronic device.

[0039] S220: When a Bluetooth connection is established between the first electronic device and the second electronic device, a first signal is sent to the second electronic device through a coding physical layer to which the target coding method belongs.

[0040] S230: Determine the distance between the first electronic device and the second electronic device according to the flight time of the first signal between the first electronic device and the second electronic device and the phase difference between the first signal and the second signal.

[0041] The second signal is a signal sent by the second electronic device to the first electronic device in response to the first signal.

[0042] In an embodiment of the present application, before the first electronic device sends a Bluetooth connection request to the second electronic device, the Bluetooth connection request is first encoded according to the encoding method included in the encoding physical layer of the first electronic device, so that the encoded Bluetooth connection request can be transmitted over a longer distance, thereby establishing a Bluetooth connection between long-distance devices. On this basis, the distance measurement technology is combined to realize the distance measurement between long-distance devices, thereby meeting the user's long-distance ranging needs.

[0043] The above steps are described in detail below:

[0044] In S210, the first electronic device is Figure 1 Taking the electronic device 100 as an example, the second electronic device may be Figure 1 The electronic device 101 shown. A Bluetooth Low Energy (BLE) data packet, also known as a BLE packet, is a data packet broadcast by the second electronic device after Bluetooth is turned on, and is used to establish a Bluetooth connection with other Bluetooth devices. Exemplarily, the second electronic device can periodically broadcast the BLE packet, and the embodiment of the present application does not limit the size of the period.

[0045] After the Bluetooth of the first electronic device is turned on, the BLE packet can be scanned, and after scanning the BLE packet broadcasted by the second electronic device, a Bluetooth connection can be established with the second electronic device.

[0046] The Bluetooth connection request is used to request to establish a Bluetooth connection with the second electronic device. The coded physical layer (coded phy) is a physical layer in the first electronic device that has data encoding and decoding functions. For example, through coding technology, such as forward error correction coding (Forward Error Correction, FEC), data transmission errors can be reduced, especially in an environment with poor signal quality, which can improve the stability and reliability of the Bluetooth connection.

[0047] Coded phy currently includes two encoding methods. With the development of technology, it may include more encoding methods in the future. The number of symbols contained in the data bits of each encoding method is different, and the communication distance corresponding to each encoding method is positively correlated with the number of symbols contained in the data bits of each encoding method. For example, the more symbols contained in the data bits, the longer the data transmission distance, that is, the longer the communication distance.

[0048] Take coded phy as an example, which includes two encoding modes, coded S=8 and coded S=2, where coded S=8 means that each data bit includes eight symbols, and coded S=2 means that each data bit includes two symbols. Each data bit includes N symbols, which means that the data bit is represented by N symbols, and N is an integer greater than or equal to 1.

[0049] The target coding mode may be any one of at least two coding modes included in coded phy, for example, the target coding mode may be coded S = 8 or coded S = 2. Of course, when coded phy includes other coding modes in the future, the target coding mode may also be other coding modes included in coded phy.

[0050] In some embodiments, the target encoding mode may be an encoding mode in which the number of symbols contained in the data bits is the largest. For example, for coded S=8 and coded S=2, the target encoding mode may be coded S=8.

[0051] When encoding a Bluetooth connection request, the embodiment of the present application encodes each data bit into the maximum number of symbols, so that the Bluetooth connection request can be transmitted over a longer distance, thereby establishing a Bluetooth connection between devices at a longer distance and achieving the purpose of long-distance measurement.

[0052] In the embodiment of the present application, when the distance between the first electronic device and the second electronic device is relatively far, in order to establish a long-distance Bluetooth connection, the Bluetooth connection request can be encoded to extend the transmission distance of the Bluetooth connection request. For example, the Bluetooth connection request can be encoded according to the target encoding method, and each data bit of the Bluetooth connection request is represented as at least two symbols.

[0053] In S220, the embodiment of the present application does not specifically limit the Bluetooth connection process between the first electronic device and the second electronic device. For example, after the second electronic device receives the Bluetooth connection request sent by the first electronic device, it can return a confirmation message to the first electronic device. After the first electronic device receives the confirmation message, it considers that the first electronic device and the second electronic device have successfully established a Bluetooth connection.

[0054] Different coding methods may belong to different physical layers, for example, coded S=2 and coded S=8 may belong to different coding physical layers. After the first electronic device and the second electronic device establish a Bluetooth connection, the first electronic device and the second electronic device may communicate via Bluetooth. For example, the first electronic device may send a first signal to the second electronic device via the coding physical layer to which the target coding method belongs.

[0055] Taking the target coding mode as coded S=8 as an example, the first electronic device can send the first signal to the second electronic device through the coding physical layer to which coded S=8 belongs.

[0056] The first signal here may be a signal used to measure the distance between the first electronic device and the second electronic device. There may be one or more first signals, and when there are multiple first signals, different first signals may correspond to different frequencies.

[0057] In S230, the flight time (ToF) of the first signal between the first electronic device and the second electronic device is the transmission time of the first signal from the first electronic device to the second electronic device, or the transmission time from the second electronic device to the first electronic device, that is, the time required for the first signal to be transmitted from the first electronic device to the second electronic device and then returned to the first electronic device, that is, the round-trip time (RTT) in the communication channel. Among them, the transmission time of the first signal from the first electronic device to the second electronic device is the same as the transmission time of the first signal from the second electronic device to the first electronic device.

[0058] For example, Figure 3 As shown, during the transmission of the first signal, the first electronic device and the second electronic device can both record the arrival time (Time of Arrival, ToA) and departure time (Time of Departure, ToD) of the first signal. According to ToA and ToD, as well as the speed of light, the distance between the first electronic device and the second electronic device can be determined.

[0059] For example, RTT=2ToF=(ToA I -ToD I )-(ToD R –ToA R ), where ToD I ToA is the time when the first signal leaves the first electronic device. I The time when the confirmation signal arrives at the first electronic device is the time when the second electronic device receives the first signal. R ToD is the time when the second electronic device receives the first signal R The time when the confirmation signal leaves the second electronic device.

[0060] The phase difference between the first signal and the second signal is the difference between the phase of the first signal and the phase of the second signal. In signal-based phase ranging, in order to accurately measure the distance between the first electronic device and the second electronic device, the first signal may include multiple signals with different frequencies.

[0061] The embodiment of the present application can mix the phase-based ranging (PBR) technology and the RTT technology, that is, the distance between the first electronic device and the second electronic device can be determined according to the phase difference and the flight time of the first signal, and then multiple distances can be processed to obtain the final distance, so as to improve the accuracy of the measurement result. For example, multiple distances can be averaged or weighted to obtain the final distance.

[0062] The embodiment of the present application encodes the Bluetooth connection request so that the Bluetooth connection request can be transmitted over a longer distance, thereby establishing a Bluetooth connection between long-distance Bluetooth devices, and then combining PBR technology and RTT technology to measure the distance between two Bluetooth devices, thereby realizing long-distance Bluetooth ranging.

[0063] Figure 4 A flowchart of another ranging method provided in an embodiment of the present application, Figure 4 and Figure 2 The difference is that Figure 4 exist Figure 2 On the basis of this, it also includes S410-S420, that is, the embodiment of the present application can also dynamically adjust the corresponding physical layer phy according to the distance between the devices.

[0064] S410: During the communication between the first electronic device and the second electronic device, determine a target physical layer that matches the distance from the physical layers included in the first electronic device.

[0065] The physical layer included in the first electronic device may include a coded physical layer and a non-coded physical layer. The non-coded physical layer is a physical layer that does not need to encode data, that is, data can be transmitted directly. This method corresponds to a higher data transmission rate and lower power consumption, but the communication distance is relatively short.

[0066] In the process of communication between the first electronic device and the second electronic device in the embodiment of the present application, according to the distance between the communication between the first electronic device and the second electronic device, a physical layer matching the distance can be selected from the physical layers included in the first electronic device, and the physical layer can be recorded as the target physical layer. The matching here can be that the communication code rate and / or power consumption between the devices is optimal at the distance. For example, for the same distance, the power consumption generated by physical layer 1 and physical layer 2 when transmitting data increases successively, then physical layer 2 can be determined as the target physical layer matching the distance.

[0067] Exemplarily, the target physical layer may be a coded physical layer or a non-coded physical layer, which is specifically related to the distance between the first electronic device and the second electronic device. The target physical layer may be the same as or different from the physical layer used to establish the Bluetooth connection.

[0068] S420: When the coding physical layer to which the target coding method belongs is different from the target physical layer, communication data is sent to the second electronic device through the target physical layer.

[0069] Exemplarily, when the coding physical layer to which the target coding method belongs is different from the target physical layer, the first electronic device can dynamically switch the physical layer of the transmission data and send the communication data to the second electronic device through the target physical layer. It should be noted that when the physical layer changes, the processing method of the communication data also changes accordingly, that is, the communication data needs to be processed according to the data processing method corresponding to the target physical layer.

[0070] For example, the target coding method is coded S=8, that is, the physical layer to which the target coding method belongs is coded S=8phy. Assuming that the target physical layer is coded S=2phy, after the physical layer is switched from coded S=8phy to coded S=2phy, the coding method of the communication data also needs to be switched from coded S=8 to coded S=2.

[0071] Exemplarily, when the coded physical layer to which the target coding mode belongs and the target physical layer are the same physical layer, the coded physical layer may continue to remain unchanged.

[0072] In the process of device communication, the embodiment of the present application can determine the distance between devices in real time, and dynamically adjust the physical layer of communication data according to the distance between the devices, so that the communication function can operate in the best state.

[0073] In some embodiments, the above S410 may include the following steps:

[0074] When the distance is greater than a first distance threshold, determining the physical layer to which the encoding mode in which the number of symbols included in the data bits is not less than the first number threshold belongs as the target physical layer;

[0075] When the distance is greater than the second distance threshold but not greater than the first distance threshold, determining the physical layer to which the encoding mode in which the number of symbols included in the data bits is less than the first number threshold but not less than the second number threshold belongs as the target physical layer;

[0076] When the distance is less than the second distance threshold, the physical layer to which the coding mode in which the number of symbols included in the data bits is less than the second number threshold belongs is determined as the target physical layer.

[0077] The first distance threshold and the second distance threshold can be set according to the scene, requirements, etc., or can be determined according to the actual signal receiving sensitivity. In some embodiments, the first distance threshold can be set to 200m, and the second distance threshold can be set to 66m.

[0078] The sizes of the first quantity threshold and the second quantity threshold can be set according to scenarios, requirements, etc. In some embodiments, the first quantity threshold can be set to 5 and the second quantity threshold can be set to 2.

[0079] In the embodiments of the present application, the greater the distance between devices, the more symbols included in the data bits of the selected physical layer, thereby improving the reliability of communication and the distance covered by the communication signal.

[0080] Taking the target physical layer including the first physical layer, or the second physical layer, or the third physical layer as an example, among them, the data bits corresponding to the first physical layer may include one symbol, the data bits corresponding to the second physical layer may include two symbols, and the data bits corresponding to the third physical layer may include eight symbols.

[0081] The more symbols included in the data bits, the higher the signal reception sensitivity of the corresponding physical layer, that is, the signal reception sensitivities of the first physical layer, the second physical layer, and the third physical layer increase in sequence.

[0082] Exemplarily, the first physical layer may be 1M phy, the second physical layer may be coded S = 2phy, and the third physical layer may be coded S = 8phy. Then, the signal reception sensitivity of the first physical layer is less than or equal to -70dBm, the signal reception sensitivity of the second physical layer is less than or equal to -75dBm, and the signal reception sensitivity of the third physical layer is less than or equal to -82dBm.

[0083] Exemplarily, when d > 200m, coded S = 8phy can be selected as the target physical layer; when 66m < d ≤ 200m, coded S = 2phy can be selected as the target physical layer; when d ≥ 66m, 1M phy can be selected as the target physical layer.

[0084] In the embodiments of the present application, when maintaining ranging during device communication, the physical layer can be dynamically switched according to the change of distance, so as to ensure the optimal communication code rate and power consumption.

[0085] In some embodiments, after S230, the ranging method may further include the following steps:

[0086] During the communication between the first electronic device and the second electronic device, output the distance between the first electronic device and the second electronic device.

[0087] In the embodiments of the present application, during device communication, ranging can be performed based on the current physical layer and the ranging result can be output. Exemplarily, the first electronic device can periodically measure the distance to the second electronic device to save power consumption.

[0088] The embodiments of the present application do not limit the output manner of the distance. For example, the user can be prompted by voice about the distance between the first electronic device and the second electronic device, or the distance between the first electronic device and the second electronic device can be directly displayed on the interface of the first electronic device.

[0089] During the process of device communication, the embodiment of the present application can continue to measure the distance between devices and output the distance, so that the user can understand the distance between the devices in a timely manner to meet business needs.

[0090] Combine the following Figure 5 The connection process between the first electronic device and the second electronic device is described, wherein the first electronic device can be used as a connection initiator and the second electronic device can be used as a connected party.

[0091] S510: The second electronic device sends a BLE broadcast, where the broadcast includes a BLE packet.

[0092] S520: The first electronic device performs connection with the phy with the maximum distance according to the broadcast, assuming that the phy currently selected 2 is coded S=8.

[0093] S530: The first electronic device measures the distance between the first electronic device and the second electronic device through phy coded S=8.

[0094] S540: The first electronic device selects a suitable phhy according to the distance to initiate a connection.

[0095] S550: The connection is established, and both parties communicate in the current best phy.

[0096] When establishing a connection, the appropriate phy is selected according to the distance, saving power consumption while ensuring the communication bit rate.

[0097] Combine the following Figure 6 The communication process after the first electronic device and the second electronic device establish a connection is described. Assume that the current Bluetooth ranging communication service is communication rescue, and GPS positioning cannot be used due to poor environment, and the first electronic device and the second electronic device have established the best phy connection.

[0098] S610, real-time communication to inquire about the other party's status, and display it on both devices through phy ranging coded S=8.

[0099] S620, when the distance between the two parties is close, switch to phy with coded S=2 to obtain better communication code rate and lower power consumption, and continue to maintain ranging.

[0100] S630: When the distance between the two parties is the shortest, switch to 1M phy to obtain a better communication bit rate and lower power consumption, and continue to maintain ranging.

[0101] S640. Complete the rescue through communication and distance measurement before the other party's device runs out of power.

[0102] By maintaining real-time ranging during the communication process, the phy can be adjusted dynamically, thereby obtaining a better communication bit rate and lower power consumption, which is of better significance to actual business.

[0103] The embodiment of the present application does not require the introduction of other additional devices. By encoding the Bluetooth connection request, the communication distance can be extended, long-distance ranging can be achieved, and the cost is reduced. Moreover, during the communication process, the ranging can continue, and the phy can be dynamically adjusted according to the ranging results, thereby ensuring the communication bit rate and saving power consumption.

[0104] It should be noted that the ranging method provided in the embodiment of the present application can be performed by a ranging device or a processing module in the ranging device for performing the ranging method. In the embodiment of the present application, the ranging device provided in the embodiment of the present application is described by taking the ranging method performed by the ranging device as an example.

[0105] Figure 7 A schematic diagram of the structure of a distance measuring device provided in an embodiment of the present application.

[0106] like Figure 7 As shown, the distance measuring device 700 may include:

[0107] The sending module 701 is used to send a Bluetooth connection request to the second electronic device when receiving a Bluetooth low energy data packet broadcast by the second electronic device; wherein the Bluetooth connection request is encoded according to a target encoding method, and the target encoding method is any one of at least two encoding methods included in the encoding physical layer of the first electronic device; when the first electronic device establishes a Bluetooth connection with the second electronic device, a first signal is sent to the second electronic device through the encoding physical layer to which the target encoding method belongs;

[0108] The determination module 702 is used to determine the distance between the first electronic device and the second electronic device based on the flight time of the first signal between the first electronic device and the second electronic device, and the phase difference between the first signal and the second signal, wherein the second signal is a signal sent by the second electronic device to the first electronic device in response to the first signal.

[0109] In an embodiment of the present application, when a Bluetooth low energy data packet broadcasted by a second electronic device is received, a Bluetooth connection request is sent to the second electronic device, wherein the Bluetooth connection request is obtained by encoding in accordance with a target encoding method, and the target encoding method is any one of at least two encoding methods included in the encoding physical layer of the first electronic device; when the first electronic device establishes a Bluetooth connection with the second electronic device, a first signal is sent to the second electronic device through the encoding physical layer to which the target encoding method belongs; according to the flight time of the first signal between the first electronic device and the second electronic device, and the phase difference between the first signal and the second signal, the distance between the first electronic device and the second electronic device is determined, and the second signal is a signal sent by the second electronic device to the first electronic device in response to the first signal. That is, before the first electronic device of the embodiment of the present application sends a Bluetooth connection request to the second electronic device, it first encodes the Bluetooth connection request in accordance with the encoding method included in the encoding physical layer of the first electronic device, so that the encoded Bluetooth connection request can be transmitted over a longer distance, thereby establishing a Bluetooth connection between long-distance devices, and on this basis, the distance measurement between long-distance devices is realized in combination with the distance measurement technology, meeting the user's long-distance ranging needs.

[0110] In some possible implementations of the embodiments of the present application, the number of symbols contained in the data bits of each encoding method is different, and the communication distance corresponding to each encoding method is positively correlated with the number of symbols contained in the data bits of each encoding method;

[0111] The target encoding method is the encoding method that contains the largest number of symbols in the data bits.

[0112] In some possible implementations of the embodiments of the present application, the determination module 702 is further configured to, after determining the distance between the first electronic device and the second electronic device, determine a target physical layer that matches the distance from the physical layers included in the first electronic device during communication between the first electronic device and the second electronic device;

[0113] The sending module 701 is further configured to send communication data to the second electronic device through the target physical layer when the coding physical layer to which the target coding method belongs is different from the target physical layer.

[0114] In some possible implementations of the embodiment of the present application, the determination module 702 is specifically configured to:

[0115] When the distance is greater than a first distance threshold, determining the physical layer to which the encoding mode in which the number of symbols included in the data bits is not less than the first number threshold belongs as the target physical layer;

[0116] When the distance is greater than the second distance threshold but not greater than the first distance threshold, determining the physical layer to which the encoding mode in which the number of symbols included in the data bits is less than the first number threshold but not less than the second number threshold belongs as the target physical layer;

[0117] When the distance is less than the second distance threshold, the physical layer to which the coding mode in which the number of symbols included in the data bits is less than the second number threshold belongs is determined as the target physical layer.

[0118] In some possible implementations of the embodiments of the present application, the target physical layer includes a first physical layer, or a second physical layer, or a third physical layer;

[0119] The data bits corresponding to the first physical layer include one symbol, the data bits corresponding to the second physical layer include two symbols, and the data bits corresponding to the third physical layer include eight symbols.

[0120] In some possible implementations of the embodiments of the present application, the distance measuring device 700 may further include:

[0121] The output module is used to output the distance between the first electronic device and the second electronic device during the communication between the first electronic device and the second electronic device after the determination module 702 determines the distance between the first electronic device and the second electronic device based on the flight time of the first signal between the first electronic device and the second electronic device and the phase difference between the first signal and the second signal.

[0122] The embodiment of the present application does not require the introduction of other additional devices. By encoding the Bluetooth connection request, the communication distance can be extended, long-distance ranging can be achieved, and the cost is reduced. Moreover, during the communication process, the ranging can continue, and the phy can be dynamically adjusted according to the ranging results, thereby ensuring the communication bit rate and saving power consumption.

[0123] The distance measuring device in the embodiment of the present application can be a device, or a component in an electronic device, such as an integrated circuit or a chip. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0124] The electronic device in the embodiment of the present application may be a terminal with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0125] The distance measuring device provided in the embodiment of the present application can achieve Figure 2 and Figure 4 The various processes in the ranging method embodiment can achieve the same technical effect, and to avoid repetition, they will not be described here.

[0126] like Figure 8 As shown, an embodiment of the present application further provides an electronic device 800, including a processor 801 and a memory 802, wherein the memory 802 stores a program or instruction that can be executed on the processor 801, and when the program or instruction is executed by the processor 801, each step of the above-mentioned ranging method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0127] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile terminals and non-mobile terminals.

[0128] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

[0129] The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910 and other components.

[0130] Those skilled in the art will appreciate that the electronic device 900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The structure of the electronic device 900 shown in the figure does not constitute a limitation on the electronic device 900. The electronic device 900 may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0131] The processor 910 is configured to send a Bluetooth connection request to the second electronic device when receiving a Bluetooth low energy data packet broadcast by the second electronic device; wherein the Bluetooth connection request is encoded according to a target encoding method, and the target encoding method is any one of at least two encoding methods included in the encoding physical layer of the first electronic device;

[0132] When the first electronic device establishes a Bluetooth connection with the second electronic device, sending a first signal to the second electronic device through a coding physical layer to which the target coding method belongs;

[0133] The distance between the first electronic device and the second electronic device is determined based on the flight time of the first signal between the first electronic device and the second electronic device and the phase difference between the first signal and the second signal. The second signal is a signal sent by the second electronic device to the first electronic device in response to the first signal.

[0134] In an embodiment of the present application, when a Bluetooth low energy data packet broadcasted by a second electronic device is received, a Bluetooth connection request is sent to the second electronic device, wherein the Bluetooth connection request is obtained by encoding in accordance with a target encoding method, and the target encoding method is any one of at least two encoding methods included in the encoding physical layer of the first electronic device; when the first electronic device establishes a Bluetooth connection with the second electronic device, a first signal is sent to the second electronic device through the encoding physical layer to which the target encoding method belongs; according to the flight time of the first signal between the first electronic device and the second electronic device, and the phase difference between the first signal and the second signal, the distance between the first electronic device and the second electronic device is determined, and the second signal is a signal sent by the second electronic device to the first electronic device in response to the first signal. That is, before the first electronic device of the embodiment of the present application sends a Bluetooth connection request to the second electronic device, it first encodes the Bluetooth connection request in accordance with the encoding method included in the encoding physical layer of the first electronic device, so that the encoded Bluetooth connection request can be transmitted over a longer distance, thereby establishing a Bluetooth connection between long-distance devices, and on this basis, the distance measurement between long-distance devices is realized in combination with the distance measurement technology, meeting the user's long-distance ranging needs.

[0135] In some possible implementations of the embodiments of the present application, the number of symbols contained in the data bits of each encoding method is different, and the communication distance corresponding to each encoding method is positively correlated with the number of symbols contained in the data bits of each encoding method;

[0136] The target encoding method is the encoding method that contains the largest number of symbols in the data bits.

[0137] In some possible implementations of the embodiments of the present application, the processor 910 is further configured to, after determining the distance between the first electronic device and the second electronic device, determine, during the communication between the first electronic device and the second electronic device, a target physical layer that matches the distance from the physical layers included in the first electronic device;

[0138] When the coding physical layer to which the target coding method belongs is different from the target physical layer, the communication data is sent to the second electronic device through the target physical layer.

[0139] In some possible implementations of the embodiments of the present application, the processor 910 is specifically configured to:

[0140] When the distance is greater than a first distance threshold, determining the physical layer to which the encoding mode in which the number of symbols included in the data bits is not less than the first number threshold belongs as the target physical layer;

[0141] When the distance is greater than the second distance threshold but not greater than the first distance threshold, determining the physical layer to which the encoding mode in which the number of symbols included in the data bits is less than the first number threshold but not less than the second number threshold belongs as the target physical layer;

[0142] When the distance is less than the second distance threshold, the physical layer to which the coding mode in which the number of symbols included in the data bits is less than the second number threshold belongs is determined as the target physical layer.

[0143] In some possible implementations of the embodiments of the present application, the processor 910 is specifically configured to:

[0144] The target physical layer includes a first physical layer, or a second physical layer, or a third physical layer;

[0145] The data bits corresponding to the first physical layer include one symbol, the data bits corresponding to the second physical layer include two symbols, and the data bits corresponding to the third physical layer include eight symbols.

[0146] In some possible implementations of the embodiments of the present application, the processor 910 is further used to output the distance between the first electronic device and the second electronic device during communication between the first electronic device and the second electronic device after determining the distance between the first electronic device and the second electronic device based on the flight time of the first signal between the first electronic device and the second electronic device and the phase difference between the first signal and the second signal.

[0147] The embodiment of the present application does not require the introduction of other additional devices. By encoding the Bluetooth connection request, the communication distance can be extended, long-distance ranging can be achieved, and the cost is reduced. Moreover, during the communication process, the ranging can continue, and the phy can be dynamically adjusted according to the ranging results, thereby ensuring the communication bit rate and saving power consumption.

[0148] It should be understood that in the embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0149] The memory 909 can be used to store software programs and various data. The memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 909 may include a volatile memory or a non-volatile memory, or the memory 909 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0150] The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 910.

[0151] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned ranging method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0152] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0153] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned ranging method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0154] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0155] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned ranging method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0156] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0157] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0158] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A distance measurement method, characterized in that: Applied to a first electronic device, the method includes: Upon receiving a Bluetooth low energy data packet broadcasted by a second electronic device, sending a Bluetooth connection request to the second electronic device; wherein the Bluetooth connection request is encoded according to a target encoding method, and the target encoding method is any one of at least two encoding methods included in the encoding physical layer of the first electronic device; When the first electronic device establishes a Bluetooth connection with the second electronic device, sending a first signal to the second electronic device through a coding physical layer to which the target coding method belongs; The distance between the first electronic device and the second electronic device is determined based on the flight time of the first signal between the first electronic device and the second electronic device, and the phase difference between the first signal and the second signal, wherein the second signal is a signal sent by the second electronic device to the first electronic device in response to the first signal.

2. The method according to claim 1, characterized in that The number of symbols contained in the data bits of each encoding method is different, and the communication distance corresponding to each encoding method is positively correlated with the number of symbols contained in the data bits of each encoding method; The target encoding method is an encoding method in which the number of symbols contained in the data bits is the largest.

3. The method according to claim 1, characterized in that After determining the distance between the first electronic device and the second electronic device, the method further includes: During the communication between the first electronic device and the second electronic device, determining a target physical layer matching the distance from the physical layers included in the first electronic device; When the coding physical layer to which the target coding method belongs is different from the target physical layer, communication data is sent to the second electronic device through the target physical layer.

4. The method according to claim 3, characterized in that The determining a target physical layer matching the distance from the physical layers included in the first electronic device includes: When the distance is greater than a first distance threshold, determining the physical layer to which the encoding mode in which the number of symbols included in the data bits is not less than the first number threshold belongs as the target physical layer; When the distance is greater than a second distance threshold but not greater than the first distance threshold, determining the physical layer to which the encoding mode in which the number of symbols included in the data bits is less than the first number threshold but not less than the second number threshold belongs as the target physical layer; When the distance is smaller than the second distance threshold, the physical layer to which the coding mode in which the number of symbols included in the data bits is smaller than the second number threshold belongs is determined as the target physical layer.

5. The method according to claim 3 or 4, characterized in that: The target physical layer includes a first physical layer, a second physical layer, or a third physical layer; The data bits corresponding to the first physical layer include one symbol, the data bits corresponding to the second physical layer include two symbols, and the data bits corresponding to the third physical layer include eight symbols.

6. The method according to any one of claims 1 to 4, characterized in that: After determining the distance between the first electronic device and the second electronic device, the method further includes: During the communication between the first electronic device and the second electronic device, the distance between the first electronic device and the second electronic device is output.

7. A distance measuring device, characterized in that: Applied to a first electronic device, the device comprises: a sending module, configured to send a Bluetooth connection request to the second electronic device when receiving a Bluetooth low energy data packet broadcast by the second electronic device; wherein the Bluetooth connection request is encoded according to a target encoding method, and the target encoding method is any one of at least two encoding methods included in the encoding physical layer of the first electronic device; when the first electronic device establishes a Bluetooth connection with the second electronic device, send a first signal to the second electronic device through the encoding physical layer to which the target encoding method belongs; A determination module is used to determine the distance between the first electronic device and the second electronic device based on the flight time of the first signal between the first electronic device and the second electronic device, and the phase difference between the first signal and the second signal, wherein the second signal is a signal sent by the second electronic device to the first electronic device in response to the first signal.

8. The device according to claim 7, characterized in that The determination module is further configured to, after determining the distance between the first electronic device and the second electronic device, determine a target physical layer matching the distance from the physical layers included in the first electronic device during communication between the first electronic device and the second electronic device; The sending module is further configured to send communication data to the second electronic device through the target physical layer when the coding physical layer to which the target coding method belongs is different from the target physical layer.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. An electronically readable storage medium, characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

11. A computer program product, characterized in that The program product is stored in a storage medium, and the program product is executed by at least one processor to implement the steps of the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Automobile unlocking control method

    CN120697703A