Ranging method and apparatus in synchronization system, device and readable storage medium

IN606814BActive Publication Date: 2026-10-23BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
IN202347006315
Authority / Receiving Office
IN · IN
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-01-31
Publication Date
2026-10-23
Estimated Expiration
2040-07-16

AI Technical Summary

Technical Problem

Existing local area communication technologies such as WiFi, UWB and Bluetooth are asynchronous systems and cannot effectively measure the distance between terminal devices in a synchronous system.

Method used

In the synchronization system, the first terminal device sends a ranging signal to the second terminal device, and determines the time difference based on the time when the signal is received and the respective timing, thereby calculating the distance between the two. Specific steps include the first terminal device sending a ranging signal and determining the first time difference, the second terminal device receiving the signal and determining the second time difference, and combining the two to calculate the distance.

Benefits of technology

The distance measurement between terminal devices is realized in the synchronization system, providing an effective solution for ranging in the synchronization system, and reducing the measurement complexity and energy consumption.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The present disclosure relates to the field of communications, and provides a ranging method and apparatus in a synchronization system, a device, and a readable storage medium. The method comprises: sending a first ranging signal to a second terminal; determining a first time difference, wherein the first time difference is the time difference between the moment when a first terminal device sends the first ranging signal and a first terminal timing; and using the first time difference to combine with a second time difference to determine the distance between the first terminal device and the second terminal device, wherein the second time difference is the time difference between the moment when the second terminal device receives the first ranging signal and a second terminal timing. In the synchronization system, the first terminal device sends the first ranging signal to the second terminal device, the second time difference is determined according to the moment when the first ranging signal is received and the second terminal timing, and the first time difference is determined according to the moment when the first ranging signal is sent and the first terminal timing, so that the distance between the first terminal device and the second terminal device is determined according to the second time difference and the first time difference.
Need to check novelty before this filing date? Find Prior Art

Description

Ranging method, device, equipment and readable storage medium in synchronization system Technical Field

[0001] The present disclosure relates to the field of communications, and in particular to a ranging method, apparatus, device, and readable storage medium in a synchronization system. Background Art

[0002] Currently, applications based on the distance and angle between user devices are developing rapidly. Terminal devices that support ranging functions can be controlled and operated more conveniently and can expand the functional modes of various application scenarios, such as product display scenarios, smart home scenarios, smart city scenarios, etc.

[0003] In related technologies, distance and angle measurement using direct communication links between users has been implemented in wireless fidelity networks such as WiFi, Ultra Wide Band (UWB), and Bluetooth. Among them, methods for measuring distance using transmission time include Single Side-Two Way Ranging (SS-TWR) and Double Side-Two Way Ranging (DS-TWR).

[0004] However, local area communication technologies such as WiFi, UWB and Bluetooth are all asynchronous systems, and for synchronous systems such as NR systems, there is no distance measurement method to determine the distance between two terminal devices.

[0005] Summary of the Invention

[0006] The present disclosure provides a ranging method, apparatus, device, and readable storage medium in a synchronization system, which can provide a ranging method for a synchronization system. The technical solution is as follows:

[0007] In one aspect, a ranging method in a synchronization system is provided, which is applied to a first terminal device, and the method includes:

[0008] Sending a first ranging signal to a second terminal device;

[0009] Determine a first time difference, where the first time difference is a time difference between a moment when the first terminal device sends the first ranging signal and a first terminal timing;

[0010] The first time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the second time difference, where the second time difference is the time difference between the moment when the second terminal device receives the first ranging signal and the second terminal timing.

[0011] In another aspect, a ranging method in a synchronization system is provided, which is applied to a second terminal device, and includes:

[0012] receiving a first ranging signal from a first terminal device;

[0013] Determine a second time difference, where the second time difference is a time difference between a moment when the second terminal device receives the first ranging signal and a second terminal timing;

[0014] The second time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, where the first time difference is the time difference between the moment when the first terminal device sends the first ranging signal and the first terminal timing.

[0015] In another aspect, a ranging device in a synchronization system is provided, which is applied to a first terminal device, and includes:

[0016] a sending module, configured to send a first ranging signal to a second terminal device;

[0017] a processing module configured to determine a first time difference, where the first time difference is a time difference between a moment when the first terminal device sends the first ranging signal and a first terminal timing;

[0018] The first time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the second time difference, where the second time difference is the time difference between the moment when the second terminal device receives the first ranging signal and the second terminal timing.

[0019] On the other hand, a ranging device in a synchronization system is provided, which is applied to a second terminal device, and the device includes:

[0020] A receiving module, configured to receive a first ranging signal from a first terminal device;

[0021] a processing module configured to determine a second time difference, where the second time difference is a time difference between a moment when the second terminal device receives the first ranging signal and a second terminal timing;

[0022] The second time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, where the first time difference is the time difference between the moment when the first terminal device sends the first ranging signal and the first terminal timing.

[0023] In another aspect, a terminal is provided, the terminal comprising:

[0024] processor;

[0025] a transceiver connected to the processor;

[0026] a memory for storing executable signaling for the processor;

[0027] The processor is configured to load and execute executable instructions to implement the ranging method in the synchronization system as described in the above-mentioned embodiment of the present disclosure.

[0028] On the other hand, a computer-readable storage medium is provided, which stores at least one instruction, at least one program, code set or instruction set. The above at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the ranging method in the synchronization system as described in the above-mentioned embodiment of the present disclosure.

[0029] In another aspect, a computer program product is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the ranging method in a synchronization system described in any of the above embodiments.

[0030] The beneficial effects of the technical solutions provided by the embodiments of the present disclosure include at least:

[0031] In a synchronous system, a first ranging signal is sent from a first terminal device to a second terminal device, and a second time difference is determined based on the time when the first ranging signal is received and the timing of the second terminal device, and a first time difference is determined based on the time when the first ranging signal is sent and the timing of the first terminal device, thereby determining the distance between the first terminal device and the second terminal device based on the second time difference and the first time difference, providing a scheme for performing ranging in a synchronous system. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0033] FIG1 is a block diagram of a communication system provided by an exemplary embodiment of the present disclosure;

[0034] FIG2 is a SS-TWR method for ranging using transmission time in the related art;

[0035] FIG3 is a DS-TWR method for ranging using transmission time in the related art;

[0036] FIG4 is a flow chart of a ranging method in a synchronization system provided by an exemplary embodiment of the present disclosure;

[0037] FIG5 is a flow chart of a ranging process provided by an exemplary embodiment of the present disclosure;

[0038] FIG6 is a flow chart of a ranging method in a synchronization system provided by a second terminal device side according to an exemplary embodiment of the present disclosure;

[0039] FIG7 is a schematic diagram of a ranging method in a synchronization system provided by an exemplary embodiment of the present disclosure;

[0040] FIG8 is a schematic diagram of a ranging method in a synchronization system provided by another exemplary embodiment of the present disclosure;

[0041] FIG9 is a flow chart of a distance detection method in a synchronization system provided by another exemplary embodiment of the present disclosure;

[0042] FIG10 is a flowchart of a distance detection method in a synchronization system provided by another exemplary embodiment of the present disclosure;

[0043] FIG11 is a flowchart of a distance detection method in a synchronization system provided by another exemplary embodiment of the present disclosure;

[0044] FIG12 is a structural block diagram of a distance measuring device in a synchronization system provided by an exemplary embodiment of the present disclosure;

[0045] FIG13 is a structural block diagram of a distance measuring device in a synchronization system provided by another exemplary embodiment of the present disclosure;

[0046] FIG14 is a structural block diagram of a terminal provided by an exemplary embodiment of the present disclosure;

[0047] FIG15 is a structural block diagram of a network device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0048] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.

[0049] FIG1 shows a block diagram of a communication system provided by an exemplary embodiment of the present disclosure. The communication system may include: an access network 12 and a terminal 13 .

