WO2023246427A1 - 一种测距方法和通信装置 - Google Patents

一种测距方法和通信装置 Download PDF

Info

Publication number
WO2023246427A1
WO2023246427A1 PCT/CN2023/096568 CN2023096568W WO2023246427A1 WO 2023246427 A1 WO2023246427 A1 WO 2023246427A1 CN 2023096568 W CN2023096568 W CN 2023096568W WO 2023246427 A1 WO2023246427 A1 WO 2023246427A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
layer
signal
duration
ranging
Prior art date
Application number
PCT/CN2023/096568
Other languages
English (en)
French (fr)
Inventor
许胜锋
李濛
应江威
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023246427A1 publication Critical patent/WO2023246427A1/zh

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S11/00Systems for determining distance or velocity not using reflection or reradiation
    • G01S11/02Systems for determining distance or velocity not using reflection or reradiation using radio waves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management

Definitions

  • Embodiments of the present application relate to the field of communications, and more specifically, to a ranging method and a communications device.
  • D2D device-to-device
  • V2X vehicle-to-everything
  • ProSe proximity-based services
  • two terminals can communicate directly after discovering each other, and can transmit information on the data plane and control plane.
  • ranging can also be performed between terminals based on direct communication to obtain the relative distance between terminals.
  • how to perform ranging based on direct communication between terminals has not yet been specified.
  • This application provides a ranging method and a communication device, which can measure the distance between terminals based on direct communication between terminals.
  • a first aspect provides a ranging method, which may be executed by a first terminal or by a module or unit in the first terminal.
  • the method includes: the first layer of the first terminal sends ranging information to the access layer of the first terminal, where the ranging information is used to indicate measuring the distance between the first terminal and the second terminal;
  • the access layer of the first terminal sends a first signal to the second terminal according to the ranging information.
  • the first signal is used to measure the distance between the first terminal and the second terminal.
  • the access layer of the first terminal receives the second signal from the second terminal, and the second signal is used to respond to the first signal; the first layer of the first terminal obtains the first duration, The first duration is the duration between the moment when the first terminal sends the first signal and the moment when the first terminal receives the second signal; the first layer of the first terminal acquires the second Duration, the second duration is the duration between the moment when the second terminal receives the first signal and the moment when the second terminal sends the second signal; the first layer of the first terminal is based on The first duration and the second duration determine the distance between the first terminal and the second terminal.
  • the access layer of the first terminal generates and sends a first signal for ranging according to the ranging information of the first layer, and receives a second signal in response to the first signal; the access layer of the first terminal The first layer obtains the first duration and the second duration, and determines the distance between the first terminal and the second terminal based on the first duration and the second duration. In this way, it can be implemented Now measure the distance between the first terminal and the second terminal.
  • the above technical solution takes into account the layered architecture inside the terminal and clarifies the functions of the first layer and the access layer inside the terminal.
  • the first layer determines the distance between the first terminal and the second terminal, the result is not easily exposed or obtained by other entities. Therefore, the above technical solution helps to ensure the distance measurement result (i.e., the distance between the first terminal and the second terminal). distance) safety.
  • the ranging information includes: a ranging indication and an identification of the second terminal, where the ranging indication is used to indicate a ranging operation.
  • the relative distance between terminals can be obtained through ranging operations.
  • the identification of the second terminal is used to indicate the object of ranging.
  • the access layer of the first terminal can determine and measure the distance between the first terminal and the second terminal based on the ranging information.
  • the ranging information includes: first ranging period information and an identification of the second terminal, the first ranging period information Used to indicate the first period of ranging.
  • the ranging period may also be called the ranging time interval.
  • the first period may also be called the first time interval.
  • this application uses the term "period" uniformly.
  • the ranging information includes: ranging instructions, first ranging period information and an identification of the second terminal, and the ranging information The indication is used to indicate the ranging operation, and the first ranging period information is used to indicate the first period of ranging.
  • the method further includes: the access layer of the first terminal determines the first duration; The layer obtains the first duration, including: the first layer of the first terminal obtains the first duration from the access layer of the first terminal.
  • the first duration is determined by the access layer of the first terminal, so that the first layer of the first terminal can obtain the first duration from the access layer of the first terminal. Since the first signal is sent by the access layer of the first terminal and the second signal is received by the access layer of the first terminal, the access layer of the first terminal knows the time of sending the first signal and the time of receiving the second signal, Furthermore, the time length between the moment when the first signal is sent and the moment when the second signal is received can be determined, and the solution is easy to implement.
  • the method further includes: the access layer of the first terminal stores a first identifier and the first terminal sends the first The first correspondence relationship of the time of the signal, the first identifier corresponds to the second terminal; the access layer of the first terminal determines the first duration, including: the access layer of the first terminal determines The moment when the first terminal receives the second signal; the access layer of the first terminal obtains the first identifier based on the first identifier included in the second signal and the first corresponding relationship. The time when the terminal sends the first signal; the access layer of the first terminal determines the time according to the time when the first terminal sends the first signal and the time when the first terminal receives the second signal. Describe the first duration.
  • the access layer of the first terminal can obtain the corresponding information of the second signal based on the first identification included in the second signal.
  • the sending moment of the first signal to ensure the accuracy of ranging.
  • the first identification includes an identification of the first terminal and/or an identification of the second terminal, and the first identification of the first terminal.
  • the identifier is used to identify communication between the first terminal and the second terminal.
  • the identifier of the first terminal here is used to identify the communication between the first terminal and the second terminal. It can be understood that the identifier of the first terminal is not used to communicate with other terminals, or it can be determined by the identifier of the first terminal. Communication peer for the second terminal. For example, when the first terminal communicates with multiple terminals including the second terminal at the same time, the first terminal can use different identifiers to communicate with different terminals. In this case, the identifier of the first terminal can also be Multiple terminals communicating with the first terminal are distinguished.
  • the first layer of the first terminal obtains the second duration, including: the first layer of the first terminal receives the second duration from the first layer.
  • the first message of the first layer of the second terminal includes the second duration; the first layer of the first terminal obtains the second duration from the first message.
  • the first message includes a proximity-based service communication 5-signaling (ProSe communication 5 signaling, PC5-S) message.
  • ProSe communication 5 signaling PC5-S
  • the second message is layer one signaling.
  • the first layer of the first terminal obtains the second duration, including: the first layer of the first terminal receives the second duration from the first layer.
  • the data of the first layer of the second terminal includes the second duration; the first layer of the first terminal obtains the second duration from the data.
  • the first layer of the second terminal sends the second duration as data to the first layer of the first terminal.
  • the data is proximity-based service communication 5-user plane (ProSe communication 5 user plane, PC5-U) data.
  • the first layer of the first terminal obtains the second duration, including: the access layer of the first terminal receives the second duration from the first terminal. A second message from the access layer of the two terminals, the second message including the second duration; the access layer of the first terminal obtains the second duration from the second message; the first terminal The first layer obtains the second duration from the access layer of the first terminal.
  • the second message includes a proximity-based service communication 5-radio resource control (ProSe communication 5 radio resource control, PC5-RRC) message.
  • ProSe communication 5 radio resource control PC5-RRC
  • the second message is signaling of the access layer.
  • the method further includes: the first layer of the first terminal determines the communication between the first terminal and the second terminal. Whether the distance satisfies a threshold condition; when the distance between the first terminal and the second terminal satisfies the threshold condition, the first layer of the first terminal sends the The distance between the first terminal and the second terminal.
  • the threshold condition comes from an application layer of the first terminal.
  • D is the distance between the first terminal and the second terminal
  • c is the speed of light
  • T round is the first duration
  • T reply is the second duration
  • the first layer is between the application layer and the access layer.
  • the first layer is a ranging layer (ranging layer), a ProSe layer, or a V2X layer. It should be noted that in different communication scenarios, the terminal The names and divisions of each layer may be different. Therefore, the first layer may be different in different communication scenarios. Here are only a few possible layers.
  • the first layer of the first terminal after determining the distance between the first terminal and the second terminal, further determines the distance between the first terminal and the second terminal according to The distance between the first terminal and the second terminal determines the second ranging period, and then sends second ranging period information to the access layer of the first terminal.
  • the second ranging period information Used to indicate the second cycle.
  • the access layer of the first terminal may perform a ranging operation according to the second cycle.
  • the first layer of the first terminal obtains the corresponding relationship between the distance and the ranging period from the application layer of the first terminal or the core network element.
  • the first layer of the first terminal obtains the corresponding relationship between the distance between the first terminal and the second terminal. and determine the second ranging period information with the obtained correspondence.
  • the first layer of the first terminal can update the ranging period information according to the distance between the first terminal and the second terminal. For example, it can be realized that a larger period is used when the distance between terminals is longer. Use smaller periods when the distance is smaller.
  • a second aspect provides a ranging method, which may be executed by a first terminal or by a module or unit in the first terminal.
  • the method includes: the first layer of the first terminal sends ranging information to the access layer of the first terminal, where the ranging information is used to indicate measuring the distance between the first terminal and the second terminal;
  • the access layer of the first terminal sends a first signal to the second terminal according to the ranging information.
  • the first signal is used to measure the distance between the first terminal and the second terminal.
  • the access layer of the first terminal receives a second signal from the second terminal, and the second signal is used to respond to the first signal; the access layer of the first terminal determines a first duration, The first duration is the duration between the moment when the first terminal sends the first signal and the moment when the first terminal receives the second signal; the access layer of the first terminal obtains the second Duration, the second duration is the duration between the moment when the second terminal receives the first signal and the moment when the second terminal sends the second signal; the access layer of the first terminal is based on The first duration and the second duration determine the distance between the first terminal and the second terminal; the access layer of the first terminal sends the information to the first layer of the first terminal. The distance between the first terminal and the second terminal.
  • the access layer of the first terminal generates and sends a first signal for ranging based on the ranging information of the first layer, receives a second signal in response to the first signal, and determines the first duration, Obtain the second duration, and determine the distance between the first terminal and the second terminal based on the first duration and the second duration. In this way, the distance between the first terminal and the second terminal can be measured.
  • the above technical solution takes into account the layered architecture inside the terminal and clarifies the functions of the first layer and the access layer inside the terminal.
  • the ranging information includes: a ranging indication and an identification of the second terminal, where the ranging indication is used to indicate a ranging operation.
  • the relative distance between terminals can be obtained through ranging operations.
  • the identification of the second terminal is used to indicate the object of ranging.
  • the access layer of the first terminal can determine and measure the distance between the first terminal and the second terminal based on the ranging information.
  • the ranging information includes: first ranging period information and an identification of the second terminal, the first ranging period information Used to indicate the first period of ranging.
  • the ranging information includes: The ranging indication, the first ranging period information and the identification of the second terminal, the ranging indication is used to indicate the ranging operation, and the first ranging period information is used to indicate the first period of ranging.
  • the method further includes: the access layer of the first terminal stores a first identifier and the first terminal sends the first The first correspondence relationship of the time of the signal, the first identifier corresponds to the second terminal; the access layer of the first terminal determines the first duration, including: the access layer of the first terminal determines the The moment when the first terminal receives the second signal; the access layer of the first terminal obtains the information sent by the first terminal according to the first identifier included in the second signal and the first corresponding relationship. The time of the first signal; the access layer of the first terminal determines the time of the first signal based on the time when the first terminal sends the first signal and the time when the first terminal receives the second signal. For a while.
  • the access layer of the first terminal can obtain the corresponding information of the second signal based on the first identification included in the second signal.
  • the sending moment of the first signal to ensure the accuracy of ranging.
  • the first identification includes an identification of the first terminal and/or an identification of the second terminal, and the first identification of the first terminal The identifier is used to identify communication between the first terminal and the second terminal.
  • the identifier of the first terminal here is used to identify the communication between the first terminal and the second terminal. It can be understood that the identifier of the first terminal is not used to communicate with other terminals, or it can be determined by the identifier of the first terminal.
  • the opposite end of communication is the second terminal. For example, when the first terminal communicates with multiple terminals including the second terminal at the same time, the first terminal can use different identifiers to communicate with different terminals. In this case, the identifier of the first terminal can also be Multiple terminals communicating with the first terminal are distinguished.
  • the access layer of the first terminal obtains the second duration, including: the access layer of the first terminal receives the second duration from the first terminal.
  • the second message includes a PC5-RRC message.
  • the second message is layer one signaling.
  • the method further includes: the access layer of the first terminal determines the connection between the first terminal and the second terminal. Whether the distance meets the threshold condition; the access layer of the first terminal sends the distance between the first terminal and the second terminal to the first layer of the first terminal, including: when the first terminal When the distance between the first terminal and the second terminal satisfies the threshold condition, the access layer of the first terminal sends the connection between the first terminal and the second terminal to the first layer of the first terminal. distance.
  • the ranging information includes the threshold condition.
  • the method further includes: the first layer of the first terminal determines the communication between the first terminal and the second terminal. Whether the distance satisfies a threshold condition; when the distance between the first terminal and the second terminal satisfies the threshold condition, the first layer of the first terminal sends the The distance between the first terminal and the second terminal.
  • the first layer of the first terminal may also determine whether the distance between the first terminal and the second terminal satisfies the threshold condition.
  • the threshold condition comes from the application layer of the first terminal.
  • D is the distance between the first terminal and the second terminal
  • c is the speed of light
  • T round is the first duration
  • T reply is the second duration
  • the first layer is between the application layer and the access layer.
  • the first layer is a ranging layer, a ProSe layer, or a V2X layer. It should be noted that in different communication scenarios, the names and division methods of each layer inside the terminal may be different. Therefore, in different communication scenarios, the first layer may be different. Here are only a few possible layers. .
  • the access layer of the first terminal after determining the distance between the first terminal and the second terminal, further determines the distance between the first terminal and the second terminal. The distance between the first terminal and the second terminal determines the second period of ranging. Subsequently, the access layer of the first terminal may perform a ranging operation according to the second cycle.
  • the access layer of the first terminal obtains the corresponding relationship between the distance and the ranging period from the application layer of the first terminal or the first layer of the first terminal.
  • the access layer of the first terminal obtains the corresponding relationship between the first terminal and the second terminal. The distance between them and the obtained correspondence determine the second period.
  • the access layer of the first terminal can update the ranging period information according to the distance between the first terminal and the second terminal. For example, it can be realized that a larger period is used when the distance between terminals is longer. Use smaller periods when the distance is smaller.
  • a ranging method is provided, which method can be executed by a second terminal or by a module or unit in the second terminal.
  • the method includes: the access layer of the second terminal receives a first signal from the first terminal, the first signal is used to measure the distance between the first terminal and the second terminal; the second terminal The access layer of the terminal sends a second signal to the first terminal, and the second signal is used to respond to the first signal; the access layer of the second terminal determines a second duration, and the second duration is The duration between the moment when the second terminal receives the first signal and the moment when the second terminal sends the second signal; the second terminal sends the second duration to the first terminal.
  • the access layer of the second terminal receives the first signal from the first terminal, sends a second signal to the first terminal in response to the first signal, and sends the second signal according to the time of receiving the first signal and the time of receiving the first signal.
  • the second duration is determined at the moment of the second signal, and the determined second duration is sent to the first terminal, so that the first terminal can complete the ranging operation and obtain the distance between the first terminal and the second terminal. Therefore, this technical solution can measure the distance between the first terminal and the second terminal.
  • the above technical solution takes into account the layered architecture within the terminal and clarifies the functions of the access layer within the terminal.
  • the second terminal sending the second duration to the first terminal includes: the first layer of the second terminal sending the second duration to the first terminal.
  • the first layer sends a first message, where the first message includes the second duration.
  • the first message includes a PC5-S message.
  • the second message is layer one signaling.
  • the second terminal sends the second duration to the first terminal, including: the first layer of the second terminal sends The first layer of the first terminal sends data, and the data includes the second duration.
  • the first layer of the second terminal sends the second duration as data to the first layer of the first terminal.
  • the data is PC5-U data.
  • the second terminal sending the second duration to the first terminal includes: the access layer of the second terminal sends The access layer of the first terminal sends a second message, where the second message includes the second duration.
  • the second message includes a PC5-RRC message.
  • the second message is signaling of the access layer.
  • the method further includes: the access layer of the second terminal stores the second identification and the second terminal receives the first The second correspondence relationship of the moment of the signal, the second identifier corresponds to the first terminal; the access layer of the second terminal determines the second duration, including: the access layer of the second terminal determines the The moment when the second terminal sends the second signal; the access layer of the second terminal obtains the reception received by the second terminal according to the second identifier included in the second signal and the second corresponding relationship. The time of the first signal; the access layer of the second terminal determines the second time based on the time when the second terminal receives the first signal and the time when the second terminal sends the second signal. Two hours.
  • the access layer of the second terminal can obtain the information corresponding to the second signal based on the second identification included in the second signal. The receiving moment of the first signal, thereby ensuring the accuracy of ranging.
  • the second identification includes the identification of the first terminal and/or the identification of the second terminal, and the second identification of the second terminal.
  • the identifier is used to identify communication between the second terminal and the first terminal.
  • the identifier of the second terminal here is used to identify the communication between the second terminal and the first terminal. It can be understood that the identifier of the second terminal is not used to communicate with other terminals, or the identifier of the second terminal can be used to determine the communication. The opposite end is the first terminal. For example, when the second terminal communicates with multiple terminals including the first terminal at the same time, the second terminal can use different identifiers to communicate with different terminals. In this case, the identifier of the second terminal can also be Differentiate multiple terminals communicating with the second terminal.
  • the first layer is between the application layer and the access layer.
  • the first layer is a ranging layer, a ProSe layer, or a V2X layer. It should be noted that in different communication scenarios, the names and division methods of each layer inside the terminal may be different. Therefore, in different communication scenarios, the first layer may be different. Here are only a few possible layers. .
  • a fourth aspect provides a ranging method, which may be executed by a first terminal or by a module or unit in the first terminal.
  • the method includes: a first terminal sending a first signal to a second terminal, the first signal being used to measure the distance between the first terminal and the second terminal; the first terminal receiving the signal from the first terminal.
  • the second signal of the second terminal, the second signal is used to respond to the first signal;
  • the first terminal determines a first duration, the first duration is the time for the first terminal to send the first signal The duration between the time and the time when the first terminal receives the second signal;
  • the first terminal receives the first message, the second message or the data from the second terminal, the first message, the The second message and the data include a second duration, and the second duration is the duration between the moment when the second terminal receives the first signal and the moment when the second terminal sends the second signal.
  • the first message includes a PC5-S message
  • the second message includes a PC5-RRC message
  • the data is PC5-U data;
  • the first terminal according to the first duration and the second duration, The distance between the first terminal and the second terminal is determined.
  • the first terminal sends a first signal for ranging, receives a second signal in response to the first signal, and determines the time between the time when the first terminal sends the first signal and the time when it receives the second signal. the first duration, and receive the second duration from the second terminal through the PC5-S message, PC5-RRC message or data, and then determine the distance between the first terminal and the second terminal based on the first duration and the second duration. In this way, the distance between the first terminal and the second terminal can be measured.
  • the method further includes: the first terminal storing a first correspondence between a first identification and a moment when the first terminal sends the first signal, the first identification corresponding to the first Two terminals; the first terminal determines the first duration, including: the first terminal determines the moment when the first terminal receives the second signal; the first terminal determines the time period included in the second signal according to The first identifier and the first corresponding relationship are used to obtain the time when the first terminal sends the first signal; the first terminal obtains the time when the first terminal sends the first signal and the time when the first terminal sends the first signal and the time when the first terminal sends the first signal.
  • the first duration is determined at the time when a terminal receives the second signal.
  • the first terminal since there is a corresponding relationship between the first identifier and the time when the first terminal sends the first signal, the first terminal can obtain the first signal corresponding to the second signal according to the first identifier included in the second signal. sending time to ensure the accuracy of ranging.
  • the first identification includes an identification of the first terminal and/or an identification of the second terminal, and the first identification of the first terminal The identifier is used to identify communication between the first terminal and the second terminal.
  • the identifier of the first terminal here is used to identify the communication between the first terminal and the second terminal. It can be understood that the identifier of the first terminal is not used to communicate with other terminals, or it can be determined by the identifier of the first terminal.
  • the opposite end of communication is the second terminal. For example, when the first terminal communicates with multiple terminals including the second terminal at the same time, the first terminal can use different identifiers to communicate with different terminals. In this case, the identifier of the first terminal can also be Multiple terminals communicating with the first terminal are distinguished.
  • the method further includes: the first terminal obtains ranging information, the ranging information is used to indicate measuring the first terminal distance from the second terminal. In this case, the first terminal sends the first signal to the second terminal according to the ranging information.
  • the ranging information includes a ranging indication and an identification of the second terminal.
  • the ranging indication is used to indicate the ranging operation.
  • the ranging information includes a third A ranging period information and the identification of the second terminal.
  • the first ranging period information is used to indicate the first period of ranging.
  • the ranging information includes a ranging indication, first ranging period information and an identification of the second terminal.
  • the first ranging period information is used to indicate the first period of ranging.
  • the first terminal after determining the distance between the first terminal and the second terminal, the first terminal further determines the distance between the first terminal and the second terminal according to the first terminal. The distance between the terminal and the second terminal determines the second period of ranging. Subsequently, the first terminal may perform a ranging operation according to the second cycle.
  • the first terminal obtains the corresponding relationship between the distance and the ranging period. After determining the distance between the first terminal and the second terminal, the first terminal uses the distance between the first terminal and the second terminal and the obtained correspondence. The relationship determines the second cycle.
  • the first terminal can update the ranging period information according to the distance between the first terminal and the second terminal. For example, a larger period can be used when the distance between the terminals is longer, and a larger period can be used when the distance between the terminals is smaller. Use smaller cycles.
  • the first terminal obtaining ranging information includes: the first terminal receiving the ranging information from the second terminal ; The method further includes: the first terminal sending the distance between the first terminal and the second terminal to the second terminal.
  • the first terminal initiates ranging when receiving the ranging request from the second terminal, and feeds back the measured distance between the first terminal and the second terminal to the second terminal.
  • the first terminal includes an application layer and a network layer.
  • the method in the fourth aspect or any implementation thereof may be performed by the network layer of the first terminal, including: the network layer of the first terminal sends the first signal to the second terminal; the network layer of the first terminal receives The second signal from the second terminal; the network layer of the first terminal determines the first duration based on the time when the first signal is sent and the time when the second signal is received; the network layer of the second terminal determines the first duration based on the time when the first signal is received and the time when the second signal is received.
  • the moment of the second signal determines the second duration; the network layer of the first terminal receives the first message, the second message or the data from the second terminal, wherein the first message, the second message and the data include the second duration; the first The network layer of the terminal determines the distance between the first terminal and the second terminal based on the first duration and the second duration.
  • the first terminal obtains the ranging information, including: the application layer of the first terminal generates the ranging information; the method further includes: the application layer of the first terminal transmits the ranging information to the first terminal.
  • the network layer of the terminal sends the ranging information.
  • the network layer may include access functions and ranging functions.
  • the access function can perform: sending and receiving signals (for example, sending a first signal, receiving a second signal, etc.), performing calculations based on the sending and receiving time of signals (for example, determining a first duration), etc.
  • the ranging function may perform: receiving information from the application layer, calculating the distance between terminals (for example, determining the distance between the first terminal and the second terminal according to the first duration and the second duration), etc.
  • the layer containing the access function can be called the access layer
  • the layer containing the ranging function can be called the first layer
  • communication can be carried out between the access layer and the first layer.
  • the access layer and the first layer may implement the method in the first aspect or any implementation manner of the first aspect.
  • the access function may perform: sending and receiving signals (for example, sending a first signal, receiving a second signal, etc.), performing calculations based on the sending and receiving moments of signals (for example, determining a first duration), calculating the distance between terminals. distance (for example, the distance between the first terminal and the second terminal is determined based on the first duration and the second duration), etc.
  • the ranging function can perform: receiving information from the application layer.
  • those that include access functions can be called access
  • the access layer which includes the ranging function, can be called the first layer, and communication can be carried out between the access layer and the first layer.
  • the access layer and the first layer can implement the second aspect or the third aspect. Methods in any implementation of the two aspects.
  • the first terminal includes an application layer, a first layer and an access layer.
  • the first layer and the access layer of the first terminal may cooperate to perform the method in the fourth aspect or any implementation thereof.
  • the first terminal obtains the ranging information, including: the application layer of the first terminal generates the ranging information; the method further includes: the application layer of the first terminal transmits the ranging information to the first terminal.
  • the first layer of the terminal sends ranging information; the first layer of the first terminal sends the ranging information to the access layer of the first terminal.
  • a fifth aspect provides a ranging method, which may be executed by a second terminal or by a module or unit in the second terminal.
  • the method includes: the second terminal receives a first signal from the first terminal, the first signal is used to measure the distance between the first terminal and the second terminal; the second terminal sends a signal to the second terminal.
  • the first terminal sends the second signal, and the second signal is used to respond to the first signal; the second terminal determines a second duration, and the second duration is when the second terminal receives the first signal.
  • the second message and the data include the second duration, the first message includes a PC5-S message, the second message includes a PC5-RRC message, and the data may be PC5-U data.
  • the second terminal receives the first signal for ranging from the first terminal, sends a second signal in response to the first signal to the first terminal, and determines the time when the second terminal receives the first signal and the time when the second terminal receives the first signal.
  • the duration determines the distance between the first terminal and the second terminal. In this way, the distance between the first terminal and the second terminal can be measured.
  • the method further includes: the second terminal storing a second correspondence between the second identifier and the moment when the second terminal receives the first signal, so The second identifier corresponds to the first terminal; the second terminal determines the second duration, including: the second terminal determines the moment when the second terminal sends the second signal; the second terminal determines the second time period according to The second identification included in the second signal and the second corresponding relationship are obtained to obtain the time when the second terminal receives the first signal; the second terminal receives the second signal according to the second terminal.
  • the second duration is determined by the time of the first signal and the time of the second terminal sending the second signal.
  • the second terminal since there is a corresponding relationship between the second identifier and the moment when the second terminal receives the first signal, the second terminal can obtain the first signal corresponding to the second signal according to the second identifier included in the second signal. receiving time to ensure the accuracy of ranging.
  • the second identification includes an identification of the first terminal and/or an identification of the second terminal, and the second identification of the second terminal.
  • the identifier is used to identify communication between the second terminal and the first terminal.
  • the identifier of the second terminal here is used to identify the communication between the second terminal and the first terminal. It can be understood that the identifier of the second terminal is not used to communicate with other terminals, or it can be determined by the identifier of the second terminal. The opposite end of communication is the first terminal. For example, when the second terminal communicates with multiple terminals including the first terminal at the same time, the second terminal can use different identifiers to communicate with different terminals. In this case, the identifier of the second terminal can also be district Multiple terminals that communicate with the second terminal.
  • the method further includes: the second terminal sending ranging information to the first terminal, the ranging information being used to indicate The distance between the first terminal and the second terminal is measured; the second terminal receives the distance between the first terminal and the second terminal from the first terminal.
  • the second terminal when there is a ranging requirement, the second terminal sends ranging information to the first terminal to request the first terminal to initiate ranging, and receives the distance between the first terminal and the second terminal from the first terminal.
  • the ranging information includes a ranging indication and an identification of the second terminal.
  • the ranging indication is used to indicate the ranging operation.
  • the ranging information includes first ranging period information and an identification of the second terminal.
  • the first ranging period information is used to indicate the first period of ranging.
  • the ranging information includes a ranging indication, first ranging period information and an identification of the second terminal.
  • the first ranging period information is used to indicate the first period of ranging.
  • the second terminal includes an application layer, a first layer and an access layer.
  • the first layer and the access layer of the second terminal may cooperate to perform the method in the fifth aspect or any implementation manner thereof.
  • a sixth aspect provides a communication device, which is used to perform the method provided by any of the above aspects or its implementation.
  • the device may include units and/or modules, such as a processing unit and/or a communication unit, for executing the method provided by any of the above aspects or implementations thereof.
  • the device is a first terminal or a second terminal.
  • the communication unit may be a transceiver, or an input/output interface, or a communication interface; the processing unit may be at least one processor.
  • the transceiver is a transceiver circuit.
  • the input/output interface is an input/output circuit.
  • the device is a chip, a chip system or a circuit used in the first terminal or the second terminal.
  • the communication unit may be an input/output interface, interface circuit, output circuit, input circuit on the chip, chip system or circuit, Pins or related circuits, etc.;
  • the processing unit may be at least one processor, processing circuit or logic circuit, etc.
  • a seventh aspect provides a communication device, which includes: a memory for storing programs; at least one processor for executing computer programs or instructions stored in the memory to execute any one of the above aspects or the implementation provided by them. method.
  • the device is a first terminal or a second terminal.
  • a communication device in an eighth aspect, includes: at least one processor and a communication interface.
  • the at least one processor is used to obtain computer programs or instructions stored in a memory through the communication interface to execute any one of the above aspects or The methods provided for its implementation.
  • the communication interface can be implemented by hardware or software.
  • the device further includes the memory.
  • processor output, reception, input and other operations can be understood as processor output, reception, input and other operations.
  • transmitting and receiving operations performed by the radio frequency circuit and the antenna, which is not limited in this application.
  • a computer-readable storage medium stores program code for device execution.
  • the program code includes a method for executing any of the above aspects or its implementation.
  • a computer program product containing instructions is provided.
  • the computer program product When the computer program product is run on a computer, it causes the computer to execute the method provided by any of the above aspects or its implementation.
  • a chip in a twelfth aspect, includes a processor and a communication interface.
  • the processor reads instructions stored in the memory through the communication interface and executes the method provided by any of the above aspects or its implementation.
  • the communication interface can be implemented by hardware or software.
  • the chip also includes a memory, in which computer programs or instructions are stored.
  • the processor is used to execute the computer programs or instructions stored in the memory.
  • the processor is used to execute Methods provided by any of the above aspects or their implementations.
  • Figure 1 is a schematic diagram of a network architecture.
  • Figure 2 is a schematic diagram of the ranging principle between terminals.
  • Figure 3 is a schematic flow chart of the ranging method 300 provided by this application.
  • Figure 4 is a schematic flow chart of the ranging method 400 provided by this application.
  • Figure 5 is a schematic flow chart of the ranging method 500 provided by this application.
  • Figure 6 is an example of the ranging method of the present application.
  • Figure 7 is another example of the ranging method of the present application.
  • Figure 8 is a schematic structural diagram of a device provided by an embodiment of the present application.
  • Figure 9 is another structural schematic diagram of a device provided by an embodiment of the present application.
  • Figure 10 is another structural schematic diagram of the device provided by the embodiment of the present application.
  • for indicating” or “instructing” may include direct indicating and indirect indicating, or “for indicating” or “instructing” may indicate explicitly and/or implicitly.
  • indicating information I when describing certain information as indicating information I, it may include that the information directly indicates I or indirectly indicates I, but it does not mean that the information must contain I.
  • an implicit indication may be based on the location and/or resources used for transmission; an explicit indication may be based on one or more parameters, and/or one or more indexes, and/or one or more bits it represents. model.
  • the first, second, third, fourth and various numerical numbers are only for convenience of description and are not used to limit the scope of the embodiments of the present application. For example, distinguish different fields, different information, etc.
  • Pre-definition can be achieved by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in a device (for example, a terminal), and this application does not limit its specific implementation.
  • saving may refer to saving in one or more memories.
  • the type of memory can be any form of storage medium, and this application is not limited thereto.
  • the "protocol” involved in the embodiments of this application may refer to standard protocols in the communication field, which may include, for example, long term evolution (LTE) protocols, new radio (NR) protocols, and applications in future communication systems. related agreements, this application does not limit this.
  • LTE long term evolution
  • NR new radio
  • At least one means one or more, and “plurality” means two or more.
  • “And/or” describes the association of associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the related objects are in an “or” relationship.
  • “At least one of the following” or similar expressions thereof refers to any combination of these items, including any combination of a single item (items) or a plurality of items (items).
  • At least one of a, b and c can mean: a, or, b, or, c, or, a and b, or, a and c, or, b and c, or, a , b and c.
  • a, b and c can be single or multiple respectively.
  • wireless mobile cellular communication systems include fifth generation ( 5th generation, 5G) or NR systems, LTE systems, LTE frequency division duplex (FDD) systems, LTE time division duplex (TDD) ) system, etc.
  • the technical solution provided by this application can also be applied to non-terrestrial communication networks (non-terrestrial network, NTN) such as satellite communication systems.
  • NTN non-terrestrial network
  • Communication Systems The technical solutions provided by this application can also be applied to device-to-device (D2D) communication systems, vehicle-to-everything (V2X) communication systems, and machine-to-machine (M2M) communication systems. , machine type communication (MTC) system, and Internet of things (IoT) communication system or other communication systems.
  • D2D device-to-device
  • V2X vehicle-to-everything
  • M2M machine-to-machine
  • MTC machine type communication
  • IoT Internet of things
  • Figure 1 shows a schematic diagram of a network architecture.
  • the network architecture takes the 5th generation system (5GS) as an example.
  • the network architecture may include three parts, namely user equipment (user equipment, UE) part, data network (data network, DN) part and operator network part.
  • the operator network may include one or more of the following network elements: (radio) access network (R)AN) equipment, user plane function (UPF) network element, Authentication server function (AUSF) network element, access and mobility management function (AMF) network element, session management function (SMF) network element, network slice selection function ( network slice selection function (NSSF) network element, network exposure function (NEF) network element, network repository function (NRF) network element, policy control function (PCF) network element, Unified data management (UDM) network element and application function (AF) network element.
  • R radio access network
  • UPF user plane function
  • AUSF Authentication server function
  • AMF access and mobility management function
  • SMF session management function
  • SMF session management function
  • NEF network slice selection function
  • NEF network exposure function
  • user equipment In this application, user equipment, (wireless) access network equipment, UPF network element, AUSF network element, AMF network element, SMF network element, NSSF network element, NEF network element, NRF network element, PCF network element, UDM Network elements and AF network elements are referred to as UE, (R)AN, UPF, AUSF, UDR, AMF, SMF, NSSF, NEF, NRF, PCF, UDM, and AF respectively.
  • the UE in this application may also be called terminal, user, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal equipment, wireless communication equipment, user agent Or user equipment, etc., for convenience of description, they are collectively referred to as terminals below.
  • a terminal is a device that can access the network.
  • the terminal and (R)AN can communicate with each other using some air interface technology (such as NR or LTE technology). Terminals can also communicate with each other using some air interface technology (such as NR or LTE technology).
  • the terminal can be a mobile phone (mobile phone), tablet computer (pad), computer with wireless transceiver function, virtual reality (VR) terminal, augmented reality (AR) terminal, terminal in satellite communication, access Terminals in integrated access and backhaul (IAB) systems, terminals in WiFi communication systems, terminals in industrial control, terminals in self-driving, telemedicine ( Terminals in remote medical, terminals in smart grid, terminals in transportation safety, terminals in smart city, terminals in smart home, etc.
  • the (R)AN in this application may be a device used to communicate with a terminal, or may be a device that connects the terminal to a wireless network.
  • (R)AN may be a node in a wireless access network.
  • (R)AN can be a base station (base station), an evolved base station (evolved NodeB, eNodeB), a transmission reception point (TRP), a home base station (for example, home evolved NodeB, or home Node B, HNB), Wi-Fi access point (AP), mobile switching center, next generation NodeB (gNB) in 5G mobile communication system, next generation NodeB (gNB) in sixth generation ( 6th generation, 6G) mobile communication system First-generation base stations, or base stations in future mobile communication systems, etc.
  • the network device can also be a module or unit that completes some functions of the base station.
  • RAN can be a centralized unit (central unit, CU), distributed unit (DU), remote radio unit (RRU) or Baseband unit (BBU), etc.
  • R)AN can also be equipment that assumes base station functions in D2D communication systems, V2X communication systems, M2M communication systems, and IoT communication systems.
  • R)AN can also be a network device in NTN, that is, (R)AN can be deployed on high-altitude platforms or satellites.
  • R)AN can be a macro base station, a micro base station or an indoor station, or a relay node or a donor node.
  • UPF is mainly responsible for forwarding and receiving user data in the terminal.
  • UPF can receive user plane data from the DN and send the user plane data to the terminal through the access network equipment.
  • UPF can also receive user plane data from the terminal through the access network equipment and forward it to the DN.
  • the transmission resources and scheduling functions in UPF network elements that provide services for terminals are managed and controlled by SMF.
  • DN is mainly used in operator networks that provide data services to terminals.
  • the Internet a third-party business network, or an IP multi-media service (IMS) network, etc.
  • IMS IP multi-media service
  • AMF is mainly responsible for signaling processing, such as: access control, mobility management, attachment and detachment, gateway selection and other functions.
  • AMF When providing services for a session in a terminal, AMF will provide control plane storage resources for the session to store the session identifier, the SMF network element identifier associated with the session identifier, etc.
  • SMF is mainly responsible for user plane network element selection, user plane network element redirection, Internet protocol (internet protocol, IP) address allocation, bearer establishment, modification and release, and quality of service (QoS) control.
  • IP Internet protocol
  • QoS quality of service
  • NSSF is mainly responsible for network slice selection and determines the network slice instances that the terminal is allowed to access based on the terminal's slice selection auxiliary information, subscription information, etc.
  • NEF mainly supports secure interaction between 3GPP networks and third-party applications.
  • NRF is mainly used to store network functional entities and description information of the services they provide.
  • PCF Policy and Charging Function
  • UDM is mainly responsible for terminal contract data management, including the storage and management of terminal identification, terminal access authorization, etc.
  • AF mainly supports interaction with the 3GPP core network to provide services, such as affecting data routing decisions, policy control functions or providing third-party services to the network.
  • AF can be the AF deployed by the operator's network itself, or it can be a third-party AF.
  • each network element can communicate with each other through interfaces.
  • the interface between each network element can be a point-to-point interface or a service-oriented interface, which is not limited by this application.
  • network architecture shown above is only an illustrative description, and the network architecture applicable to the embodiments of the present application is not limited thereto. Any network architecture that can realize the functions of each of the above network elements is applicable to the embodiments of the present application.
  • functions or network elements such as AMF, SMF, UPF, PCF, UDM, AUSF, NSSF, NEF, NRF, and AF shown in Figure 1 can be understood as network elements used to implement different functions. For example, they can be Need to be combined into network slices. These network elements can be independent devices, or they can be integrated into the same device to implement different functions, or they can be network elements in hardware devices, software functions running on dedicated hardware, or platforms (for example, cloud The virtualization function instantiated on the platform), this application does not limit the specific form of the above network elements.
  • the technical solution of this application can be applied to ranging between terminals in the scenario of direct communication between terminals.
  • it can be applied to D2D, V2X, ProSe, WiFi, WiFi direct, bluetooth, purple Communication scenarios such as zigbee, radio frequency identification devices (RFID), infrared data association (IrDA), ultrawideband (UWB), or near-field communication (NFC) Ranging between terminals below.
  • RFID radio frequency identification devices
  • IrDA infrared data association
  • UWB ultrawideband
  • NFC near-field communication
  • Figure 2 shows a schematic diagram of the ranging principle between terminals.
  • Determining the relative position between terminals can be achieved through relative positioning.
  • Relative positioning may be determining a relative distance and/or relative angle between terminals.
  • Relative distance can be obtained by ranging, and relative angle can be obtained by angle measurement. This application focuses on determining the relative distance between terminals.
  • terminal 1 (or startup terminal) sends an initial ranging signal
  • terminal 1 (or feedback terminal) sends a feedback ranging signal for feedback to terminal 1 after receiving the initial ranging signal.
  • the relative distance between terminal 1 and terminal 2 flight time ⁇ speed of light, where the determination process of time of flight (TOF) may include:
  • Step 1 Terminal 1 calculates the time period T round between the time when the initial ranging signal is sent and the time when the feedback ranging signal is received;
  • Step 2 Terminal 2 calculates the time period T reply between the time when the initial ranging signal is received and the time when the feedback ranging signal is sent;
  • Step 3 Terminal 2 sends a reply of duration T to Terminal 1;
  • the ranging principle shown in Figure 2 does not limit the time of sending the initial ranging signal, the time of receiving the feedback ranging signal, the time of receiving the initial ranging signal, and the time of sending the feedback ranging signal.
  • the time when the initial ranging signal is sent can be any time in the process of sending the initial ranging signal
  • the time when the feedback ranging signal is received can be any time in the process of receiving the feedback ranging signal
  • the time when the initial ranging signal is received can be the initial time.
  • the time at which the feedback ranging signal is sent can be at any time during the process of transmitting the feedback ranging signal.
  • the hierarchical architecture inside the terminal is not considered, and the functions of each layer inside the terminal (for example, the ranging layer (ranging layer) and the access stratum (AS)) are not clarified. , the parameters of interaction between layers, and the transmission method of T reply .
  • Figure 3 is a schematic flow chart of the ranging method 300 provided by this application.
  • Method 300 includes at least part of the following content.
  • Step 301 The first layer of the first terminal sends ranging information to the access layer of the first terminal.
  • the ranging information is used to indicate measuring the distance between the first terminal and the second terminal.
  • the ranging information includes first ranging period information and the identity of the second terminal.
  • the first ranging period information is used to indicate the first period of ranging.
  • the ranging information includes ranging instructions, first ranging period information and the identification of the second terminal.
  • the first ranging period information is used to indicate the first period of ranging.
  • the identity of the second terminal may be the layer 2 (layer 2, L2) identity of the second terminal.
  • the first layer of the first terminal obtains ranging information.
  • the first layer of the first terminal obtains the ranging information from the application layer of the first terminal, that is, the ranging information comes from the application layer of the first terminal. For example, when the application layer of the first terminal has a ranging requirement, the application layer of the first terminal can generate ranging information and send the ranging information to the first layer of the first terminal.
  • the identity of the second terminal included in the ranging information generated by the application layer may be the application layer identity of the second terminal.
  • the layer 2 identifier of the second terminal can be obtained according to the application layer identifier of the second terminal.
  • the first layer of the first terminal may be to obtain the layer 2 identification of the second terminal from the terminal 2 during the discovery process with the terminal 2, or may also be established during the establishment of proximity-based service communication 5 (ProSe communication 5) with the terminal 2. , PC5) Obtain the layer 2 identifier of the second terminal from terminal 2 during the connection process, or The layer 2 identification of the second terminal may also be obtained from the terminal 2 after the PC5 connection with the terminal 2 is established.
  • Method 2 The first layer of the first terminal obtains the ranging information from the second terminal, that is, the ranging information comes from the second terminal. For example, when the second terminal has a ranging requirement, the second terminal may send ranging information to the first terminal in order to request the first terminal to measure the distance between the second terminal and the second terminal.
  • the first layer of the first terminal obtains the ranging information from the first layer of the second terminal, and the first layer of the second terminal sends the ranging information to the first layer of the first terminal.
  • the first layer of the second terminal sends ranging information to the first layer of the first terminal through the PC5-S message or PC5-U.
  • the first layer of the second terminal sends the ranging information to the first layer of the first terminal through PC5-U. It can be understood that the first layer of the second terminal sends the ranging information as data to the third layer of the first terminal. layer.
  • the application layer of the first terminal obtains the ranging information from the application layer of the second terminal, and the application layer of the second terminal sends the ranging information to the application layer of the first terminal through PC5-U, and then the application layer of the first terminal One layer obtains ranging information from the application layer of the first terminal.
  • the first layer of the first terminal before step 301, the first layer of the first terminal also determines that the first terminal calculates the ranging result (ie, the distance between the first terminal and the second terminal). That is, when it is determined that the ranging result is calculated by the first terminal, the first layer of the first terminal sends ranging information to the access layer of the first terminal, and the ranging result is calculated by the first terminal.
  • the first terminal and the second terminal may exchange ranging computing capability information to determine which terminal should calculate the ranging result.
  • the first layer of the first terminal before step 301, the first layer of the first terminal also determines that the first terminal sends a signal for ranging first. That is, when the first layer of the first terminal determines that the first terminal sends the signal for ranging first, the first layer of the first terminal sends the ranging information to the access layer of the first terminal, and the first terminal sends the ranging information to the access layer of the first terminal.
  • the access layer first sends signals for ranging.
  • the first terminal and the second terminal may exchange information to determine which terminal sends the signal for ranging first.
  • Step 302 The access layer of the first terminal sends the first signal to the second terminal according to the ranging information.
  • the access layer of the second terminal receives the first signal from the first terminal.
  • the first signal is used to measure the distance between the first terminal and the second terminal.
  • the first signal may be a ranging signal (ranging signaling), a ranging reference signal (ranging reference signaling), a positioning reference signal (positioning reference signaling) or the initial ranging signal shown in Figure 2.
  • ranging signaling ranging signaling
  • ranging reference signaling ranging reference signaling
  • positioning reference signaling positioning reference signaling
  • the access layer of the first terminal determines to send the first signal according to the ranging indication, and uses the identity of the first terminal and the identity of the second terminal.
  • the identifier of the terminal sends the first signal to the second terminal.
  • the access layer of the first terminal uses the first period according to the first period indicated by the first ranging period information.
  • the identifier of the terminal and the identifier of the second terminal are used to send the first signal to the second terminal.
  • the access layer of the first terminal determines to send the first signal according to the ranging indication, and according to The first period indicated by the first ranging period information uses the identifier of the first terminal and the identifier of the second terminal to send the first signal to the second terminal.
  • the access layer of the first terminal uses the identity of the first terminal and the identity of the second terminal to send the first signal to the second terminal.
  • the first terminal uses the identity of the first terminal as the first signal.
  • the source address uses the identifier of the second terminal as the destination address of the first signal, and sends the first signal to the second terminal.
  • the source address of the first signal is the identity of the first terminal
  • the destination address is the identity of the second terminal.
  • the identity of the first terminal is the layer 2 identity of the first terminal
  • the identity of the second terminal is the layer 2 identity of the second terminal.
  • the identifier of the first terminal is used to identify communication between the first terminal and the second terminal.
  • the first signal includes the identifier of the first terminal and the identifier of the second terminal.
  • the access layer of the first terminal when the first terminal calculates the ranging result, sends the first signal to the second terminal based on the ranging information.
  • the access layer of the first terminal when the first terminal first sends a signal for ranging, the access layer of the first terminal sends the first signal to the second terminal based on the ranging information.
  • Step 303 After receiving the first signal, the access layer of the second terminal sends the second signal to the first terminal.
  • the access layer of the first terminal receives the second signal from the second terminal.
  • the second signal is a response signal to the first signal.
  • the second signal is used to respond to the first signal.
  • the second signal may be ranging signaling, ranging reference signaling, positioning reference signaling or the feedback ranging signal shown in Figure 2.
  • the access layer of the second terminal uses the identity of the first terminal and the identity of the second terminal to send the second signal to the first terminal.
  • the first terminal uses the identifier of the second terminal as the source address of the second signal, uses the identifier of the first terminal as the destination address of the second signal, and sends the second signal to the first terminal.
  • the second signal The source address is the identifier of the second terminal, and the destination address is the identifier of the first terminal.
  • the identity of the first terminal is the layer 2 identity of the first terminal
  • the identity of the second terminal is the layer 2 identity of the second terminal.
  • the identifier of the second terminal is used to identify communication between the second terminal and the first terminal.
  • the second signal includes the identity of the first terminal and the identity of the second terminal.
  • Step 304 The first layer of the first terminal obtains the first duration.
  • the first duration is the duration between the time when the access layer of the first terminal sends the first signal and the time when the access layer of the first terminal receives the second signal.
  • the first layer of the first terminal obtains the first duration from the access layer of the first terminal, or in other words, the access layer of the first terminal sends the first duration to the first layer of the first terminal.
  • the access layer of the first terminal performs the operation of determining the first duration.
  • the access layer of the first terminal determines the first duration.
  • the access layer of the first terminal stores the first correspondence between the first identifier and the moment when the access layer of the first terminal sends the first signal. relationship, wherein the first identification corresponds to the second terminal; the access layer of the first terminal determines the moment when the second signal is received; the access layer of the first terminal determines the time of receiving the second signal according to the first identification included in the second signal, and the first terminal's access layer.
  • the first correspondence relationship stored by the access layer obtains the time of sending the first signal corresponding to the first identifier; the access layer of the first terminal sends the first signal according to the obtained time and the determined time of the access layer of the first terminal.
  • the first duration is determined at the moment when the access layer of the first terminal receives the second signal.
  • the first identification is an identification of the first terminal and/or an identification of the second terminal.
  • the identifier of the first terminal is used to identify communication between the first terminal and the second terminal.
  • the first identification is the identification of the second terminal.
  • the access layer of the first terminal uses the identifier of the second terminal to send the first signal (for example, using the identifier of the second terminal as the destination address of the first signal), and the first signal
  • the access layer of the first terminal can obtain the identification of the second terminal based on the identification of the second terminal included in the second signal. The sending time of the first signal corresponding to the signal, thereby ensuring the accuracy of ranging.
  • the first signal corresponding to the second signal can be understood as the first signal to which the second signal responds, or the first signal that triggers the second signal.
  • the identification of the second terminal included in the second signal may also be replaced by the source address of the second signal.
  • the first identifier is an identifier of the first terminal, and the identifier of the first terminal is used to identify communication between the first terminal and the second terminal.
  • the sending time of the first signal corresponding to the second signal can also be obtained through the identification of the first terminal, so that Ensure the accuracy of ranging.
  • the first terminal can use different identifiers to communicate with different terminals.
  • the identifier of the first terminal can also be Multiple terminals communicating with the first terminal are distinguished.
  • the access layer of the first terminal when the access layer of the first terminal sends the first duration to the first layer of the first terminal, it also sends the first identifier corresponding to the first duration to the first layer of the first terminal, so that the first The first duration explicitly received by the first layer of the terminal is used to determine the distance between the first terminal and the second terminal.
  • Step 305 The access layer of the second terminal determines the second duration.
  • the second duration is the duration between the time when the access layer of the second terminal receives the first signal and the time when the access layer of the second terminal sends the second signal.
  • the access layer of the second terminal stores the second identification and the second time at which the access layer of the second terminal receives the first signal.
  • Correspondence relationship wherein the second identifier corresponds to the first terminal; the access layer of the second terminal determines the time to send the second signal; the access layer of the second terminal determines the time to send the second signal according to the second identifier included in the second signal, and the second terminal
  • the access layer of the second terminal stores the second corresponding relationship, and obtains the moment of receiving the first signal corresponding to the second identifier; the access layer of the second terminal determines the moment of receiving the first signal according to the obtained moment of receiving the first signal by the access layer of the second terminal.
  • the second duration is determined at the moment when the access layer of the second terminal sends the second signal.
  • the second identification is the identification of the first terminal and/or the identification of the second terminal.
  • the identifier of the second terminal is used to identify communication between the second terminal and the first terminal.
  • the second identification is the identification of the first terminal.
  • the access layer of the second terminal uses the identity of the first terminal to send the second signal (for example, using the identity of the first terminal as the destination address of the second signal), and the identity of the first terminal is the same as the identity of the second terminal.
  • the access layer of the second terminal can obtain the transmission of the first signal corresponding to the second signal based on the identification of the first terminal included in the second signal. time to ensure the accuracy of ranging.
  • the first signal corresponding to the second signal can be understood as the first signal to which the second signal responds, or the first signal that triggers the second signal.
  • the identity of the first terminal included in the second signal may also be replaced by the destination address of the second signal.
  • the second identification is an identification of the second terminal, and the identification of the second terminal is used to identify communication between the second terminal and the first terminal.
  • the sending time of receiving the first signal corresponding to the second signal can also be obtained through the identifier of the second terminal, This ensures the accuracy of ranging.
  • the second terminal can use different identifiers to communicate with different terminals. In this case, the identifier of the second terminal Multiple terminals communicating with the second terminal can also be distinguished.
  • first identifier and the second identifier may be the same or different.
  • step 305 is performed before step 303, the time at which the access layer of the second terminal sends the second signal in step 305 may be the estimated time at which the access layer of the second terminal sends the second signal. If step 305 is performed after step 303, the time when the access layer of the second terminal sends the second signal in step 305 may be the estimated time when the access layer of the second terminal sends the second signal, or it may be the second time. The actual time when the access layer of the terminal sends the second signal.
  • Step 306 The second terminal sends the second duration to the first terminal.
  • the first terminal receives the second duration from the second terminal.
  • the second terminal to send the second duration to the first terminal, which are not limited.
  • the second terminal sends the second duration to the first terminal through first layer signaling.
  • the first layer of the second terminal sends a first message to the first layer of the first terminal, where the first message includes a second duration.
  • the access layer of the second terminal sends the second duration and the identification of the first terminal to the first layer of the second terminal to instruct the first layer of the second terminal to send the second duration to the first terminal; in After receiving the second duration and the identification of the first terminal, the first layer of the second terminal generates a first message according to the second duration, and sends the first message and the identification of the first terminal to the access layer of the second terminal; After receiving the first message and the identifier of the first terminal, the access layer of the second terminal uses the received identifier of the first terminal and the identifier of the second terminal to send the first message to the access layer of the first terminal; After receiving the first message, the access layer of the first terminal sends the first message to the first layer of the first terminal.
  • the access layer of the second terminal uses the received identification of the first terminal and the identification of the second terminal to send the first message to the access layer of the first terminal.
  • the access layer of the second terminal may send The received identification of the first terminal is used as the destination address, the identification of the second terminal is used as the source address, and the first message is sent to the access layer of the first terminal.
  • the source address of the first message is the identifier of the second terminal, and the destination address is the identifier of the first terminal.
  • the first message includes a PC5-S message.
  • the second terminal sends the second duration to the first terminal through signaling of the access layer.
  • the access layer of the second terminal sends a second message to the access layer of the first terminal, where the second message includes a second duration.
  • the access layer of the second terminal generates the second message according to the second duration, and uses the identifier of the first terminal and the identifier of the second terminal to send the second message to the access layer of the first terminal.
  • the access layer of the second terminal uses the identity of the first terminal and the identity of the second terminal to send the second message to the access layer of the first terminal.
  • the access layer of the second terminal may send the first terminal
  • the identifier of the second terminal is used as the destination address
  • the identifier of the second terminal is used as the source address
  • the second message is sent to the access layer of the first terminal.
  • the source address of the second message is the identifier of the second terminal
  • the destination address is the identifier of the first terminal.
  • the second message includes a PC5-RRC message.
  • the second terminal sends the second duration to the first terminal through PC5-U. It can be understood that the second duration is used as data sent by the second terminal to the first terminal.
  • the first layer of the second terminal sends the second duration as data to the first layer of the first terminal.
  • the access layer of the second terminal sends the second duration and the identification of the first terminal to the first layer of the second terminal to instruct the first layer of the second terminal to send the second duration to the first terminal; in After receiving the second duration and the identification of the first terminal, the first layer of the second terminal generates data according to the second duration (the data includes the second duration), and combines the data with the first
  • the identification of the terminal is sent to the access layer of the second terminal; after receiving the data and the identification of the first terminal, the access layer of the second terminal uses the received identification of the first terminal and the identification of the second terminal to send a request to the third terminal.
  • the access layer of one terminal sends data; after receiving the data, the access layer of the first terminal sends the data to the first layer of the first terminal.
  • Step 307 The first layer of the first terminal obtains the second duration.
  • the first layer of the first terminal obtains the second duration from the first layer signaling.
  • the access layer of the first terminal receives the first message from the second terminal; the access layer of the first terminal sends the first message to the first layer of the first terminal; the first layer of the first terminal receives the first message from the second terminal.
  • the first message gets the second duration.
  • Another possible implementation manner is that when the second terminal sends the second duration to the first terminal through signaling of the access layer, the first layer of the first terminal obtains the second duration from the access layer of the first terminal. Specifically, the access layer of the first terminal receives the second message from the access layer of the second terminal; the access layer of the first terminal obtains the second duration from the second message, and uses the obtained second duration Sent to the first layer of the first terminal.
  • the first layer of the first terminal obtains the second duration from the received PC5-U.
  • the access layer of the first terminal receives data from the second terminal; the access layer of the first terminal sends the data to the first layer of the first terminal; the first layer of the first terminal obtains the second layer from the data. duration.
  • the access layer of the first terminal when the access layer of the first terminal sends the first message, the second duration, or the data to the first layer of the first terminal, it also sends the first message, the second duration, or data to the first layer of the first terminal.
  • the duration or the first identifier corresponding to the data, so that the second duration explicitly obtained by the first layer of the first terminal is used to determine the distance between the first terminal and the second terminal.
  • Step 308 The first layer of the first terminal determines the distance between the first terminal and the second terminal based on the first duration and the second duration.
  • D is the distance between the first terminal and the second terminal
  • c is the speed of light
  • T round is the first duration
  • T reply is the second duration
  • a dedicated channel for the second terminal is established between layers within the first terminal.
  • the dedicated channel for the second terminal has a corresponding relationship with the first identifier, and the first identifier corresponds to the second terminal.
  • the access layer of the first terminal determines, based on the corresponding relationship between the dedicated channel of the second terminal and the first identifier, to send the first layer to the first terminal through the dedicated channel of the second terminal: the first identifier is determined as the associated information.
  • the first duration, the second duration from the second terminal, and the first message or data from the second terminal carrying the second duration is determined as the associated information.
  • the first layer of the first terminal is based on the first duration and the second duration of the dedicated channel from the second terminal, or the first duration and the first message including the second duration, or the first duration and the data including the second duration, The distance between the first terminal and the second terminal is determined.
  • the access layer of the first terminal when the access layer of the first terminal sends the first duration, the first message, the data and the second duration to the first layer of the first terminal, it also sends the first duration to the first layer of the first terminal.
  • the first identifier corresponding to the first duration, the first message, the data or the second duration, the first layer of the first terminal is based on the first duration and the second duration sent simultaneously with the first identifier, or the first duration and the second duration.
  • the first message of two durations, or the first duration and data including the second duration determines the distance between the first terminal and the second terminal. Wherein, the first identification corresponds to the second terminal.
  • the first terminal may also send the distance between the first terminal and the second terminal to the application layer of the first terminal. For example, when the ranging information of the first layer of the first terminal comes from the application layer of the first terminal, the first layer of the first terminal can also send the distance between the first terminal and the second terminal to the application layer of the first terminal. distance.
  • the first layer of the first terminal before sending the distance between the first terminal and the second terminal to the application layer of the first terminal, the first layer of the first terminal further determines whether the distance between the first terminal and the second terminal satisfies the threshold condition. ; When the distance between the first terminal and the second terminal meets the threshold condition, the first layer of the first terminal sends the distance between the first terminal and the second terminal to the application layer of the first terminal.
  • the above threshold condition may come from the application layer of the first terminal.
  • the first layer of the first terminal after determining the distance between the first terminal and the second terminal, the first layer of the first terminal further determines a third step of ranging based on the distance between the first terminal and the second terminal. two cycles, and then sends second ranging cycle information to the access layer of the first terminal, where the second ranging cycle information is used to indicate the second cycle.
  • the first layer of the first terminal obtains the corresponding relationship between the distance and the ranging period from the application layer of the first terminal or the core network element (such as PCF or AMF). The distance between the two terminals and the obtained correspondence determine the second ranging period information.
  • the first terminal may perform ranging based on the second cycle in a manner similar to that based on the first cycle, which will not be described again.
  • the first layer of the first terminal can update the ranging period information according to the distance between the first terminal and the second terminal. For example, it can be realized that a larger period is used when the distance between terminals is longer. Use smaller periods when the distance is smaller.
  • the access layer of the first terminal generates and sends a first signal for ranging according to the ranging information of the first layer, receives a second signal in response to the first signal, and determines that the first terminal sends the first signal.
  • the distance between the first terminal and the second terminal is determined according to the first duration and the second duration. In this way, the distance between the first terminal and the second terminal can be measured.
  • the method 300 considers the layered architecture within the terminal, and clarifies the functions of each layer within the terminal, the parameters of interactions between layers, and the transmission method of T reply .
  • the method 300 helps to ensure the ranging results (i.e., the third the distance between one terminal and the second terminal).
  • Figure 4 is a schematic flow chart of the ranging method 400 provided by this application.
  • the terminal includes an application layer, a first layer and an access layer.
  • the first layer may be different.
  • the first layer may be the ranging layer, V2X layer or ProSe layer, etc.
  • the first layer may also be called the upper layer. For convenience of description, they will be collectively referred to as the first layer below.
  • the access layer of the first terminal determines the distance between the first terminal and the second terminal based on the first duration and the second duration.
  • Method 400 includes at least part of the following.
  • Step 401 The first layer of the first terminal sends ranging information to the access layer of the first terminal.
  • the ranging information is used to indicate measuring the distance between the first terminal and the second terminal.
  • Step 402 The access layer of the first terminal sends the first signal to the second terminal based on the ranging information.
  • the access layer of the second terminal receives the first signal from the first terminal.
  • the first signal is used to measure the distance between the first terminal and the second terminal.
  • Step 403 After receiving the first signal, the access layer of the second terminal sends the second signal to the first terminal.
  • the access layer of the first terminal receives the second signal from the second terminal.
  • the second signal is a response signal to the first signal.
  • the second signal is used to respond to the first signal.
  • steps 401-403 please refer to steps 301-303, which will not be described again here.
  • Step 404 The access layer of the first terminal determines the first duration.
  • This application does not limit the specific implementation manner in which the access layer of the first terminal determines the first duration.
  • the access layer of the first terminal stores the first correspondence between the first identifier and the moment when the access layer of the first terminal sends the first signal. relationship, wherein the first identification corresponds to the second terminal; the access layer of the first terminal determines the moment when the second signal is received; the access layer of the first terminal determines the time of receiving the second signal according to the first identification included in the second signal, and the first terminal's access layer.
  • the first correspondence relationship stored by the access layer obtains the time of sending the first signal corresponding to the first identifier; the access layer of the first terminal sends the first signal according to the obtained time and the determined time of the access layer of the first terminal.
  • the first duration is determined at the moment when the access layer of the first terminal receives the second signal.
  • the first identification is an identification of the first terminal and/or an identification of the second terminal.
  • the identifier of the first terminal is used to identify communication between the first terminal and the second terminal.
  • the first identification is the identification of the second terminal.
  • the access layer of the first terminal uses the identifier of the second terminal to send the first signal (for example, using the identifier of the second terminal as the destination address of the first signal), and the identifier of the second terminal is the same as the identifier of the first terminal.
  • the access layer of the first terminal can obtain the sending time of the first signal corresponding to the second signal based on the identity of the second terminal included in the second signal. , thereby ensuring the accuracy of ranging.
  • the first signal corresponding to the second signal can be understood as the first signal to which the second signal responds, or the first signal that triggers the second signal.
  • the identification of the second terminal included in the second signal may also be replaced by the source address of the second signal.
  • the first identifier is an identifier of the first terminal, and the identifier of the first terminal is used to identify communication between the first terminal and the second terminal.
  • the sending time of the first signal corresponding to the second signal can also be obtained through the identification of the first terminal, so that Ensure the accuracy of ranging.
  • the first terminal can use different identifiers to communicate with different terminals.
  • the identifier of the first terminal can also be Multiple terminals communicating with the first terminal are distinguished.
  • Step 405 The access layer of the second terminal determines the second duration.
  • the second duration is the duration between the time when the access layer of the second terminal receives the first signal and the time when the access layer of the second terminal sends the second signal.
  • step 405 For detailed description of step 405, please refer to step 305, which will not be described again here.
  • Step 406 The second terminal sends the second duration to the first terminal.
  • the first terminal receives the second duration from the second terminal.
  • the second terminal to send the second duration to the first terminal, which are not limited.
  • the second terminal sends the second duration to the first terminal through signaling of the access layer.
  • the access layer of the second terminal sends a second message to the access layer of the first terminal, where the second message includes a second duration.
  • the access layer of the second terminal generates the second message according to the second duration, and uses the identifier of the first terminal and the identifier of the second terminal to send the second message to the access layer of the first terminal.
  • the access layer of the second terminal uses the identity of the first terminal and the identity of the second terminal to send the second message to the access layer of the first terminal.
  • the access layer of the second terminal may send the first terminal
  • the identifier of the second terminal is used as the destination address
  • the identifier of the second terminal is used as the source address
  • the second message is sent to the access layer of the first terminal.
  • the source address of the second message is the identifier of the second terminal
  • the destination address is the identifier of the first terminal.
  • the second message includes a PC5-RRC message.
  • Step 407 The access layer of the first terminal obtains the second duration.
  • the access layer of the first terminal obtains the second duration from the signaling of the access layer.
  • the access layer of the first terminal receives the second message from the access layer of the second terminal; the access layer of the first terminal obtains the second duration from the second message.
  • Step 408 The access layer of the first terminal determines the distance between the first terminal and the second terminal based on the first duration and the second duration.
  • D is the distance between the first terminal and the second terminal
  • c is the speed of light
  • T round is the first duration
  • T reply is the second duration
  • Step 409 The access layer of the first terminal sends the distance between the first terminal and the second terminal to the first layer of the first terminal.
  • the access layer of the first terminal before sending the distance between the first terminal and the second terminal to the first layer of the first terminal, the access layer of the first terminal also determines whether the distance between the first terminal and the second terminal meets the threshold.
  • the access layer of the first terminal sends the distance between the first terminal and the second terminal to the first layer of the first terminal.
  • the access layer of the first terminal when the access layer of the first terminal sends the distance between the first terminal and the second terminal to the first layer of the first terminal, it also sends a third layer corresponding to the distance to the first layer of the first terminal.
  • An identifier so that the first layer of the first terminal makes it clear that the distance is the distance between the first terminal and the second terminal.
  • the first identification corresponds to the second terminal.
  • the first layer of the first terminal may also send the first terminal and the second terminal to the application layer of the first terminal. the distance between. For example, when the ranging information of the first layer of the first terminal comes from the application layer of the first terminal, the first layer of the first terminal can also send the distance between the first terminal and the second terminal to the application layer of the first terminal. distance.
  • the first layer of the first terminal before sending the distance between the first terminal and the second terminal to the application layer of the first terminal, the first layer of the first terminal further determines whether the distance between the first terminal and the second terminal satisfies the threshold condition. ; When the distance between the first terminal and the second terminal meets the threshold condition, the first layer of the first terminal sends the distance between the first terminal and the second terminal to the application layer of the first terminal. For example, when the access layer of the first terminal is not sure whether the distance between the first terminal and the second terminal meets the threshold condition, the first layer of the first terminal may also determine the distance between the first terminal and the second terminal. Whether the distance meets the threshold condition.
  • the first layer of the first terminal when the first layer of the first terminal sends the distance between the first terminal and the second terminal to the application layer of the first terminal, it also sends the first identifier corresponding to the distance to the application layer of the first terminal. , so that the application layer of the first terminal makes it clear that the distance is the distance between the first terminal and the second terminal.
  • the first identification corresponds to the second terminal.
  • the above threshold condition may come from the application layer of the first terminal.
  • the access layer of the first terminal determines whether the distance between the first terminal and the second terminal meets the threshold condition
  • the first layer of the first terminal sends the access layer to the first terminal.
  • the threshold condition may be included in the ranging information of the incoming layer.
  • the ranging information sent by the first layer of the first terminal to the access layer of the first terminal may include No threshold condition.
  • the access layer of the first terminal determines the second distance of the ranging based on the distance between the first terminal and the second terminal. cycle. For example, the access layer of the first terminal obtains the corresponding relationship between the distance and the ranging period from the application layer of the first terminal or the first layer of the first terminal. The access layer of the first terminal obtains the corresponding relationship between the first terminal and the second terminal. The distance and the obtained correspondence determine the second period. Subsequently, the first terminal may perform ranging based on the second period in a manner similar to that based on the first period, which will not be described again.
  • the first terminal can update the ranging period according to the distance between the first terminal and the second terminal. For example, a larger period can be used when the distance between the terminals is longer, and a larger period can be used when the distance between the terminals is shorter. Use a smaller period.
  • the access layer of the first terminal generates and sends a first signal for ranging according to the ranging information of the first layer, receives a second signal in response to the first signal, and determines that the first terminal sends the first signal.
  • the first duration between the moment of the signal and the moment of receiving the second signal is obtained from the second terminal, and the distance between the first terminal and the second terminal is determined based on the first duration and the second duration. In this way, the distance between the first terminal and the second terminal can be measured.
  • the method 400 considers the layered architecture within the terminal, and clarifies the functions of each layer within the terminal, the parameters of interactions between layers, and the transmission method of Treply.
  • the information interaction between the layers of the terminal in methods 300 and 400 is described as “sending” and “receiving”.
  • Information interaction may not involve sending and receiving actions, but information input and information output between interfaces.
  • Send can also be replaced by "provide”, “output”, “read”, etc.
  • rejection can also be replaced by "input", "write”, etc.
  • Figure 5 is a schematic flow chart of the ranging method 500 provided by this application.
  • Method 500 includes at least part of the following.
  • Step 501 The first terminal sends a first signal to the second terminal.
  • the second terminal receives the first signal from the first terminal.
  • the first signal is used to measure the distance between the first terminal and the second terminal.
  • the first signal may be ranging signaling, ranging reference signaling, positioning reference signaling or the initial ranging signal shown in Figure 2.
  • the first terminal uses the identifier of the first terminal and the identifier of the second terminal to send the first signal to the second terminal.
  • the first terminal uses the identifier of the first terminal as the source address of the first signal, uses the identifier of the second terminal as the destination address of the first signal, and sends the first signal to the second terminal.
  • the first signal The source address is the identifier of the first terminal, and the destination address is the identifier of the second terminal.
  • the first signal includes the identifier of the first terminal and the identifier of the second terminal.
  • the first terminal before step 501, the first terminal also determines that the distance measurement result (ie, the distance between the first terminal and the second terminal) is calculated by the first terminal.
  • the first terminal and the second terminal may exchange ranging computing capability information to determine which terminal should calculate the ranging result.
  • the first terminal before step 501, the first terminal further determines that the first terminal sends a signal for ranging first. That is, when the first terminal determines that the first terminal sends the signal for ranging first, the first terminal sends the first signal.
  • the first terminal and the second terminal may exchange information to determine which terminal sends the signal for ranging first.
  • Step 502 The second terminal sends a second signal to the first terminal.
  • the first terminal receives the second signal from the second terminal.
  • the second signal is a response signal to the first signal.
  • the second signal is used to respond to the first signal.
  • the second signal may be ranging signaling, ranging reference signaling, positioning reference signaling or the feedback ranging signal shown in Figure 2.
  • the second terminal uses the identity of the first terminal and the identity of the second terminal to send the second signal to the first terminal.
  • the first terminal uses the identifier of the second terminal as the source address of the second signal, uses the identifier of the first terminal as the destination address of the second signal, and sends the second signal to the first terminal.
  • the second signal The source address is the identifier of the second terminal, and the destination address is the identifier of the first terminal.
  • the identity of the first terminal is the layer 2 identity of the first terminal
  • the identity of the second terminal is the layer 2 identity of the second terminal.
  • the identifier of the second terminal is used to identify communication between the second terminal and the first terminal.
  • the second signal includes the identity of the first terminal and the identity of the second terminal.
  • Step 503 The first terminal determines the first duration.
  • the first duration is the duration between the time when the first terminal sends the first signal and the time when the first terminal receives the second signal.
  • the first terminal after the first terminal sends the first signal, stores a first correspondence between the first identifier and the time when the first terminal sends the first signal, where the first identifier corresponds to the second terminal. ; The first terminal determines the time of receiving the second signal; the first terminal obtains the time of sending the first signal corresponding to the first identification according to the first identification included in the second signal and the first correspondence stored by the first terminal; The first terminal determines the first duration based on the time when the first terminal sends the first signal and the time when the first terminal receives the second signal.
  • the first identification is an identification of the first terminal and/or an identification of the second terminal.
  • the identification of the first terminal is used for communication between the first terminal and the second terminal.
  • the first identification is the identification of the second terminal.
  • the access layer of the first terminal uses the identifier of the second terminal to send the first signal (for example, using the identifier of the second terminal as the destination address of the first signal), and the identifier of the second terminal is the same as the identifier of the first terminal.
  • the access layer of the first terminal can obtain the sending time of the first signal corresponding to the second signal based on the identity of the second terminal included in the second signal. , thereby ensuring the accuracy of ranging.
  • the first signal corresponding to the second signal can be understood as the first signal to which the second signal responds, or the first signal that triggers the second signal.
  • the identification of the second terminal included in the second signal may also be replaced by the source address of the second signal.
  • the first identifier is an identifier of the first terminal, and the identifier of the first terminal is used to identify communication between the first terminal and the second terminal.
  • the sending time of the first signal corresponding to the second signal can also be obtained through the identification of the first terminal, so that Ensure the accuracy of ranging.
  • the first terminal can use different identifiers to communicate with different terminals.
  • the identifier of the first terminal can also be Multiple terminals communicating with the first terminal are distinguished.
  • Step 504 The second terminal determines the second duration.
  • the second duration is the duration between the time when the second terminal receives the first signal and the time when the second terminal sends the second signal.
  • the second terminal after the second terminal receives the first signal, stores a second correspondence between the second identifier and the moment when the second terminal receives the first signal, where the second identifier corresponds to the first Terminal; the second terminal determines the time of sending the second signal; the second terminal obtains the time of receiving the first signal corresponding to the second identification according to the second identification included in the second signal and the second correspondence relationship stored by the second terminal. ; The second terminal determines the second duration based on the obtained time when the access layer of the second terminal receives the first signal and the determined time when the second terminal sends the second signal.
  • the second identification is the identification of the first terminal and/or the identification of the second terminal.
  • the identifier of the second terminal is used to identify communication between the second terminal and the first terminal.
  • the second identification is the identification of the first terminal.
  • the second terminal uses the identification of the first terminal to send the second signal (for example, uses the identification of the first terminal as the destination address of the second signal), and the identification of the first terminal is the same as the second terminal receiving the first signal.
  • the first signal corresponding to the second signal can be understood as the first signal to which the second signal responds, or the first signal that triggers the second signal.
  • the identity of the first terminal included in the second signal may also be replaced by the destination address of the second signal.
  • the second identification is an identification of the second terminal, and the identification of the second terminal is used to identify communication between the second terminal and the first terminal.
  • the sending time of receiving the first signal corresponding to the second signal can also be obtained through the identifier of the second terminal, This ensures the accuracy of ranging.
  • the second terminal can use different identifiers to communicate with different terminals.
  • the identifier of the second terminal can also be Differentiate multiple terminals communicating with the second terminal.
  • first identifier and the second identifier may be the same or different.
  • step 504 does not limit the order of step 504 and step 502, nor does it limit the order of step 504 and step 503.
  • step 504 is performed before step 502, the time when the second terminal sends the second signal in step 504 may be the estimated time when the second terminal sends the second signal. If step 504 is performed after step 502, the time when the second terminal sends the second signal in step 504 may be the estimated time when the second terminal sends the second signal, or it may be the actual time when the second terminal sends the second signal. .
  • Step 505 The second terminal sends the first message, the second message or data to the first terminal.
  • the first terminal receives the first message, the second message or the data from the second terminal.
  • the first message, the second message and the data include the second duration
  • the first message includes the PC5-S message
  • the second message includes the PC5-RRC message
  • the data may be PC5-U data.
  • the second terminal may send the second duration to the first terminal through a PC5-S message, a PC5-RRC message or a PC5-U.
  • the second terminal uses the identity of the first terminal and the identity of the second terminal to send the first message, the second message or data to the first terminal.
  • the second terminal uses the identification of the first terminal as the destination address and the identification of the second terminal as the source address to send the first message, the second message or the data to the first terminal, that is, the first message, the second message and the data.
  • the source address is the identifier of the second terminal
  • the destination address is the identifier of the first terminal.
  • Step 506 The first terminal determines the distance between the first terminal and the second terminal based on the first duration and the second duration.
  • D is the distance between the first terminal and the second terminal
  • c is the speed of light
  • T round is the first duration
  • T reply is the second duration
  • the first terminal sends a first signal for ranging, receives a second signal in response to the first signal, and determines a third time between the time when the first terminal sends the first signal and the time when the second signal is received. a duration, and receives a second duration from the second terminal through a PC5-S message, PC5-RRC message or data, and then determines the distance between the first terminal and the second terminal based on the first duration and the second duration. In this way, the method 500 can implement measuring the distance between the first terminal and the second terminal.
  • method 500 further includes: the first terminal obtains ranging information, where the ranging information is used to indicate measuring the distance between the first terminal and the second terminal. In this case, the first terminal sends the first signal to the second terminal according to the ranging information.
  • the ranging information includes a ranging indication and an identification of the second terminal.
  • the ranging indication is used to indicate the ranging operation
  • the identification of the second terminal is used to indicate the object of ranging.
  • the access layer of the first terminal can determine and measure the distance between the first terminal and the second terminal based on the ranging information.
  • the ranging information includes first ranging period information and the identity of the second terminal.
  • the first ranging period information is used to indicate the first period of ranging
  • the identity of the second terminal is used to indicate the object of ranging.
  • the ranging information includes ranging instructions, first ranging period information and the identification of the second terminal.
  • the ranging indication is used to indicate the ranging operation
  • the first ranging period information is used to indicate the first period of ranging
  • the identification of the second terminal is used to indicate the object of ranging.
  • the identity of the second terminal may be the layer 2 identity of the second terminal.
  • the first terminal after determining the distance between the first terminal and the second terminal, the first terminal further determines a second period of ranging based on the distance between the first terminal and the second terminal. Subsequently, the first terminal may perform a ranging operation according to the second cycle. For example, the first terminal obtains the corresponding relationship between the distance and the ranging period. After determining the distance between the first terminal and the second terminal, the first terminal uses the distance between the first terminal and the second terminal and the obtained correspondence. The relationship determines the second cycle. In this way, the first terminal can update the ranging period information according to the distance between the first terminal and the second terminal. For example, a larger period can be used when the distance between the terminals is longer, and a larger period can be used when the distance between the terminals is smaller. Use smaller cycles.
  • the first terminal obtains the ranging information, including: the first terminal obtains the ranging information from the second terminal.
  • the second terminal sends ranging information to the first terminal, and accordingly, the first terminal receives ranging information from the second terminal, where the ranging information is used to indicate measuring the distance between the first terminal and the second terminal. distance.
  • the method 500 may further include: the first terminal sending the distance between the first terminal and the second terminal to the second terminal. In other words, the first terminal initiates ranging when receiving the ranging request from the second terminal, and feeds back the measured distance between the first terminal and the second terminal to the second terminal.
  • the first terminal and the second terminal include an application layer and a network layer.
  • the method 500 may be executed by the network layer of the first terminal and the network layer of the second terminal, including: the network layer of the first terminal sends the first signal to the second terminal, and accordingly, the network layer of the second terminal Receive the first signal from the first terminal; the network layer of the second terminal sends the second signal to the first terminal; accordingly, the network layer of the first terminal receives the second signal from the second terminal; the network layer of the first terminal The road layer determines the first duration based on the time when the first signal is sent and the time when the second signal is received; The network layer of the second terminal determines the second duration based on the moment of receiving the first signal and the moment of sending the second signal; the network layer of the second terminal sends the second duration to the first terminal through the PC5-S message or PC5-RRC message, Correspondingly, the network layer of the first terminal receives the second duration from the second terminal; the network layer of the first terminal determines the distance
  • the network layer of the first terminal may include an access function and a ranging function.
  • the access function can perform: sending and receiving signals (for example, sending a first signal, receiving a second signal, etc.), performing calculations based on the sending and receiving time of signals (for example, determining a first duration), etc.
  • the ranging function may perform: receiving information from the application layer, calculating the distance between terminals (for example, determining the distance between the first terminal and the second terminal according to the first duration and the second duration), etc.
  • the layer containing the access function can be called the access layer, and the layer containing the ranging function can form the first layer, and communication can be carried out between the access layer and the first layer.
  • the access layer and the first layer can realize the functions of the first terminal in Figure 3.
  • the access function may perform: sending and receiving signals (for example, sending a first signal, receiving a second signal, etc.), performing calculations based on the sending and receiving moments of signals (for example, determining a first duration), calculating the distance between terminals. distance (for example, the distance between the first terminal and the second terminal is determined based on the first duration and the second duration), etc.
  • the ranging function can perform: receiving information from the application layer.
  • the layer containing the access function can be called the access layer
  • the layer containing the ranging function can be called the first layer
  • communication can be carried out between the access layer and the first layer.
  • the access layer and the first layer can realize the function of the first terminal in Figure 4.
  • the network layer of the second terminal may include an access function and a ranging function.
  • the access function can perform: sending and receiving signals (for example, receiving a first signal, sending a second signal, etc.), performing calculations based on the sending and receiving time of signals (for example, determining a second duration), etc.
  • the ranging function can perform: sending and receiving messages, etc.
  • the layer containing the access function can be called the access layer
  • the layer containing the ranging function can be called the first layer
  • communication can be carried out between the access layer and the first layer.
  • the access layer and the first layer can realize the functions of the second terminal in Figure 3 or Figure 4.
  • the first terminal obtains the ranging information, including: the application layer of the first terminal generates the ranging information.
  • Method 500 also includes: the application layer of the first terminal sending ranging information to the network layer of the first terminal.
  • the first terminal and the second terminal include an application layer, a first layer and an access layer.
  • the method 500 can be executed by the first layer and the access layer of the first terminal, and the first layer and the access layer of the second terminal.
  • Figure 3 and Figure 4 please refer to Figure 3 and Figure 4, which will not be described again here. .
  • terminal 1 initiates ranging and measures the relative distance between terminal 1 and terminal 2.
  • the ranging layer may correspond to the first layer above
  • the ranging signal may correspond to the first signal above
  • the response signal may correspond to the second signal above
  • the distance threshold may correspond to the threshold condition above .
  • the relative distance between terminal 1 and terminal 2 is simply referred to as the distance result below.
  • Figure 6 is an example of the ranging method of the present application.
  • the ranging signal is generated by the access layer of terminal 1, and the distance result is calculated.
  • Step 601 The application layer (APP layer) of terminal 1 provides ranging requirements to the ranging layer of terminal 1. beg.
  • the ranging requirement may include a ranging instruction, and the ranging instruction is used to indicate initiating a ranging operation.
  • the ranging requirements also include a distance threshold.
  • the distance threshold is the distance threshold that needs to be met when submitting the distance result, that is, the distance result is submitted to a higher layer only when the distance result meets the distance threshold.
  • the distance threshold may include one or more thresholds.
  • the ranging requirement can also carry the application layer identifier (UE2app ID) of terminal 2, which is used to indicate the object of ranging.
  • UE2app ID application layer identifier
  • Step 602 The ranging layer of terminal 1 requests the access layer of terminal 1 to measure the distance to terminal 2.
  • the ranging layer of terminal 1 provides the ranging indication and the layer 2 identification (UE2L2ID) of terminal 2 to the access layer of terminal 1.
  • the ranging indicator is used to indicate ranging operations.
  • the ranging operation can be understood as measuring the distance between terminals.
  • the ranging layer of terminal 1 provides the first ranging period information and the layer 2 identifier of terminal 2 to the access layer of terminal 1.
  • the first ranging period information is used to indicate the first period of ranging.
  • the ranging layer of terminal 1 provides the ranging indication, the first ranging cycle information and the layer 2 identifier of terminal 2 to the access layer of terminal 1.
  • the ranging indicator is used to indicate ranging operations.
  • the ranging operation can be understood as measuring the distance between terminals.
  • the first ranging period information is used to indicate the first period of ranging.
  • the layer 2 identifier of terminal 2 may be obtained from terminal 2 during the discovery process with terminal 2, or may be obtained from terminal 2 during the process of establishing a PC5 connection with terminal 2, or may be obtained during Obtained from Terminal 2 after the PC5 connection with Terminal 2 is established.
  • terminal 1 can perform the discovery process of terminal 2 and the PC5 connection establishment process, and obtain the terminal from terminal 2 during the discovery process, the PC5 connection establishment process, or after the PC5 connection is established.
  • the ranging layer of Terminal 1 also provides the distance threshold to the access layer of Terminal 1 . This allows the access layer to determine whether to submit the distance result upward.
  • the first layer of terminal 1 also determines the distance result calculated by terminal 1 . That is, when it is determined that the distance result is calculated by terminal 1, the first layer of terminal 1 requests the access layer of terminal 1 to measure the distance from terminal 2, and the access layer of terminal 1 calculates the distance result.
  • terminal 1 and terminal 2 can exchange ranging computing capability information, and then determine the distance result calculated by terminal 1.
  • the first layer of terminal 1 also determines that terminal 1 sends the signal for ranging first. That is, when the first layer of terminal 1 determines that terminal 1 sends the signal for ranging first, the first layer of terminal 1 requests the access layer of terminal 1 to measure the distance to terminal 2 and the distance between terminal 1 and terminal 2. The access layer first sends signals for ranging. Alternatively, terminal 1 and terminal 2 may exchange information to determine that terminal 1 sends the signal for ranging first.
  • Step 603 The access layer of terminal 1 generates and sends a ranging signal (ranging signaling), and records the sending time T 1 of the ranging signal.
  • a ranging signal ranging signaling
  • the access layer of terminal 1 determines to send the ranging signal according to the ranging indication, And use the layer 2 identifier of terminal 1 and the layer 2 identifier of terminal 2 to send the ranging signal.
  • the source address of the ranging signal is the layer 2 identifier of terminal 1
  • the destination address of the ranging signal is the layer 2 identifier of terminal 2.
  • the access layer of terminal 1 stores the corresponding relationship between the layer 2 identifier of terminal 1 and the sending time T 1
  • the access layer of terminal 1 stores the corresponding relationship between the layer 2 identifier of terminal 2 and the sending time T 1 .
  • the access layer of terminal 1 when the ranging layer of terminal 1 provides the first ranging period information and the layer 2 identifier of terminal 2 to the access layer of terminal 1, the access layer of terminal 1 follows the first ranging period.
  • the first cycle of information indication, end of use The layer 2 identifier of terminal 1 and the layer 2 identifier of terminal 2 send a ranging signal.
  • the source address of the ranging signal is the layer 2 identifier of terminal 1
  • the destination address of the ranging signal is the layer 2 identifier of terminal 2.
  • the access layer of terminal 1 stores the corresponding relationship between the layer 2 identifier of terminal 1 and the sending time T 1
  • the access layer of terminal 1 stores the corresponding relationship between the layer 2 identifier of terminal 2 and the sending time T 1 .
  • the access layer of terminal 1 when the ranging layer of terminal 1 provides the ranging indication, the first ranging period information and the layer 2 identifier of terminal 2 to the access layer of terminal 1, the access layer of terminal 1 will The distance indication determines that the ranging signal is sent, and according to the first period indicated by the first ranging period information, the ranging signal is sent using the layer 2 identification of terminal 1 and the layer 2 identification of terminal 2.
  • the source address of the ranging signal is terminal 1.
  • the layer 2 identifier of Terminal 2 is the destination address of the ranging signal.
  • the access layer of terminal 1 stores the corresponding relationship between the layer 2 identifier of terminal 1 and the sending time T 1 , and/or the access layer of terminal 1 stores the corresponding relationship between the layer 2 identifier of terminal 2 and the sending time T 1 .
  • terminal 1 when the access layer of terminal 1 stores the correspondence between the layer 2 identifier of terminal 1 and the sending time T 1 , terminal 1 can use different layer 2 identifiers of terminal 1 for different terminals 2.
  • Step 604 After receiving the ranging signal from terminal 1, the access layer of terminal 2 generates and sends a response signal, and determines T reply based on the receiving time T 2 of the ranging signal and the sending time T 3 of the response signal.
  • the access layer of terminal 2 after receiving the ranging signal from terminal 1, stores the corresponding relationship between the layer 2 identifier of terminal 1 and the reception time T2 , and/or the access layer of terminal 2 stores terminal 2 The corresponding relationship between the layer 2 identifier and the receiving time T 2 .
  • the access layer of terminal 2 uses the layer 2 identifier of terminal 1 and the layer 2 identifier of terminal 2 to send a response signal.
  • the source address of the response signal is the layer 2 identifier of terminal 2
  • the destination address of the response signal is the layer 2 identifier of terminal 1.
  • an implementation method for the access layer of terminal 2 to use the layer 2 identifier of terminal 1 as the associated information to determine T reply is: the access layer of terminal 2 determines the sending time T 3 of the response signal; the access layer of terminal 2 determines T reply based on The destination address of the response signal, that is, the layer 2 identifier of terminal 1, and the corresponding relationship between the layer 2 identifier of terminal 1 and the reception time T 2 of the ranging signal, determine the reception time T 2 of the ranging signal corresponding to the response signal, and then T reply is calculated based on the reception time T 2 of the ranging signal and the transmission time T 3 of the response signal.
  • terminal 2 can use different layer 2 identifiers of terminal 2 for different terminals 1.
  • Step 605 Terminal 2 sends T reply to Terminal 1.
  • terminal 2 sends T reply to terminal 1 through signaling at the access layer.
  • the access layer of terminal 2 may send T reply to terminal 1 through a PC5-RRC message.
  • the sending time T3 of the response signal may be the time when the response signal is expected to be sent, or it may be the time when the response signal is actually sent.
  • Step 606 After receiving the response signal from terminal 2, the access layer of terminal 1 determines T round based on the sending time T 1 of the ranging signal and the receiving time T 4 of the response signal, and based on T round and the value obtained in step 605 T reply to calculate the distance result.
  • the distance result speed of light ⁇ (T round - T reply )/2.
  • an implementation method in which the access layer of terminal 1 uses the layer 2 identifier of terminal 2 as the associated information to determine T round is: the access layer of terminal 1 uses the source address of the response signal, that is, the layer 2 identifier of terminal 2, and Layer 2 label for terminal 2 Identify the corresponding relationship with the sending time T 1 of the ranging signal, determine the sending time T 1 of the ranging signal corresponding to the response signal, and then calculate T round based on the sending time T 1 of the ranging signal and the receiving time T 4 of the response signal.
  • Step 607 The access layer of terminal 1 submits the distance result and optionally the layer 2 identifier of terminal 2 corresponding to the distance result to the ranging layer of terminal 1.
  • the access layer of terminal 1 also determines whether the distance result satisfies the distance threshold. If the distance result meets the distance threshold, the access layer of terminal 1 submits the distance result and the layer 2 identifier of terminal 2 corresponding to the distance result to the ranging layer of terminal 1. If the distance result does not meet the distance threshold, the access layer of terminal 1 may not submit the distance result and the layer 2 identifier of terminal 2 corresponding to the distance result to the ranging layer of terminal 1.
  • the distance result satisfies the distance threshold, which may be, for example, the distance result is greater than the distance threshold, or the distance result is less than the distance threshold, etc.
  • Step 608 The ranging layer of terminal 1 submits the distance result and optionally the application layer identifier of terminal 2 corresponding to the distance result to the application layer of terminal 1.
  • the ranging layer of terminal 1 also determines whether the distance result satisfies the distance threshold. If the distance result meets the distance threshold, the ranging layer of terminal 1 submits the distance result and the application layer identifier of terminal 2 corresponding to the distance result to the application layer of terminal 1. If the distance result does not meet the distance threshold, the ranging layer of terminal 1 may not submit the distance result and the application layer identifier of terminal 2 corresponding to the distance result to the application layer of terminal 1.
  • the distance result satisfies the distance threshold, which may be, for example, the distance result is greater than the distance threshold, or the distance result is less than the distance threshold, etc.
  • the access layer of terminal 1 determines the second period of ranging based on the distance between terminal 1 and terminal 2. For example, the access layer of terminal 1 obtains the corresponding relationship between distance and ranging period from the application layer of terminal 1 or the first layer of terminal 1. The access layer of terminal 1 obtains the corresponding relationship between the distance between terminal 1 and terminal 2. The relationship determines the second cycle. Subsequently, the terminal 1 can perform ranging according to the second cycle in a manner similar to that based on the first cycle, which will not be described again. In this way, terminal 1 can update the ranging period according to the distance between terminal 1 and terminal 2. For example, a larger period can be used when the distance between terminals is longer, and a smaller period can be used when the distance between terminals is shorter. small cycle.
  • Figure 7 is another example of the ranging method of the present application.
  • the ranging signal is generated by the access layer of terminal 1, and the distance result is calculated by the ranging layer.
  • Step 701 The application layer of terminal 1 provides ranging requirements to the ranging layer of terminal 1.
  • the ranging requirement may include a ranging instruction, and the ranging instruction is used to indicate initiating a ranging operation.
  • the ranging requirement also includes a distance threshold.
  • the distance threshold is the distance threshold that needs to be met when submitting the distance result, that is, the distance result is submitted to a higher layer only when the distance result meets the distance threshold.
  • the distance threshold may include one or more thresholds.
  • the ranging requirement may also carry the application layer identifier of the terminal 2 to indicate the object of ranging.
  • Step 702 The ranging layer of terminal 1 requests the access layer of terminal 1 to measure the distance to terminal 2.
  • the ranging layer of terminal 1 provides the ranging indication and the layer 2 identifier of terminal 2 to the access layer of terminal 1.
  • the ranging indicator is used to indicate ranging operations.
  • the ranging operation can be understood as measuring the distance between terminals distance.
  • the ranging layer of terminal 1 provides the first ranging period information and the layer 2 identifier of terminal 2 to the access layer of terminal 1.
  • the first ranging period information is used to indicate the first period of ranging.
  • the ranging layer of terminal 1 provides the ranging indication, the first ranging cycle information and the layer 2 identifier of terminal 2 to the access layer of terminal 1.
  • the ranging indicator is used to indicate ranging operations.
  • the ranging operation can be understood as measuring the distance between terminals.
  • the first ranging period information is used to indicate the first period of ranging.
  • the first layer of terminal 1 also determines the distance result calculated by terminal 1 . That is, when it is determined that the distance result is calculated by terminal 1, the first layer of terminal 1 requests the access layer of terminal 1 to measure the distance between terminal 2 and terminal 2, and calculates the distance result.
  • terminal 1 and terminal 2 can exchange ranging computing capability information, and then determine the distance result calculated by terminal 1.
  • the first layer of terminal 1 also determines that terminal 1 sends the signal for ranging first. That is, when the first layer of terminal 1 determines that terminal 1 sends the signal for ranging first, the first layer of terminal 1 requests the access layer of terminal 1 to measure the distance to terminal 2 and the distance between terminal 1 and terminal 2. The access layer first sends signals for ranging. Alternatively, terminal 1 and terminal 2 may exchange information to determine that terminal 1 sends the signal for ranging first.
  • the ranging layer of Terminal 1 provides the first ranging cycle information to the access layer of Terminal 1 .
  • the first ranging period information is used to indicate the first period of ranging.
  • Step 703 The access layer of terminal 1 generates and sends a ranging signal, and records the sending time T 1 of the ranging signal.
  • the access layer of terminal 1 determines to send the ranging signal according to the ranging indication, And use the layer 2 identifier of terminal 1 and the layer 2 identifier of terminal 2 to send the ranging signal.
  • the source address of the ranging signal is the layer 2 identifier of terminal 1
  • the destination address of the ranging signal is the layer 2 identifier of terminal 2.
  • the access layer of terminal 1 stores the corresponding relationship between the layer 2 identifier of terminal 1 and the sending time T 1
  • the access layer of terminal 1 stores the corresponding relationship between the layer 2 identifier of terminal 2 and the sending time T 1 .
  • the access layer of Terminal 1 when the ranging layer of Terminal 1 provides the first ranging period information and the Layer 2 identifier of Terminal 2 to the access layer of Terminal 1, the access layer of Terminal 1 follows the first ranging period.
  • the ranging signal is sent using the layer 2 identifier of terminal 1 and the layer 2 identifier of terminal 2.
  • the source address of the ranging signal is the layer 2 identifier of terminal 1
  • the destination address of the ranging signal is the layer 2 identifier of terminal 2.
  • Layer 2 identification The access layer of terminal 1 stores the corresponding relationship between the layer 2 identifier of terminal 1 and the sending time T 1
  • the access layer of terminal 1 stores the corresponding relationship between the layer 2 identifier of terminal 2 and the sending time T 1 .
  • the access layer of terminal 1 when the ranging layer of terminal 1 provides the ranging indication, the first ranging period information and the layer 2 identifier of terminal 2 to the access layer of terminal 1, the access layer of terminal 1 will The distance indication determines that the ranging signal is sent, and according to the first period indicated by the first ranging period information, the ranging signal is sent using the layer 2 identification of terminal 1 and the layer 2 identification of terminal 2.
  • the source address of the ranging signal is terminal 1.
  • the layer 2 identifier of Terminal 2 is the destination address of the ranging signal.
  • the access layer of terminal 1 stores the corresponding relationship between the layer 2 identifier of terminal 1 and the sending time T 1 , and/or the access layer of terminal 1 stores the corresponding relationship between the layer 2 identifier of terminal 2 and the sending time T 1 .
  • terminal 1 when the access layer of terminal 1 stores the correspondence between the layer 2 identifier of terminal 1 and the sending time T 1 , terminal 1 can use different layer 2 identifiers of terminal 1 for different terminals 2.
  • Step 704 After receiving the ranging signal from terminal 1, the access layer of terminal 2 generates and sends a response signal, and determines T reply based on the receiving time T 2 of the ranging signal and the sending time T 3 of the response signal.
  • the access layer of terminal 2 after receiving the ranging signal from terminal 1, stores the layer 2 identification of terminal 1 The corresponding relationship with the reception time T 2 , and/or the access layer of the terminal 2 stores the corresponding relationship between the layer 2 identifier of the terminal 2 and the reception time T 2 .
  • the access layer of terminal 2 uses the layer 2 identifier of terminal 1 and the layer 2 identifier of terminal 2 to send a response signal.
  • the source address of the response signal is the layer 2 identifier of terminal 2
  • the destination address of the response signal is the layer 2 identifier of terminal 1.
  • an implementation method for the access layer of terminal 2 to use the layer 2 identifier of terminal 1 as the associated information to determine T reply is: the access layer of terminal 2 determines the sending time T 3 of the response signal; the access layer of terminal 2 determines T reply based on The destination address of the response signal, that is, the layer 2 identifier of terminal 1, and the corresponding relationship between the layer 2 identifier of terminal 1 and the reception time T 2 of the ranging signal, determine the reception time T 2 of the ranging signal corresponding to the response signal, and then T reply is calculated based on the reception time T 2 of the ranging signal and the transmission time T 3 of the response signal.
  • terminal 2 can use different layer 2 identifiers of terminal 2 for different terminals 1.
  • Step 705 Terminal 2 sends T reply to Terminal 1.
  • terminal 2 sends T reply to terminal 1 through signaling at the ranging layer.
  • the access layer of terminal 2 provides T reply and the layer 2 identifier of terminal 1 to the ranging layer of terminal 2.
  • the ranging layer of terminal 2 After receiving the T reply and the layer 2 identifier of terminal 1, the ranging layer of terminal 2 generates a message based on the T reply .
  • PC5-S message and provides the PC5-S message and the layer 2 identifier of terminal 1 to the access layer of terminal 2.
  • the PC5-S message includes T reply ; further, the access layer of terminal 2 will respond according to the received
  • the layer 2 identifier of terminal 1 and the layer 2 identifier of terminal 2 send a PC5-S message to terminal 1.
  • the source address of the PC5-S message is the layer 2 identifier of terminal 2
  • the destination address of the PC5-S message is the layer 2 identifier of terminal 1.
  • terminal 2 sends T reply to terminal 1 through signaling at the access layer.
  • the access layer of terminal 2 may send T reply to terminal 1 through the PC5-RRC signal.
  • terminal 2 sends T reply to terminal 1 through PC5-U.
  • the access layer of terminal 2 provides T reply and the layer 2 identifier of terminal 1 to the ranging layer of terminal 2.
  • the ranging layer of terminal 2 After receiving the T reply and the layer 2 identifier of terminal 1, the ranging layer of terminal 2 generates a message based on the T reply . data, and provides the data and the layer 2 identifier of terminal 1 to the access layer of terminal 2.
  • the data includes T reply ; further, the access layer of terminal 2 will receive the layer 2 identifier of terminal 1 and the layer 2 identifier of terminal 2.
  • the layer 2 identifier sends data to terminal 1.
  • the source address of the data is the layer 2 identifier of terminal 2, and the destination address of the data is the layer 2 identifier of terminal 1.
  • the sending time T 3 of the response signal in step 705 may be the time when the access layer of terminal 2 is expected to send the response signal, or may be the time when the access layer of terminal 2 actually sends the response signal.
  • Step 706 After receiving the response signal from terminal 2, the access layer of terminal 1 determines T round based on the sending time T 1 of the ranging signal and the receiving time T 4 of the response signal.
  • an implementation method in which the access layer of terminal 1 uses the layer 2 identifier of terminal 2 as the associated information to determine T round is: the access layer of terminal 1 uses the source address of the response signal, that is, the layer 2 identifier of terminal 2, and The corresponding relationship between the layer 2 identifier of terminal 2 and the sending time T 1 of the ranging signal determines the sending time T 1 of the ranging signal corresponding to the response signal, and then based on the sending time T 1 of the ranging signal and the receiving time of the response signal T 4 calculates T round .
  • Step 707 The access layer of terminal 1 submits T round and optionally the layer 2 identifier of terminal 2 corresponding to the T round to the ranging layer of terminal 1.
  • Step 708 The ranging layer of terminal 1 calculates the distance result based on T round and T reply obtained in step 705.
  • the distance result the speed of light ⁇ (T round -T reply )/2.
  • the distance result the speed of light ⁇ (T round -T reply )/2.
  • Step 709 The ranging layer of terminal 1 submits the distance result and optionally the application layer identifier of terminal 2 corresponding to the distance result to the application layer of terminal 1.
  • the ranging layer of terminal 1 also determines whether the distance result satisfies the distance threshold. If the distance result satisfies the distance threshold, the ranging layer of terminal 1 submits the distance result and the application layer identifier of terminal 2 corresponding to the distance result to the application layer of terminal 1. If the distance result does not meet the distance threshold, the ranging layer of terminal 1 may not submit the distance result and the application layer identifier of terminal 2 corresponding to the distance result to the application layer of terminal 1.
  • the distance result satisfies the distance threshold, which may be, for example, the distance result is greater than the distance threshold, or the distance result is less than the distance threshold, etc.
  • the first layer of terminal 1 after determining the distance between terminal 1 and terminal 2, the first layer of terminal 1 also determines the second period of ranging based on the distance between terminal 1 and terminal 2, and then provides access to terminal 1
  • the layer sends second ranging period information, and the second ranging period information is used to indicate the second period.
  • the first layer of terminal 1 obtains the corresponding relationship between distance and ranging period from the application layer of terminal 1 or the core network element (such as PCF or AMF). The distance and the obtained correspondence determine the second ranging period information.
  • the terminal 1 can perform ranging according to the second cycle in a manner similar to that based on the first cycle, which will not be described again.
  • the first layer of terminal 1 can update the ranging period information according to the distance between terminal 1 and terminal 2. For example, it can use a larger period when the distance between terminals is longer, and use a larger period when the distance between terminals is longer. Hours use smaller periods.
  • the terminal performs operation B on layer A, which can also be described as the terminal performs operation B on layer A, or the terminal performs operation B through layer A.
  • the first layer of the terminal sends ranging information to the access layer of the terminal. It can also be described as: the terminal sends ranging information to the access layer of the terminal on the first layer, or the terminal sends the ranging information to the terminal through the first layer. Send ranging information into the layer.
  • the devices in Figures 8 to 10 include corresponding hardware structures and/or software modules for performing each function.
  • the units and method steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software driving the hardware depends on the specific application scenarios and design constraints of the technical solution.
  • FIGS 8 to 10 are schematic structural diagrams of possible devices provided by embodiments of the present application. These devices can be used to implement the functions of the first terminal or the second terminal in the above method embodiments, and therefore can also achieve the beneficial effects of the above method embodiments.
  • the device 800 includes an application layer 810, a first layer 820 and an access layer 830.
  • the first layer 820 is used to: send ranging information to the access layer 830, where the ranging information is used to indicate the measurement of the The distance between the first terminal and the second terminal.
  • the access layer 830 is configured to: send a first signal to the second terminal according to the ranging information, where the first signal is used to measure the distance between the first terminal and the second terminal; and A second signal is received from the second terminal, and the second signal is used to respond to the first signal.
  • the first layer 820 is also used to: obtain the first duration, the first A duration is the duration between the moment when the first terminal sends the first signal and the moment when the first terminal receives the second signal; a second duration is obtained, and the second duration is the second duration The duration between the moment when the terminal receives the first signal and the moment when the second terminal sends the second signal; and based on the first duration and the second duration, determine the relationship between the first terminal and the distance between the second terminals.
  • the access layer 830 is also configured to determine the first duration.
  • the first layer 820 is specifically configured to obtain the first duration from the access layer of the first terminal.
  • the access layer 830 is also configured to store a first correspondence between a first identifier and the time when the first terminal sends the first signal, where the first identifier corresponds to the second terminal.
  • the access layer 830 is specifically configured to: determine the moment when the first terminal receives the second signal; and obtain the first identifier according to the first identifier included in the second signal and the first corresponding relationship. The time when the terminal sends the first signal; the first duration is determined based on the time when the first terminal sends the first signal and the time when the first terminal receives the second signal.
  • the first layer 820 is specifically configured to: receive a first message from the first layer of the second terminal, where the first message includes the second duration; and obtain the first message from the first message. Two hours.
  • the first layer 820 is specifically configured to: receive data from the first layer of the second terminal, where the data includes the second duration; and obtain the second duration from the data.
  • the data can be PC5-U data.
  • the access layer 830 is further configured to: receive a second message from the access layer of the second terminal, where the second message includes the second duration; and obtain the first message from the second message. Two hours.
  • the first layer 820 is specifically configured to obtain the second duration from the access layer of the first terminal.
  • the first layer 820 is also used to: determine whether the distance between the first terminal and the second terminal satisfies a threshold condition; when the distance between the first terminal and the second terminal satisfies When the threshold condition is met, the distance between the first terminal and the second terminal is sent to the application layer 810.
  • the first layer 820 is used to: send ranging information to the access layer 830, where the ranging information is used to indicate the measurement of the The distance between the first terminal and the second terminal.
  • the access layer 830 is configured to: send a first signal to the second terminal according to the ranging information, where the first signal is used to measure the distance between the first terminal and the second terminal; receive a second signal from the second terminal, the second signal being used to respond to the first signal; determining a first duration, the first duration being the time when the first terminal sends the first signal and The duration between the moment when the first terminal receives the second signal; and obtaining the second duration, which is the moment when the second terminal receives the first signal and the moment when the second terminal sends the signal.
  • the duration between the moments of the second signal determining the distance between the first terminal and the second terminal according to the first duration and the second duration; and sending the first terminal to the first layer 820 The distance between the first terminal and the second terminal.
  • the access layer 830 is also configured to store a first correspondence between a first identifier and the time when the first terminal sends the first signal, where the first identifier corresponds to the second terminal.
  • the access layer 830 is specifically configured to: determine the moment when the first terminal receives the second signal; and obtain the first identifier according to the first identifier included in the second signal and the first corresponding relationship. The time when the terminal sends the first signal; the first duration is determined based on the time when the first terminal sends the first signal and the time when the first terminal receives the second signal.
  • the access layer 830 is specifically configured to: receive a second message from the second terminal, where the second message includes the second duration; and obtain the second duration from the second message.
  • the access layer 830 is also configured to determine whether the distance between the first terminal and the second terminal meets a threshold condition.
  • the access layer 830 is specifically configured to: when the distance between the first terminal and the second terminal meets the threshold When the condition is met, the distance between the first terminal and the second terminal is sent to the first layer 820.
  • the first layer 820 is also used to: determine whether the distance between the first terminal and the second terminal satisfies a threshold condition; when the distance between the first terminal and the second terminal satisfies When the threshold condition is met, the distance between the first terminal and the second terminal is sent to the application layer 810.
  • the access layer 810 is used to: receive a first signal from the first terminal, the first signal is used for measurement The distance between the first terminal and the second terminal; sending a second signal to the first terminal, the second signal being used to respond to the first signal; determining a second duration, the second The duration is the duration between the moment when the second terminal receives the first signal and the moment when the second terminal sends the second signal.
  • the access layer 810 is further configured to send the second duration to the first terminal, or the first layer 820 is configured to send the second duration to the first terminal.
  • the first layer 820 is specifically configured to: send a first message to the first layer of the first terminal, where the first message includes the second duration.
  • the first layer 820 is specifically used to send data to the first layer of the first terminal, where the data includes the second duration.
  • the data can be PC5-U data.
  • the access layer 810 is specifically configured to: send a second message to the access layer of the first terminal, where the second message includes the second duration.
  • the access layer 810 is further configured to: store a second correspondence between a second identifier and the moment when the second terminal receives the first signal, where the second identifier corresponds to the first terminal.
  • the access layer 810 is specifically configured to: determine the time when the second terminal sends the second signal; and obtain the second signal according to the second identifier included in the second signal and the second corresponding relationship. The time when the terminal receives the first signal; the second duration is determined based on the time when the second terminal receives the first signal and the time when the second terminal sends the second signal.
  • the device 900 includes a transceiver unit 910 and a processing unit 920.
  • the transceiver unit 910 is used to: send a first signal to the second terminal, the first signal is used to measure the first terminal distance from the second terminal; receiving a second signal from the second terminal, the second signal being used to respond to the first signal.
  • the processing unit 920 is configured to determine a first duration, where the first duration is a duration between a time when the first terminal sends the first signal and a time when the first terminal receives the second signal.
  • the transceiving unit 910 is also configured to receive a first message, a second message or data from the second terminal, where the first message, the second message and the data include a second duration, and the second duration is the duration between the moment when the second terminal receives the first signal and the moment when the second terminal sends the second signal, the first message includes a PC5-S message, and the second message includes PC5-RRC message, the data may be PC5-U data.
  • the processing unit 920 is further configured to determine the distance between the first terminal and the second terminal according to the first duration and the second duration.
  • the processing unit 920 is further configured to: store a first correspondence between a first identifier and the time when the first terminal sends the first signal, where the first identifier corresponds to the second terminal.
  • the processing unit 920 is specifically configured to: determine the time when the first terminal receives the second signal; and obtain the first terminal according to the first identifier included in the second signal and the first corresponding relationship. The time when the first signal is sent; the first duration is determined based on the time when the first terminal sends the first signal and the time when the first terminal receives the second signal.
  • the transceiver unit 910 is further configured to: receive ranging information from the second terminal, where the ranging information is used to indicate measuring the distance between the first terminal and the second terminal; The second terminal sends the distance between the first terminal and the second terminal.
  • the apparatus 900 includes an application layer and a network layer.
  • the functions of the above-mentioned transceiver unit 910 and processing unit 920 may be implemented by the network layer. Specifically, it may include: the network layer sends the first signal to the second terminal; the network layer receives the second signal from the second terminal; the network layer determines the first duration based on the time when the first signal is sent and the time when the second signal is received; the network layer The network layer determines the second duration based on the time when the first signal is received and the time when the second signal is sent; the network layer receives the first message, the second message or the data from the second terminal, where the first message, the second message, and the data Including a second duration; the network layer determines the distance between the first terminal and the second terminal based on the first duration and the second duration.
  • the application layer sends ranging information to the network layer, where the ranging information is used to indicate measuring the distance between the first terminal and the second terminal.
  • the network layer sends the ranging information to the second terminal based on the ranging information. The first signal.
  • the apparatus 900 includes an application layer, a first layer and an access layer.
  • the first layer and the access layer may cooperate to realize the functions of the transceiver unit 910 and the processing unit 920.
  • the application layer sends ranging information to the first layer, where the ranging information is used to indicate measuring the distance between the first terminal and the second terminal; the first layer sends ranging information to the access layer, in this case Next, the access layer sends the first signal to the second terminal according to the ranging information.
  • the transceiver unit 910 is used to: receive a first signal from the first terminal, the first signal is used to measure the first The distance between the terminal and the second terminal; sending the second signal to the first terminal, the second signal being used to respond to the first signal.
  • the processing unit 920 is configured to determine a second duration, where the second duration is a duration between the moment when the second terminal receives the first signal and the moment when the second terminal sends the second signal.
  • the transceiving unit 910 is further configured to: send a first message, a second message or data to the first terminal, where the first message, the second message and the data include the second duration, the first The message includes a PC5-S message, the second message includes a PC5-RRC message, and the data may be PC5-U data.
  • the processing unit 920 is further configured to: store a second correspondence between a second identification and a time when the second terminal receives the first signal, where the second identification corresponds to the first terminal.
  • the processing unit 920 is specifically configured to: determine the time when the second terminal sends the second signal; and obtain the second terminal according to the second identifier included in the second signal and the second corresponding relationship. The time when the first signal is received; the second duration is determined based on the time when the second terminal receives the first signal and the time when the second terminal sends the second signal.
  • the transceiver unit 910 is further configured to: send ranging information to the first terminal, where the ranging information is used to indicate measuring the distance between the first terminal and the second terminal; receive the distance from the first terminal to the second terminal. The distance between the first terminal and the second terminal of the first terminal.
  • the apparatus 900 includes a network layer.
  • the functions of the above-mentioned transceiver unit 910 and processing unit 920 may be implemented by the network layer. Specifically, it may include: the network layer receives the first signal from the first terminal; the network layer sends the second signal to the first terminal; the network layer determines the second duration; the network layer sends the first message, the second message or data to the first terminal. .
  • the apparatus 900 includes an application layer, a first layer and an access layer.
  • the first layer and the access layer may cooperate to realize the functions of the transceiver unit 910 and the processing unit 920.
  • the device 800 please refer to the description of the device 800, which will not be described again here.
  • transceiver unit 910 and processing unit 920, reference may be made to the relevant descriptions in the above-mentioned method embodiments, which will not be described again here.
  • device 1000 includes processor 1010 .
  • Processor 1010 is coupled to memory 1030 for storing instructions.
  • the processor 1010 is used to execute instructions in the memory 1030 to implement the functions of the above-mentioned processing unit 920.
  • the device 1000 further includes a memory 1030.
  • the device 1000 further includes an interface circuit 1020.
  • the processor 1010 and the interface circuit 1020 are coupled to each other.
  • the interface circuit 1020 may be a transceiver or an input-output interface.
  • the processor 1010 is used to execute instructions to realize the functions of the above-mentioned processing unit 920, and the interface circuit 1020 is used to realize the functions of the above-mentioned transceiver unit 910.
  • the chip implements the functions of the first terminal in the above method embodiment.
  • the chip receives information from other modules (such as radio frequency modules or antennas) in the first terminal, and the information is sent to the first terminal by other devices; or, the chip sends information to other modules (such as radio frequency modules or antennas) in the first terminal. ) sends information, which is sent by the first terminal to other devices.
  • the chip implements the functions of the second terminal in the above method embodiment.
  • the chip receives information from other modules (such as radio frequency modules or antennas) in the second terminal, and the information is sent to the second terminal by other devices; or, the chip sends information to other modules (such as radio frequency modules or antennas) in the second terminal. ) sends information, which is sent by the second terminal to other devices.
  • the application also provides a communication device, including a processor, the processor is coupled to a memory, the memory is used to store computer programs or instructions and/or data, the processor is used to execute the computer programs or instructions stored in the memory, or read the memory storage data to perform the methods in each of the above method embodiments.
  • a communication device including a processor, the processor is coupled to a memory, the memory is used to store computer programs or instructions and/or data, the processor is used to execute the computer programs or instructions stored in the memory, or read the memory storage data to perform the methods in each of the above method embodiments.
  • the communication device includes memory.
  • the memory is integrated with the processor, or is provided separately.
  • the present application also provides a computer-readable storage medium on which are stored computer instructions for implementing the method executed by the first terminal or the second terminal in each of the above method embodiments.
  • This application also provides a computer program product, which includes instructions.
  • the instructions are executed by a computer, the methods executed by the first terminal or the second terminal in each of the above method embodiments are implemented.
  • the present application also provides a communication system, which includes at least one of the first terminal or the second terminal in the above embodiments.
  • processor in the embodiment of the present application can be a central processing unit (CPU), or other general-purpose processor, digital signal processor (DSP), or application-specific integrated circuit (application specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
  • CPU central processing unit
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • a general-purpose processor can be a microprocessor or any conventional processor.
  • the method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions.
  • Software instructions may be composed of corresponding software modules, which may be stored in random access memory, flash memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, or electrically erasable memory.
  • Programmable read-only memory register, hard disk, mobile hard disk, compact disc read-only memory (CD-ROM) or any other form of storage media well known in the art.
  • An exemplary storage medium is coupled to the processor such that the processor can read information from the storage medium and write information to the storage medium.
  • the storage medium can also be an integral part of the processor.
  • the processor and storage media may be located in an ASIC. Additionally, the ASIC may be located in the first terminal or the second terminal.
  • the processor and the storage medium may also exist as discrete components in the first terminal or the second terminal.
  • the computer program product includes one or more computer programs or instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, a network device, a user equipment, or other programmable device.
  • the computer program or instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another.
  • the computer program or instructions may be transmitted from a website, computer, A server or data center transmits via wired or wireless means to another website site, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media.
  • the available media may be magnetic media, such as floppy disks, hard disks, and tapes; optical media, such as digital video optical disks; or semiconductor media, such as solid-state hard drives.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Radar Systems Or Details Thereof (AREA)

Abstract

本申请提供了一种测距方法和通信装置,在该方法中,由第一终端的接入层根据第一层的测距信息生成并发送用于测距的第一信号,接收响应于第一信号的第二信号,由第一终端的第一层获取第一终端发送第一信号的时刻与第一终端接收所述第二信号的时刻之间的第一时长、以及第二终端接收第一信号的时刻与第二终端发送第二信号的时刻之间第二时长,并根据第一时长和第二时长确定第一终端与第二终端之间的距离。这样可以实现测量第一终端与第二终端之间的距离。

Description

一种测距方法和通信装置
本申请要求于2022年06月24日提交中国专利局、申请号为202210726824.1、申请名称为“一种测距方法和通信装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信领域,并且更具体地,涉及一种测距方法和通信装置。
背景技术
随着移动通信的高速发展,新业务类型(例如,视频聊天、虚拟现实(virtual reality,VR)/增强现实(augmented reality,AR)等数据业务)的普遍使用提高了用户对带宽的需求。很多通信场景下,例如,设备到设备(device-to-device,D2D)通信场景、车到万物(vehicle-to-everything,V2X)通信场景、和基于邻近的服务(proximity-based services,ProSe)通信场景等,允许终端之间直接进行通信。
如果两个终端在近距离范围内,那么在相互发现后两个终端可以直接通信,可进行数据面和控制面的信息传输。在理论上,终端之间还可以基于直接通信进行测距,以获取终端之间的相对距离。但是,目前尚未规定如何基于终端之间的直接通信进行测距。
发明内容
本申请提供了一种测距方法和通信装置,可以基于终端之间的直接通信测量终端之间的距离。
第一方面,提供了一种测距方法,所述方法可以由第一终端执行,也可以由第一终端中的模块或单元执行。
所述方法包括:第一终端的第一层向所述第一终端的接入层发送测距信息,所述测距信息用于指示测量所述第一终端与第二终端之间的距离;所述第一终端的接入层根据所述测距信息,向所述第二终端发送第一信号,所述第一信号用于测量所述第一终端与所述第二终端之间的距离;所述第一终端的接入层接收来自所述第二终端的第二信号,所述第二信号用于响应所述第一信号;所述第一终端的第一层获取第一时长,所述第一时长为所述第一终端发送所述第一信号的时刻与所述第一终端接收所述第二信号的时刻之间的时长;所述第一终端的第一层获取第二时长,所述第二时长为所述第二终端接收所述第一信号的时刻与所述第二终端发送所述第二信号的时刻之间的时长;所述第一终端的第一层根据所述第一时长和所述第二时长,确定所述第一终端与所述第二终端之间的距离。
在上述技术方案中,由第一终端的接入层根据第一层的测距信息生成并发送用于测距的第一信号,接收响应于第一信号的第二信号;由第一终端的第一层获取第一时长以及第二时长,并根据第一时长和第二时长确定第一终端与第二终端之间的距离。这样,可以实 现测量第一终端与第二终端之间的距离。
并且,上述技术方案考虑了终端内部的分层架构,明确了终端内部第一层和接入层的功能。此外,由于第一层确定第一终端与第二终端之间的距离,结果不易暴露或不易被其他实体获取,因此上述技术方案有助于保障测距结果(即第一终端与第二终端之间的距离)的安全性。
结合第一方面,在一种可能的实现方式中,所述测距信息包括:测距指示和所述第二终端的标识,所述测距指示用于指示测距操作。
其中,通过测距操作可以获得终端之间的相对距离。第二终端的标识用于指示测距的对象。这样,第一终端的接入层根据测距信息可以确定测量第一终端与第二终端之间的距离。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述测距信息包括:第一测距周期信息和所述第二终端的标识,所述第一测距周期信息用于指示测距的第一周期。测距的周期也可以称为测距的时间间隔,例如,第一周期也可以称为第一时间间隔,为了描述方便,本申请统一采用“周期”的叫法。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述测距信息包括:测距指示、第一测距周期信息和所述第二终端的标识,所述测距指示用于指示测距操作,所述第一测距周期信息用于指示测距的第一周期。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述方法还包括:所述第一终端的接入层确定所述第一时长;所述第一终端的第一层获取第一时长,包括:所述第一终端的第一层从所述第一终端的接入层获取所述第一时长。
在上述技术方案中,由第一终端的接入层确定第一时长,这样第一终端的第一层可以从第一终端的接入层获取第一时长。由于第一信号由第一终端的接入层发送、第二信号由第一终端的接入层接收,因此第一终端的接入层知道发送第一信号的时刻和接收第二信号的时刻,进而可以确定发送第一信号的时刻与接收第二信号之间的时长,方案易于实现。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述方法还包括:所述第一终端的接入层存储第一标识与所述第一终端发送所述第一信号的时刻的第一对应关系,所述第一标识对应于所述第二终端;所述第一终端的接入层确定所述第一时长,包括:所述第一终端的接入层确定所述第一终端接收所述第二信号的时刻;所述第一终端的接入层根据所述第二信号包括的所述第一标识、以及所述第一对应关系,获取所述第一终端发送所述第一信号的时刻;所述第一终端的接入层根据所述第一终端发送所述第一信号的时刻和所述第一终端接收所述第二信号的时刻,确定所述第一时长。
在上述技术方案中,由于第一标识与第一终端发送第一信号的时刻存在对应关系,因此第一终端的接入层可以根据第二信号包括的第一标识,获取与该第二信号对应的第一信号的发送时刻,从而保证测距的正确性。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述第一标识包括所述第一终端的标识和/或所述第二终端的标识,所述第一终端的标识用于标识所述第一终端与所述第二终端之间的通信。
这里的第一终端的标识用于标识第一终端与第二终端之间的通信,可以理解为,该第一终端的标识不用于与其他终端通信,或者,通过该第一终端的标识可以确定通信的对端 为第二终端。例如,当第一终端同时与包括第二终端在内的多个终端通信时,对于不同的终端,第一终端可以使用不同的标识与之通信,在此情况下,第一终端的标识同样可以区分与第一终端通信的多个终端。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述第一终端的第一层获取第二时长,包括:所述第一终端的第一层接收来自所述第二终端的第一层的第一消息,所述第一消息包括所述第二时长;所述第一终端的第一层从所述第一消息获取所述第二时长。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述第一消息包括基于邻近的服务通信5-信令(ProSe communication 5 signaling,PC5-S)消息。
换句话说,第二消息为第一层的信令。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述第一终端的第一层获取第二时长,包括:所述第一终端的第一层接收来自所述第二终端的第一层的数据,所述数据包括所述第二时长;所述第一终端的第一层从所述数据获取所述第二时长。
换句话说,第二终端的第一层将第二时长作为数据发送至第一终端的第一层。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述数据为基于邻近的服务通信5-用户面(ProSe communication 5 user plane,PC5-U)数据。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述第一终端的第一层获取第二时长,包括:所述第一终端的接入层接收来自所述第二终端的接入层的第二消息,所述第二消息包括所述第二时长;所述第一终端的接入层从所述第二消息获取所述第二时长;所述第一终端的第一层从所述第一终端的接入层获取所述第二时长。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述第二消息包括基于邻近的服务通信5-无线资源控制(ProSe communication 5 radio resource control,PC5-RRC)消息。
换句话说,第二消息为接入层的信令。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述方法还包括:所述第一终端的第一层确定所述第一终端与所述第二终端之间的距离是否满足阈值条件;当所述第一终端与所述第二终端之间的距离满足所述阈值条件时,所述第一终端的第一层向所述第一终端的应用层发送所述第一终端与所述第二终端之间的距离。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述阈值条件来自所述第一终端的应用层。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述第一终端与所述第二终端之间的距离满足:
D=c×(Tround-Treply)/2
其中,D为所述第一终端与所述第二终端之间的距离,c为光速,Tround为所述第一时长,Treply为所述第二时长。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述第一层处于应用层与所述接入层之间。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,所述第一层为测距层(ranging layer)、ProSe层、或V2X层。需要说明的是,在不同的通信场景下,终端内 部各层的名称和划分方式有可能不同,因此,在不同的通信场景下,第一层可能不同,这里仅列出了几种可能的层。
结合第一方面或其任意实现方式,在另一种可能的实现方式中,在确定所述第一终端与所述第二终端之间的距离后,所述第一终端的第一层还根据所述第一终端与所述第二终端之间的距离确定测距的第二周期,然后向所述第一终端的接入层发送第二测距周期信息,所述第二测距周期信息用于指示所述第二周期。后续,第一终端的接入层可以根据第二周期执行测距操作。
例如,第一终端的第一层从第一终端的应用层或核心网网元获取距离与测距周期的对应关系,第一终端的第一层根据第一终端与第二终端之间的距离和获取到的对应关系确定第二测距周期信息。
这样,第一终端的第一层可以根据第一终端与第二终端之间的距离更新测距周期信息,例如可以实现在终端之间的距离较长时使用较大的周期,在终端之间的距离较小时使用较小的周期。
第二方面,提供了一种测距方法,所述方法可以由第一终端执行,也可以由第一终端中的模块或单元执行。
所述方法包括:第一终端的第一层向所述第一终端的接入层发送测距信息,所述测距信息用于指示测量所述第一终端与第二终端之间的距离;所述第一终端的接入层根据所述测距信息,向所述第二终端发送第一信号,所述第一信号用于测量所述第一终端与所述第二终端之间的距离;所述第一终端的接入层接收来自所述第二终端的第二信号,所述第二信号用于响应所述第一信号;所述第一终端的接入层确定第一时长,所述第一时长为所述第一终端发送所述第一信号的时刻与所述第一终端接收所述第二信号的时刻之间的时长;所述第一终端的接入层获取第二时长,所述第二时长为所述第二终端接收所述第一信号的时刻与所述第二终端发送所述第二信号的时刻之间的时长;所述第一终端的接入层根据所述第一时长和所述第二时长,确定所述第一终端与所述第二终端之间的距离;所述第一终端的接入层向所述第一终端的第一层发送所述第一终端与所述第二终端之间的距离。
在上述技术方案中,由第一终端的接入层根据第一层的测距信息生成并发送用于测距的第一信号,接收响应于第一信号的第二信号,确定第一时长,获取第二时长,并根据第一时长和第二时长确定第一终端与第二终端之间的距离。这样,可以实现测量第一终端与第二终端之间的距离。并且,上述技术方案考虑了终端内部的分层架构,明确了终端内部第一层和接入层的功能。
结合第二方面,在一种可能的实现方式中,所述测距信息包括:测距指示和所述第二终端的标识,所述测距指示用于指示测距操作。
其中,通过测距操作可以获得终端之间的相对距离。第二终端的标识用于指示测距的对象。这样,第一终端的接入层根据测距信息可以确定测量第一终端与第二终端之间的距离。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,所述测距信息包括:第一测距周期信息和所述第二终端的标识,所述第一测距周期信息用于指示测距的第一周期。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,所述测距信息包括: 测距指示、第一测距周期信息和所述第二终端的标识,所述测距指示用于指示测距操作,所述第一测距周期信息用于指示测距的第一周期。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,所述方法还包括:所述第一终端的接入层存储第一标识与所述第一终端发送所述第一信号的时刻的第一对应关系,所述第一标识对应于所述第二终端;所述第一终端的接入层确定第一时长,包括:所述第一终端的接入层确定所述第一终端接收所述第二信号的时刻;所述第一终端的接入层根据所述第二信号包括的所述第一标识、以及所述第一对应关系,获取所述第一终端发送所述第一信号的时刻;所述第一终端的接入层根据所述第一终端发送所述第一信号的时刻和所述第一终端接收所述第二信号的时刻,确定所述第一时长。
在上述技术方案中,由于第一标识与第一终端发送第一信号的时刻存在对应关系,因此第一终端的接入层可以根据第二信号包括的第一标识,获取与该第二信号对应的第一信号的发送时刻,从而保证测距的正确性。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,所述第一标识包括所述第一终端的标识和/或所述第二终端的标识,所述第一终端的标识用于标识所述第一终端与所述第二终端之间的通信。
这里的第一终端的标识用于标识第一终端与第二终端之间的通信,可以理解为,该第一终端的标识不用于与其他终端通信,或者,通过该第一终端的标识可以确定通信的对端为第二终端。例如,当第一终端同时与包括第二终端在内的多个终端通信时,对于不同的终端,第一终端可以使用不同的标识与之通信,在此情况下,第一终端的标识同样可以区分与第一终端通信的多个终端。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,所述第一终端的接入层获取第二时长,包括:所述第一终端的接入层接收来自所述第二终端的第二消息,所述第二消息包括所述第二时长;所述第一终端的接入层获取第二时长,包括:所述第一终端的接入层从所述第二消息中获取所述第二时长。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,所述第二消息包括PC5-RRC消息。
换句话说,第二消息为第一层的信令。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,所述方法还包括:所述第一终端的接入层确定所述第一终端与所述第二终端之间的距离是否满足阈值条件;所述第一终端的接入层向所述第一终端的第一层发送所述第一终端与所述第二终端之间的距离,包括:当所述第一终端与所述第二终端之间的距离满足所述阈值条件时,所述第一终端的接入层向所述第一终端的第一层发送所述第一终端与所述第二终端之间的距离。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,所述测距信息包括所述阈值条件。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,所述方法还包括:所述第一终端的第一层确定所述第一终端与所述第二终端之间的距离是否满足阈值条件;当所述第一终端与所述第二终端之间的距离满足所述阈值条件时,所述第一终端的第一层向所述第一终端的应用层发送所述第一终端与所述第二终端之间的距离。
例如,当第一终端的接入层不确定第一终端与第二终端之间的距离是否满足阈值条件 时,可以由第一终端的第一层还确定第一终端与第二终端之间的距离是否满足阈值条件。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,所述阈值条件来自所述第一终端的应用层。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,所述第一终端与所述第二终端之间的距离满足:
D=c×(Tround-Treply)/2
其中,D为所述第一终端与所述第二终端之间的距离,c为光速,Tround为所述第一时长,Treply为所述第二时长。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,所述第一层处于应用层与所述接入层之间。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,所述第一层为测距层、ProSe层、或V2X层。需要说明的是,在不同的通信场景下,终端内部各层的名称和划分方式有可能不同,因此,在不同的通信场景下,第一层可能不同,这里仅列出了几种可能的层。
结合第二方面或其任意实现方式,在另一种可能的实现方式中,在确定所述第一终端与所述第二终端之间的距离后,所述第一终端的接入层还根据所述第一终端与所述第二终端之间的距离确定测距的第二周期。后续,第一终端的接入层可以根据第二周期执行测距操作。
例如,第一终端的接入层从第一终端的应用层或第一终端的第一层获取距离与测距周期的对应关系,第一终端的接入层根据第一终端与第二终端之间的距离和获取到的对应关系确定第二周期。
这样,第一终端的接入层可以根据第一终端与第二终端之间的距离更新测距周期信息,例如可以实现在终端之间的距离较长时使用较大的周期,在终端之间的距离较小时使用较小的周期。
第三方面,提供了一种测距方法,所述方法可以由第二终端执行,也可以由第二终端中的模块或单元执行。
所述方法包括:第二终端的接入层接收来自第一终端的第一信号,所述第一信号用于测量所述第一终端与所述第二终端之间的距离;所述第二终端的接入层向所述第一终端发送第二信号,所述第二信号用于响应所述第一信号;所述第二终端的接入层确定第二时长,所述第二时长为所述第二终端接收所述第一信号的时刻与所述第二终端发送所述第二信号的时刻之间的时长;所述第二终端向所述第一终端发送所述第二时长。
在上述技术方案中,第二终端的接入层接收来自第一终端的第一信号,向第一终端发送用于响应第一信号的第二信号,并根据接收第一信号的时刻和发送第二信号的时刻确定第二时长,向第一终端发送确定的第二时长,使得第一终端可以完成测距操作,得到第一终端与第二终端之间的距离。因此,该技术方案可以实现测量第一终端与第二终端之间的距离。并且,上述技术方案考虑了终端内部的分层架构,明确了终端内部接入层的功能。
结合第三方面,在一种可能的实现方式中,所述第二终端向所述第一终端发送所述第二时长,包括:所述第二终端的第一层向所述第一终端的第一层发送第一消息,所述第一消息包括所述第二时长。
结合第三方面或其任意实现方式,在另一种可能的实现方式中,所述第一消息包括PC5-S消息。
换句话说,第二消息为第一层的信令。
结合第三方面或其任意实现方式,在另一种可能的实现方式中,所述第二终端向所述第一终端发送所述第二时长,包括:所述第二终端的第一层向所述第一终端的第一层发送数据,所述数据包括所述第二时长。
换句话说,第二终端的第一层将第二时长作为数据发送至第一终端的第一层。
结合第三方面或其任意实现方式,在另一种可能的实现方式中,所述数据为PC5-U数据。
结合第三方面或其任意实现方式,在另一种可能的实现方式中,所述第二终端向所述第一终端发送所述第二时长,包括:所述第二终端的接入层向所述第一终端的接入层发送第二消息,所述第二消息包括所述第二时长。
结合第三方面或其任意实现方式,在另一种可能的实现方式中,所述第二消息包括PC5-RRC消息。
换句话说,第二消息为接入层的信令。
结合第三方面或其任意实现方式,在另一种可能的实现方式中,所述方法还包括:所述第二终端的接入层存储第二标识与所述第二终端接收所述第一信号的时刻的第二对应关系,所述第二标识对应于所述第一终端;所述第二终端的接入层确定第二时长,包括:所述第二终端的接入层确定所述第二终端发送所述第二信号的时刻;所述第二终端的接入层根据所述第二信号包括的所述第二标识、以及所述第二对应关系,获取所述第二终端接收所述第一信号的时刻;所述第二终端的接入层根据所述第二终端接收所述第一信号的时刻和所述第二终端发送所述第二信号的时刻,确定所述第二时长。
在上述技术方案中,由于第二标识与第二终端接收第一信号的时刻存在对应关系,因此第二终端的接入层可以根据第二信号包括的第二标识,获取与该第二信号对应的第一信号的接收时刻,从而保证测距的正确性。
结合第三方面或其任意实现方式,在另一种可能的实现方式中,所述第二标识包括所述第一终端的标识和/或所述第二终端的标识,所述第二终端的标识用于标识所述第二终端与所述第一终端之间的通信。
这里的第二终端的标识用于标识第二终端与第一终端之间通信,可以理解为,该第二终端的标识不用于与其他终端通信,或者,通过该第二终端的标识可以确定通信的对端为第一终端。例如,当第二终端同时与包括第一终端在内的多个终端通信时,对于不同的终端,第二终端可以使用不同的标识与之通信,在此情况下,第二终端的标识同样可以区分与第二终端通信的多个终端。
结合第三方面或其任意实现方式,在另一种可能的实现方式中,所述第一层处于应用层与所述接入层之间。
结合第三方面或其任意实现方式,在另一种可能的实现方式中,所述第一层为测距层、ProSe层、或V2X层。需要说明的是,在不同的通信场景下,终端内部各层的名称和划分方式有可能不同,因此,在不同的通信场景下,第一层可能不同,这里仅列出了几种可能的层。
第四方面,提供了一种测距方法,所述方法可以由第一终端执行,也可以由第一终端中的模块或单元执行。
所述方法包括:第一终端向第二终端发送第一信号,所述第一信号用于测量所述第一终端与所述第二终端之间的距离;所述第一终端接收来自所述第二终端的第二信号,所述第二信号用于响应所述第一信号;所述第一终端确定第一时长,所述第一时长为所述第一终端发送所述第一信号的时刻与所述第一终端接收所述第二信号的时刻之间的时长;所述第一终端接收来自所述第二终端的第一消息、第二消息或数据,所述第一消息、所述第二消息和所述数据包括第二时长,所述第二时长为所述第二终端接收所述第一信号的时刻与所述第二终端发送所述第二信号的时刻之间的时长,所述第一消息包括PC5-S消息,所述第二消息包括PC5-RRC消息,所述数据为PC5-U数据;所述第一终端根据所述第一时长和所述第二时长,确定所述第一终端与所述第二终端之间的距离。
在上述技术方案中,第一终端发送用于测距的第一信号,接收响应于第一信号的第二信号,确定第一终端发送第一信号的时刻与接收第二信号的时刻之间的第一时长,并通过PC5-S消息、PC5-RRC消息或数据接收来自第二终端的第二时长,进而根据第一时长和第二时长确定第一终端与第二终端之间的距离。这样可以实现测量第一终端与第二终端之间的距离。
结合第四方面,所述方法还包括:所述第一终端存储第一标识与所述第一终端发送所述第一信号的时刻的第一对应关系,所述第一标识对应于所述第二终端;所述第一终端确定第一时长,包括:所述第一终端确定所述第一终端接收所述第二信号的时刻;所述第一终端根据所述第二信号包括的所述第一标识、以及所述第一对应关系,获取所述第一终端发送所述第一信号的时刻;所述第一终端根据所述第一终端发送所述第一信号的时刻和所述第一终端接收所述第二信号的时刻,确定所述第一时长。
在上述技术方案中,由于第一标识与第一终端发送第一信号的时刻存在对应关系,因此第一终端可以根据第二信号包括的第一标识,获取与该第二信号对应的第一信号的发送时刻,从而保证测距的正确性。
结合第四方面或其任意实现方式,在另一种可能的实现方式中,所述第一标识包括所述第一终端的标识和/或所述第二终端的标识,所述第一终端的标识用于标识所述第一终端与所述第二终端之间的通信。
这里的第一终端的标识用于标识第一终端与第二终端之间的通信,可以理解为,该第一终端的标识不用于与其他终端通信,或者,通过该第一终端的标识可以确定通信的对端为第二终端。例如,当第一终端同时与包括第二终端在内的多个终端通信时,对于不同的终端,第一终端可以使用不同的标识与之通信,在此情况下,第一终端的标识同样可以区分与第一终端通信的多个终端。
结合第四方面或其任意实现方式,在另一种可能的实现方式中,所述方法还包括:所述第一终端获取测距信息,所述测距信息用于指示测量所述第一终端与所述第二终端之间的距离。在此情况下,第一终端根据测距信息向第二终端发送第一信号。
结合第四方面或其任意实现方式,在另一种可能的实现方式中,所述测距信息包括测距指示和第二终端的标识。其中,测距指示用于指示测距操作。
结合第四方面或其任意实现方式,在另一种可能的实现方式中,所述测距信息包括第 一测距周期信息和第二终端的标识。其中,第一测距周期信息用于指示测距的第一周期。
结合第四方面或其任意实现方式,在另一种可能的实现方式中,所述测距信息包括测距指示、第一测距周期信息和第二终端的标识。其中,第一测距周期信息用于指示测距的第一周期。
结合第四方面或其任意实现方式,在另一种可能的实现方式中,在确定所述第一终端与所述第二终端之间的距离后,所述第一终端还根据所述第一终端与所述第二终端之间的距离确定测距的第二周期。后续,第一终端可以根据第二周期执行测距操作。
例如,第一终端获取距离与测距周期的对应关系,在确定第一终端与第二终端之间的距离后,第一终端根据第一终端与第二终端之间的距离和获取到的对应关系确定第二周期。
这样,第一终端可以根据第一终端与第二终端之间的距离更新测距周期信息,例如可以实现在终端之间的距离较长时使用较大的周期,在终端之间的距离较小时使用较小的周期。
结合第四方面或其任意实现方式,在另一种可能的实现方式中,所述第一终端获取测距信息,包括:所述第一终端接收来自所述第二终端的所述测距信息;所述方法还包括:所述第一终端向所述第二终端发送所述第一终端与所述第二终端之间的距离。
换句话说,第一终端在接收到第二终端的测距请求时发起测距,并将测量得到的第一终端与第二终端之间的距离反馈给第二终端。
结合第四方面或其任意实现方式,在另一种可能的实现方式中,所述第一终端包括应用层和网络层。在此情况下,可以由第一终端的网络层执行第四方面或其任意实现方式中的方法,包括:第一终端的网络层向第二终端发送第一信号;第一终端的网络层接收来自第二终端的第二信号;第一终端的网路层根据发送第一信号的时刻以及接收第二信号的时刻确定第一时长;第二终端的网络层根据接收第一信号的时刻以及发送第二信号的时刻确定第二时长;第一终端的网络层接收来自第二终端的第一消息、第二消息或数据,其中,第一消息、第二消息和数据包括第二时长;第一终端的网络层根据第一时长和第二时长确定第一终端与第二终端之间的距离。更详细的描述可以参考上文的第四方面或第四方面的任意实现方式中的描述,在此不再赘述。
可选地,所述第一终端获取测距信息,包括:所述第一终端的应用层生成所述测距信息;所述方法还包括:所述第一终端的应用层向所述第一终端的网络层发送所述测距信息。
需要说明的是,在一些实现方式中,网络层里可以包括接入功能和测距功能。
作为一个示例,接入功能可以执行:信号的收发(例如,发送第一信号,接收第二信号等)、根据信号的收发时刻进行计算(例如,确定第一时长)等。测距功能可以执行:接收来自应用层的信息、计算终端之间的距离(例如,根据第一时长和第二时长确定第一终端与第二终端之间的距离)等。另外,根据部署的需求,包含接入功能的可以称之为接入层,包含测距功能的可以称之为第一层,并且接入层和第一层之间可以进行通信,在此情况下,接入层和第一层可以实现如第一方面或第一方面的任意实现方式中的方法。
作为另一个示例,接入功能可以执行:信号的收发(例如,发送第一信号,接收第二信号等)、根据信号的收发时刻进行计算(例如,确定第一时长)、计算终端之间的距离(例如,根据第一时长和第二时长确定第一终端与第二终端之间的距离)等。测距功能可以执行:接收来自应用层的信息。另外,根据部署的需求,包含接入功能的可以称之为接 入层,包含测距功能的可以称之为第一层,并且接入层和第一层之间可以进行通信,在此情况下,接入层和第一层可以实现如第二方面或第二方面的任意实现方式中的方法。
结合第四方面或其任意实现方式,在另一种可能的实现方式中,所述第一终端包括应用层、第一层和接入层。在此情况下,可以由第一终端的第一层和接入层相配合,以执行第四方面或其任意实现方式中的方法。更详细的描述可以参考第一方面或其任意实现方式,或者可以参考第二方面或其任意实现方式,在此不再赘述。
可选地,所述第一终端获取测距信息,包括:所述第一终端的应用层生成所述测距信息;所述方法还包括:所述第一终端的应用层向所述第一终端的第一层发送测距信息;所述第一终端的第一层向所述第一终端的接入层发送所述测距信息。
第五方面,提供了一种测距方法,所述方法可以由第二终端执行,也可以由第二终端中的模块或单元执行。
所述方法包括:第二终端接收来自第一终端的第一信号,所述第一信号用于测量所述第一终端与所述第二终端之间的距离;所述第二终端向所述第一终端发送所述第二信号,所述第二信号用于响应所述第一信号;所述第二终端确定第二时长,所述第二时长为所述第二终端接收所述第一信号的时刻与所述第二终端发送所述第二信号的时刻之间的时长;所述第二终端向所述第一终端发送第一消息、第二消息或数据,所述第一消息、所述第二消息和所述数据包括所述第二时长,所述第一消息包括PC5-S消息,所述第二消息包括PC5-RRC消息,所述数据可以为PC5-U数据。
在上述技术方案中,第二终端接收来自第一终端的用于测距的第一信号,向第一终端发送响应于第一信号的第二信号,确定第二终端接收第一信号的时刻与发送第二信号的时刻之间的第二时长,并通过PC5-S消息、PC5-RRC消息或PC5-U数据向第一终端发送第二时长,使得第一终端可以根据第一时长和第二时长确定第一终端与第二终端之间的距离。这样可以实现测量第一终端与第二终端之间的距离。
结合第五方面,在一种可能的实现方式中,所述方法还包括:所述第二终端存储第二标识与所述第二终端接收所述第一信号的时刻的第二对应关系,所述第二标识对应于所述第一终端;所述第二终端确定第二时长,包括:所述第二终端确定所述第二终端发送所述第二信号的时刻;所述第二终端根据所述第二信号包括的所述第二标识、以及所述第二对应关系,获取所述第二终端接收所述第一信号的时刻;所述第二终端根据所述第二终端接收所述第一信号的时刻和所述第二终端发送所述第二信号的时刻,确定所述第二时长。
在上述技术方案中,由于第二标识与第二终端接收第一信号的时刻存在对应关系,因此第二终端可以根据第二信号包括的第二标识,获取与该第二信号对应的第一信号的接收时刻,从而保证测距的正确性。
结合第五方面或其任意实现方式,在另一种可能的实现方式中,所述第二标识包括所述第一终端的标识和/或所述第二终端的标识,所述第二终端的标识用于标识所述第二终端与所述第一终端之间的通信。
这里的第二终端的标识用于标识第二终端与第一终端之间的通信,可以理解为,该第二终端的标识不用于与其他终端通信,或者,通过该第二终端的标识可以确定通信的对端为第一终端。例如,当第二终端同时与包括第一终端在内的多个终端通信时,对于不同的终端,第二终端可以使用不同的标识与之通信,在此情况下,第二终端的标识同样可以区 分与第二终端通信的多个终端。
结合第五方面或其任意实现方式,在另一种可能的实现方式中,所述方法还包括:所述第二终端向所述第一终端发送测距信息,所述测距信息用于指示测量所述第一终端与所述第二终端之间的距离;所述第二终端接收来自所述第一终端的所述第一终端与所述第二终端之间的距离。
换句话说,第二终端在有测距需求时向第一终端发送测距信息以请求第一终端发起测距,并接收来自第一终端的第一终端与第二终端之间的距离。
结合第五方面或其任意实现方式,在另一种可能的实现方式中,所述测距信息包括测距指示和第二终端的标识。其中,测距指示用于指示测距操作。
结合第五方面或其任意实现方式,在另一种可能的实现方式中,所述测距信息包括第一测距周期信息和第二终端的标识。其中,第一测距周期信息用于指示测距的第一周期。
结合第五方面或其任意实现方式,在另一种可能的实现方式中,所述测距信息包括测距指示、第一测距周期信息和第二终端的标识。其中,第一测距周期信息用于指示测距的第一周期。
结合第五方面或其任意实现方式,在另一种可能的实现方式中,所述第二终端包括网络层,所述方法由所述第二终端的网络层执行,包括:第二终端的网络层接收来自第一终端的第一信号;第二终端的网络层向第一终端发送第二信号;第二终端的网络层确定第二时长;第二终端的网络层向第一终端发送第一消息、第二消息或数据。更详细的描述可以参考上文的第五方面或第五方面的任意实现方式中的描述,在此不再赘述。
需要说明的是,在一些实现方式中,网络层里可以包括接入功能和测距功能。
作为一个示例,接入功能可以执行:信号的收发(例如,接收第一信号,发送第二信号等)、根据信号的收发时刻进行计算(例如,确定第二时长)等。测距功能可以执行:消息的收发等。另外,根据部署的需求,包含接入功能的可以称之为接入层,包含测距功能的可以称之为第一层,并且接入层和第一层之间可以进行通信,在此情况下,接入层和第一层可以实现如第三方面或第三方面的任意实现方式中的方法。
结合第五方面或其任意实现方式,在另一种可能的实现方式中,所述第二终端包括应用层、第一层和接入层。在此情况下,可以由第二终端的第一层和接入层相配合,以执行第五方面或其任意实现方式中的方法。更详细的描述可以参考第三方面或其任意实现方式,在此不再赘述。
第六方面,提供了一种通信装置,该装置用于执行上述任意一方面或其实现方式提供的方法。具体地,该装置可以包括用于执行上述任意一方面或其实现方式提供的方法的单元和/或模块,如处理单元和/或通信单元。
在一种实现方式中,该装置为第一终端或第二终端。当该装置为第一终端或第二终端时,通信单元可以是收发器,或,输入/输出接口,或者通信接口;处理单元可以是至少一个处理器。可选地,收发器为收发电路。可选地,输入/输出接口为输入/输出电路。
在另一种实现方式中,该装置为用于第一终端或第二终端中的芯片、芯片系统或电路。当该装置为用于第一终端或第二终端中的芯片、芯片系统或电路时,通信单元可以是该芯片、芯片系统或电路上的输入/输出接口、接口电路、输出电路、输入电路、管脚或相关电路等;处理单元可以是至少一个处理器、处理电路或逻辑电路等。
第七方面,提供了一种通信装置,该装置包括:存储器,用于存储程序;至少一个处理器,用于执行存储器存储的计算机程序或指令,以执行上述任意一方面或其实现方式提供的方法。
在一种实现方式中,该装置为第一终端或第二终端。
在另一种实现方式中,该装置为用于第一终端或第二终端中的芯片、芯片系统或电路。
第八方面,提供了一种通信装置,该装置包括:至少一个处理器和通信接口,该至少一个处理器用于通过该通信接口获取存储在存储器的计算机程序或指令,以执行上述任意一方面或其实现方式提供的方法。该通信接口可以由硬件或软件实现。
在一种实现方式中,该装置还包括该存储器。
第九方面,提供了一种处理器,用于执行上述各方面提供的方法。
对于处理器所涉及的发送和获取/接收等操作,如果没有特殊说明,或者,如果未与其在相关描述中的实际作用或者内在逻辑相抵触,那么可以理解为处理器输出和接收、输入等操作,也可以理解为由射频电路和天线所进行的发送和接收操作,本申请对此不做限定。
第十方面,提供了一种计算机可读存储介质,该计算机可读介质存储用于设备执行的程序代码,该程序代码包括用于执行上述任意一方面或其实现方式提供的方法。
第十一方面,提供了一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述任意一方面或其实现方式提供的方法。
第十二方面,提供了一种芯片,芯片包括处理器与通信接口,处理器通过通信接口读取存储器上存储的指令,执行上述任意一方面或其实现方式提供的方法。该通信接口可以由硬件或软件实现。
可选地,作为一种实现方式,芯片还包括存储器,存储器中存储有计算机程序或指令,处理器用于执行存储器上存储的计算机程序或指令,当计算机程序或指令被执行时,处理器用于执行上述任意一方面或其实现方式提供的方法。
第十三方面,提供了一种通信系统,包括上文的第一终端和/或第二终端。
附图说明
图1是一种网络架构的示意图。
图2是终端之间的测距原理的示意图。
图3是本申请提供的测距方法300的示意性流程图。
图4是本申请提供的测距方法400的示意性流程图。
图5是本申请提供的测距方法500的示意性流程图。
图6是本申请的测距方法的一个示例。
图7是本申请的测距方法的另一个示例。
图8是本申请的实施例提供的装置的一种结构示意图。
图9是本申请的实施例提供的装置的另一结构示意图。
图10是本申请的实施例提供的装置的又一结构示意图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
在介绍本申请的实施例之前,先做出以下几点说明。
在本申请中,“用于指示”或“指示”可以包括用于直接指示和用于间接指示,或者说“用于指示”或“指示”可以显式地和/或隐式地指示。例如,当描述某一信息用于指示信息I时,可以包括该信息直接指示I或间接指示I,而并不代表该信息中一定携带有I。又例如,隐式指示可以基于用于传输的位置和/或资源;显式指示可以基于一个或多个参数,和/或一个或多个索引,和/或一个或多个它所表示的位模式。
本申请对很多特性所列出的定义仅用于以举例方式来解释该特性的功能,其详细内容可以参考现有技术。
下文示出的实施例中,第一、第二、第三、第四以及各种数字编号仅为描述方便进行的区分,并不用来限制本申请实施例的范围。例如,区分不同的字段、不同的信息等。
“预先定义”可以通过在设备(例如,终端)中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,本申请对于其具体的实现方式不做限定。其中,“保存”可以是指,保存在一个或者多个存储器中。存储器的类型可以是任意形式的存储介质,本申请并不对此限定。
本申请实施例中涉及的“协议”可以是指通信领域的标准协议,例如可以包括长期演进(long term evolution,LTE)协议、新无线(new radio,NR)协议以及应用于未来的通信系统中的相关协议,本申请对此不做限定。
本申请将围绕包括多个设备、组件、模块等的系统来呈现各个方面、实施例或特征。应当理解和明白的是,各个系统可以包括另外的设备、组件、模块等,并且/或者可以并不包括结合附图讨论的所有设备、组件、模块等。此外,还可以使用这些方案的组合。
在本申请实施例中,“作为一个示例”、“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用示例的一词旨在以具体方式呈现概念。
术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b和c中的至少一项(个),可以表示:a,或,b,或,c,或,a和b,或,a和c,或,b和c,或,a、b和c。其中a、b和c分别可以是单个,也可以是多个。
为便于理解本申请的技术方案,首先对可以应用本申请的技术方案的通信系统进行描述。
本申请提供的技术方案可以应用于各种通信系统。例如,无线移动蜂窝通信系统,包括第五代(5thgeneration,5G)或NR系统、LTE系统、LTE频分双工(frequency division duplex,FDD)系统、LTE时分双工(time division duplex,TDD)系统等。本申请提供的技术方案还还可以应用于卫星通信系统等非陆地通信网络(non-terrestrial network,NTN) 通信系统。本申请提供的技术方案还可以应用于设备到设备(device to device,D2D)通信系统、车到万物(vehicle-to-everything,V2X)通信系统、机器到机器(machine to machine,M2M)通信系统、机器类型通信(machine type communication,MTC)系统、以及物联网(internet of things,IoT)通信系统或者其他通信系统。本申请提供的技术方案还可以应用于未来的通信系统,如第六代移动通信系统。
作为示例,图1示出了一种网络架构的示意图。
如图1所示,该网络架构以5G系统(the 5th generation system,5GS)为例。该网络架构中可包括三部分,分别是用户设备(user equipment,UE)部分、数据网络(data network,DN)部分和运营商网络部分。其中,运营商网络可包括以下网元中的一个或多个:(无线)接入网((radio)access network,(R)AN)设备、用户面功能(user plane function,UPF)网元、认证服务器功能(authentication server function,AUSF)网元、接入和移动性管理功能(access and mobility management function,AMF)网元、会话管理功能(session management function,SMF)网元、网络切片选择功能(network slice selection function,NSSF)网元、网络开放功能(network exposure function,NEF)网元、网络功能库功能(network repository function,NRF)网元、策略控制功能(policy control function,PCF)网元、统一数据管理(unified data management,UDM)网元和应用功能(application function,AF)网元。上述运营商网络中,除RAN部分之外的部分可以称为核心网部分。
在本申请中,将用户设备、(无线)接入网设备、UPF网元、AUSF网元、AMF网元、SMF网元、NSSF网元、NEF网元、NRF网元、PCF网元、UDM网元、AF网元分别简称为UE、(R)AN、UPF、AUSF、UDR、AMF、SMF、NSSF、NEF、NRF、PCF、UDM、AF。
下面对图1中涉及的各网元进行简单描述。
1、UE
本申请中的UE也可以称为终端、用户、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端设备、无线通信设备、用户代理或用户装置等,为了描述方便,下文统一称为终端。
终端是一种可以接入网络的设备。终端与(R)AN之间可以采用某种空口技术(如NR或LTE技术)相互通信。终端与终端之间也可以采用某种空口技术(如NR或LTE技术)相互通信。终端可以是手机(mobile phone)、平板电脑(pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端、增强现实(augmented reality,AR)终端、卫星通信中的终端、接入回传一化链路(integrated access and backhaul,IAB)系统中的终端、WiFi通信系统中的终端、工业控制(industrial control)中的终端、无人驾驶(self driving)中的终端、远程医疗(remote medical)中的终端、智能电网(smart grid)中的终端、运输安全(transportation safety)中的终端、智慧城市(smart city)中的终端、智慧家庭(smart home)中的终端等。
本申请的实施例对UE所采用的具体技术和具体设备形态不做限定。
2、(R)AN
本申请中的(R)AN可以是用于与终端通信的设备,也可以是一种将终端接入到无线网络的设备。
(R)AN可以为无线接入网中的节点。(R)AN可以是基站(base station)、演进型基站(evolved NodeB,eNodeB)、发送接收点(transmission reception point,TRP)、家庭基站(例如,home evolved NodeB,或home Node B,HNB)、Wi-Fi接入点(access point,AP)、移动交换中心、5G移动通信系统中的下一代基站(next generation NodeB,gNB)、第六代(6th generation,6G)移动通信系统中的下一代基站、或未来移动通信系统中的基站等。网络设备还可以是完成基站部分功能的模块或单元,例如,可以是集中式单元(central unit,CU)、分布式单元(distributed unit,DU)、射频拉远单元(remote radio unit,RRU)或基带单元(baseband unit,BBU)等。(R)AN还可以是D2D通信系统、V2X通信系统、M2M通信系统以及IoT通信系统中承担基站功能的设备等。(R)AN还可以是NTN中的网络设备,即(R)AN可以部署于高空平台或者卫星。(R)AN可以是宏基站,也可以是微基站或室内站,还可以是中继节点或施主节点等。
本申请的实施例对(R)AN所采用的具体技术、设备形态以及名称不做限定。
3、UPF
UPF主要负责终端中的用户数据的转发和接收。例如,UPF可以从DN接收用户面数据,并通过接入网设备将用户面数据发送给终端。UPF还可以通过接入网设备从终端接收用户面数据,并转发到DN。UPF网元中为终端提供服务的传输资源和调度功能由SMF管理控制。
4、DN
DN主要用于为终端提供数据服务的运营商网络。例如,因特网(Internet)、第三方的业务网络、或IP多媒体服务业务(IP multi-media service,IMS)网络等。
5、AUSF
支持第三代合作伙伴计划(3rd generation partnership project,3GPP)和非3GPP的接入认证。
6、AMF
AMF主要负责信令处理部分,例如:接入控制、移动性管理、附着与去附着以及网关选择等功能。在为终端中的会话提供服务的情况下,AMF会为该会话提供控制面的存储资源,以存储会话标识、与会话标识关联的SMF网元标识等。
7、SMF
SMF主要负责用户面网元选择、用户面网元重定向、因特网协议(internet protocol,IP)地址分配、承载的建立、修改和释放以及服务质量(quality of service,QoS)控制等。
8、NSSF
NSSF主要负责网络切片选择,根据终端的切片选择辅助信息、签约信息等确定终端允许接入的网络切片实例。
9、NEF
NEF主要支持3GPP网络和第三方应用安全的交互。
10、NRF
NRF主要用于保存网络功能实体以及其提供服务的描述信息等。
11、PCF
PCF主要负责策略控制的决策、提供控制平面功能的策略规则、以及基于流量的计费 控制功能等。
12、UDM
UDM主要负责终端的签约数据管理,包括终端标识的存储和管理、终端的接入授权等。
13、AF
AF主要支持与3GPP核心网交互来提供服务,例如影响数据路由决策、策略控制功能或者向网络提供第三方的服务。AF可是运营商网络自身部署的AF,也可以是第三方AF。
在图1所示的网络架构中,各网元之间可以接口通信。各网元之间的接口可以是点对点接口,也可以是服务化接口,本申请不予限制。
应理解,上述所示的网络架构仅是示例性说明,适用本申请实施例的网络架构并不局限于此,任何能够实现上述各个网元的功能的网络架构都适用于本申请实施例。
还应理解,图1中所示的AMF、SMF、UPF、PCF、UDM、AUSF、NSSF、NEF、NRF、AF等功能或者网元,可以理解为用于实现不同功能的网元,例如可以按需组合成网络切片。这些网元可以各自独立的设备,也可以集成于同一设备中实现不同的功能,或者可以是硬件设备中的网络元件,也可以是在专用硬件上运行的软件功能,或者是平台(例如,云平台)上实例化的虚拟化功能,本申请对于上述网元的具体形态不作限定。
还应理解,上述命名仅为便于区分不同的功能而定义,不应对本申请构成任何限定。本申请并不排除在6G网络以及未来其它的网络中采用其他命名的可能。例如,在6G网络中,上述各个网元中的部分或全部可以沿用5G中的术语,也可能采用其他名称等。
本申请的技术方案可以应用于终端与终端直接通信场景下的终端之间的测距,例如,可以应用于D2D、V2X、ProSe、WiFi、WiFi直连(WiFi direct)、蓝牙(bluetooth)、紫蜂(zigbee)、射频识别(radio frequency identification devices,RFID)、红外数据传输(infrared data association,IrDA)、超宽频(ultrawideband,UWB)、或近场通信(near-field communication,NFC)等通信场景下的终端之间的测距。
下面对终端之间的测距原理进行描述。
作为示例,图2示出了终端之间的测距原理的示意图。
确定终端之间的相对位置可以通过相对定位实现。相对定位可以是确定终端之间的相对距离和/或相对角度。通过测距可以获取相对距离,通过测角获得相对角度。本申请重点涉及确定终端之间的相对距离。
如图2所示,终端1(或称启动终端)发送初始测距信号,终端1(或称反馈终端)在接收到初始测距信号后向终端1发送用于反馈的反馈测距信号。具体地,终端1与终端2之间的相对距离=飞行时间×光速,其中,飞行时间(time of flight,TOF)的确定过程可以包括:
步骤1,终端1计算发送初始测距信号的时刻到接收反馈测距信号的时刻之间的时长Tround
步骤2,终端2计算接收初始测距信号的时刻到发送反馈测距信号的时刻之间的时长Treply
步骤3,终端2将时长Treply发送给终端1;
步骤4,终端1计算飞行时间:TOF=Tprop=(Tround-Treply)/2。
需要说明的是,图2所示的测距原理中并不限定发送初始测距信号的时刻、接收反馈测距信号的时刻、接收初始测距信号的时刻、以及发送反馈测距信号的时刻的选取的具体方式。发送初始测距信号的时刻可以是初始测距信号发送过程中的任意时刻,接收反馈测距信号的时刻可以是反馈测距信号接收过程中的任意时刻,接收初始测距信号的时刻可以是初始测距信号接收过程中的任意时刻,发送反馈测距信号的时刻可以是反馈测距信号发送过程中的任意时刻。
在上述确定终端之间的相对距离的方法中并未考虑终端内部的分层架构,未明确终端内部各层(例如,测距层(ranging layer)和接入层(access stratum,AS)的功能、层与层之间交互的参数、以及Treply的传输方式。
下面对本申请提供的测距方法进行描述。
图3是本申请提供的测距方法300的示意性流程图。
在图3中,以终端包括应用层、第一层和接入层为例。需要说明的是,在不同的通信场景下,终端内部各层的名称和划分方式有可能不同,例如,在D2D通信场景下终端可以包括应用层、测距层和接入层,在V2X通信场景下终端可以包括应用层、V2X层和接入层,在ProSe通信场景下终端可以包括应用层、ProSe层和接入层。因此,在不同的通信场景下,第一层可能不同,例如,第一层可以为测距层、V2X层或ProSe层等,第一层也可以称为上层(upper layer)。为了描述方便,下文将统一称为第一层。
可选地,第一层可以处于应用层与接入层之间。
方法300包括以下至少部分内容。
步骤301,第一终端的第一层向第一终端的接入层发送测距信息。
其中,测距信息用于指示测量第一终端与第二终端之间的距离。
一种可能的实现方式,测距信息包括测距指示和第二终端的标识。其中,测距指示用于指示测距操作。第二终端的标识用于指示测距的对象,这样,第一终端的接入层根据测距信息可以确定测量第一终端与第二终端之间的距离。
另一种可能的实现方式,测距信息包括第一测距周期信息和第二终端的标识。其中,第一测距周期信息用于指示测距的第一周期。
又一种可能的实现方式,测距信息包括测距指示、第一测距周期信息和第二终端的标识。其中,第一测距周期信息用于指示测距的第一周期。
可选地,第二终端的标识可以为第二终端的层2(layer 2,L2)标识。
一种可能的实现方式,在步骤301之前,第一终端的第一层获取测距信息。
方式1:第一终端的第一层从第一终端的应用层获取测距信息,即测距信息来源于第一终端的应用层。例如,当第一终端的应用层有测距需求时,第一终端的应用层可以生成测距信息,并将测距信息发送给第一终端的第一层。
可选地,应用层生成的测距信息中包括的第二终端的标识可以为第二终端的应用层标识。在此情况下,当第一终端的第一层接收到测距信息后,可以根据第二终端的应用层标识获取第二终端的层2标识。例如,第一终端的第一层可以是在与终端2的发现过程中从终端2获取第二终端的层2标识,或者还可以在与终端2的建立基于邻近的服务通信5(ProSe communication 5,PC5)连接的过程中从终端2获取第二终端的层2标识,或者 还可以在与终端2的PC5连接建立后从终端2获取第二终端的层2标识。
方式2:第一终端的第一层从第二终端获取测距信息,即测距信息来源于第二终端。例如,当第二终端有测距需求时,第二终端可以向第一终端发送测距信息,以便请求第一终端测量与第二终端之间的距离。
可选地,第一终端的第一层从第二终端的第一层获取测距信息,第二终端的第一层向第一终端的第一层发送测距信息。例如,第二终端的第一层通过PC5-S消息或PC5-U向第一终端的第一层发送测距信息。其中,第二终端的第一层通过PC5-U向第一终端的第一层发送测距信息,可以理解为,第二终端的第一层将测距信息作为数据发送至第一终端的第一层。
可选地,第一终端的应用层从第二终端的应用层获取测距信息,第二终端的应用层通过PC5-U向第一终端的应用层发送测距信息,进而第一终端的第一层从第一终端的应用层获取测距信息。
一种可能的实现方式,在步骤301之前,第一终端的第一层还确定由第一终端计算测距结果(即第一终端与第二终端之间的距离)。即当确定由第一终端计算测距结果时,第一终端的第一层向第一终端的接入层发送测距信息,并且由第一终端计算测距结果。可选地,第一终端和第二终端可以交互测距计算能力信息,进而确定由哪个终端计算测距结果。
一种可能的实现方式,在步骤301之前,第一终端的第一层还确定由第一终端先发送用于测距的信号。即当第一终端的第一层确定由第一终端先发送用于测距的信号时,第一终端的第一层向第一终端的接入层发送测距信息、以及由第一终端的接入层先发送用于测距的信号。可选地,第一终端和第二终端可以交互信息以确定由哪个终端先发送用于测距的信号。
步骤302,第一终端的接入层根据测距信息,向第二终端发送第一信号。
相应地,第二终端的接入层接收来自第一终端的第一信号。
其中,第一信号用于测量第一终端与第二终端之间的距离。
可选地,第一信号可以为测距信号(ranging signaling)、测距参考信号(ranging reference signaling)、定位参考信号(positioning reference signaling)或图2所示的初始测距信号。
一种可能的实现方式,当测距信息包括测距指示和第二终端的标识时,第一终端的接入层根据测距指示确定发送第一信号,并使用第一终端的标识和第二终端的标识,向第二终端发送第一信号。
另一种可能的实现方式,当测距信息包括第一测距周期信息和第二终端的标识时,第一终端的接入层按照第一测距周期信息指示的第一周期,使用第一终端的标识和第二终端的标识,向第二终端发送第一信号。
又一种可能的实现方式,当测距信息包括测距指示、第一测距周期信息和第二终端的标识时,第一终端的接入层根据测距指示确定发送第一信号,并按照第一测距周期信息指示的第一周期使用第一终端的标识和第二终端的标识,向第二终端发送第一信号。
示例性地,第一终端的接入层使用第一终端的标识和第二终端的标识,向第二终端发送第一信号,可以是:第一终端将第一终端的标识作为第一信号的源地址,将第二终端的标识作为第一信号的目的地址,向第二终端发送第一信号。换句话说,第一信号的源地址为第一终端的标识,目的地址为第二终端的标识。
可选地,第一终端的标识为第一终端的层2标识,第二终端的标识为第二终端的层2标识。其中,第一终端的标识用于标识第一终端与第二终端之间的通信。
需要说明的是,若源地址和目的地址看作第一信号的一部分,则第一信号包括第一终端的标识和第二终端的标识。
一种可能的实现方式,当由第一终端计算测距结果时,第一终端的接入层根据测距信息向第二终端发送第一信号。
一种可能的实现方式,当由第一终端先发送用于测距的信号时,第一终端的接入层根据测距信息向第二终端发送第一信号。
步骤303,在接收到第一信号后,第二终端的接入层向第一终端发送第二信号。
相应地,第一终端的接入层接收来自第二终端的第二信号。
其中,第二信号为第一信号的响应信号,换一种描述方式,第二信号用于响应第一信号。
可选地,第二信号可以为ranging signaling、ranging reference signaling、positioning reference signaling或图2所示的反馈测距信号。
一种可能的实现方式,第二终端的接入层使用第一终端的标识和第二终端的标识,向第一终端发送第二信号。例如,第一终端将第二终端的标识作为第二信号的源地址,将第一终端的标识作为第二信号的目的地址,向第一终端发送第二信号,换句话说,第二信号的源地址为第二终端的标识,目的地址为第一终端的标识。
可选地,第一终端的标识为第一终端的层2标识,第二终端的标识为第二终端的层2标识。其中,第二终端的标识用于标识第二终端与第一终端之间的通信。
同样,若源地址和目的地址看作第二信号的一部分,则第二信号包括第一终端的标识和第二终端的标识。
步骤304,第一终端的第一层获取第一时长。
其中,第一时长为第一终端的接入层发送第一信号的时刻与第一终端的接入层接收第二信号的时刻之间的时长。
一种可能的实现方式,第一终端的第一层从第一终端的接入层获取第一时长,或者说,第一终端的接入层向第一终端的第一层发送第一时长。在此情况下,第一终端的接入层执行确定第一时长的操作。
本申请不限定第一终端的接入层确定第一时长的具体实现方式。一种可能的实现方式,在第一终端的接入层发送第一信号后,第一终端的接入层存储第一标识与第一终端的接入层发送第一信号的时刻的第一对应关系,其中,第一标识对应于第二终端;第一终端的接入层确定接收第二信号的时刻;第一终端的接入层根据第二信号包括的第一标识、以及第一终端的接入层存储的第一对应关系,获取与第一标识对应的发送第一信号的时刻;第一终端的接入层根据获取的第一终端的接入层发送第一信号的时刻与确定的第一终端的接入层接收第二信号的时刻,确定第一时长。
可选地,第一标识为第一终端的标识和/或第二终端的标识。其中,第一终端的标识用于标识第一终端与第二终端之间的通信。
作为一个示例,第一标识为第二终端的标识。这样,由于第一终端的接入层使用的第二终端的标识发送第一信号(例如,将第二终端的标识作为第一信号的目的地址),且第 二终端的标识与第一终端的接入层发送第一信号的时刻又存在对应关系,因此,第一终端的接入层根据第二信号包括的第二终端的标识,可以获取与该第二信号对应的第一信号的发送时刻,从而保证测距的正确性。
其中,与该第二信号对应的第一信号,可以理解为,第二信号所响应的第一信号,或者,触发该第二信号的第一信号。第二信号包括的第二终端的标识,也可以替换为,第二信号的源地址。
作为另一个示例,第一标识为第一终端的标识,第一终端的标识用于标识第一终端与第二终端之间的通信。此时,由于第一终端的标识用于标识第一终端与第二终端之间的通信,因此通过该第一终端的标识也可以获取与该第二信号对应的第一信号的发送时刻,从而保证测距的正确性。例如,当第一终端同时与包括第二终端在内的多个终端通信时,对于不同的终端,第一终端可以使用不同的标识与之通信,在此情况下,第一终端的标识同样可以区分与第一终端通信的多个终端。
可选地,第一终端的接入层在向第一终端的第一层发送第一时长时,还向第一终端的第一层发送与该第一时长对应的第一标识,以便第一终端的第一层明确接收到的第一时长用于确定第一终端与第二终端之间的距离。
步骤305,第二终端的接入层确定第二时长。
其中,第二时长为第二终端的接入层接收第一信号的时刻与第二终端的接入层发送第二信号的时刻之间的时长。
一种可能的实现方式,在第二终端的接入层接收到第一信号后,第二终端的接入层存储第二标识与第二终端的接入层接收第一信号的时刻的第二对应关系,其中,第二标识对应于第一终端;第二终端的接入层确定发送第二信号的时刻;第二终端的接入层根据第二信号包括的第二标识、以及第二终端的接入层存储的第二对应关系,获取与第二标识对应的接收第一信号的时刻;第二终端的接入层根据获取的第二终端的接入层接收第一信号的时刻与确定的第二终端的接入层发送第二信号的时刻,确定第二时长。
可选地,第二标识为第一终端的标识和/或第二终端的标识。其中,第二终端的标识用于标识第二终端与第一终端之间的通信。
作为一个示例,第二标识为第一终端的标识。这样,由于第二终端的接入层使用的第一终端的标识发送第二信号(例如,将第一终端的标识作为第二信号的目的地址),且第一终端的标识与第二终端的接入层接收第一信号的时刻又存在对应关系,因此,第二终端的接入层根据第二信号包括的第一终端的标识,可以获取接收与该第二信号对应的第一信号的发送时刻,从而保证测距的正确性。
其中,与该第二信号对应的第一信号,可以理解为,第二信号所响应的第一信号,或者,触发该第二信号的第一信号。第二信号包括的第一终端的标识,也可以替换为,第二信号的目的地址。
作为另一个示例,第二标识为第二终端的标识,第二终端的标识用于标识第二终端与第一终端之间的通信。此时,由于第二终端的标识用于标识第二终端与第一终端之间的通信,因此通过该第二终端的标识也可以获取接收与该第二信号对应的第一信号的发送时刻,从而保证测距的正确性。例如,当第二终端同时与包括第一终端在内的多个终端通信时,对于不同的终端,第二终端可以使用不同的标识与之通信,在此情况下,第二终端的标识 同样可以区分与第二终端通信的多个终端。
需要说明的是,第一标识和第二标识可以相同,也可以不同。
还需要说明的是,本申请不限定步骤305和步骤303的先后顺序,也不限定步骤305和步骤304的先后顺序。若步骤305在步骤303之前执行,则步骤305中的第二终端的接入层发送第二信号的时刻可以为第二终端的接入层发送第二信号的预估时刻。若步骤305在步骤303之后执行,则步骤305中的第二终端的接入层发送第二信号的时刻可以为第二终端的接入层发送第二信号的预估时刻,也可以是第二终端的接入层发送第二信号的实际时刻。
步骤306,第二终端向第一终端发送第二时长。
相应地,第一终端接收来自第二终端的第二时长。
在本申请中,第二终端向第一终端发送第二时长的方式有很多,不予限制。
一种可能的实现方式,第二终端通过第一层的信令向第一终端发送第二时长。
作为一个示例,第二终端的第一层向第一终端的第一层发送第一消息,第一消息包括第二时长。具体地,第二终端的接入层将第二时长和第一终端的标识发送至第二终端的第一层,以指示第二终端的第一层将第二时长发送至第一终端;在接收到第二时长和第一终端的标识后,第二终端的第一层根据第二时长生成第一消息,并将第一消息和第一终端的标识发送至第二终端的接入层;在接收到第一消息和第一终端的标识后,第二终端的接入层使用接收到的第一终端的标识和第二终端的标识,向第一终端的接入层发送第一消息;第一终端的接入层接收到第一消息后,将第一消息发送至第一终端的第一层。
其中,第二终端的接入层使用接收到的第一终端的标识和第二终端的标识,向第一终端的接入层发送第一消息,例如,可以是第二终端的接入层将接收到的第一终端的标识作为目的地址,将第二终端的标识作为源地址,向第一终端的接入层发送第一消息。第一消息的源地址为第二终端的标识,目的地址为第一终端的标识。
可选地,第一消息包括PC5-S消息。
另一种可能的实现方式,第二终端通过接入层的信令向第一终端发送第二时长。
作为一个示例,第二终端的接入层向第一终端的接入层发送第二消息,第二消息包括第二时长。具体地,第二终端的接入层根据第二时长生成第二消息,并使用第一终端的标识和第二终端的标识,向第一终端的接入层发送第二消息。
其中,第二终端的接入层使用第一终端的标识和第二终端的标识,向第一终端的接入层发送第二消息,例如,可以是第二终端的接入层将第一终端的标识作为目的地址,将第二终端的标识作为源地址,向第一终端的接入层发送第二消息。第二消息的源地址为第二终端的标识,目的地址为第一终端的标识。
可选地,第二消息包括PC5-RRC消息。
又一种可能的实现方式,第二终端通过PC5-U向第一终端发送第二时长。可以理解为,第二时长作为第二终端向第一终端发送的数据。
作为一个示例,第二终端的第一层向第一终端的第一层发送第二时长,第二时长作为数据。具体地,第二终端的接入层将第二时长和第一终端的标识发送至第二终端的第一层,以指示第二终端的第一层将第二时长发送至第一终端;在接收到第二时长和第一终端的标识后,第二终端的第一层根据第二时长生成数据(数据包括第二时长),并将数据和第一 终端的标识发送至第二终端的接入层;在接收到数据和第一终端的标识后,第二终端的接入层使用接收到的第一终端的标识和第二终端的标识,向第一终端的接入层发送数据;第一终端的接入层接收到数据后,将数据发送至第一终端的第一层。
步骤307,第一终端的第一层获取第二时长。
一种可能的实现方式,当第二终端通过第一层的信令向第一终端发送第二时长时,第一终端的第一层从第一层的信令中获取第二时长。具体地,第一终端的接入层接收到来自第二终端的第一消息;第一终端的接入层将第一消息发送至第一终端的第一层;第一终端的第一层从第一消息获取第二时长。
另一种可能的实现方式,当第二终端通过接入层的信令向第一终端发送第二时长时,第一终端的第一层从第一终端的接入层获取第二时长。具体地,第一终端的接入层接收到来自第二终端的接入层的第二消息;第一终端的接入层从第二消息中获取第二时长,并将获取到的第二时长发送至第一终端的第一层。
又一种可能的实现方式,当第二终端通过PC5-U向第一终端发送第二时长时,第一终端的第一层从接收到的PC5-U中获取第二时长。具体地,第一终端的接入层接收到来自第二终端的数据;第一终端的接入层将数据发送至第一终端的第一层;第一终端的第一层从数据获取第二时长。
可选地,第一终端的接入层在向第一终端的第一层发送第一消息、第二时长、或数据时,还向第一终端的第一层发送与第一消息、第二时长或数据对应的第一标识,以便第一终端的第一层明确获取到的第二时长用于确定第一终端与第二终端之间的距离。
步骤308,第一终端的第一层根据第一时长和第二时长,确定第一终端与第二终端之间的距离。
一种可能的实现方式,第一终端与第二终端之间的距离满足:
D=c×(Tround-Treply)/2
其中,D为所述第一终端与所述第二终端之间的距离,c为光速,Tround为第一时长,Treply为第二时长。
需要说明的是,本申请不限定第一终端的第一层关联第一时长和第二时长的方式。
一种可能的实现方式,第一终端内部的层与层之间建立了第二终端的专用通道,第二终端的专用通道与第一标识具有对应关系,第一标识对应于第二终端。第一终端的接入层根据第二终端的专用通道与第一标识的对应关系,确定通过第二终端的专用通道通向第一终端的第一层发送:以第一标识为关联信息确定的第一时长、来自第二终端的第二时长、以及来自第二终端的携带第二时长的第一消息或数据。第一终端的第一层根据来自第二终端的专用通道的第一时长和第二时长、或者第一时长和包括第二时长的第一消息、或者第一时长和包括第二时长的数据,确定第一终端与第二终端之间的距离。
另一种可能的实现方式,第一终端的接入层在向第一终端的第一层发送第一时长、第一消息、数据和第二时长时,还向第一终端的第一层发送与第一时长、第一消息、数据或第二时长对应的第一标识,第一终端的第一层根据与第一标识同时发送的第一时长和第二时长、或者第一时长和包括第二时长的第一消息、或者第一时长和包括第二时长的数据,确定第一终端与第二终端之间的距离。其中,第一标识对应于第二终端。
在本申请的另一些实施例中,在确定第一终端与第二终端之间的距离后,第一终端的 第一层还可以向第一终端的应用层发送第一终端与第二终端之间的距离。例如,当第一终端的第一层的测距信息来自于第一终端的应用层时,第一终端的第一层还可以向第一终端的应用层发送第一终端与第二终端之间的距离。
可选地,在向第一终端的应用层发送第一终端与第二终端之间的距离之前,第一终端的第一层还确定第一终端与第二终端之间的距离是否满足阈值条件;当第一终端与第二终端之间的距离满足阈值条件时,第一终端的第一层向第一终端的应用层发送第一终端与第二终端之间的距离。
可选地,上述阈值条件可以来自第一终端的应用层。
在本申请的另一些实施例中,在确定第一终端与第二终端之间的距离后,第一终端的第一层还根据第一终端与第二终端之间的距离确定测距的第二周期,然后向第一终端的接入层发送第二测距周期信息,第二测距周期信息用于指示第二周期。例如,第一终端的第一层从第一终端的应用层或核心网网元(如PCF或AMF)获取距离与测距周期的对应关系,第一终端的第一层根据第一终端与第二终端之间的距离和获取到的对应关系确定第二测距周期信息。后续,第一终端可以根据第二周期执行测距,方式与根据第一周期类似,不再赘述。这样,第一终端的第一层可以根据第一终端与第二终端之间的距离更新测距周期信息,例如可以实现在终端之间的距离较长时使用较大的周期,在终端之间的距离较小时使用较小的周期。
在方法300中,第一终端的接入层根据第一层的测距信息生成并发送用于测距的第一信号,接收响应于第一信号的第二信号,并确定第一终端发送第一信号的时刻与接收第二信号的时刻之间的第一时长;第一终端的第一层从第一终端的接入层获取第一时长、以及接收来自第二终端的第二时长,并根据第一时长和第二时长确定第一终端与第二终端之间的距离。这样,可以实现测量第一终端与第二终端之间的距离。
并且,在方法300考虑了终端内部的分层架构,明确了终端内部各层的功能、层与层之间交互的参数、以及Treply的传输方式。此外,相比于接入层,由于第一层计算第一终端与第二终端之间的距离,计算结果不易暴露或不易被其他实体获取,因此方法300有助于保障测距结果(即第一终端与第二终端之间的距离)的安全性。
图4是本申请提供的测距方法400的示意性流程图。
同样,在方法400中,以终端包括应用层、第一层和接入层为例。在不同的通信场景下,第一层可能不同,例如,第一层可以为测距层、V2X层或ProSe层等,第一层也可以称为上层(upper layer)。为了描述方便,下文将统一称为第一层。
与方法300不同的是,在方法400中,由第一终端的接入层根据第一时长和第二时长确定第一终端与第二终端之间的距离。
方法400包括以下至少部分内容。
步骤401,第一终端的第一层向第一终端的接入层发送测距信息。
其中,测距信息用于指示测量第一终端与第二终端之间的距离。
步骤402,第一终端的接入层根据测距信息,向第二终端发送第一信号。
相应地,第二终端的接入层接收来自第一终端的第一信号。
其中,第一信号用于测量第一终端与第二终端之间的距离。
步骤403,在接收到第一信号后,第二终端的接入层向第一终端发送第二信号。
相应地,第一终端的接入层接收来自第二终端的第二信号。
其中,第二信号为第一信号的响应信号,换一种描述方式,第二信号用于响应第一信号。
步骤401-403的详细描述可以参考步骤301-303,在此不再赘述。
步骤404,第一终端的接入层确定第一时长。
本申请不限定第一终端的接入层确定第一时长的具体实现方式。
一种可能的实现方式,在第一终端的接入层发送第一信号后,第一终端的接入层存储第一标识与第一终端的接入层发送第一信号的时刻的第一对应关系,其中,第一标识对应于第二终端;第一终端的接入层确定接收第二信号的时刻;第一终端的接入层根据第二信号包括的第一标识、以及第一终端的接入层存储的第一对应关系,获取与第一标识对应的发送第一信号的时刻;第一终端的接入层根据获取的第一终端的接入层发送第一信号的时刻与确定的第一终端的接入层接收第二信号的时刻,确定第一时长。
可选地,第一标识为第一终端的标识和/或第二终端的标识。其中,第一终端的标识用于标识第一终端与第二终端之间的通信。
作为一个示例,第一标识为第二终端的标识。这样,由于第一终端的接入层使用的第二终端的标识发送第一信号(例如,将第二终端的标识作为第一信号的目的地址),且第二终端的标识与第一终端的接入层发送第一信号的时刻又存在对应关系,因此,第一终端的接入层根据第二信号包括的第二终端的标识,可以获取与该第二信号对应的第一信号的发送时刻,从而保证测距的正确性。
其中,与该第二信号对应的第一信号,可以理解为,第二信号所响应的第一信号,或者,触发该第二信号的第一信号。第二信号包括的第二终端的标识,也可以替换为,第二信号的源地址。
作为另一个示例,第一标识为第一终端的标识,第一终端的标识用于标识第一终端与第二终端之间的通信。此时,由于第一终端的标识用于标识第一终端与第二终端之间的通信,因此通过该第一终端的标识也可以获取与该第二信号对应的第一信号的发送时刻,从而保证测距的正确性。例如,当第一终端同时与包括第二终端在内的多个终端通信时,对于不同的终端,第一终端可以使用不同的标识与之通信,在此情况下,第一终端的标识同样可以区分与第一终端通信的多个终端。
步骤405,第二终端的接入层确定第二时长。
其中,第二时长为第二终端的接入层接收第一信号的时刻与第二终端的接入层发送第二信号的时刻之间的时长。
步骤405的详细描述可以参考步骤305,在此不再赘述。
步骤406,第二终端向第一终端发送第二时长。
相应地,第一终端接收来自第二终端的第二时长。
在本申请中,第二终端向第一终端发送第二时长的方式有很多,不予限制。
一种可能的实现方式,第二终端通过接入层的信令向第一终端发送第二时长。
作为一个示例,第二终端的接入层向第一终端的接入层发送第二消息,第二消息包括第二时长。具体地,第二终端的接入层根据第二时长生成第二消息,并使用第一终端的标识和第二终端的标识,向第一终端的接入层发送第二消息。
其中,第二终端的接入层使用第一终端的标识和第二终端的标识,向第一终端的接入层发送第二消息,例如,可以是第二终端的接入层将第一终端的标识作为目的地址,将第二终端的标识作为源地址,向第一终端的接入层发送第二消息。第二消息的源地址为第二终端的标识,目的地址为第一终端的标识。
可选地,第二消息包括PC5-RRC消息。
步骤407,第一终端的接入层获取第二时长。
一种可能的实现方式,当第二终端通过接入层的信令向第一终端发送第二时长时,第一终端的接入层从接入层的信令中获取第二时长。具体地,第一终端的接入层接收到来自第二终端的接入层的第二消息;第一终端的接入层从第二消息中获取第二时长。
步骤408,第一终端的接入层根据第一时长和第二时长,确定第一终端与第二终端之间的距离。
一种可能的实现方式,第一终端与第二终端之间的距离满足:
D=c×(Tround-Treply)/2
其中,D为所述第一终端与所述第二终端之间的距离,c为光速,Tround为第一时长,Treply为第二时长。
步骤409,第一终端的接入层向第一终端的第一层发送第一终端与第二终端之间的距离。
可选地,在向第一终端的第一层发送第一终端与第二终端之间的距离之前,第一终端的接入层还确定第一终端与第二终端之间的距离是否满足阈值条件;当第一终端与第二终端之间的距离满足阈值条件时,第一终端的接入层向第一终端的第一层发送第一终端与第二终端之间的距离。
可选地,第一终端的接入层在向第一终端的第一层发送第一终端与第二终端之间的距离时,还向第一终端的第一层发送与该距离对应的第一标识,以便第一终端的第一层明确该距离为第一终端与第二终端之间的距离。其中,第一标识对应于第二终端。
在本申请的另一些实施例中,在接收到第一终端与第二终端之间的距离后,第一终端的第一层还可以向第一终端的应用层发送第一终端与第二终端之间的距离。例如,当第一终端的第一层的测距信息来自于第一终端的应用层时,第一终端的第一层还可以向第一终端的应用层发送第一终端与第二终端之间的距离。
可选地,在向第一终端的应用层发送第一终端与第二终端之间的距离之前,第一终端的第一层还确定第一终端与第二终端之间的距离是否满足阈值条件;当第一终端与第二终端之间的距离满足阈值条件时,第一终端的第一层向第一终端的应用层发送第一终端与第二终端之间的距离。例如,当第一终端的接入层不确定第一终端与第二终端之间的距离是否满足阈值条件时,可以由第一终端的第一层还确定第一终端与第二终端之间的距离是否满足阈值条件。
可选地,第一终端的第一层在向第一终端的应用层发送第一终端与第二终端之间的距离时,还向第一终端的应用层发送与该距离对应的第一标识,以便第一终端的应用层明确该距离为第一终端与第二终端之间的距离。其中,第一标识对应于第二终端。
可选地,上述阈值条件可以来自第一终端的应用层。当由第一终端的接入层确定第一终端与第二终端之间的距离是否满足阈值条件时,第一终端的第一层发送给第一终端的接 入层的测距信息中可以包括该阈值条件。当由第一终端的第一层确定第一终端与第二终端之间的距离是否满足阈值条件时,第一终端的第一层发送给第一终端的接入层的测距信息中可以包括不阈值条件。
在本申请的另一些实施例中,在确定第一终端与第二终端之间的距离后,第一终端的接入层根据第一终端与第二终端之间的距离确定测距的第二周期。例如第一终端的接入层从第一终端的应用层或第一终端的第一层获取距离与测距周期的对应关系,第一终端的接入层根据第一终端与第二终端之间的距离和获取的对应关系确定第二周期。后续,第一终端可以根据第二周期执行测距,方式与根据第一周期隔类似,不再赘述。这样,第一终端可以根据第一终端与第二终端之间的距离更新测距的周期,例如可以实现在终端之间的距离较长时使用较大的周期,在终端之间的距离较短时使用较小的周期。
在方法400中,第一终端的接入层根据第一层的测距信息生成并发送用于测距的第一信号,接收响应于第一信号的第二信号,确定第一终端发送第一信号的时刻与接收第二信号的时刻之间的第一时长,从第二终端获取第二时长,并根据第一时长和第二时长确定第一终端与第二终端之间的距离。这样,可以实现测量第一终端与第二终端之间的距离。
并且,在方法400考虑了终端内部的分层架构,明确了终端内部各层的功能、层与层之间交互的参数、以及Treply的传输方式。
需要说明的是,为了描述方便,方法300和方法400中终端的层与层之间的信息交互采用了是“发送”和“接收”的描述方式,实际上,终端的层与层之间的信息交互可以没有发送和接收的动作,而是接口与接口之间的信息输入和信息输出。“发送”也可以替换为“提供”、“输出”、“读出”等,“接收”也可以替换为“输入”、“写入”等。
图5是本申请提供的测距方法500的示意性流程图。
方法500包括以下至少部分内容。
步骤501,第一终端向第二终端发送第一信号。
相应地,第二终端接收来自第一终端的第一信号。
其中,第一信号用于测量第一终端与第二终端之间的距离。
可选地,第一信号可以为ranging signaling、ranging reference signaling、positioning reference signaling或图2所示的初始测距信号。
一种可能的实现方式,第一终端使用第一终端的标识和第二终端的标识,向第二终端发送第一信号。例如,第一终端将第一终端的标识作为第一信号的源地址,将第二终端的标识作为第一信号的目的地址,向第二终端发送第一信号,换句话说,第一信号的源地址为第一终端的标识,目的地址为第二终端的标识。
需要说明的是,若源地址和目的地址看作第一信号的一部分,则第一信号包括第一终端的标识和第二终端的标识。
一种可能的实现方式,在步骤501之前,第一终端还确定由第一终端计算测距结果(即第一终端与第二终端之间的距离)。可选地,第一终端和第二终端可以交互测距计算能力信息,进而确定由哪个终端计算测距结果。
一种可能的实现方式,在步骤501之前,第一终端还确定由第一终端先发送用于测距的信号。即当第一终端确定由第一终端先发送用于测距的信号时,第一终端发送第一信号。可选地,第一终端和第二终端可以交互信息以确定由哪个终端先发送用于测距的信号。
步骤502,第二终端向第一终端发送第二信号。
相应地,第一终端接收来自第二终端的第二信号。
其中,第二信号为第一信号的响应信号,换一种描述方式,第二信号用于响应第一信号。
可选地,第二信号可以为ranging signaling、ranging reference signaling、positioning reference signaling或图2所示的反馈测距信号。
一种可能的实现方式,第二终端使用第一终端的标识和第二终端的标识,向第一终端发送第二信号。例如,第一终端将第二终端的标识作为第二信号的源地址,将第一终端的标识作为第二信号的目的地址,向第一终端发送第二信号,换句话说,第二信号的源地址为第二终端的标识,目的地址为第一终端的标识。
可选地,第一终端的标识为第一终端的层2标识,第二终端的标识为第二终端的层2标识。其中,第二终端的标识用于标识第二终端与第一终端之间的通信。
同样,若源地址和目的地址看作第二信号的一部分,则第二信号包括第一终端的标识和第二终端的标识。
步骤503,第一终端确定第一时长。
其中,第一时长为第一终端发送第一信号的时刻与第一终端接收第二信号的时刻之间的时长。
一种可能的实现方式,在第一终端发送第一信号后,第一终端存储第一标识与第一终端发送第一信号的时刻的第一对应关系,其中,第一标识对应于第二终端;第一终端确定接收第二信号的时刻;第一终端根据第二信号包括的第一标识、以及第一终端存储的第一对应关系,获取与第一标识对应的发送第一信号的时刻;第一终端根据第一终端发送第一信号的时刻与第一终端接收第二信号的时刻,确定第一时长。
可选地,第一标识为第一终端的标识和/或第二终端的标识。其中,第一终端的标识用于第一终端与第二终端之间的通信。
作为一个示例,第一标识为第二终端的标识。这样,由于第一终端的接入层使用的第二终端的标识发送第一信号(例如,将第二终端的标识作为第一信号的目的地址),且第二终端的标识与第一终端的接入层发送第一信号的时刻又存在对应关系,因此,第一终端的接入层根据第二信号包括的第二终端的标识,可以获取与该第二信号对应的第一信号的发送时刻,从而保证测距的正确性。
其中,与该第二信号对应的第一信号,可以理解为,第二信号所响应的第一信号,或者,触发该第二信号的第一信号。第二信号包括的第二终端的标识,也可以替换为,第二信号的源地址。
作为另一个示例,第一标识为第一终端的标识,第一终端的标识用于标识第一终端与第二终端之间的通信。此时,由于第一终端的标识用于标识第一终端与第二终端之间的通信,因此通过该第一终端的标识也可以获取与该第二信号对应的第一信号的发送时刻,从而保证测距的正确性。例如,当第一终端同时与包括第二终端在内的多个终端通信时,对于不同的终端,第一终端可以使用不同的标识与之通信,在此情况下,第一终端的标识同样可以区分与第一终端通信的多个终端。
步骤504,第二终端确定第二时长。
其中,第二时长为第二终端接收第一信号的时刻与第二终端发送第二信号的时刻之间的时长。
一种可能的实现方式,在第二终端接收到第一信号后,第二终端存储第二标识与第二终端接收第一信号的时刻的第二对应关系,其中,第二标识对应于第一终端;第二终端确定发送第二信号的时刻;第二终端根据第二信号包括的第二标识、以及第二终端存储的第二对应关系,获取与第二标识对应的接收第一信号的时刻;第二终端根据获取的第二终端的接入层接收第一信号的时刻与确定的第二终端发送第二信号的时刻,确定第二时长。
可选地,第二标识为第一终端的标识和/或第二终端的标识。其中,第二终端的标识用于标识第二终端与第一终端之间的通信。
作为一个示例,第二标识为第一终端的标识。这样,由于第二终端使用的第一终端的标识发送第二信号(例如,将第一终端的标识作为第二信号的目的地址),且第一终端的标识与第二终端接收第一信号的时刻又存在对应关系,因此,第二终端根据第二信号包括的第一终端的标识,可以获取接收与该第二信号对应的第一信号的发送时刻,从而保证测距的正确性。
其中,与该第二信号对应的第一信号,可以理解为,第二信号所响应的第一信号,或者,触发该第二信号的第一信号。第二信号包括的第一终端的标识,也可以替换为,第二信号的目的地址。
作为另一个示例,第二标识为第二终端的标识,第二终端的标识用于标识第二终端与第一终端之间的通信。此时,由于第二终端的标识用于标识第二终端与第一终端之间的通信,因此通过该第二终端的标识也可以获取接收与该第二信号对应的第一信号的发送时刻,从而保证测距的正确性。例如,当第二终端同时与包括第一终端在内的多个终端通信时,对于不同的终端,第二终端可以使用不同的标识与之通信,在此情况下,第二终端的标识同样可以区分与第二终端通信的多个终端。
需要说明的是,第一标识和第二标识可以相同,也可以不同。
还需要说明的是,本申请不限定步骤504和步骤502的先后顺序,也不限定步骤504和步骤503的先后顺序。若步骤504在步骤502之前执行,则步骤504中的第二终端发送第二信号的时刻可以为第二终端发送第二信号的预估时刻。若步骤504在步骤502之后执行,则步骤504中的第二终端发送第二信号的时刻可以为第二终端发送第二信号的预估时刻,也可以是第二终端发送第二信号的实际时刻。
步骤505,第二终端向第一终端发送第一消息、第二消息或数据。
相应地,第一终端接收来自第二终端的第一消息、第二消息或数据。
其中,第一消息、第二消息和数据包括第二时长,第一消息包括PC5-S消息,第二消息包括PC5-RRC消息,数据可以为PC5-U数据。换句话说,第二终端可以通过PC5-S消息、PC5-RRC消息或PC5-U向第一终端发送第二时长。
一种可能的实现方式,第二终端使用第一终端的标识和第二终端的标识,向第一终端发送第一消息、第二消息或数据。例如,第二终端将第一终端的标识作为目的地址,将第二终端的标识作为源地址,向第一终端发送第一消息、第二消息或数据,即第一消息、第二消息和数据的源地址为第二终端的标识,目的地址为第一终端的标识。
步骤506,第一终端根据第一时长和第二时长,确定第一终端与第二终端之间的距离。
一种可能的实现方式,第一终端与第二终端之间的距离满足:
D=c×(Tround-Treply)/2
其中,D为所述第一终端与所述第二终端之间的距离,c为光速,Tround为第一时长,Treply为第二时长。
在方法500中,第一终端发送用于测距的第一信号,接收响应于第一信号的第二信号,确定第一终端发送第一信号的时刻与接收第二信号的时刻之间的第一时长,并通过PC5-S消息、PC5-RRC消息或数据接收来自第二终端的第二时长,进而根据第一时长和第二时长确定第一终端与第二终端之间的距离。这样,方法500可以实现测量第一终端与第二终端之间的距离。
在本申请的另一些实施例中,方法500还包括:第一终端获取测距信息,其中,测距信息用于指示测量第一终端与第二终端之间的距离。在此情况下,第一终端根据测距信息向第二终端发送第一信号。
一种可能的实现方式,测距信息包括测距指示和第二终端的标识。其中,测距指示用于指示测距操作,第二终端的标识用于指示测距的对象。这样,第一终端的接入层根据测距信息可以确定测量第一终端与第二终端之间的距离。
另一种可能的实现方式,测距信息包括第一测距周期信息和第二终端的标识。其中,第一测距周期信息用于指示测距的第一周期,第二终端的标识用于指示测距的对象。
又一种可能的实现方式,测距信息包括测距指示、第一测距周期信息和第二终端的标识。其中,测距指示用于指示测距操作,第一测距周期信息用于指示测距的第一周期,第二终端的标识用于指示测距的对象。
可选地,第二终端的标识可以为第二终端的层2标识。
一种可能的实现方式,在确定第一终端与第二终端之间的距离后,第一终端还根据第一终端与第二终端之间的距离确定测距的第二周期。后续,第一终端可以根据第二周期执行测距操作。例如,第一终端获取距离与测距周期的对应关系,在确定第一终端与第二终端之间的距离后,第一终端根据第一终端与第二终端之间的距离和获取到的对应关系确定第二周期。这样,第一终端可以根据第一终端与第二终端之间的距离更新测距周期信息,例如可以实现在终端之间的距离较长时使用较大的周期,在终端之间的距离较小时使用较小的周期。
一种可能的实现方式,第一终端获取测距信息,包括:第一终端从第二终端获取测距信息。具体地,第二终端向第一终端发送测距信息,相应地,第一终端接收来自第二终端的测距信息,其中,测距信息用于指示测量第一终端与第二终端之间的距离。在此情况下,方法500还可以包括:第一终端向第二终端发送第一终端与第二终端之间的距离。换句话说,第一终端在接收到第二终端的测距请求时发起测距,并将测量得到的第一终端与第二终端之间的距离反馈给第二终端。
一种可能的实现方式,第一终端和第二终端包括应用层和网络层。在此情况下,方法500可以由第一终端的网络层和第二终端的网络层执行,包括:第一终端的网络层向第二终端发送第一信号,相应地,第二终端的网络层接收来自第一终端的第一信号;第二终端的网路层向第一终端发送第二信号,相应地,第一终端的网络层接收来自第二终端的第二信号;第一终端的网路层根据发送第一信号的时刻以及接收第二信号的时刻确定第一时长; 第二终端的网络层根据接收第一信号的时刻以及发送第二信号的时刻确定第二时长;第二终端的网络层通过PC5-S消息或PC5-RRC消息向第一终端发送第二时长,相应地,第一终端的网络层接收来自第二终端的第二时长;第一终端的网络层根据第一时长和第二时长确定第一终端与第二终端之间的距离。更详细的描述可以参考上文的步骤501至步骤506,在此不再赘述。
需要说明的是,在一些实现方式中,第一终端的网络层里可以包括接入功能和测距功能。
作为一个示例,接入功能可以执行:信号的收发(例如,发送第一信号,接收第二信号等)、根据信号的收发时刻进行计算(例如,确定第一时长)等。测距功能可以执行:接收来自应用层的信息、计算终端之间的距离(例如,根据第一时长和第二时长确定第一终端与第二终端之间的距离)等。另外,根据部署的需求,包含接入功能的可以称之为接入层,包含测距功能的可以形成第一层,并且接入层和第一层之间可以进行通信,在此情况下,接入层和第一层可以实现图3中第一终端的功能。
作为另一个示例,接入功能可以执行:信号的收发(例如,发送第一信号,接收第二信号等)、根据信号的收发时刻进行计算(例如,确定第一时长)、计算终端之间的距离(例如,根据第一时长和第二时长确定第一终端与第二终端之间的距离)等。测距功能可以执行:接收来自应用层的信息。另外,根据部署的需求,包含接入功能的可以称之为接入层,包含测距功能可以称之为第一层,并且接入层和第一层之间可以进行通信,在此情况下,接入层和第一层可以实现图4中第一终端的功能。
同样,在一些实现方式中,第二终端的网络层里可以包括接入功能和测距功能。
作为一个示例,接入功能可以执行:信号的收发(例如,接收第一信号,发送第二信号等)、根据信号的收发时刻进行计算(例如,确定第二时长)等。测距功能可以执行:消息的收发等。另外,根据部署的需求,包含接入功能的可以称之为接入层,包含测距功能的可以称之为第一层,并且接入层和第一层之间可以进行通信,在此情况下,接入层和第一层可以实现图3或图4中第二终端的功能。
可选地,第一终端获取测距信息,包括:第一终端的应用层生成测距信息。方法500还包括:第一终端的应用层向第一终端的网络层发送测距信息。
在本申请的另一些实施例中,第一终端和第二终端包括应用层、第一层和接入层。在此情况下,方法500可以由第一终端的第一层和接入层、以及第二终端的第一层和接入层执行,详细描述可以参考图3和图4,在此不再赘述。
下面结合具体的示例对本申请的技术方案进行描述。在以下示例中,以D2D通信场景为例,由终端1发起测距,测量终端1与终端2之间的相对距离。其中,测距层可以对应于上文的第一层,测距信号可以对应于上文的第一信号,响应信号可以对应于上文的第二信号,距离阈值可以对应于上文的阈值条件。为了描述方便,下文将终端1与终端2之间的相对距离简称为距离结果。
示例1
图6是本申请的测距方法的一个示例。在该示例中,由终端1的接入层生成测距信号、以及计算距离结果。
步骤601,终端1的应用层(application layer,APP layer)向终端1的测距层提供测距需 求。
其中,测距需求可以包括测距指示,测距指示用于指示发起测距操作。
可选地,测距需求还包括距离阈值(distance threshold)。距离阈值为递交距离结果时需要满足的距离阈值,即距离结果满足距离阈值时才向更高的层递交距离结果。距离阈值可以包括一个或多个阈值。
测距需求中还可以携带终端2的应用层标识(UE2app ID),用于指示测距的对象。
步骤602,终端1的测距层向终端1的接入层请求测量与终端2之间的距离。
一种可能的实现方式,如图6所示,终端1的测距层向终端1的接入层提供测距指示和终端2的层2标识(UE2L2ID)。测距指示用于指示测距操作。测距操作可以理解为测量终端之间的距离。
另一种可能的实现方式,终端1的测距层向终端1的接入层提供第一测距周期信息和终端2的层2标识。第一测距周期信息用于指示测距的第一周期。
又一种可能的实现方式,终端1的测距层向终端1的接入层提供测距指示、第一测距周期信息和终端2的层2标识。测距指示用于指示测距操作。测距操作可以理解为测量终端之间的距离。第一测距周期信息用于指示测距的第一周期。
其中,终端2的层2标识可以是在与终端2的发现过程中从终端2获取的,或者还可以是在与终端2的建立PC5连接的过程中从终端2获取的,或者还可以是在与终端2的PC5连接建立后从终端2获取的。例如在终端1的应用层发起测距之后,终端1可以执行终端2的发现过程以及PC5连接建立过程,并在该发现过程中、该PC5连接建立过程中或PC5连接建立后从终端2获取终端2的层2标识。
可选地,终端1的测距层还向终端1的接入层提供距离阈值。这样可以实现由接入层确定是否向上递交距离结果。
可选地,终端1的第一层还确定由终端1计算距离结果。即当确定由终端1计算距离结果时,终端1的第一层向终端1的接入层请求测量与终端2之间的距离,并且由终端1的接入层计算距离结果。可选地,终端1和终端2可以交互测距计算能力信息,进而确定由终端1计算距离结果。
可选地,终端1的第一层还确定由终端1先发送用于测距的信号。即当终端1的第一层确定由终端1先发送用于测距的信号时,终端1的第一层向终端1的接入层请求测量与终端2之间的距离、以及由终端1的接入层先发送用于测距的信号。可选地,终端1和终端2可以交互信息以确定由终端1先发送用于测距的信号。
步骤603,终端1的接入层生成并发送测距信号(ranging signaling),并记录测距信号的发送时刻T1
一种可能的实现方式,当终端1的测距层向终端1的接入层提供测距指示和终端2的层2标识时,终端1的接入层根据测距指示确定发送测距信号,并使用终端1的层2标识和终端2的层2标识发送测距信号,测距信号的源地址为终端1的层2标识,测距信号的目的地址为终端2的层2标识。终端1的接入层存储终端1的层2标识与发送时刻T1的对应关系,和/或,终端1的接入层存储终端2的层2标识与发送时刻T1的对应关系。
另一种可能的实现方式,当终端1的测距层向终端1的接入层提供第一测距周期信息和终端2的层2标识时,终端1的接入层按照第一测距周期信息指示的第一周期,使用终 端1的层2标识和终端2的层2标识发送测距信号,测距信号的源地址为终端1的层2标识,测距信号的目的地址为终端2的层2标识。终端1的接入层存储终端1的层2标识与发送时刻T1的对应关系,和/或,终端1的接入层存储终端2的层2标识与发送时刻T1的对应关系。
又一种可能的实现方式,当终端1的测距层向终端1的接入层提供测距指示、第一测距周期信息和终端2的层2标识时,终端1的接入层根据测距指示确定发送测距信号,并按照第一测距周期信息指示的第一周期,使用终端1的层2标识和终端2的层2标识发送测距信号,测距信号的源地址为终端1的层2标识,测距信号的目的地址为终端2的层2标识。终端1的接入层存储终端1的层2标识与发送时刻T1的对应关系,和/或,终端1的接入层存储终端2的层2标识与发送时刻T1的对应关系。
需要说明的是,当终端1的接入层存储终端1的层2标识与发送时刻T1的对应关系时,针对不同的终端2,终端1可以使用不同的终端1的层2标识。
步骤604,在接收到来自终端1的测距信号后,终端2的接入层生成并发送响应信号,根据测距信号的接收时刻T2与响应信号的发送时刻T3确定Treply
具体地,在接收到来自终端1的测距信号后,终端2的接入层存储终端1的层2标识与接收时刻T2的对应关系,和/或,终端2的接入层存储终端2的层2标识与接收时刻T2的对应关系。终端2的接入层使用终端1的层2标识和终端2的层2标识发送响应信号,响应信号的源地址为终端2的层2标识,响应信号的目的地址为终端1的层2标识。终端2的接入层以终端1的层2标识作为关联信息确定Treply,其中,Treply=T3-T2
其中,终端2的接入层以终端1的层2标识作为关联信息确定Treply的一种实现方式为:终端2的接入层确定响应信号的发送时刻T3;终端2的接入层根据响应信号的目的地址,即终端1的层2标识,以及终端1的层2标识与测距信号的接收时刻T2的对应关系,确定该响应信号对应的测距信号的接收时刻T2,进而根据测距信号的接收时刻T2和响应信号的发送时刻T3计算Treply
需要说明的是,当终端2的接入层存储终端2的层2标识与接收时刻T2的对应关系时,针对不同的终端1,终端2可以使用不同的终端2的层2标识。
步骤605,终端2向终端1发送Treply
一种可能的实现方式,终端2通过接入层的信令向终端1发送Treply。例如,终端2的接入层可以通过PC5-RRC消息向终端1发送Treply。在该方式中,响应信号的发送时刻T3可以为预计发送响应信号的时刻,也可以为实际发送响应信号的时刻。
步骤606,在接收到来自终端2的响应信号后,终端1的接入层根据测距信号的发送时刻T1与响应信号的接收时刻T4确定Tround,并根据Tround和步骤605中获取到的Treply计算距离结果。
具体地,在接收到来自终端1的测距信号后,终端1的接入层记录响应信号的接收时刻T4,并以终端2的层2标识作为关联信息,确定Tround,其中,Tround=T4-T1。终端1的接入层根据Tround和步骤605中获取到的Treply计算距离结果,其中,距离结果=光速×(Tround-Treply)/2。距离结果的计算方式的详细描述可以参考图2,在此不再详述。
其中,终端1的接入层以终端2的层2标识作为关联信息确定Tround的一种实现方式为:终端1的接入层根据响应信号的源地址,即终端2的层2标识,以及终端2的层2标 识与测距信号的发送时刻T1的对应关系,确定该响应信号对应的测距信号的发送时刻T1,进而根据测距信号的发送时刻T1和响应信号的接收时刻T4计算Tround
步骤607,终端1的接入层向终端1的测距层递交距离结果、以及可选的对应于该距离结果的终端2的层2标识。
可选地,若在步骤602中终端1的测距层向终端1的接入层提供了距离阈值,则终端1的接入层还判断该距离结果是否满足距离阈值。若距离结果满足距离阈值,则终端1的接入层向终端1的测距层递交距离结果、以及对应于该距离结果的终端2的层2标识。若距离结果不满足距离阈值,则终端1的接入层可以不向终端1的测距层递交距离结果、以及对应于该距离结果的终端2的层2标识。
其中,根据实际情况,距离结果满足距离阈值,可以是例如距离结果大于距离阈值或距离结果小于距离阈值等。
步骤608,终端1的测距层向终端1的应用层递交距离结果、以及可选的对应于该距离结果的终端2的应用层标识。
可选地,若在步骤607中终端1的接入层未判断距离结果是否满足距离阈值,则终端1的测距层还判断距离结果是否满足距离阈值。若距离结果满足距离阈值,则终端1的测距层向终端1的应用层递交距离结果、以及对应于该距离结果的终端2的应用层标识。若距离结果不满足距离阈值,则终端1的测距层可以不向终端1的应用层递交距离结果、以及对应于该距离结果的终端2的应用层标识。
其中,根据实际情况,距离结果满足距离阈值,可以是例如距离结果大于距离阈值或距离结果小于距离阈值等。
在一些实现方式中,在确定终端1与终端2之间的距离后,终端1的接入层根据终端1与终端2之间的距离确定测距的第二周期。例如终端1的接入层从终端1的应用层或终端1的第一层获取距离与测距周期的对应关系,终端1的接入层根据终端1与终端2之间的距离和获取的对应关系确定第二周期。后续,终端1可以根据第二周期执行测距,方式与根据第一周期类似,不再赘述。这样,终端1可以根据终端1与终端2之间的距离更新测距的周期,例如可以实现在终端之间的距离较长时使用较大的周期,在终端之间的距离较短时使用较小的周期。
示例2
图7是本申请的测距方法的另一个示例。在该示例中,由终端1的接入层生成测距信号,由测距层计算距离结果。
步骤701,终端1的应用层向终端1的测距层提供测距需求。
其中,测距需求可以包括测距指示,测距指示用于指示发起测距操作。
可选地,测距需求还包括距离阈值。距离阈值为递交距离结果时需要满足的距离阈值,即距离结果满足距离阈值时才向更高的层递交距离结果。距离阈值可以包括一个或多个阈值。
测距需求中还可以携带终端2的应用层标识,用于指示测距的对象。
步骤702,终端1的测距层向终端1的接入层请求测量与终端2之间的距离。
一种可能的实现方式,如图7所示,终端1的测距层向终端1的接入层提供测距指示和终端2的层2标识。测距指示用于指示测距操作。测距操作可以理解为测量终端之间的 距离。
另一种可能的实现方式,终端1的测距层向终端1的接入层提供第一测距周期信息和终端2的层2标识。第一测距周期信息用于指示测距的第一周期。
又一种可能的实现方式,终端1的测距层向终端1的接入层提供测距指示、第一测距周期信息和终端2的层2标识。测距指示用于指示测距操作。测距操作可以理解为测量终端之间的距离。第一测距周期信息用于指示测距的第一周期。
可选地,终端1的第一层还确定由终端1计算距离结果。即当确定由终端1计算距离结果时,终端1的第一层向终端1的接入层请求测量与终端2之间的距离,并且计算距离结果。可选地,终端1和终端2可以交互测距计算能力信息,进而确定由终端1计算距离结果。
可选地,终端1的第一层还确定由终端1先发送用于测距的信号。即当终端1的第一层确定由终端1先发送用于测距的信号时,终端1的第一层向终端1的接入层请求测量与终端2之间的距离、以及由终端1的接入层先发送用于测距的信号。可选地,终端1和终端2可以交互信息以确定由终端1先发送用于测距的信号。
可选地,终端1的测距层向终端1的接入层提供第一测距周期信息。第一测距周期信息用于指示测距的第一周期。
步骤703,终端1的接入层生成并发送测距信号,并记录测距信号的发送时刻T1
一种可能的实现方式,当终端1的测距层向终端1的接入层提供测距指示和终端2的层2标识时,终端1的接入层根据测距指示确定发送测距信号,并使用终端1的层2标识和终端2的层2标识发送测距信号,测距信号的源地址为终端1的层2标识,测距信号的目的地址为终端2的层2标识。终端1的接入层存储终端1的层2标识与发送时刻T1的对应关系,和/或,终端1的接入层存储终端2的层2标识与发送时刻T1的对应关系。
另一种可能的实现方式,当终端1的测距层向终端1的接入层提供第一测距周期信息和终端2的层2标识时,终端1的接入层按照第一测距周期信息指示的第一周期,使用终端1的层2标识和终端2的层2标识发送测距信号,测距信号的源地址为终端1的层2标识,测距信号的目的地址为终端2的层2标识。终端1的接入层存储终端1的层2标识与发送时刻T1的对应关系,和/或,终端1的接入层存储终端2的层2标识与发送时刻T1的对应关系。
又一种可能的实现方式,当终端1的测距层向终端1的接入层提供测距指示、第一测距周期信息和终端2的层2标识时,终端1的接入层根据测距指示确定发送测距信号,并按照第一测距周期信息指示的第一周期,使用终端1的层2标识和终端2的层2标识发送测距信号,测距信号的源地址为终端1的层2标识,测距信号的目的地址为终端2的层2标识。终端1的接入层存储终端1的层2标识与发送时刻T1的对应关系,和/或,终端1的接入层存储终端2的层2标识与发送时刻T1的对应关系。
需要说明的是,当终端1的接入层存储终端1的层2标识与发送时刻T1的对应关系时,针对不同的终端2,终端1可以使用不同的终端1的层2标识。
步骤704,在接收到来自终端1的测距信号后,终端2的接入层生成并发送响应信号,根据测距信号的接收时刻T2与响应信号的发送时刻T3确定Treply
具体地,在接收到来自终端1的测距信号后,终端2的接入层存储终端1的层2标识 与接收时刻T2的对应关系,和/或,终端2的接入层存储终端2的层2标识与接收时刻T2的对应关系。终端2的接入层使用终端1的层2标识和终端2的层2标识发送响应信号,响应信号的源地址为终端2的层2标识,响应信号的目的地址为终端1的层2标识。终端2的接入层以终端1的层2标识作为关联信息确定Treply,其中,Treply=T3-T2
其中,终端2的接入层以终端1的层2标识作为关联信息确定Treply的一种实现方式为:终端2的接入层确定响应信号的发送时刻T3;终端2的接入层根据响应信号的目的地址,即终端1的层2标识,以及终端1的层2标识与测距信号的接收时刻T2的对应关系,确定该响应信号对应的测距信号的接收时刻T2,进而根据测距信号的接收时刻T2和响应信号的发送时刻T3计算Treply
需要说明的是,当终端2的接入层存储终端2的层2标识与接收时刻T2的对应关系时,针对不同的终端1,终端2可以使用不同的终端2的层2标识。
步骤705,终端2向终端1发送Treply
一种可能的实现方式,如图7所示,终端2通过测距层的信令向终端1发送Treply。例如,终端2的接入层向终端2的测距层提供Treply和终端1的层2标识,在收到Treply和终端1的层2标识后,终端2的测距层根据Treply生成PC5-S消息,并将PC5-S消息、和终端1的层2标识提供给终端2的接入层,该PC5-S消息中包括Treply;进一步由终端2的接入层根据接收到的终端1的层2标识和终端2的层2标识向终端1发送PC5-S消息,该PC5-S消息的源地址为终端2的层2标识,该PC5-S消息的目的地址为终端1的层2标识。
另一种可能的实现方式,终端2通过接入层的信令向终端1发送Treply。例如,终端2的接入层可以通过PC5-RRC信号向终端1发送Treply
又一种可能的实现方式,终端2通过PC5-U向终端1发送Treply。例如,终端2的接入层向终端2的测距层提供Treply和终端1的层2标识,在收到Treply和终端1的层2标识后,终端2的测距层根据Treply生成数据,并将数据和终端1的层2标识提供给终端2的接入层,该数据中包括Treply;进一步由终端2的接入层根据接收到的终端1的层2标识和终端2的层2标识向终端1发送数据,该数据的源地址为终端2的层2标识,该数据的目的地址为终端1的层2标识。
步骤705中的响应信号的发送时刻T3可以为终端2的接入层预计发送响应信号的时刻,也可以为终端2的接入层实际发送响应信号的时刻。
步骤706,在接收到来自终端2的响应信号后,终端1的接入层根据测距信号的发送时刻T1与响应信号的接收时刻T4确定Tround
具体地,在接收到来自终端1的测距信号后,终端1的接入层记录响应信号的接收时刻T4,并以终端2的层2标识作为关联信息,确定Tround,其中,Tround=T4-T1
其中,终端1的接入层以终端2的层2标识作为关联信息确定Tround的一种实现方式为:终端1的接入层根据响应信号的源地址,即终端2的层2标识,以及终端2的层2标识与测距信号的发送时刻T1的对应关系,确定该响应信号对应的测距信号的发送时刻T1,进而根据测距信号的发送时刻T1和响应信号的接收时刻T4计算Tround
步骤707,终端1的接入层向终端1的测距层递交Tround、以及可选的对应于该Tround的终端2的层2标识。
步骤708,终端1的测距层根据Tround和步骤705中获取到的Treply计算距离结果。
其中,距离结果=光速×(Tround-Treply)/2,距离结果的计算方式的详细描述可以参考图2,在此不再详述。
步骤709,终端1的测距层向终端1的应用层递交距离结果、以及可选的对应于该距离结果的终端2的应用层标识。
可选地,若在步骤701中终端1的应用层向终端1的测距层提供了距离阈值,则终端1的测距层还判断距离结果是否满足距离阈值。若距离结果满足距离阈值,则终端1的测距层向终端1的应用层递交距离结果、以及对应于该距离结果的终端2的应用层标识。若距离结果不满足距离阈值,则终端1的测距层可以不向终端1的应用层递交距离结果、以及对应于该距离结果的终端2的应用层标识。
其中,根据实际情况,距离结果满足距离阈值,可以是例如距离结果大于距离阈值或距离结果小于距离阈值等。
在一些实现方式中,在确定终端1与终端2之间的距离后终端1的第一层还根据终端1与终端2之间的距离确定测距的第二周期,然后向终端1的接入层发送第二测距周期信息,第二测距周期信息用于指示第二周期。例如,终端1的第一层从终端1的应用层或核心网网元(如PCF或AMF)获取距离与测距周期的对应关系,终端1的第一层根据终端1与终端2之间的距离和获取到的对应关系确定第二测距周期信息。后续,终端1可以根据第二周期执行测距,方式与根据第一周期类似,不再赘述。这样,终端1的第一层可以根据终端1与终端2之间的距离更新测距周期信息,例如可以实现在终端之间的距离较长时使用较大的周期,在终端之间的距离较小时使用较小的周期。
需要说明的是,在本申请中,终端的层A执行操作B,也可以描述为,终端在层A执行操作B,或者终端通过层A执行操作B。例如,终端的第一层向终端的接入层发送测距信息,也可以描述为,终端在第一层向终端的接入层发送测距信息,或者,终端通过第一层向终端的接入层发送测距信息。
上文结合图3至图7,详细描述了本申请提供的方法,下面将结合图8至图10,详细描述本申请的装置实施例。
可以理解的是,为了实现上述实施例中功能,图8至图10中的装置包括了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本申请中所公开的实施例描述的各示例的单元及方法步骤,本申请能够以硬件或硬件和计算机软件相结合的形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用场景和设计约束条件。
图8至图10为本申请的实施例提供的可能的装置的结构示意图。这些装置可以用于实现上述方法实施例中第一终端或第二终端的功能,因此也能实现上述方法实施例所具备的有益效果。
如图8所示,装置800包括应用层810、第一层820和接入层830。
当装置800用于实现图3所示的方法实施例中第一终端的功能时,第一层820用于:向接入层830发送测距信息,所述测距信息用于指示测量所述第一终端与第二终端之间的距离。接入层830用于:根据所述测距信息,向所述第二终端发送第一信号,所述第一信号用于测量所述第一终端与所述第二终端之间的距离;以及接收来自所述第二终端的第二信号,所述第二信号用于响应所述第一信号。第一层820还用于:获取第一时长,所述第 一时长为所述第一终端发送所述第一信号的时刻与所述第一终端接收所述第二信号的时刻之间的时长;获取第二时长,所述第二时长为所述第二终端接收所述第一信号的时刻与所述第二终端发送所述第二信号的时刻之间的时长;以及根据所述第一时长和所述第二时长,确定所述第一终端与所述第二终端之间的距离。
可选地,接入层830还用于:确定所述第一时长。第一层820具体用于:从所述第一终端的接入层获取所述第一时长。
可选地,接入层830还用于:存储第一标识与所述第一终端发送所述第一信号的时刻的第一对应关系,所述第一标识对应于所述第二终端。接入层830具体用于:确定所述第一终端接收所述第二信号的时刻;根据所述第二信号包括的所述第一标识、以及所述第一对应关系,获取所述第一终端发送所述第一信号的时刻;根据所述第一终端发送所述第一信号的时刻和所述第一终端接收所述第二信号的时刻,确定所述第一时长。
可选地,第一层820具体用于:接收来自所述第二终端的第一层的第一消息,所述第一消息包括所述第二时长;从所述第一消息获取所述第二时长。
可选地,第一层820具体用于:接收来自所述第二终端的第一层的数据,所述数据包括所述第二时长;从所述数据获取所述第二时长。其中数据可以为PC5-U数据。
可选地,接入层830还用于:接收来自所述第二终端的接入层的第二消息,所述第二消息包括所述第二时长;从所述第二消息获取所述第二时长。第一层820具体用于:从所述第一终端的接入层获取所述第二时长。
可选地,第一层820还用于:确定所述第一终端与所述第二终端之间的距离是否满足阈值条件;当所述第一终端与所述第二终端之间的距离满足所述阈值条件时,向应用层810发送所述第一终端与所述第二终端之间的距离。
当装置800用于实现图4所示的方法实施例中第一终端的功能时,第一层820用于:向接入层830发送测距信息,所述测距信息用于指示测量所述第一终端与第二终端之间的距离。接入层830用于:根据所述测距信息,向所述第二终端发送第一信号,所述第一信号用于测量所述第一终端与所述第二终端之间的距离;接收来自所述第二终端的第二信号,所述第二信号用于响应所述第一信号;确定第一时长,所述第一时长为所述第一终端发送所述第一信号的时刻与所述第一终端接收所述第二信号的时刻之间的时长;获取第二时长,所述第二时长为所述第二终端接收所述第一信号的时刻与所述第二终端发送所述第二信号的时刻之间的时长;根据所述第一时长和所述第二时长,确定所述第一终端与所述第二终端之间的距离;以及向第一层820发送所述第一终端与所述第二终端之间的距离。
可选地,接入层830还用于:存储第一标识与所述第一终端发送所述第一信号的时刻的第一对应关系,所述第一标识对应于所述第二终端。接入层830具体用于:确定所述第一终端接收所述第二信号的时刻;根据所述第二信号包括的所述第一标识、以及所述第一对应关系,获取所述第一终端发送所述第一信号的时刻;根据所述第一终端发送所述第一信号的时刻和所述第一终端接收所述第二信号的时刻,确定所述第一时长。
可选地,接入层830具体用于:接收来自所述第二终端的第二消息,所述第二消息包括所述第二时长;从所述第二消息中获取所述第二时长。
可选地,接入层830还用于:确定所述第一终端与所述第二终端之间的距离是否满足阈值条件。接入层830具体用于:当所述第一终端与所述第二终端之间的距离满足所述阈 值条件时,向第一层820发送所述第一终端与所述第二终端之间的距离。
可选地,第一层820还用于:确定所述第一终端与所述第二终端之间的距离是否满足阈值条件;当所述第一终端与所述第二终端之间的距离满足所述阈值条件时,向应用层810发送所述第一终端与所述第二终端之间的距离。
当装置800用于实现图3或图4所示的方法实施例中第二终端的功能时,接入层810用于:接收来自第一终端的第一信号,所述第一信号用于测量所述第一终端与所述第二终端之间的距离;向所述第一终端发送第二信号,所述第二信号用于响应所述第一信号;确定第二时长,所述第二时长为所述第二终端接收所述第一信号的时刻与所述第二终端发送所述第二信号的时刻之间的时长。接入层810还用于:向所述第一终端发送所述第二时长,或者,第一层820用于:向所述第一终端发送所述第二时长。
可选地,第一层820具体用于:向所述第一终端的第一层发送第一消息,所述第一消息包括所述第二时长。
可选地,第一层820具体用于:向所述第一终端的第一层发送的数据,所述数据包括所述第二时长。其中数据可以为PC5-U数据。
可选地,接入层810具体用于:向所述第一终端的接入层发送第二消息,所述第二消息包括所述第二时长。
可选地,接入层810还用于:存储第二标识与所述第二终端接收所述第一信号的时刻的第二对应关系,所述第二标识对应于所述第一终端。接入层810具体用于:确定所述第二终端发送所述第二信号的时刻;根据所述第二信号包括的所述第二标识、以及所述第二对应关系,获取所述第二终端接收所述第一信号的时刻;根据所述第二终端接收所述第一信号的时刻和所述第二终端发送所述第二信号的时刻,确定所述第二时长。
关于上述应用层810、第一层820和接入层830更详细的描述,可参考上述方法实施例中的相关描述,在此不再说明。
如图9所示,装置900包括收发单元910和处理单元920。
当装置900用于实现图5所示的方法实施例中第一终端的功能时,收发单元910用于:向第二终端发送第一信号,所述第一信号用于测量所述第一终端与所述第二终端之间的距离;接收来自所述第二终端的第二信号,所述第二信号用于响应所述第一信号。处理单元920用于:确定第一时长,所述第一时长为所述第一终端发送所述第一信号的时刻与所述第一终端接收所述第二信号的时刻之间的时长。收发单元910还用于:接收来自所述第二终端的第一消息、第二消息或数据,所述第一消息、所述第二消息和所述数据包括第二时长,所述第二时长为所述第二终端接收所述第一信号的时刻与所述第二终端发送所述第二信号的时刻之间的时长,所述第一消息包括PC5-S消息,所述第二消息包括PC5-RRC消息,所述数据可以为PC5-U数据。处理单元920还用于:根据所述第一时长和所述第二时长,确定所述第一终端与所述第二终端之间的距离。
可选地,处理单元920还用于:存储第一标识与所述第一终端发送所述第一信号的时刻的第一对应关系,所述第一标识对应于所述第二终端。处理单元920具体用于:确定所述第一终端接收所述第二信号的时刻;根据所述第二信号包括的所述第一标识、以及所述第一对应关系,获取所述第一终端发送所述第一信号的时刻;根据所述第一终端发送所述第一信号的时刻和所述第一终端接收所述第二信号的时刻,确定所述第一时长。
可选地,收发单元910还用于:接收来自所述第二终端的测距信息,所述测距信息用于指示测量所述第一终端与所述第二终端之间的距离;向所述第二终端发送所述第一终端与所述第二终端之间的距离。
可选地,装置900包括应用层和网络层。在此情况下,可以由网络层实现上述收发单元910和处理单元920的功能。具体可以包括:网络层向第二终端发送第一信号;网络层接收来自第二终端的第二信号;网路层根据发送第一信号的时刻以及接收第二信号的时刻确定第一时长;网络层根据接收第一信号的时刻以及发送第二信号的时刻确定第二时长;网络层接收来自第二终端的第一消息、第二消息或数据,其中,第一消息、第二消息、和数据包括第二时长;网络层根据第一时长和第二时长确定第一终端与第二终端之间的距离。可选地,应用层向网络层发送测距信息,其中测距信息用于指示测量第一终端与第二终端之间的距离,在此情况下,网络层根据测距信息向第二终端发送第一信号。
可选地,装置900包括应用层、第一层和接入层。在此情况下,可以由第一层和接入层相配合以实现上述收发单元910和处理单元920的功能。更详细的描述可以参考装置800的描述,在此不再赘述。可选地,应用层向第一层发送测距信息,其中测距信息用于指示测量第一终端与第二终端之间的距离;第一层向接入层发送测距信息,在此情况下,接入层根据测距信息向第二终端发送第一信号。
当装置900用于实现图5所示的方法实施例中第二终端的功能时,收发单元910用于:接收来自第一终端的第一信号,所述第一信号用于测量所述第一终端与所述第二终端之间的距离;向所述第一终端发送所述第二信号,所述第二信号用于响应所述第一信号。处理单元920用于:确定第二时长,所述第二时长为所述第二终端接收所述第一信号的时刻与所述第二终端发送所述第二信号的时刻之间的时长。收发单元910还用于:向所述第一终端发送第一消息、第二消息或数据,所述第一消息、所述第二消息和所述数据包括所述第二时长,所述第一消息包括PC5-S消息,所述第二消息包括PC5-RRC消息,所述数据可以为PC5-U数据。
可选地,处理单元920还用于:存储第二标识与所述第二终端接收所述第一信号的时刻的第二对应关系,所述第二标识对应于所述第一终端。处理单元920具体用于:确定所述第二终端发送所述第二信号的时刻;根据所述第二信号包括的所述第二标识、以及所述第二对应关系,获取所述第二终端接收所述第一信号的时刻;根据所述第二终端接收所述第一信号的时刻和所述第二终端发送所述第二信号的时刻,确定所述第二时长。
可选地,收发单元910还用于:向所述第一终端发送测距信息,所述测距信息用于指示测量所述第一终端与所述第二终端之间的距离;接收来自所述第一终端的所述第一终端与所述第二终端之间的距离。
可选地,装置900包括网络层。在此情况下,可以由网络层实现上述收发单元910和处理单元920的功能。具体可以包括:网络层接收来自第一终端的第一信号;网络层向第一终端发送第二信号;网络层确定第二时长;网络层向第一终端发送第一消息、第二消息或数据。
可选地,装置900包括应用层、第一层和接入层。在此情况下,可以由第一层和接入层相配合以实现上述收发单元910和处理单元920的功能。更详细的描述可以参考装置800的描述,在此不再赘述。
关于上述收发单元910和处理单元920更详细的描述,可参考上述方法实施例中的相关描述,在此不再说明。
如图10示,装置1000包括处理器1010。处理器1010与存储器1030耦合,存储器1030用于存储指令。当装置1000用于实现上文所述的方法时,处理器1010用于执行存储器1030中的指令,以实现上述处理单元920的功能。
可选地,装置1000还包括存储器1030。
可选地,装置1000还包括接口电路1020。处理器1010和接口电路1020之间相互耦合。可以理解的是,接口电路1020可以为收发器或输入输出接口。当装置1000用于实现上文所述的方法时,处理器1010用于执行指令,以实现上述处理单元920的功能,接口电路1020用于实现上述收发单元910的功能。
示例性地,当装置1000为应用于第一终端的芯片时,该芯片实现上述方法实施例中第一终端的功能。该芯片从第一终端中的其它模块(如射频模块或天线)接收信息,该信息是其他装置发送给第一终端的;或者,该芯片向第一终端中的其它模块(如射频模块或天线)发送信息,该信息是第一终端发送给其他装置的。
示例性地,当装置1000为应用于第二终端的芯片时,该芯片实现上述方法实施例中第二终端的功能。该芯片从第二终端中的其它模块(如射频模块或天线)接收信息,该信息是其他装置发送给第二终端的;或者,该芯片向第二终端中的其它模块(如射频模块或天线)发送信息,该信息是第二终端发送给其他装置的。
本申请还提供一种通信装置,包括处理器,该处理器与存储器耦合,存储器用于存储计算机程序或指令和/或数据,处理器用于执行存储器存储的计算机程序或指令,或读取存储器存储的数据,以执行上文各方法实施例中的方法。可选地,处理器为一个或多个。可选地,该通信装置包括存储器。可选地,存储器为一个或多个。可选地,该存储器与该处理器集成在一起,或者分离设置。
本申请还提供一种计算机可读存储介质,其上存储有用于实现上述各方法实施例中由第一终端或第二终端执行的方法的计算机指令。
本申请还提供一种计算机程序产品,包含指令,该指令被计算机执行时以实现上述各方法实施例中由第一终端或第二终端执行的方法。
本申请还提供一种通信系统,该通信系统包括上文各实施例中的第一终端或第二终端中至少一个。
上述提供的任一种装置中相关内容的解释及有益效果均可参考上文提供的对应的方法实施例,此处不再赘述。
可以理解的是,本申请的实施例中的处理器可以是中央处理单元(central processing unit,CPU),还可以是其它通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其它可编程逻辑器件、晶体管逻辑器件,硬件部件或者其任意组合。通用处理器可以是微处理器,也可以是任何常规的处理器。
本申请的实施例中的方法步骤可以通过硬件的方式来实现,也可以由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器、闪存、只读存储器、可编程只读存储器、可擦除可编程只读存储器、电可擦除 可编程只读存储器、寄存器、硬盘、移动硬盘、只读光盘存储器(compact disc read-only memory,CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。另外,该ASIC可以位于第一终端或第二终端中。当然,处理器和存储介质也可以作为分立组件存在于第一终端或第二终端中。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机程序或指令。在计算机上加载和执行所述计算机程序或指令时,全部或部分地执行本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、网络设备、用户设备或者其它可编程装置。所述计算机程序或指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机程序或指令可以从一个网站站点、计算机、服务器或数据中心通过有线或无线方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是集成一个或多个可用介质的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,例如,软盘、硬盘、磁带;也可以是光介质,例如,数字视频光盘;还可以是半导体介质,例如,固态硬盘。
在本申请的各个实施例中,如果没有特殊说明以及逻辑冲突,不同的实施例之间的术语和/或描述具有一致性、且可以相互引用,不同的实施例中的技术特征根据其内在的逻辑关系可以组合形成新的实施例。
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定。
除非另有说明,本申请实施例所使用的所有技术和科学术语与本申请的技术领域的技术人员通常理解的含义相同。本申请中所使用的术语只是为了描述具体的实施例的目的,不是旨在限制本申请的范围。应理解,上述为举例说明,上文的例子仅仅是为了帮助本领域技术人员理解本申请实施例,而非要将申请实施例限制于所示例的具体数值或具体场景。本领域技术人员根据上文所给出的例子,显然可以进行各种等价的修改或变化,这样的修改和变化也落入本申请实施例的范围内。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (38)

  1. 一种测距方法,其特征在于,所述方法包括:
    第一终端的第一层向所述第一终端的接入层发送测距信息,所述测距信息用于指示测量所述第一终端与第二终端之间的距离;
    所述第一终端的接入层根据所述测距信息,向所述第二终端发送第一信号,所述第一信号用于测量所述第一终端与所述第二终端之间的距离;
    所述第一终端的接入层接收来自所述第二终端的第二信号,所述第二信号用于响应所述第一信号;
    所述第一终端的第一层获取第一时长,所述第一时长为所述第一终端发送所述第一信号的时刻与所述第一终端接收所述第二信号的时刻之间的时长;
    所述第一终端的第一层获取第二时长,所述第二时长为所述第二终端接收所述第一信号的时刻与所述第二终端发送所述第二信号的时刻之间的时长;
    所述第一终端的第一层根据所述第一时长和所述第二时长,确定所述第一终端与所述第二终端之间的距离。
  2. 根据权利要求1所述的方法,其特征在于,所述测距信息包括:测距指示和所述第二终端的标识,所述测距指示用于指示测距操作。
  3. 根据权利要求1或2所述的方法,其特征在于,
    所述方法还包括:
    所述第一终端的接入层确定所述第一时长;
    所述第一终端的第一层获取第一时长,包括:
    所述第一终端的第一层从所述第一终端的接入层获取所述第一时长。
  4. 根据权利要求3所述的方法,其特征在于,
    所述方法还包括:
    所述第一终端的接入层存储第一标识与所述第一终端发送所述第一信号的时刻的第一对应关系,所述第一标识对应于所述第二终端;
    所述第一终端的接入层确定所述第一时长,包括:
    所述第一终端的接入层确定所述第一终端接收所述第二信号的时刻;
    所述第一终端的接入层根据所述第二信号包括的所述第一标识、以及所述第一对应关系,获取所述第一终端发送所述第一信号的时刻;
    所述第一终端的接入层根据所述第一终端发送所述第一信号的时刻和所述第一终端接收所述第二信号的时刻,确定所述第一时长。
  5. 根据权利要求4所述的方法,其特征在于,
    所述第一标识包括所述第一终端的标识和/或所述第二终端的标识,所述第一终端的标识用于标识所述第一终端与所述第二终端之间的通信。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述第一终端的第一层获取第二时长,包括:
    所述第一终端的第一层接收来自所述第二终端的第一层的第一消息,所述第一消息包 括所述第二时长;
    所述第一终端的第一层从所述第一消息获取所述第二时长。
  7. 根据权利要求6所述的方法,其特征在于,所述第一消息包括基于邻近的服务通信5-信令PC5-S消息。
  8. 根据权利要求1至5中任一项所述的方法,其特征在于,所述第一终端的第一层获取第二时长,包括:
    所述第一终端的第一层接收来自所述第二终端的第一层的数据,所述数据包括所述第二时长;
    所述第一终端的第一层从所述数据获取所述第二时长。
  9. 根据权利要求1至5中任一项所述的方法,其特征在于,
    所述方法还包括:
    所述第一终端的接入层接收来自所述第二终端的接入层的第二消息,所述第二消息包括所述第二时长;
    所述第一终端的接入层从所述第二消息获取所述第二时长;
    所述第一终端的第一层获取第二时长,包括:
    所述第一终端的接入层从所述第一终端的接入层获取所述第二时长。
  10. 根据权利要求9所述的方法,其特征在于,所述第二消息包括基于邻近的服务通信5-无线资源控制PC5-RRC消息。
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,所述方法还包括:
    所述第一终端的第一层确定所述第一终端与所述第二终端之间的距离是否满足阈值条件;
    当所述第一终端与所述第二终端之间的距离满足所述阈值条件时,所述第一终端的第一层向所述第一终端的应用层发送所述第一终端与所述第二终端之间的距离。
  12. 根据权利要求1至11中任一项所述的方法,其特征在于,所述第一层处于应用层与所述接入层之间。
  13. 根据权利要求12所述的方法,其特征在于,所述第一层为测距ranging层、基于邻近的服务ProSe层、或车到万物V2X层。
  14. 一种测距方法,其特征在于,所述方法包括:
    第一终端的第一层向所述第一终端的接入层发送测距信息,所述测距信息用于指示测量所述第一终端与第二终端之间的距离;
    所述第一终端的接入层根据所述测距信息,向所述第二终端发送第一信号,所述第一信号用于测量所述第一终端与所述第二终端之间的距离;
    所述第一终端的接入层接收来自所述第二终端的第二信号,所述第二信号用于响应所述第一信号;
    所述第一终端的接入层确定第一时长,所述第一时长为所述第一终端发送所述第一信号的时刻与所述第一终端接收所述第二信号的时刻之间的时长;
    所述第一终端的接入层获取第二时长,所述第二时长为所述第二终端接收所述第一信号的时刻与所述第二终端发送所述第二信号的时刻之间的时长;
    所述第一终端的接入层根据所述第一时长和所述第二时长,确定所述第一终端与所述 第二终端之间的距离;
    所述第一终端的接入层向所述第一终端的第一层发送所述第一终端与所述第二终端之间的距离。
  15. 根据权利要求14所述的方法,其特征在于,所述测距信息包括:测距指示和所述第二终端的标识,所述测距指示用于指示测距操作。
  16. 根据权利要求14或15所述的方法,其特征在于,
    所述方法还包括:
    所述第一终端的接入层存储第一标识与所述第一终端发送所述第一信号的时刻的第一对应关系,所述第一标识对应于所述第二终端;
    所述第一终端的接入层确定第一时长,包括:
    所述第一终端的接入层确定所述第一终端接收所述第二信号的时刻;
    所述第一终端的接入层根据所述第二信号包括的所述第一标识、以及所述第一对应关系,获取所述第一终端发送所述第一信号的时刻;
    所述第一终端的接入层根据所述第一终端发送所述第一信号的时刻和所述第一终端接收所述第二信号的时刻,确定所述第一时长。
  17. 根据权利要求16所述的方法,其特征在于,
    所述第一标识包括所述第一终端的标识和/或所述第二终端的标识,所述第一终端的标识用于标识所述第一终端与所述第二终端之间的通信。
  18. 根据权利要求14至17中任一项所述的方法,其特征在于,所述第一终端的接入层获取第二时长,包括:
    所述第一终端的接入层接收来自所述第二终端的第二消息,所述第二消息包括所述第二时长;
    所述第一终端的接入层获取第二时长,包括:
    所述第一终端的接入层从所述第二消息获取所述第二时长。
  19. 根据权利要求18所述的方法,其特征在于,所述第二消息包括基于邻近的服务通信5-无线资源控制PC5-RRC消息。
  20. 根据权利要求14至19中任一项所述的方法,其特征在于,
    所述方法还包括:
    所述第一终端的接入层确定所述第一终端与所述第二终端之间的距离是否满足阈值条件;
    所述第一终端的接入层向所述第一终端的第一层发送所述第一终端与所述第二终端之间的距离,包括:
    当所述第一终端与所述第二终端之间的距离满足所述阈值条件时,所述第一终端的接入层向所述第一终端的第一层发送所述第一终端与所述第二终端之间的距离。
  21. 根据权利要求14至20中任一项所述的方法,其特征在于,所述第一层处于应用层与所述接入层之间。
  22. 根据权利要求21所述的方法,其特征在于,所述第一层为测距ranging层、基于邻近的服务ProSe层、或车到万物V2X层。
  23. 一种测距方法,其特征在于,所述方法包括:
    第二终端的接入层接收来自第一终端的第一信号,所述第一信号用于测量所述第一终端与所述第二终端之间的距离;
    所述第二终端的接入层向所述第一终端发送第二信号,所述第二信号用于响应所述第一信号;
    所述第二终端的接入层确定第二时长,所述第二时长为所述第二终端接收所述第一信号的时刻与所述第二终端发送所述第二信号的时刻之间的差值;
    所述第二终端向所述第一终端发送所述第二时长。
  24. 根据权利要求23所述的方法,其特征在于,所述第二终端向所述第一终端发送所述第二时长,包括:
    所述第二终端的第一层向所述第一终端的第一层发送第一消息,所述第一消息包括所述第二时长。
  25. 根据权利要求24所述的方法,其特征在于,所述第一消息包括基于邻近的服务通信5-信令PC5-S消息。
  26. 根据权利要求23所述的方法,其特征在于,所述第二终端向所述第一终端发送所述第二时长,包括:
    所述第二终端的第一层向所述第一终端的第一层发送数据,所述数据包括所述第二时长。
  27. 根据权利要求23所述的方法,其特征在于,所述第二终端向所述第一终端发送所述第二时长,包括:
    所述第二终端的接入层向所述第一终端的接入层发送第二消息,所述第二消息包括所述第二时长。
  28. 根据权利要求27所述的方法,其特征在于,所述第二消息包括基于邻近的服务通信5-无线资源控制PC5-RRC消息。
  29. 根据权利要求23至28中任一项所述的方法,其特征在于,
    所述方法还包括:
    所述第二终端的接入层存储第二标识与所述第二终端接收所述第一信号的时刻的第二对应关系,所述第二标识对应于所述第一终端;
    所述第二终端的接入层确定第二时长,包括:
    所述第二终端的接入层确定所述第二终端发送所述第二信号的时刻;
    所述第二终端的接入层根据所述第二信号包括的所述第二标识、以及所述第二对应关系,获取所述第二终端接收所述第一信号的时刻;
    所述第二终端的接入层根据所述第二终端接收所述第一信号的时刻和所述第二终端发送所述第二信号的时刻,确定所述第二时长。
  30. 根据权利要求29所述的方法,其特征在于,
    所述第二标识包括所述第一终端的标识和/或所述第二终端的标识,所述第二终端的标识用于标识所述第二终端与所述第一终端之间的通信。
  31. 根据权利要求24至26中任一项所述的方法,其特征在于,所述第一层处于应用层与所述接入层之间。
  32. 根据权利要求31所述的方法,其特征在于,所述第一层为测距ranging层、基于 邻近的服务ProSe层、或车到万物V2X层。
  33. 一种通信装置,其特征在于,包括:
    处理器,用于执行存储器中存储的计算机程序,以使得所述装置执行如权利要求1至13中任一项所述的方法,或者执行如权利要求14至22中任一项所述的方法,或者执行如权利要求23至32中任一项所述的方法。
  34. 根据权利要求33所述的装置,其特征在于,所述装置还包括所述存储器。
  35. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求1至13中任一项所述的方法,或者执行如权利要求14至22中任一项所述的方法,或者执行如权利要求23至32中任一项所述的方法。
  36. 一种计算机程序产品,其特征在于,所述计算机程序产品包括用于执行如权利要求1至13中任一项所述的方法的指令,或者包括执行如权利要求14至22中任一项所述的方法的指令,或者包括执行如权利要求23至32中任一项所述的方法的指令。
  37. 一种通信系统,其特征在于,包括:第一终端和第二终端;
    所述第一终端,用于执行如权利要求1至22中任一项所述的方法;
    所述第二终端,用于执行如权利要求23至32中任一项所述的方法。
  38. 一种芯片,其特征在于,所述芯片包括处理器与通信接口,所述处理器通过所述通信接口读取存储器上存储的指令,执行如权利要求1至32中任一项所述的方法。
PCT/CN2023/096568 2022-06-24 2023-05-26 一种测距方法和通信装置 WO2023246427A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210726824.1A CN117319920A (zh) 2022-06-24 2022-06-24 一种测距方法和通信装置
CN202210726824.1 2022-06-24

Publications (1)

Publication Number Publication Date
WO2023246427A1 true WO2023246427A1 (zh) 2023-12-28

Family

ID=89287193

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/096568 WO2023246427A1 (zh) 2022-06-24 2023-05-26 一种测距方法和通信装置

Country Status (3)

Country Link
CN (1) CN117319920A (zh)
TW (1) TW202402071A (zh)
WO (1) WO2023246427A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104335666A (zh) * 2012-05-23 2015-02-04 高通股份有限公司 用于使用设备到设备通信来支持基于ims的服务的方法和装置
CN111641964A (zh) * 2018-02-07 2020-09-08 Oppo广东移动通信有限公司 无线通信方法和设备
CN111989592A (zh) * 2020-07-16 2020-11-24 北京小米移动软件有限公司 同步系统中的测距方法、装置、设备及可读存储介质
WO2021093710A1 (zh) * 2019-11-11 2021-05-20 大唐移动通信设备有限公司 一种进行定位的方法、终端及网络侧设备
JP2022051622A (ja) * 2020-09-22 2022-04-01 株式会社Soken 測位装置
WO2022247831A1 (zh) * 2021-05-25 2022-12-01 华为技术有限公司 终端设备的通信方法、装置和系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104335666A (zh) * 2012-05-23 2015-02-04 高通股份有限公司 用于使用设备到设备通信来支持基于ims的服务的方法和装置
CN111641964A (zh) * 2018-02-07 2020-09-08 Oppo广东移动通信有限公司 无线通信方法和设备
WO2021093710A1 (zh) * 2019-11-11 2021-05-20 大唐移动通信设备有限公司 一种进行定位的方法、终端及网络侧设备
CN111989592A (zh) * 2020-07-16 2020-11-24 北京小米移动软件有限公司 同步系统中的测距方法、装置、设备及可读存储介质
JP2022051622A (ja) * 2020-09-22 2022-04-01 株式会社Soken 測位装置
WO2022247831A1 (zh) * 2021-05-25 2022-12-01 华为技术有限公司 终端设备的通信方法、装置和系统

Also Published As

Publication number Publication date
TW202402071A (zh) 2024-01-01
CN117319920A (zh) 2023-12-29

Similar Documents

Publication Publication Date Title
US20230029714A1 (en) Authorization method, policy control function device, and access and mobility management function device
WO2020206582A1 (zh) 一种用于中继通信的方法和装置
EP3952213B1 (en) Communication method, apparatus, and system
WO2022017285A1 (zh) 报文转发方法、装置及系统
WO2021134701A1 (zh) D2d通信方法、装置及系统
US20220070967A1 (en) Communications method, apparatus, and system
WO2020001319A1 (zh) 动态组网方法、设备及系统
WO2022033543A1 (zh) 一种中继通信方法及通信装置
WO2022022322A1 (zh) 访问本地网络的方法和装置
WO2024000412A1 (zh) 通信方法和通信装置
WO2022267652A1 (zh) 一种通信方法、通信装置及通信系统
WO2023246427A1 (zh) 一种测距方法和通信装置
CN114071649A (zh) 访问本地网络的方法和装置
WO2023197737A1 (zh) 报文发送方法、pin管理方法、通信装置及通信系统
WO2023071847A1 (zh) 一种业务转移方法及通信装置
WO2023185062A1 (zh) 一种备份方法、通信装置及通信系统
WO2023272670A1 (zh) 一种网络连接的方法、装置及系统
WO2023005440A1 (zh) 通信方法、通信装置及通信系统
WO2023029488A1 (zh) 一种通信方法及装置
WO2023061207A1 (zh) 一种通信方法、通信装置及通信系统
WO2023169225A1 (zh) 一种pin管理方法、通信装置及通信系统
WO2023020046A1 (zh) 一种通信方法及通信装置
WO2024074148A1 (zh) 通信方法、装置及系统
WO2023179331A1 (zh) 一种发送数据包的方法、通信装置及通信系统
WO2023216696A1 (zh) 信息处理的方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23826076

Country of ref document: EP

Kind code of ref document: A1