[0050] The access network 12 includes several access network devices 120. The access network device 120 may be a base station, which is a device deployed in the access network to provide wireless communication functions for terminals. The base station may include various forms of macro base stations, micro base stations, relay stations, access points, and the like. In systems using different wireless access technologies, the names of devices with base station functions may be different. For example, in the Long Term Evolution (LTE) system, it is called eNodeB or eNB; in the 5G New Radio (NR) system, it is called gNodeB or gNB. With the evolution of communication technology, the name "base station" may be described and may change. For the convenience of the embodiments of the present disclosure, the above-mentioned devices that provide wireless communication functions for terminals are collectively referred to as access network devices.

[0051] Terminal 13 may include various handheld devices with wireless communication capabilities, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to a wireless modem, as well as various forms of User Equipment (UE), Mobile Station (MS), and terminal devices. For ease of description, the above-mentioned devices are collectively referred to as terminals. Access network device 120 and terminal 13 communicate with each other via some air interface technology, such as the Uu interface.

[0052] In the embodiment of the present disclosure, the terminal 13 includes: a vehicle 131 , other vehicles 132 , infrastructure 133 , and pedestrians 134 .

[0053] Vehicle to Vehicle (V2V) refers to the communication between a vehicle 131 and another vehicle 132 , wherein the vehicle sends relevant information about itself to the other vehicle, including driving speed, geographic location, driving direction, and driving status.

[0054] Vehicle to Infrastructure (V2I) refers to the communication between a vehicle 131 and infrastructure 133 . Infrastructure 133 includes all infrastructure encountered by the vehicle during its travel, including traffic lights, bus stops, buildings, tunnels and other construction facilities.

[0055] Vehicle to Pedestrian (V2P) refers to communication between a vehicle 131 and a pedestrian 134. Pedestrians generally refer to electronic devices with mobile communication capabilities carried by pedestrians, such as mobile phones and wearable devices. Wearable devices include smart bracelets, smart watches, and smart rings.

[0056] In the embodiment of the present disclosure, the vehicle 131 is referred to as the first terminal, and the other vehicles 132, infrastructure 133 and pedestrians 134 are referred to as the second terminals for illustration purposes only. However, the roles of the two may be interchanged, and this is not limited thereto.

[0057] Optionally, the first terminal and the second terminal are both terminals that support direct communication, and the communication system may be an NR system and a subsequent evolution system.

[0058] In the related art, in local area communication systems such as WiFi, UWB, and Bluetooth, methods for measuring distance using transmission time include single-side two-way ranging (SS-TWR) and double-side two-way ranging (DS-TWR).

[0059] For illustration, please refer to Figure 2, which illustrates the SS-TWR method for ranging using transmission time in the related art. As shown in Figure 2, device 210 transmits ranging signal A to device 220. Device 220 feeds back ranging signal B based on ranging signal A. Device 210 measures the time difference T_round between transmitting ranging signal A and receiving ranging signal B. Device 220 measures the time difference T_reply between receiving ranging signal A and transmitting ranging signal B. After devices 210 and 220 exchange time difference T_round and time difference T_reply, they can obtain the propagation time T_prop of ranging signal A and ranging signal B based on the time difference measurement, and calculate the distance between devices 210 and 220 based on the propagation time.

[0060] For illustration, please refer to Figure 3, which illustrates the DS-TWR method for ranging using transmission time in the related art. As shown in Figure 3, device 310 and device 320 each initiate a single-side two-way ranging (SS-TWR) operation. The two devices exchange the measured values ​​of T_round1, T_round2, T_reply1, and T_reply2, based on which they estimate the propagation time T_prop and calculate the distance between devices 310 and 320.

[0061] However, WiFi, Bluetooth, UWB and other communication technologies are all asynchronous systems, while the NR system is a synchronous system. In the NR system, the user equipment needs to be synchronized with a reference synchronization source, such as: synchronizing according to the downlink synchronization signal of the base station, and sending and receiving signals according to a given timing. Therefore, in the embodiment of the present disclosure, the characteristics of the synchronous system are utilized to simplify the measurement of the time difference.

[0062] FIG4 is a flow chart of a ranging method in a synchronization system provided by an exemplary embodiment of the present disclosure. The method is described by taking application of the method to a first terminal device as an example. As shown in FIG4 , the method includes:

[0063] Step 401: Send a first ranging signal to a second terminal device.

[0064] Optionally, the first terminal device sends a first ranging signal to the second terminal device through a direct communication link.

[0065] Optionally, the first ranging signal is a signal sent by the first terminal device to the second terminal device, and is used to measure the distance between the first terminal device and the second terminal device.

[0066] Optionally, the first ranging signal is a signal sent by the first terminal device when it receives a ranging request, such as: the first terminal device receives a service trigger signal, and the service needs to measure the distance between the first terminal device and the second terminal device when triggered, then the first terminal device sends the first ranging signal to the second terminal device.

[0067] Optionally, the moment when the first terminal device sends the first ranging signal is the first designated moment within the sending time period of the first ranging signal.

[0068] Optionally, the first designated time includes: a start time of the first ranging signal transmission period; or an end time of the first ranging signal transmission period; or a peak power occurrence time within the first ranging signal transmission period.

[0069] Optionally, the sending period refers to the time period between the moment when the first terminal device starts sending the first ranging signal through the transmitter and the moment when the first terminal device ends sending the first ranging signal.

[0070] Optionally, the first terminal device first determines a first synchronization clock according to a synchronization reference signal.

[0071] Illustratively, the first terminal device determines the time unit based on a downlink synchronization signal sent by a network device; or, the first terminal device determines the time unit based on its own Global Positioning System (GPS) signal; or, the first terminal device determines the time unit based on a direct connection synchronization signal sent by a third terminal device. The third terminal device includes other terminals other than the first terminal.

[0072] Optionally, the time unit includes any one of an Orthogonal Frequency Division Multiplexing (OFDM) symbol, a time slot, a subframe, a radio frame, a microsecond, a millisecond, or a second, and may also be other division granularities, which are not limited in the embodiments of the present disclosure. Optionally, the process of determining the time unit is a process of performing time-frequency resource synchronization.

[0073] Optionally, after determining the time unit, a first ranging signal is sent to the second terminal device.

[0074] Step 402: Determine a first time difference.

[0075] Optionally, the first time difference is the time difference between the moment when the first terminal device sends the first ranging signal and the first terminal timing.

[0076] The first time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the second time difference, wherein the second time difference is the time difference between the moment when the second terminal device receives the first ranging signal and the second terminal timing.

[0077] Optionally, in response to the first terminal device needing to obtain distance information between the first terminal device and the second terminal device, the first terminal device determines a second time difference, and determines the distance between the first terminal device and the second terminal device based on the first time difference and the second time difference. Optionally, the first terminal device receives first ranging information sent by the second terminal device, where the first ranging information includes the second time difference.

[0078] The moment when the second terminal device receives the first ranging signal is the second designated moment within the reception period of the first ranging signal.

[0079] Optionally, the second time difference is a time difference determined based on a second designated moment and the first time unit, wherein the second designated moment is a moment when the second terminal device receives the first ranging signal.

[0080] That is, when the second terminal device receives the first ranging signal, it determines the second time difference according to the time of receiving the first ranging signal and the second terminal timing.

[0081] Optionally, the second terminal device first determines the second synchronization clock based on its own synchronization reference signal. Illustratively, the second terminal device determines the time unit based on a downlink synchronization signal sent by the network device; or, the second terminal device determines the time unit based on its own GPS signal; or, the second terminal device determines the time unit based on a direct connection synchronization signal sent by a fourth terminal device. The fourth terminal device includes other terminal devices other than the second terminal device.

[0082] Optionally, the time unit includes any one of OFDM symbol, slot, subframe, frame, microsecond, millisecond, second, or other division granularity, which is not limited in the embodiment of the present disclosure. Optionally, the process of determining the time unit is a process of performing time-frequency resource synchronization.

[0083] It is worth noting that the first terminal device and the second terminal device may use the same synchronization method or different synchronization methods when determining the time unit. Optionally, when the first terminal device and the second terminal device both use the downlink synchronization signal sent by the network device to determine the time unit, the first terminal device and the second terminal device may be synchronized based on the same network device or based on different network devices, such as: the first terminal device is synchronized based on the downlink synchronization signal sent by base station A, and the second terminal device is synchronized based on the downlink synchronization signal sent by base station B; or, the first terminal device is synchronized based on the downlink synchronization signal sent by base station A, and the second terminal device is synchronized based on its own GPS signal when it is outside the coverage of base station A.

[0084] When the first terminal device and the second terminal device use different synchronization methods to determine the time unit, there is a slight difference in the time unit synchronization between the first terminal device and the second terminal device. Optionally, when determining the distance between the first terminal device and the second terminal device, the distance detection algorithm is used to reduce the impact of the difference between the time unit synchronization on the distance calculation. That is, through the design of the distance detection algorithm, the influence of the difference between the time unit synchronization on the distance calculation process is reduced.

[0085] Optionally, when receiving the first ranging signal, the second terminal device receives the first ranging signal based on blind detection; or, the second terminal device receives the first ranging signal based on pre-acquired transmission information of the first ranging signal. For example, if the first ranging signal is pre-configured by the base station for transmission within the first time unit, the base station sends a configuration instruction to the first terminal device and the second terminal device, respectively, where the configuration instruction is used to instruct the first ranging signal to be transmitted within the first time unit. Thus, when the first terminal device transmits the first ranging signal, it transmits it within the first time unit, and the second terminal device detects and receives the first ranging signal within the first time unit.

[0086] Optionally, the first terminal device and the second terminal device communicate directly with each other and pre-agree on the time and frequency resource location and transmission parameters for sending the first ranging signal; the second terminal device receives it according to the agreed time, frequency resource location and transmission parameters.

[0087] Optionally, the first terminal device periodically sends a first ranging signal, and the second terminal device pre-knows the sending period and the start position of the time domain period through base station configuration, direct connection information configuration or pre-configuration, and periodically receives the first ranging signal.

[0088] Optionally, when the second terminal device receives the first ranging signal based on blind detection, the frequency domain range information, time domain range information, time domain starting position and period of the blind detection resource area are pre-known through base station configuration, direct connection information configuration or pre-configuration, thereby realizing blind detection of the first ranging signal.

[0089] Optionally, the second designated moment within the reception period of the first ranging signal includes: the start moment of the reception period of the first ranging signal; or the end moment of the reception period of the first ranging signal; or the peak power occurrence moment within the reception period of the first ranging signal.

[0090] Optionally, the first designated moment in the transmission period of the first ranging signal and the second designated moment in the reception period of the first ranging signal are moments of the same type. In an exemplary embodiment, the first designated moment in the transmission period of the first ranging signal is the start moment of the transmission period, and the second designated moment in the reception period of the first ranging signal is the start moment of the reception period.

[0091] Optionally, the receiving period refers to a time period between the moment when the second terminal device starts receiving the first ranging signal through the receiver and the moment when the second terminal device ends receiving the first ranging signal.

[0092] Optionally, the first terminal timing includes the start time of the first time unit determined according to the first synchronization clock of the first terminal device; or, the end time of the first time unit; or, a specified time within the first time unit, such as: the end time of the cyclic prefix (CP) within a specified OFDM symbol within the first time unit.

[0093] Optionally, the second terminal timing includes the start time of the first time unit determined according to the second synchronization clock of the second terminal device; or, the end time of the first time unit; or, a specified time within the first time unit, such as: the end time of the CP within a specified OFDM symbol within the first time unit.

[0094] Schematically, in the NR system, the first time unit is the Lth time domain symbol in slot N, then the first time difference is the time difference between the moment when the first terminal device sends the first ranging signal and the specified moment in the Lth time domain symbol. For example: the first time difference is the time difference between the starting moment when the first terminal device sends the first ranging signal and the starting moment of the Lth time domain symbol. When the first time difference is 0, it means that the starting moment when the first terminal device sends the first ranging signal coincides with the starting moment of the first time unit (i.e., the Lth time domain symbol); when the first time difference is a negative value, it means that the starting moment when the first terminal device sends the first ranging signal is before the starting moment of the first time unit; when the first time difference is a positive value, it means that the starting moment when the first terminal device sends the first ranging signal is after the starting moment of the first time unit. Among them, when the first time difference is a negative value, there is such a situation: the time unit grid is based on the downlink timing of the base station, and the first ranging signal is sent at the moment after the uplink timing advance (Timing Advance, TA) is adjusted.

[0095] 5 , the transmitting terminal 510 of the ranging signal determines t_A1 based on the time when the ranging signal is transmitted and the Lth symbol in slot n, and the receiving terminal 520 determines t_B1 based on the time when the ranging signal is received and the Lth symbol in slot n, thereby determining the distance between the two terminals based on t_A1 and t_B1.

[0096] Optionally, when sending the first ranging signal, the first terminal device uses a higher frequency sampling clock than when sending other signals, such as the physical sidelink control channel (PSCCH) and the physical sidelink shared channel (PSSCH), so as to obtain more accurate time measurement accuracy, that is, the first time difference is measured according to the third synchronization clock of the first terminal device, and the frequency of the third synchronization clock of the first terminal device is higher than the frequency of the first synchronization clock of the first terminal device.

[0097] It is worth noting that in the related art of ranging based on transmission time, a high sampling rate clock needs to be used for time measurement during the entire T_round period. However, in the embodiment of the present disclosure, a high sampling rate is only needed to perform accurate time measurement within the first time unit of sending the first ranging signal, thereby reducing measurement complexity and energy consumption.

[0098] Optionally, in the above description, the first time difference is determined based on the transmission time of the first ranging signal, that is, the first time difference is measured based on the third synchronization clock of the first terminal device. In an optional embodiment, the first time difference may also be preconfigured, that is, the first terminal device determines the first time difference based on configuration or preconfiguration information; optionally, the second terminal device determines the first time difference based on configuration or preconfiguration information.

[0099] Optionally, the first terminal device sends second ranging information to the second terminal device, where the second ranging information includes the first time difference.

[0100] Optionally, corresponding to the first terminal device side, FIG6 is a flow chart of a ranging method in a synchronization system described on the second terminal device side. As shown in FIG6 , the process includes:

[0101] Step 601: Receive a first ranging signal from a first terminal.

[0102] Optionally, when the second terminal device receives the first ranging signal in the first time unit, in order to avoid a small gap in time synchronization, the second terminal device starts detection from before the start position of the first time unit.

[0103] Step 602: Determine the second time difference.

[0104] Optionally, the second time difference is a time difference between the moment when the second terminal device receives the first ranging signal and the second terminal timing.

[0105] Optionally, the second time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, where the first time difference is the time difference between the moment when the first terminal device sends the first ranging signal and the first terminal timing.

[0106] Optionally, when the second terminal device needs to determine the distance between itself and the first terminal device, it obtains the first time difference and determines the distance between itself and the first terminal device based on the first time difference and the second time difference.

[0107] Optionally, the second terminal device receives second ranging information sent by the first terminal device, where the second ranging information includes the first time difference.

[0108] Optionally, the second terminal device sends first ranging information to the first terminal device, where the first ranging information includes the second time difference.

[0109] To summarize, the method provided in this embodiment sends a first ranging signal to a second terminal device in a synchronous system through a first terminal device, and determines a second time difference based on the time of receiving the first ranging signal and the timing of the second terminal, and determines the first time difference based on the time of sending the first ranging signal and the timing of the first terminal, thereby determining the distance between the first terminal device and the second terminal device based on the second time difference and the first time difference, providing a scheme for ranging in a synchronous system.

[0110] Schematically, as shown in FIG7 , which shows a schematic diagram of a ranging method provided by an exemplary embodiment of the present disclosure, as shown in FIG7 , the first terminal device 710 sends a first ranging signal to the second terminal device 720, and the second terminal device 720 determines the second time difference based on the received first ranging signal.

[0111] The first terminal device 710 sends the first ranging signal according to a preconfigured or predefined first time difference.

[0112] Thus, the second terminal device 720 determines the distance between the first terminal device 710 and the second terminal device 720 based on the preconfigured or predefined first time difference in combination with the second time difference.

[0113] The second terminal device 720 feeds back the second time difference to the first terminal device 710 , so that the first terminal device 710 determines the distance between the first terminal device 710 and the second terminal device 720 according to the second time difference and the first time difference.

[0114] The first time difference involved in this process is preconfigured or predefined, and the ranging involved is one-way ranging, that is, the first terminal device only needs to send a first ranging signal to the second terminal device in one direction.

[0115] Schematically, as shown in Figure 8, it shows a schematic diagram of a ranging method provided by another exemplary embodiment of the present disclosure. As shown in Figure 8, the first terminal device 810 sends a first ranging signal to the second terminal device 820, and the second terminal device 820 determines the second time difference based on the received first ranging signal.

[0116] The first terminal device 810 determines the first time difference according to the sending of the first ranging signal.

[0117] The second terminal device 820 feeds back the second time difference to the first terminal device 810 , so that the first terminal device 810 determines the distance between the first terminal device 810 and the second terminal device 820 according to the second time difference and the first time difference.

[0118] The first terminal device 810 sends the first time difference to the second terminal device 820 , so that the second terminal device determines the distance between the first terminal device 810 and the second terminal device 820 according to the second time difference and the first time difference.

[0119] The first time difference involved in this process is determined by the first terminal device 810 based on the transmission of the first ranging signal, and the ranging involved is one-way ranging, that is, the first terminal device only needs to send the first ranging signal to the second terminal device in one direction.

[0120] In an optional embodiment, the distance detection between the first terminal device and the second terminal device is implemented by a unilateral bidirectional ranging method. FIG9 is a flowchart of a distance detection method in a synchronization system provided by another exemplary embodiment of the present disclosure. As shown in FIG9, the method includes:

[0121] Step 901: A first terminal device sends a first ranging signal to a second terminal device.

[0122] Optionally, the first terminal device first determines the first synchronization clock according to its own synchronization reference signal.

[0123] The first terminal device sends a first ranging signal to the second terminal device via a direct communication link. Optionally, the first ranging signal is used to measure the distance between the first terminal device and the second terminal device.

[0124] Step 902: The second terminal device receives a first ranging signal from the first terminal device.

[0125] Optionally, the second terminal device first determines the second synchronization clock according to its own synchronization reference signal. It is worth noting that the first terminal device and the second terminal device can use the same synchronization method or different synchronization methods when determining the first synchronization clock and the second synchronization clock.

[0126] Step 903: The first terminal device determines a first time difference.

[0127] Optionally, the first time difference is the time difference between the moment when the first terminal device sends the first ranging signal and the first terminal timing.

[0128] Step 904: The second terminal device determines a second time difference.

[0129] Optionally, the second time difference is a time difference between the moment when the second terminal device receives the first ranging signal and the second terminal timing.

[0130] Step 905: The second terminal device sends a second ranging signal to the first terminal device.

[0131] Optionally, the second terminal device sends a second ranging signal to the first terminal device through the direct communication link.

[0132] Optionally, the second ranging signal is a signal sent by the second terminal device to the first terminal device when the second terminal device receives the first ranging signal. The second ranging signal is used to complete ranging between the first terminal device and the second terminal device through unidirectional bilateral ranging in combination with the first ranging signal.

[0133] Optionally, the moment when the second terminal device sends the second ranging signal is a third designated moment within the sending period of the second ranging signal.

[0134] Optionally, the third designated moment on the second ranging signal includes: the start moment of the second ranging signal transmission period; or the end moment of the second ranging signal transmission period; or the peak power occurrence moment within the second ranging signal transmission period.

[0135] Step 906: The first terminal device receives a second ranging signal from the second terminal device.

[0136] Step 907: The first terminal device determines a third time difference.

[0137] Optionally, the third time difference is the time difference between the moment when the first terminal device receives the second ranging signal and the third terminal timing.

[0138] Optionally, the third terminal timing includes a start time, an end time, or a specified time within the second time unit determined according to the first synchronous clock of the first terminal device.

[0139] Step 908: The second terminal device determines a fourth time difference.

[0140] Optionally, the fourth time difference is the time difference between the moment when the second terminal device sends the second ranging signal and the fourth terminal timing.

[0141] Optionally, the fourth terminal timing includes a start time, an end time, or a specified time within the second time unit determined according to a second synchronous clock of the second terminal device.

[0142] Optionally, the moment when the first terminal device receives the second ranging signal is a fourth designated moment within a reception period of the second ranging signal.

[0143] Optionally, the fourth designated moment includes: a start moment of the reception period of the second ranging signal; or an end moment of the reception period of the second ranging signal; or a peak power occurrence moment within the reception period of the second ranging signal.

[0144] Optionally, the third designated moment in the sending period of the second ranging signal and the fourth designated moment in the receiving period of the second ranging signal are moments of the same type.

[0145] Step 909: The first terminal device sends the first time difference and the third time difference to the second terminal device.

[0146] Optionally, when the second terminal device needs to perform distance detection, it receives second ranging information sent by the first terminal device, where the second ranging information includes the first time difference and the third time difference.

[0147] Optionally, when sending the first time difference and the third time difference, the first terminal device may directly send the values ​​of the first time difference and the third time difference, or may send the difference between the first time difference and the third time difference.

[0148] In step 910 , the second terminal device sends the second time difference and the fourth time difference to the first terminal device.

[0149] Optionally, when the first terminal device needs to perform distance detection, it receives first ranging information sent by the second terminal device, where the first ranging information includes the second time difference and the fourth time difference.

[0150] Optionally, when sending the second time difference and the fourth time difference, the second terminal device may directly send the values ​​of the second time difference and the fourth time difference, or may send the difference between the second time difference and the fourth time difference.

[0151] Step 911: The first terminal device determines the distance between the first terminal device and the second terminal device according to the first time difference, the second time difference, the third time difference, and the fourth time difference.

[0152] Step 912: The second terminal device determines the distance between the first terminal device and the second terminal device according to the first time difference, the second time difference, the third time difference, and the fourth time difference.

[0153] Illustratively, a first ranging signal is sent from a first terminal device to a second terminal device at the lth symbol in the nth slot, and a second ranging signal is sent from the second terminal device to the first terminal device at the kth symbol in the mth slot. The first terminal device obtains a first time difference t1 of the first ranging signal and a fourth time difference t4 of the second ranging signal; the second terminal device obtains a second time difference t2 of the first ranging signal and a third time difference t3 of the second ranging signal. Because the time units used for transmission of the first and second ranging signals are known to both the sending and receiving user devices, the reply time and round trip time can be calculated based on the time differences.

[0154] Wherein, reply_time = (mn) × T_slot + (kl) × T_symbol - (t3 + t2);

[0155] RD_time=(mn)×T_slot+(kl)×T_symbol-(t1+t4);

[0156] Where T_slot is the duration of a slot, and T_symbol is the duration of a symbol.

[0157] According to the unilateral two-way ranging formula, the propagation delay is calculated as:

[0158] T_prop=(t1+t2+t3+t4) / 2;

[0159] Therefore, the distance between two terminals can be predicted based on Reply_time, RD_time and T_prop.

[0160] In an optional embodiment, the distance detection between the first terminal device and the second terminal device is implemented by a bilateral bidirectional ranging method. The distance detection between the first terminal device and the second terminal device is performed by sending three ranging signals. FIG10 is a flowchart of a distance detection method in a synchronization system provided by another exemplary embodiment of the present disclosure. As shown in FIG10, the method includes:

[0161] Step 1001: A first terminal device sends a first ranging signal to a second terminal device.

[0162] Optionally, the first terminal device first determines the first synchronization clock according to its own synchronization reference signal.

[0163] The first terminal device sends a first ranging signal to the second terminal device via a direct communication link. Optionally, the first ranging signal is used to measure the distance between the first terminal device and the second terminal device.

[0164] Step 1002: The second terminal device receives a first ranging signal from the first terminal device.

[0165] Optionally, the second terminal device first determines the second synchronization clock according to its own synchronization reference signal. It is worth noting that the first terminal device and the second terminal device can use the same synchronization method or different synchronization methods when determining the first synchronization clock and the second synchronization clock.

[0166] Step 1003: The first terminal device determines a first time difference.

[0167] Optionally, the first time difference is the time difference between the moment when the first terminal device sends the first ranging signal and the first terminal timing.

[0168] Step 1004: The second terminal device determines a second time difference.

[0169] Optionally, the second time difference is a time difference between the moment when the second terminal device receives the first ranging signal and the second terminal timing.

[0170] Step 1005: The second terminal device sends a second ranging signal to the first terminal device.

[0171] Optionally, the moment when the second terminal device sends the second ranging signal is a third designated moment within the sending period of the second ranging signal.

[0172] Optionally, the third designated moment on the second ranging signal includes: the start moment of the second ranging signal transmission period; or the end moment of the second ranging signal transmission period; or the peak power occurrence moment within the second ranging signal transmission period.

[0173] Step 1006: The first terminal device receives a second ranging signal.

[0174] Step 1007: The first terminal device determines a third time difference.

[0175] Optionally, the third time difference is the time difference between the moment when the first terminal device receives the second ranging signal and the third terminal timing.

[0176] Step 1008: The second terminal device determines a fourth time difference.

[0177] Optionally, the fourth time difference is the time difference between the moment when the second terminal device sends the second ranging signal and the fourth terminal timing.

[0178] Optionally, the moment when the first terminal device receives the second ranging signal is a fourth designated moment within a reception period of the second ranging signal.

[0179] Optionally, the fourth designated moment includes: a start moment of the reception period of the second ranging signal; or an end moment of the reception period of the second ranging signal; or a peak power occurrence moment within the reception period of the second ranging signal.

[0180] Optionally, the third designated moment in the sending period of the second ranging signal and the fourth designated moment in the receiving period of the second ranging signal are moments of the same type.

[0181] Step 1009: The first terminal device sends a third ranging signal to the second terminal device.

[0182] Optionally, the first terminal device sends a third ranging signal after sending the first ranging signal; or, the first terminal device sends a third ranging signal after receiving the second ranging signal.

[0183] Optionally, the moment when the first terminal device sends the third ranging signal is the fifth designated moment within the sending period of the third ranging signal.

[0184] Optionally, the fifth designated time on the third ranging signal includes: the start time of the transmission period of the third ranging signal; or the end time of the transmission period of the third ranging signal; or the peak power occurrence time within the transmission period of the third ranging signal.

[0185] Step 1010: The second terminal device receives a third ranging signal.

[0186] Step 1011: The first terminal device determines a fifth time difference.

[0187] Optionally, the fifth time difference is the time difference between the moment when the first terminal device sends the third ranging signal and the fifth terminal timing.

[0188] Optionally, the fifth terminal timing includes a start time, an end time, or a specified time within the third time unit determined according to the first synchronous clock of the first terminal device.

[0189] Step 1012: The second terminal device determines a sixth time difference.

[0190] Optionally, the sixth time difference is the time difference between the moment when the second terminal device receives the third ranging signal and the sixth terminal timing.

[0191] Optionally, the sixth terminal timing includes a start time, an end time of the third time unit or a specified time within the second time unit determined according to the second synchronous clock of the second terminal device.

[0192] Optionally, the moment when the second terminal device receives the third ranging signal is the sixth designated moment within the reception period of the third ranging signal.

[0193] Optionally, the sixth designated time includes: a start time of the reception period of the third ranging signal; or an end time of the reception period of the third ranging signal; or a peak power occurrence time within the reception period of the third ranging signal.

[0194] Optionally, the fifth designated moment in the sending period of the third ranging signal and the sixth designated moment in the receiving period of the third ranging signal are moments of the same type.

[0195] Step 1013: The first terminal device sends the first time difference, the third time difference, and the fifth time difference to the second terminal device.

[0196] Optionally, when the second terminal device needs to perform distance detection, it receives second ranging information sent by the first terminal device, where the second ranging information includes the first time difference, the third time difference, and the fifth time difference.

[0197] Optionally, when sending the first time difference, the third time difference and the fifth time difference, the first terminal device may directly send the numerical values ​​of the first time difference, the third time difference and the fifth time difference, or may send at least two of the difference between the first time difference and the third time difference; the difference between the third time difference and the fifth time difference; and the difference between the first time difference and the fifth time difference.

[0198] Step 1014: The second terminal device sends the second time difference, the fourth time difference, and the sixth time difference to the first terminal device.

[0199] Optionally, when the first terminal device needs to perform distance detection, it receives first ranging information sent by the second terminal device, where the first ranging information includes the second time difference, the fourth time difference, and the sixth time difference.

[0200] Optionally, when sending the second time difference, the fourth time difference and the sixth time difference, the second terminal device may directly send the numerical values ​​of the second time difference, the fourth time difference and the sixth time difference, or may send at least two of the difference between the second time difference and the fourth time difference; the difference between the fourth time difference and the sixth time difference; and the difference between the second time difference and the sixth time difference.

[0201] Step 1015: The first terminal device determines the distance between the first terminal device and the second terminal device according to the second time difference, the first time difference, the third time difference, the fourth time difference, the fifth time difference, and the sixth time difference.

[0202] Step 1016: The second terminal device determines the distance between the first terminal device and the second terminal device according to the second time difference, the first time difference, the third time difference, the fourth time difference, the fifth time difference, and the sixth time difference.

[0203] In an optional embodiment, the distance detection between the first terminal device and the second terminal device is implemented by a bilateral bidirectional ranging method. The distance detection between the first terminal device and the second terminal device is performed by sending four ranging signals. FIG11 is a flowchart of a distance detection method in a synchronization system provided by another exemplary embodiment of the present disclosure. As shown in FIG11, the method includes:

[0204] Step 1101: A first terminal device sends a first ranging signal to a second terminal device.

[0205] Optionally, the first terminal device first determines the first synchronization clock according to its own synchronization reference signal.

[0206] The first terminal device sends a first ranging signal to the second terminal device via a direct communication link. Optionally, the first ranging signal is used to measure the distance between the first terminal device and the second terminal device.

[0207] Step 1102: The second terminal device receives a first ranging signal from the first terminal device.

[0208] Optionally, the second terminal device first determines the second synchronization clock according to its own synchronization reference signal. It is worth noting that the first terminal device and the second terminal device can use the same synchronization method or different synchronization methods when determining the first synchronization clock and the second synchronization clock.

[0209] Step 1103: The first terminal device determines a first time difference.

[0210] Optionally, the first time difference is the time difference between the moment when the first terminal device sends the first ranging signal and the first terminal timing.

[0211] Step 1104: The second terminal device determines a second time difference.

[0212] Optionally, the second time difference is a time difference between the moment when the second terminal device receives the first ranging signal and the second terminal timing.

[0213] Step 1105: The second terminal device sends a second ranging signal to the first terminal device.

[0214] Optionally, the second terminal device sends a second ranging signal to the first terminal device through the direct communication link.

[0215] Optionally, the second ranging signal is a signal sent by the second terminal device to the first terminal device when the second terminal device receives the first ranging signal. The second ranging signal is used to complete ranging between the first terminal device and the second terminal device through unidirectional bilateral ranging in combination with the first ranging signal.

[0216] Step 1106: The first terminal device receives a second ranging signal from the second terminal device.

[0217] Step 1107: The first terminal device determines a third time difference.

[0218] Optionally, the third time difference is the time difference between the moment when the first terminal device receives the second ranging signal and the third terminal timing.

[0219] Step 1108: The second terminal device determines a fourth time difference.

[0220] Optionally, the fourth time difference is the time difference between the moment when the second terminal device sends the second ranging signal and the fourth terminal timing.

[0221] Step 1109: The first terminal device sends a third ranging signal to the second terminal device.

[0222] Optionally, the moment when the first terminal device sends the third ranging signal is the fifth designated moment within the sending period of the third ranging signal.

[0223] Optionally, the fifth designated time on the third ranging signal includes: the start time of the transmission period of the third ranging signal; or the end time of the transmission period of the third ranging signal; or the peak power occurrence time within the transmission period of the third ranging signal.

[0224] Step 1110: The second terminal device receives a third ranging signal from the first terminal device.

[0225] Step 1111: The first terminal device determines a fifth time difference.

[0226] Optionally, the fifth time difference is the time difference between the moment when the first terminal device sends the third ranging signal and the fifth terminal timing.

[0227] Step 1112: The second terminal device determines a sixth time difference.

[0228] Optionally, the sixth time difference is the time difference between the moment when the second terminal device receives the third ranging signal and the sixth terminal timing.

[0229] Step 1113: The second terminal device sends a fourth ranging signal to the second terminal device.

[0230] Optionally, the second terminal device sends a fourth ranging signal to the first terminal device through the direct communication link.

[0231] Optionally, the fourth ranging signal is a signal sent by the second terminal device to the first terminal device when the second terminal device receives the third ranging signal.

[0232] Optionally, the moment when the second terminal device sends the fourth ranging signal is the seventh designated moment within the sending time period of the fourth ranging signal.

[0233] Optionally, the seventh designated time on the fourth ranging signal includes: the start time of the sending period of the fourth ranging signal; or the end time of the sending period of the fourth ranging signal; or the peak power occurrence time within the sending period of the fourth ranging signal.

[0234] Step 1114: The first terminal device receives a fourth ranging signal from the second terminal device.

[0235] Step 1115: The first terminal device determines the seventh time difference.

[0236] Optionally, the seventh time difference is the time difference between the moment when the first terminal device receives the fourth ranging signal and the seventh terminal timing.

[0237] Optionally, the seventh terminal timing includes a start time, an end time, or a specified time within the fourth time unit determined according to the first synchronous clock of the first terminal device.

[0238] Step 1116: The second terminal device determines the eighth time difference.

[0239] Optionally, the eighth time difference is the time difference between the moment when the second terminal device sends the fourth ranging signal and the eighth terminal timing.

[0240] Optionally, the eighth terminal timing includes a start time, an end time, or a designated time within the fourth time unit determined according to the second synchronous clock of the second terminal device.

[0241] Optionally, the moment when the first terminal device receives the fourth ranging signal is the eighth designated moment within the reception period of the fourth ranging signal.

[0242] Optionally, the eighth designated time includes: a start time of the reception period of the fourth ranging signal; or an end time of the reception period of the fourth ranging signal; or a peak power occurrence time within the reception period of the fourth ranging signal.

[0243] Optionally, the seventh designated moment in the sending period of the fourth ranging signal and the eighth designated moment in the receiving period of the fourth ranging signal are moments of the same type.

[0244] Step 1117: The first terminal device sends the first time difference, the third time difference, the fifth time difference, and the seventh time difference to the second terminal device.

[0245] Optionally, when the second terminal device needs to perform distance detection, it receives second ranging information sent by the first terminal device, where the second ranging information includes the first time difference, the third time difference, the fifth time difference, and the seventh time difference.

[0246] Optionally, when sending the first time difference, the third time difference, the fifth time difference and the seventh time difference, the first terminal device may directly send the values ​​of the first time difference, the third time difference, the fifth time difference and the seventh time difference, or may send the difference between the first time difference and the third time difference; the difference between the fifth time difference and the seventh time difference.

[0247] Step 1118: The second terminal device sends the second time difference, the fourth time difference, the sixth time difference, and the eighth time difference to the first terminal device.

[0248] Optionally, when the first terminal device needs to perform distance detection, it receives first ranging information sent by the second terminal device, where the first ranging information includes the second time difference, the fourth time difference, the sixth time difference, and the eighth time difference.

[0249] Optionally, when sending the second time difference, fourth time difference, sixth time difference and eighth time difference, the second terminal device may directly send the values ​​of the second time difference, fourth time difference, sixth time difference and eighth time difference, or may send the difference between the second time difference and the fourth time difference; the difference between the sixth time difference and the eighth time difference.

[0250] Step 1119: The first terminal device determines the distance between the first terminal device and the second terminal device based on the first time difference, the second time difference, the third time difference, the fourth time difference, the fifth time difference, the sixth time difference, the seventh time difference, and the eighth time difference.

[0251] Step 1120: The second terminal device determines the distance between the first terminal device and the second terminal device based on the first time difference, the second time difference, the third time difference, the fourth time difference, the fifth time difference, the sixth time difference, the seventh time difference, and the eighth time difference.

[0252] FIG12 is a structural block diagram of a ranging device in a synchronization system provided by an exemplary embodiment of the present disclosure, which is applied to a first terminal device. As shown in FIG12 , the device includes:

[0253] The sending module 1210 is configured to send a first ranging signal to the second terminal device;

[0254] The processing module 1220 is configured to determine a first time difference, where the first time difference is a time difference between a time when the first terminal device sends the first ranging signal and a first terminal timing;

[0255] The first time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the second time difference, where the second time difference is the time difference between the moment when the second terminal device receives the first ranging signal and the second terminal timing.

[0256] In an optional embodiment, the processing module 1220 is further configured to obtain the second time difference; and determine the distance between the first terminal device and the second terminal device according to the second time difference and the first time difference.

[0257] In an optional embodiment, the moment when the first terminal device sends the first ranging signal is a first designated moment within a sending period of the first ranging signal;

[0258] The moment when the second terminal device receives the first ranging signal is a second designated moment within the reception period of the first ranging signal.

[0259] The first designated time within the sending period of the first ranging signal includes:

[0260] The start time of the transmission period of the first ranging signal; or

[0261] The end time of the transmission period of the first ranging signal; or

[0262] The peak power occurrence time within the transmission period of the first ranging signal.

[0263] In an optional embodiment, the first designated moment in the sending period of the first ranging signal and the second designated moment in the receiving period of the first ranging signal are moments of the same type.

[0264] In an optional embodiment, the first terminal timing includes a start time, an end time of a first time unit or a specified time within the first time unit determined according to a first synchronous clock of the first terminal device.

[0265] In an optional embodiment, the processing module 1220 is further configured to determine the first synchronization clock according to the synchronization reference signal.

[0266] In an optional embodiment, the processing module 1220 is further configured to determine the time unit according to the downlink synchronization signal sent by the network device;

[0267] or,

[0268] The processing module 1220 is further configured to determine a time unit based on the global positioning system signal;

[0269] or,

[0270] The processing module 1220 is further configured to determine a time unit according to the direct connection synchronization signal sent by the third terminal device.

[0271] In an optional embodiment, the processing module 1220 is further configured to determine the first time difference according to configuration or pre-configuration information; or,

[0272] The processing module 1220 is further configured to measure the first time difference according to the third synchronization clock of the first terminal device.

[0273] In an optional embodiment, the frequency of the third synchronization clock of the first terminal device is higher than the frequency of the first synchronization clock of the first terminal device.

[0274] In an optional embodiment, the device further comprises:

[0275] The receiving module 1230 is configured to receive first ranging information sent by the second terminal device, where the first ranging information includes the second time difference.

[0276] In an optional embodiment, the sending module 1210 is further configured to send second ranging information to a second terminal device, where the second ranging information includes the first time difference.

[0277] In an optional embodiment, the device further comprises:

[0278] The receiving module 1230 is configured to receive a second ranging signal from a second terminal device;

[0279] The processing module 1220 is further configured to determine a third time difference, where the third time difference is a time difference between a moment when the first terminal device receives the second ranging signal and a third terminal timing;

[0280] The third time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, the second time difference and the fourth time difference, and the fourth time difference is the time difference between the moment when the second terminal device sends the second ranging signal and the fourth terminal timing.

[0281] In an optional embodiment, the sending module 1210 is further configured to send a third ranging signal to the second terminal device;

[0282] The processing module 1220 is further configured to determine a fifth time difference, where the fifth time difference is a time difference between a moment when the first terminal device sends the third ranging signal and a fifth terminal timing;

[0283] The fifth time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, the second time difference, the third time difference, the fourth time difference and the sixth time difference, and the sixth time difference is the time difference between the moment when the second terminal device receives the third ranging signal and the sixth terminal timing.

[0284] In an optional embodiment, the device further comprises:

[0285] The receiving module 1230 is configured to receive a fourth ranging signal from the second terminal device;

[0286] The processing module 1220 is further configured to determine a seventh time difference, where the seventh time difference is a time difference between a moment when the first terminal device receives the fourth ranging signal and a seventh terminal timing;

[0287] The seventh time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, the second time difference, the third time difference, the fourth time difference, the fifth time difference, the sixth time difference and the eighth time difference, and the eighth time difference is the time difference between the moment when the second terminal device sends the fourth ranging signal and the eighth terminal timing.

[0288] FIG13 is a structural block diagram of a ranging device in a synchronization system provided by an exemplary embodiment of the present disclosure, which is applied to a second terminal device. As shown in FIG13 , the device includes:

[0289] The receiving module 1310 is configured to receive a first ranging signal from a first terminal device;

[0290] The processing module 1320 is configured to determine a second time difference, where the second time difference is a time difference between a moment when the second terminal device receives the first ranging signal and a second terminal timing;

[0291] The second time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, where the first time difference is the time difference between the moment when the first terminal device sends the first ranging signal and the first terminal timing.

[0292] In an optional embodiment, the processing module 1320 is further configured to obtain the first time difference; and determine the distance between the first terminal device and the second terminal device according to the second time difference and the first time difference.

[0293] In an optional embodiment, the moment when the first terminal device sends the first ranging signal is a first designated moment within a sending period of the first ranging signal;

[0294] The moment when the second terminal device receives the first ranging signal is a second designated moment within the reception period of the first ranging signal.

[0295] In an optional embodiment, the first designated moment within the sending period of the first ranging signal includes:

[0296] The start time of the transmission period of the first ranging signal; or

[0297] The end time of the transmission period of the first ranging signal; or

[0298] The peak power occurrence time within the transmission period of the first ranging signal.

[0299] In an optional embodiment, the first designated moment in the sending period of the first ranging signal and the second designated moment in the receiving period of the first ranging signal are moments of the same type.

[0300] In an optional embodiment, the second terminal timing includes a start time, an end time of a first time unit or a specified time within the first time unit determined according to a second synchronous clock of the second terminal.

[0301] In an optional embodiment, the processing module 1320 is further configured to determine a second synchronization clock according to a synchronization reference signal.

[0302] In an optional embodiment, the processing module 1320 is further configured to determine the time unit according to the downlink synchronization signal sent by the network device;

[0303] or,

[0304] The processing module 1320 is further configured to determine a time unit based on the global positioning system signal;

[0305] or,

[0306] The processing module 1320 is further configured to determine a time unit according to the direct connection synchronization signal sent by the fourth terminal device.

[0307] In an optional embodiment, the processing module 1320 is further configured to determine the first time difference according to configuration or pre-configuration information.

[0308] In an optional embodiment, the processing module 1320 is further configured to measure the second time difference according to a fourth synchronization clock of the second terminal device.

[0309] In an optional embodiment, the frequency of the fourth synchronization clock of the second terminal device is higher than the frequency of the second synchronization clock of the second terminal device.

[0310] In an optional embodiment, the receiving module 1310 is further configured to receive second ranging information sent by the first terminal, where the second ranging information includes the first time difference.

[0311] In an optional embodiment, the device further comprises:

[0312] The sending module 1330 is configured to send first ranging information to the first terminal device, where the first ranging information includes the second time difference.

[0313] In an optional embodiment, the device further comprises:

[0314] The sending module 1330 is configured to send a second ranging signal to the first terminal device;

[0315] The processing module 1320 is further configured to determine a fourth time difference, where the fourth time difference is a time difference between a moment when the second terminal device sends the second ranging signal and a fourth terminal timing;

[0316] The fourth time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, the second time difference and the third time difference, and the third time difference is the time difference between the moment when the first terminal device receives the second ranging signal and the third terminal timing.

[0317] In an optional embodiment, the receiving module 1310 is further configured to receive a third ranging signal from the first terminal device;

[0318] The processing module 1320 is further configured to determine a sixth time difference, where the sixth time difference is a time difference between a moment when the second terminal device receives the third ranging signal and a sixth terminal timing;

[0319] The sixth time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, the second time difference, the third time difference, the fourth time difference and the fifth time difference, and the fifth time difference is the time difference between the moment when the first terminal device sends the third ranging signal and the fifth terminal timing.

[0320] In an optional embodiment, the device further comprises:

[0321] The sending module 1330 is configured to send a fourth ranging signal to the first terminal device;

[0322] The processing module 1320 is further configured to determine an eighth time difference, where the eighth time difference is a time difference between a moment when the second terminal device sends the fourth ranging signal and an eighth terminal timing;

[0323] The seventh time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, the second time difference, the third time difference, the fourth time difference, the fifth time difference, the sixth time difference and the seventh time difference, and the seventh time difference is the time difference between the moment when the first terminal device receives the fourth ranging signal and the seventh terminal timing.

[0324] FIG14 shows a schematic structural diagram of a terminal provided by an exemplary embodiment of the present disclosure. The terminal includes: a processor 1401 , a receiver 1402 , a transmitter 1403 , a memory 1404 , and a bus 1405 .

[0325] The processor 1401 includes one or more processing cores. The processor 1401 executes various functional applications and information processing by running software programs and modules.

[0326] The receiver 1402 and the transmitter 1403 may be implemented as a communication component, which may be a communication chip.

[0327] The memory 1404 is connected to the processor 1401 via a bus 1405 .

[0328] The memory 1404 may be used to store at least one instruction, and the processor 1401 may be used to execute the at least one instruction to implement each step in the above method embodiment.

[0329] In addition, the memory 1404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof. Volatile or non-volatile storage devices include but are not limited to: magnetic disks or optical disks, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), static random-access memory (SRAM), read-only memory (ROM), magnetic memory, flash memory, and programmable read-only memory (PROM).

[0330] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is further provided, such as a memory including instructions, wherein the instructions can be executed by a processor of a terminal to perform the method executed by the terminal side in the above-mentioned device switching method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0331] A non-transitory computer-readable storage medium, when instructions in the non-transitory computer storage medium are executed by a processor of a terminal, enables the terminal to execute the ranging method in the above-mentioned synchronization system.

[0332] Fig. 15 is a block diagram showing a network device 1500 according to an exemplary embodiment. In some embodiments, the network device 1500 is a base station.

[0333] The network device 1500 includes a processor 1501, a receiver 1502, a transmitter 1503, and a memory 1504. The receiver 1502, the transmitter 1503, and the memory 1504 are connected to the processor 1501 via a bus.

[0334] Processor 1501 includes one or more processing cores and executes the method performed by the network device in the device switching method provided in the embodiments of the present disclosure by running software programs and modules. Memory 1504 can be used to store software programs and modules. Specifically, memory 1504 can store an operating system 1541 and an application module 1542 required for at least one function. Receiver 1502 is used to receive communication data sent by other devices, and transmitter 1503 is used to send communication data to other devices.

[0335] A non-transitory computer-readable storage medium, when instructions in the non-transitory computer storage medium are executed by a processor of a network device, enables the network device to perform the ranging method in the synchronization system.

[0336] An exemplary embodiment of the present disclosure further provides a communication system, the system comprising: a terminal and a network device;

[0337] The terminal includes a ranging device in a synchronization system provided by the embodiment shown in FIG12 or 13 .

[0338] An exemplary embodiment of the present disclosure further provides a communication system, the communication system comprising: a terminal and a network device;

[0339] The terminal includes the terminal provided by the embodiment shown in FIG14 ;

[0340] The network device includes the network device provided in the embodiment shown in FIG15 .

[0341] An exemplary embodiment of the present disclosure also provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the steps performed by the terminal or access network device in the ranging method in the synchronization system provided by each of the above method embodiments.

[0342] It should be understood that the term "plurality" used herein refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.

[0343] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.

[0344] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A ranging method in a synchronous system, characterized in that: Applied to a first terminal device, the method includes: Sending a first ranging signal to a second terminal device; Determine a first time difference, where the first time difference is a time difference between a moment when the first terminal device sends the first ranging signal and a first terminal timing; The first time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the second time difference, where the second time difference is the time difference between the moment when the second terminal device receives the first ranging signal and the second terminal timing.

2. The method according to claim 1, characterized in that The method further comprises: Obtaining the second time difference; The distance between the first terminal device and the second terminal device is determined according to the second time difference and the first time difference.

3. The method according to claim 1, characterized in that The moment when the first terminal device sends the first ranging signal is the first designated moment within the sending period of the first ranging signal; The moment when the second terminal device receives the first ranging signal is a second designated moment within the reception period of the first ranging signal.

4. The method according to claim 3, characterized in that The first designated time within the sending period of the first ranging signal includes: The start time of the transmission period of the first ranging signal; or The end time of the transmission period of the first ranging signal; or The peak power occurrence time within the transmission period of the first ranging signal.

5. The method according to claim 3, characterized in that The first designated time within the transmission period of the first ranging signal and the second designated time within the reception period of the first ranging signal are times of the same type.

6. The method according to any one of claims 1 to 5, characterized in that: The first terminal timing includes a start time, an end time of a first time unit or a specified time within the first time unit determined according to a first synchronous clock of the first terminal device.

7. The method according to claim 6, characterized in that The method further comprises: A first synchronization clock is determined according to the synchronization reference signal.

8. The method according to claim 7, characterized in that The method further comprises: Determine the time unit according to the downlink synchronization signal sent by the network device; or, Determining time units based on GPS signals; or, The time unit is determined according to the direct connection synchronization signal sent by the third terminal device.

9. The method according to any one of claims 1 to 5, characterized in that: Determining the first time difference includes: Determine the first time difference according to configuration or pre-configuration information; or, The first time difference is measured according to a third synchronization clock of the first terminal device.

10. The method according to claim 9, characterized in that The frequency of the third synchronization clock of the first terminal device is higher than the frequency of the first synchronization clock of the first terminal device.

11. The method according to claim 2, characterized in that The obtaining of the second time difference includes: Receive first ranging information sent by the second terminal device, where the first ranging information includes the second time difference.

12. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Send second ranging information to a second terminal device, where the second ranging information includes the first time difference.

13. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: receiving a second ranging signal from the second terminal device; Determine a third time difference, where the third time difference is a time difference between a moment when the first terminal device receives the second ranging signal and a third terminal timing; The third time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, the second time difference and the fourth time difference, and the fourth time difference is the time difference between the moment when the second terminal device sends the second ranging signal and the fourth terminal timing.

14. The method according to claim 13, characterized in that The method further comprises: Sending a third ranging signal to the second terminal device; Determine a fifth time difference, where the fifth time difference is a time difference between a moment when the first terminal device sends the third ranging signal and a fifth terminal timing; The fifth time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, the second time difference, the third time difference, the fourth time difference and the sixth time difference, and the sixth time difference is the time difference between the moment when the second terminal device receives the third ranging signal and the sixth terminal timing.

15. The method according to claim 14, characterized in that The method further comprises: receiving a fourth ranging signal from the second terminal device; Determine a seventh time difference, where the seventh time difference is a time difference between a moment when the first terminal device receives the fourth ranging signal and a seventh terminal timing; The seventh time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, the second time difference, the third time difference, the fourth time difference, the fifth time difference, the sixth time difference and the eighth time difference, and the eighth time difference is the time difference between the moment when the second terminal device sends the fourth ranging signal and the eighth terminal timing.

16. A ranging method in a synchronous system, characterized in that: Applied to a second terminal device, the method includes: receiving a first ranging signal from a first terminal device; Determine a second time difference, where the second time difference is a time difference between a moment when the second terminal device receives the first ranging signal and a second terminal timing; The second time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, where the first time difference is the time difference between the moment when the first terminal device sends the first ranging signal and the first terminal timing.

17. The method according to claim 16, characterized in that The method further comprises: obtaining the first time difference; The distance between the first terminal device and the second terminal device is determined according to the second time difference and the first time difference.

18. The method according to claim 16, characterized in that The moment when the first terminal device sends the first ranging signal is the first designated moment within the sending period of the first ranging signal; The moment when the second terminal device receives the first ranging signal is a second designated moment within the reception period of the first ranging signal.

19. The method according to claim 18, characterized in that The first designated time within the sending period of the first ranging signal includes: The start time of the transmission period of the first ranging signal; or The end time of the transmission period of the first ranging signal; or The peak power occurrence time within the transmission period of the first ranging signal.

20. The method according to claim 18, wherein The first designated time within the transmission period of the first ranging signal and the second designated time within the reception period of the first ranging signal are times of the same type.

21. The method according to any one of claims 16 to 20, characterized in that The second terminal timing includes a start time, an end time of a first time unit or a specified time within the first time unit determined according to a second synchronous clock of the second terminal.

22. The method according to claim 21, characterized in that The method further comprises: A second synchronization clock is determined according to the synchronization reference signal.

23. The method according to claim 22, characterized in that The method further comprises: Determine the time unit according to the downlink synchronization signal sent by the network device; or, Determining time units based on GPS signals; or, The time unit is determined according to the direct connection synchronization signal sent by the fourth terminal device.

24. The method according to claim 17, wherein The obtaining of the first time difference includes: The first time difference is determined according to configuration or pre-configuration information.

25. The method according to claim 21, wherein The determining of the second time difference comprises: The second time difference is measured according to a fourth synchronization clock of the second terminal device.

26. The method according to claim 25, characterized in that The frequency of the fourth synchronization clock of the second terminal device is higher than the frequency of the second synchronization clock of the second terminal device.

27. The method according to any one of claims 16 to 20, characterized in that The obtaining of the first time difference includes: Second ranging information sent by the first terminal is received, where the second ranging information includes the first time difference.

28. The method according to any one of claims 16 to 20, characterized in that The method further comprises: Send first ranging information to the first terminal device, where the first ranging information includes the second time difference.

29. The method according to any one of claims 16 to 20, characterized in that The method further comprises: Sending a second ranging signal to the first terminal device; Determine a fourth time difference, where the fourth time difference is a time difference between a moment when the second terminal device sends the second ranging signal and a fourth terminal timing; The fourth time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, the second time difference and the third time difference, and the third time difference is the time difference between the moment when the first terminal device receives the second ranging signal and the third terminal timing.

30. The method according to claim 28, wherein The method further comprises: receiving a third ranging signal from the first terminal device; Determine a sixth time difference, where the sixth time difference is a time difference between a moment when the second terminal device receives the third ranging signal and a sixth terminal timing; The sixth time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, the second time difference, the third time difference, the fourth time difference and the fifth time difference, and the fifth time difference is the time difference between the moment when the first terminal device sends the third ranging signal and the fifth terminal timing.

31. The method according to claim 30, wherein The method further comprises: Sending a fourth ranging signal to the first terminal device; Determine an eighth time difference, where the eighth time difference is a time difference between a moment when the second terminal device sends the fourth ranging signal and an eighth terminal timing; The seventh time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, the second time difference, the third time difference, the fourth time difference, the fifth time difference, the sixth time difference and the seventh time difference, and the seventh time difference is the time difference between the moment when the first terminal device receives the fourth ranging signal and the seventh terminal timing.

32. A distance measuring device in a synchronous system, characterized in that: Applied in a first terminal device, the apparatus includes: a sending module, configured to send a first ranging signal to a second terminal device; a processing module configured to determine a first time difference, where the first time difference is a time difference between a moment when the first terminal device sends the first ranging signal and a first terminal timing; The first time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the second time difference, where the second time difference is the time difference between the moment when the second terminal device receives the first ranging signal and the second terminal timing.

33. A distance measuring device in a synchronous system, characterized in that: Applied to a second terminal device, the apparatus includes: A receiving module, configured to receive a first ranging signal from a first terminal device; a processing module configured to determine a second time difference, where the second time difference is a time difference between a moment when the second terminal device receives the first ranging signal and a second terminal timing; The second time difference is used to determine the distance between the first terminal device and the second terminal device in combination with the first time difference, where the first time difference is the time difference between the moment when the first terminal device sends the first ranging signal and the first terminal timing.

34. A terminal, characterized in that: The terminal includes: processor; a transceiver connected to the processor; a memory for storing executable signaling for the processor; The processor is configured to load and execute executable instructions to implement the ranging method in the synchronization system according to any one of claims 1 to 31.

35. A computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the ranging method in the synchronization system as described in any one of claims 1 to 31.