Ranging method and apparatus

By performing ranging during the discovery process in a wireless communication system and protecting the integrity of the message, the problem of resource and power consumption in the ranging process in the prior art is solved, and a more efficient and secure ranging method is achieved.

CN117223300BActive Publication Date: 2025-12-30BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202280000702.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-11
Publication Date
2025-12-30
Estimated Expiration
2042-03-11

AI Technical Summary

Technical Problem

In wireless communication systems, the authentication and discovery process before ranging consumes a lot of network resources and leads to increased terminal power consumption.

Method used

Ranging is performed during the discovery process. Ranging calculations are performed through inter-terminal solicitation and solicitation response messages, and the integrity of the messages is protected to ensure security.

Benefits of technology

It reduces network resource consumption and saves terminal power consumption, while improving the security of the ranging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117223300B_ABST
    Figure CN117223300B_ABST
Patent Text Reader

Abstract

The present disclosure provides a ranging method and device, and a ranging verification method and device. The technical solution of the present disclosure comprises: a target terminal sends an inquiry message comprising a measurement signal to an observation terminal (S201); the observation terminal feeds back an inquiry response message comprising a feedback measurement signal to the target terminal in the case of matching with the target terminal (S202); and the observation terminal calculates the distance between the observation terminal and the target terminal based on the measurement signal and the feedback measurement signal (S203). Thus, the ranging between the two terminals can be performed in the discovery process, thereby reducing the network resource consumption and saving the power consumption of the terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of mobile communication technology, and in particular to a ranging method and apparatus, as well as a ranging verification method and apparatus. Background Technology

[0002] In wireless communication systems, distance measurement is required to enable communication between two terminals. Currently, a series of processes such as authentication and discovery need to be performed before distance measurement can be performed. When there is a large demand for distance measurement, this consumes a lot of network resources and causes significant power consumption by the terminals. Summary of the Invention

[0003] This disclosure proposes a ranging method and apparatus that can perform ranging during the discovery process, thereby reducing network resource consumption and saving terminal power consumption.

[0004] This disclosure proposes a ranging verification method and apparatus, which enables network devices to verify terminals to determine whether a terminal is allowed to perform ranging during the discovery process, and also to verify terminals to determine whether a terminal is allowed to perform ranging on another terminal during the discovery process.

[0005] A first aspect of this disclosure provides a ranging method executed by a first terminal, wherein the first terminal is a terminal that initiates a discovery-measurement combination process for performing ranging during discovery. The method includes: sending an inquiry message to a second terminal, wherein the second terminal is a terminal that will be discovered to perform the discovery-measurement combination process, the inquiry message instructing the second terminal to perform a discovery match with the first terminal, and the inquiry message includes a measurement signal; receiving an inquiry response message from the second terminal in response to the inquiry message, wherein the inquiry response message is sent by the second terminal when it determines that it is matched with the first terminal, and the inquiry response message includes a feedback measurement signal; and calculating the distance between the second terminal and the first terminal based on the measurement signal and the feedback measurement signal.

[0006] Optionally, before sending the query message to the second terminal, the method further includes: performing integrity protection on the query message.

[0007] Optionally, the integrity protection of the solicitation message includes: calculating a message verification code based on security parameters received from the first local public land mobile network (HPLMN) network element of the first terminal's first local public land mobile network (HPLMN); and appending the message verification code to the end of the solicitation message to protect the integrity of the solicitation message.

[0008] Optionally, the query response message is an integrity-protected message, and the method further includes: verifying the integrity of the query response message; wherein calculating the distance to the second terminal based on the measurement signal and the feedback measurement signal includes: if the integrity of the query response message is successfully verified, calculating the distance to the second terminal based on the measurement signal and the feedback measurement signal.

[0009] Optionally, verifying the integrity of the query response message includes: verifying the integrity of the query response message based on security parameters received from the first DDNMF network element.

[0010] Optionally, the method further includes: sending a first discovery request message to a first DDNMF network element, wherein the first discovery request message is used to request the execution of a discovery measurement combination procedure; receiving a discovery response message fed back by the first DDNMF network element when it determines that the first terminal is allowed to perform ranging on the second terminal during the discovery process, wherein the discovery response message includes parameter information for the discovery measurement combination procedure; wherein sending a solicitation message to the second terminal includes: sending a solicitation message to the second terminal when the first terminal is allowed to perform ranging on the second terminal during the discovery process.

[0011] Optionally, the first discovery request message includes a discovery measurement combination process instruction, which is used to request verification of whether the first terminal is allowed to perform ranging on the second terminal during the discovery process.

[0012] A second aspect of this disclosure provides a ranging method executed by a second terminal, wherein the second terminal is a terminal to be discovered for a discovery-measurement combination process, the discovery-measurement combination process being used to perform ranging during the discovery process, the method comprising: receiving an inquiry message sent by a first terminal, wherein the first terminal is the terminal initiating the discovery-measurement combination process, the inquiry message being used to instruct the second terminal to perform a discovery match with the first terminal, and the inquiry message including a measurement signal; and, if the second terminal determines that it is matched with the first terminal, sending an inquiry response message back to the first terminal, wherein the inquiry response message includes a feedback measurement signal, wherein the measurement signal and the feedback measurement signal are used to determine the distance between the first terminal and the second terminal.

[0013] Optionally, the solicitation message is an integrity-protected message, and the method further includes: verifying the integrity of the solicitation message; wherein feeding back the solicitation response message to the first terminal includes: feeding back the solicitation response message to the first terminal if the integrity of the solicitation message is successfully verified.

[0014] Optionally, verifying the integrity of the solicitation message includes: verifying the integrity of the solicitation message based on security parameters received from the second local public land mobile network (HPLMN) second proximity service discovery management function (DDNMF) network element of the second terminal.

[0015] Optionally, before sending the query response message to the first terminal, the method further includes: performing integrity protection on the query response message.

[0016] Optionally, the method further includes: the integrity protection of the query response message includes: calculating a message verification code based on security parameters received from the second DDNMF network element; and appending the message verification code to the end of the query response message to protect the integrity of the query response message.

[0017] Optionally, the method further includes: sending a second discovery request message to the second DDNMF network element, wherein the second discovery request message is used to request the execution of a discovery measurement combination procedure; and receiving a discovery response message fed back by the second DDNMF network element when it determines that the second terminal is allowed to perform ranging during the discovery process, wherein the discovery response message includes parameter information for the discovery measurement combination procedure; wherein feeding back the solicitation response message to the first terminal includes: feeding back the solicitation response message to the first terminal when the second terminal determines that it matches the first terminal and the second terminal is allowed to perform ranging during the discovery process.

[0018] Optionally, the second discovery request message includes a discovery measurement combination verification instruction, which is used to request verification of whether the second terminal is allowed to perform ranging during the discovery process.

[0019] A third aspect of this disclosure provides a ranging verification method, the method being executed by a first proximity service discovery management function (DDNMF) network element of a first local public terrestrial mobile network (HPLMN) of a first terminal. The method includes: receiving a first discovery request message sent by the first terminal, wherein the first discovery request message is used to request execution of a discovery measurement combination process and indicates that the first terminal sending the first discovery request message is the terminal initiating the discovery measurement combination process, the discovery measurement combination process being used to perform ranging during the discovery process; and responding to the first discovery request message, sending a first discovery measurement combination process verification request to a ranging application server, the ranging application server being used to verify the first discovery measurement combination process. The system verifies whether the first terminal is allowed to perform ranging during the discovery process; receives the verification result from the ranging application server, and if the verification result indicates that the first terminal is allowed to perform ranging during the discovery process, forwards the first discovery request message to the second DDNMF network element of the second HPLMN of the second terminal, the second terminal being the terminal to be discovered for the discovery measurement combination process; receives the discovery response message fed back by the second DDNMF network element if it determines that the first terminal is allowed to perform ranging on the second terminal during the discovery process, wherein the discovery response message includes parameter information for the discovery measurement combination process; and sends the discovery response message to the first terminal.

[0020] Optionally, the parameter information includes security parameters for integrity protection and / or verification of the specified information.

[0021] Optionally, the first discovery request message includes a discovery measurement combination process instruction, which is used to request verification of whether the first terminal is allowed to perform ranging during the discovery process and to verify whether the first terminal is allowed to perform ranging on the second terminal during the discovery process.

[0022] A fourth aspect of this disclosure provides a ranging verification method, the method being executed by a second proximity service discovery management function (DDNMF) network element of a second local public terrestrial mobile network (HPLMN) of a second terminal. The method includes: receiving a second discovery request message sent by the second terminal, wherein the second discovery request message requests execution of a discovery measurement combination procedure and indicates that the second terminal sending the second discovery request message is a terminal to be discovered for performing the discovery measurement combination procedure, the discovery measurement combination procedure being used to perform ranging during the discovery process; responding to the second discovery request message, sending a second discovery measurement combination procedure verification request to a ranging application server, the ranging application server verifying whether the second terminal is allowed to perform ranging during the discovery process based on the second discovery measurement combination procedure verification request to obtain a second verification result; receiving the second verification result from the ranging application server; if the second verification result indicates that the second terminal is allowed to perform ranging during the discovery process, generating second parameter information for the discovery measurement combination procedure of the second terminal; and sending a second discovery response message including the second parameter information to the second terminal.

[0023] Optionally, the method further includes: receiving a first discovery request message forwarded by a first DDNMF network element of a first HPLMN of a first terminal, the first discovery request message being used to request the execution of a discovery measurement combination process and indicating that the first terminal sending the first discovery request message is the terminal initiating the discovery measurement combination process; responding to the first discovery request message, sending a third discovery measurement combination process verification request to the ranging application server, the ranging application server verifying whether the first terminal is allowed to perform ranging on the second terminal during the discovery process based on the third discovery measurement combination process verification request to obtain a first verification result; receiving the first verification result from the ranging application server; generating first parameter information for the discovery measurement combination process of the first terminal if the first verification result indicates that the first terminal is allowed to perform ranging on the second terminal during the discovery process; and sending a first discovery response message including the first parameter information to the first DDNMF network element.

[0024] Optionally, the first parameter information and the second parameter information each include security parameters for integrity protection and / or verification of the specified information.

[0025] Optionally, the second discovery request message includes a second discovery measurement combination procedure instruction, which is used to request verification of whether the second terminal is allowed to perform ranging during the discovery process.

[0026] Optionally, the first discovery request message includes a first discovery measurement combination procedure instruction, which is used to request verification of whether the first terminal is allowed to perform ranging on the second terminal during the discovery process.

[0027] A fifth aspect of this disclosure provides a ranging verification method, the method comprising: receiving a first discovery measurement combination process verification request sent by a first DDNMF network element of a first local public terrestrial mobile network (HPLMN) of a first terminal, wherein the first terminal is a terminal that initiates the discovery measurement combination process, the discovery measurement combination process is used to perform ranging during the discovery process, and the first discovery measurement combination process verification request is used to request verification of whether the first terminal is allowed to perform ranging during the discovery process; verifying whether the first terminal is allowed to perform ranging during the discovery process to obtain an intermediate verification result; feeding back the intermediate verification result to the first DDNMF network element; and receiving a second DDNMF request from a second terminal of a second HPLMN. The third discovery measurement combination process verification request sent by the NMF network element, wherein the second terminal is a terminal to be discovered for the discovery measurement combination process, the third discovery measurement combination process verification request is used to request verification whether the first terminal is allowed to perform ranging on the second terminal during the discovery process; to verify whether the first terminal is allowed to perform ranging on the second terminal during the discovery process to obtain a first verification result; and to feed back the first verification result to the second DDNMF network element, the second DDNMF network element generating first parameter information for the discovery measurement combination process of the first terminal if the first verification result indicates that the first terminal is allowed to perform ranging on the second terminal during the discovery process.

[0028] Optionally, the method further includes: receiving a second discovery measurement combination process verification request sent by the second DDNMF network element, the second discovery measurement combination process verification request being used to request verification of whether the second terminal is allowed to perform ranging during the discovery process; verifying whether the second terminal is allowed to perform ranging during the discovery process to obtain a second verification result; and feeding back the second verification result to the second DDNMF network element, the second DDNMF network element generating second parameter information for the discovery measurement combination process of the second terminal if the second verification result indicates that the second terminal is allowed to perform ranging during the discovery process.

[0029] A sixth aspect of this disclosure provides a ranging device applied to a first terminal, wherein the first terminal is a terminal that initiates a discovery-measurement combination process, the discovery-measurement combination process being used to perform ranging during the discovery process. The device includes: a transceiver module, configured to: send an inquiry message to a second terminal, wherein the second terminal is a terminal that will be discovered to perform the discovery-measurement combination process, the inquiry message being used to instruct the second terminal to perform a discovery match with the first terminal, and the inquiry message including a measurement signal; receive an inquiry response message from the second terminal in response to the inquiry message, wherein the inquiry response message is sent when the second terminal determines that it is matched with the first terminal, and the inquiry response message including a feedback measurement signal; and a processing module, configured to calculate the distance between the device and the second terminal based on the measurement signal and the feedback measurement signal.

[0030] A seventh aspect embodiment of this disclosure provides a ranging device applied to a second terminal, wherein the second terminal is a terminal to be discovered for a discovery-measurement combination process, the discovery-measurement combination process being used to perform ranging during the discovery process, the device comprising: a transceiver module, configured to: receive an inquiry message sent by a first terminal, wherein the first terminal is the terminal initiating the discovery-measurement combination process, the inquiry message being used to instruct the second terminal to perform discovery matching with the first terminal, and the inquiry message including a measurement signal; and, if the second terminal determines that it is matched with the first terminal, to send an inquiry response message back to the first terminal, wherein the inquiry response message includes a feedback measurement signal, wherein the measurement signal and the feedback measurement signal are used to determine the distance between the first terminal and the second terminal.

[0031] An eighth aspect embodiment of this disclosure provides a ranging verification apparatus applied to a first proximity service discovery management function (DDNMF) network element of a first local public terrestrial mobile network (HPLMN) for a first terminal. The apparatus includes a transceiver module configured to: receive a first discovery request message sent by the first terminal, wherein the first discovery request message requests the execution of a discovery measurement combination process and indicates that the first terminal sending the first discovery request message is the terminal initiating the discovery measurement combination process, the discovery measurement combination process being used to perform ranging during the discovery process; and, in response to the first discovery request message, send a first discovery measurement combination process verification request to a ranging application server, the ranging application server being configured to verify the first discovery measurement combination process based on the first discovery measurement... The system performs a combined verification request to verify whether the first terminal is allowed to perform ranging during the discovery process; receives the verification result from the ranging application server, and if the verification result indicates that the first terminal is allowed to perform ranging during the discovery process, forwards the first discovery request message to the second DDNMF network element of the second HPLMN of the second terminal, where the second terminal is the terminal to be discovered for the discovery measurement combined process; receives a discovery response message from the second DDNMF network element if it determines that the first terminal is allowed to perform ranging on the second terminal during the discovery process, wherein the discovery response message includes parameter information for the discovery measurement combined process; and sends the discovery response message to the first terminal.

[0032] A ninth aspect embodiment of this disclosure provides a ranging verification apparatus applied to the execution of a second proximity service discovery management function (DDNMF) network element in a second local public terrestrial mobile network (HPLMN) of a second terminal. The apparatus includes a transceiver module and a processing module. The transceiver module is configured to: receive a second discovery request message sent by the second terminal, wherein the second discovery request message requests the execution of a discovery measurement combination procedure and indicates that the second terminal sending the second discovery request message is a terminal to be discovered for the discovery measurement combination procedure, the discovery measurement combination procedure being used to perform ranging during the discovery process; in response to the second discovery request message, send a second discovery measurement combination procedure verification request to a ranging application server, the ranging application server verifying whether the second terminal is allowed to perform ranging during the discovery process based on the second discovery measurement combination procedure verification request to obtain a second verification result; and receive the second verification result from the ranging application server. The processing module is configured to generate second parameter information for the discovery measurement combination procedure of the second terminal if the second verification result indicates that the second terminal is allowed to perform ranging during the discovery process. The transceiver module is further configured to send a second discovery response message including the second parameter information to the second terminal.

[0033] A tenth aspect embodiment of this disclosure provides a ranging verification apparatus, the apparatus comprising a transceiver module and a processing module; the transceiver module is configured to receive a first discovery measurement combination process verification request sent by a first DDNMF network element of a first local public terrestrial mobile network (HPLMN) of a first terminal, wherein the first terminal is a terminal initiating a discovery measurement combination process, the discovery measurement combination process is used to perform ranging during the discovery process, and the first discovery measurement combination process verification request is used to request verification of whether the first terminal is allowed to perform ranging during the discovery process; the processing module is configured to verify whether the first terminal is allowed to perform ranging during the discovery process to obtain an intermediate verification result; the transceiver module is further configured to feed back the intermediate verification result to the first DDNMF network element; and receive a second HP from a second terminal. The LMN's second DDNMF network element sends a third discovery measurement combination process verification request, wherein the second terminal is a terminal to be discovered for the discovery measurement combination process. The third discovery measurement combination process verification request is used to request verification of whether the first terminal is allowed to perform ranging on the second terminal during the discovery process. The processing module is also used to verify whether the first terminal is allowed to perform ranging on the second terminal during the discovery process to obtain a first verification result. The transceiver module is also used to feed back the first verification result to the second DDNMF network element. The second DDNMF network element generates first parameter information for the discovery measurement combination process of the first terminal when the first verification result indicates that the first terminal is allowed to perform ranging on the second terminal during the discovery process.

[0034] The eleventh aspect of this disclosure provides a communication device, including: a transceiver; a memory; and a processor, respectively connected to the transceiver and the memory, configured to control the wireless signal transmission and reception of the transceiver by executing computer-executable instructions on the memory, and capable of implementing the ranging method of the first or second aspect embodiment or the ranging verification method of the third, fourth or fifth aspect embodiment described above.

[0035] The twelfth aspect of this disclosure provides a computer storage medium storing computer-executable instructions; the computer-executable instructions, when executed by a processor, can implement the ranging method of the first or second aspect embodiment, or the ranging verification method of the third, fourth, or fifth aspect embodiment.

[0036] This disclosure provides a ranging method and apparatus. An observation terminal (i.e., the terminal initiating the discovery-measurement combination process) sends a solicitation message including a measurement signal to a target terminal (i.e., a candidate terminal participating in the discovery-measurement combination process, typically located near the observation terminal). If the target terminal matches the observation terminal, it sends a solicitation response message including a feedback measurement signal back to the observation terminal. The observation terminal can calculate the distance between itself and the target terminal using the measurement signal and the feedback measurement signal. Therefore, ranging between the two terminals can be performed during the discovery process, thereby reducing network resource consumption and saving terminal power consumption.

[0037] This disclosure also provides a ranging verification method and apparatus. The network device can verify an observation terminal to determine whether the observation terminal is permitted to perform ranging during the discovery process and whether it is permitted to perform ranging on a specific target terminal during the discovery process. Furthermore, the network device can verify a target terminal to determine whether the target terminal is permitted to perform ranging during the discovery process. Thus, it is possible to verify whether the terminal can perform the discovery-measurement combination process.

[0038] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description

[0039] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:

[0040] Figure 1 This is a schematic diagram illustrating the orientation of one terminal relative to another terminal.

[0041] Figure 2 This is a flowchart illustrating a ranging method according to an embodiment of the present disclosure;

[0042] Figure 3 This is a flowchart illustrating a ranging method according to an embodiment of the present disclosure;

[0043] Figure 4 This is a flowchart illustrating a ranging method according to an embodiment of the present disclosure;

[0044] Figure 5 This is a flowchart illustrating a ranging method according to an embodiment of the present disclosure;

[0045] Figure 6 This is a flowchart illustrating a method for obtaining discovery measurement combination information according to an embodiment of the present disclosure;

[0046] Figure 7 This is a flowchart illustrating a ranging method according to an embodiment of the present disclosure;

[0047] Figure 8 This is a flowchart illustrating a ranging method according to an embodiment of the present disclosure;

[0048] Figure 9 This is a flowchart illustrating a ranging method according to an embodiment of the present disclosure;

[0049] Figure 10 This is a flowchart illustrating a ranging method according to an embodiment of the present disclosure;

[0050] Figure 11 This is a flowchart illustrating a method for obtaining discovery measurement combination information according to an embodiment of the present disclosure;

[0051] Figure 12 This is a flowchart illustrating a ranging method according to an embodiment of the present disclosure;

[0052] Figure 13 This is a flowchart illustrating a ranging verification method according to an embodiment of the present disclosure;

[0053] Figure 14 This is a flowchart illustrating a ranging verification method according to an embodiment of the present disclosure;

[0054] Figure 15 This is a flowchart illustrating a ranging verification method according to an embodiment of the present disclosure;

[0055] Figure 16 This is a flowchart illustrating a ranging verification method according to an embodiment of the present disclosure;

[0056] Figure 17 This is a flowchart illustrating a ranging verification method according to an embodiment of the present disclosure;

[0057] Figure 18 This is a schematic flowchart of a discovery measurement combination process according to an embodiment of the present disclosure;

[0058] Figure 19 This is a block diagram of a ranging device according to an embodiment of the present disclosure;

[0059] Figure 20 This is a block diagram of a ranging device according to an embodiment of the present disclosure;

[0060] Figure 21 This is a block diagram of a ranging verification device according to an embodiment of the present disclosure;

[0061] Figure 22 This is a block diagram of a ranging verification device according to an embodiment of the present disclosure;

[0062] Figure 23 This is a block diagram of a ranging verification device according to an embodiment of the present disclosure;

[0063] Figure 24 This is a schematic diagram of the structure of a communication device provided in an embodiment of the present disclosure;

[0064] Figure 25 This is a schematic diagram of the structure of a chip provided in an embodiment of the present disclosure. Detailed Implementation

[0065] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.

[0066] According to 3GPP protocols, ranging-based services refer to services provided using the distance between two terminals and / or the orientation of one terminal relative to another. In a three-dimensional context, the orientation of one terminal relative to another includes both horizontal and vertical directions, such as... Figure 1 As shown. The first terminal has a reference plane and a reference direction. The horizontal direction (azimuth) of the second terminal relative to the first terminal is indicated by the angle between the reference direction and the projection of the line connecting the first and second terminals onto the reference plane. The vertical direction of the second terminal relative to the first terminal is indicated by the angle on the horizontal plane. Some range-based services only require distance measurement, some only require direction measurement, and others require both distance and direction measurement.

[0067] For ranging-based services that only require distance measurement, Time of Flight (ToF) can be used to measure the path length between two terminals. Assuming radio frequency (RF) is used to acquire the ToF signal, the first terminal sends a measurement signal to the second terminal, and the second terminal, upon receiving the measurement signal, sends it back to the first terminal. The first terminal determines the distance between itself and the second terminal based on the ToF of the measurement signal. For example, assuming the time interval between the first terminal sending the measurement signal and receiving the measurement signal from the second terminal is Δt2, and the time interval between the second terminal receiving the measurement signal and sending it back is Δt1, and the signal transmission speed is C, then the distance between the first and second terminals is (Δt2 - Δt1) × C / 2.

[0068] Currently, to enable communication between two terminals, a series of processes such as authentication and discovery need to be performed before ranging can be performed. When there is a high demand for ranging, this consumes significant network resources and causes substantial power consumption in the terminals. To reduce network resource consumption and terminal power consumption, it is desirable to simplify the required processes as much as possible.

[0069] To this end, this disclosure proposes a ranging method and apparatus, which enables the terminal to perform ranging during the discovery process, thereby reducing network resource consumption and saving terminal power consumption.

[0070] In addition, this disclosure also proposes a ranging verification method and apparatus, which enables network devices to verify terminals to determine whether terminals are allowed to perform ranging during the discovery process, and to verify terminals to determine whether terminals are allowed to perform ranging on another terminal during the discovery process.

[0071] The aforementioned discovery-measurement combination process is used to perform ranging during the discovery process. In the following text, for the sake of simplicity, the terminal that initiates the discovery-measurement combination process may be referred to as the observation terminal, and the other terminal may be referred to as the target terminal (i.e., the candidate terminal that will be discovered to participate in the discovery-measurement combination process).

[0072] The ranging method and apparatus, as well as the ranging verification method and apparatus provided in this application, are described in detail below with reference to the accompanying drawings.

[0073] Figure 2 This is a flowchart illustrating a ranging method according to an embodiment of the present disclosure. Figure 2 As shown, the method can be executed by an observation terminal and includes the following steps.

[0074] S201, send a query message to the target terminal.

[0075] The solicitation message is used to instruct the observation terminal and the target terminal to perform discovery matching, and the solicitation message includes a measurement signal to indicate that the observation terminal expects to perform ranging during the discovery process.

[0076] S202, Receive the query response message from the target terminal in response to the query message.

[0077] The solicitation response message is sent by the target terminal when it determines that it matches the observation terminal, and the solicitation response message includes a feedback measurement signal. In some embodiments, the solicitation response message includes the feedback measurement signal and the time difference between receiving the solicitation message and the feedback solicitation response message. Optionally, the solicitation response message may also include a discovery message type, which will be described in detail below.

[0078] After receiving the query message sent by the observation terminal, the target terminal can perform a discovery process to determine whether the target terminal matches the observation terminal. If the target terminal matches the observation terminal, it can send a query response message including feedback measurement signals to the observation terminal.

[0079] In some embodiments, if the target terminal and the observation terminal do not match, the target terminal may not send a query response message to the observation terminal, which means that the target terminal and the observation terminal cannot communicate.

[0080] S203 calculates the distance to the target terminal based on the measurement signal and the feedback measurement signal.

[0081] After receiving a query response message that includes feedback measurement signals, the observation terminal can calculate the distance between the observation terminal and the target terminal based on the measurement signals and the feedback measurement signals.

[0082] In some embodiments, if the observation terminal does not receive a query response message from the target terminal within a preset time period, the observation terminal can determine that the target terminal does not match the observation terminal and will not communicate with the target terminal.

[0083] According to the ranging method of this disclosure, an observation terminal sends a query message including a measurement signal to a target terminal. If the target terminal matches the observation terminal, it sends a query response message including a feedback measurement signal back to the observation terminal. The observation terminal can then calculate the distance between itself and the target terminal based on the measurement signal and the feedback measurement signal. Therefore, ranging between the two terminals can be performed during the discovery process, thereby reducing network resource consumption and saving terminal power consumption.

[0084] Figure 3 A flowchart illustrating a ranging method according to an embodiment of the present disclosure is shown. Figure 3 As shown, the method can be executed by an observation terminal and includes the following steps.

[0085] S301 protects the integrity of the solicitation message.

[0086] The solicitation message is used to instruct the observation terminal and the target terminal to perform discovery matching, and the solicitation message includes a measurement signal to indicate that the observation terminal expects to perform ranging during the discovery process.

[0087] In some embodiments, step S301 may include the following steps.

[0088] S3011, calculates the message verification code based on the security parameters received from the Direct Discovery Name Management Function (DDNMF) network element of the observation terminal's local public land mobile network (HPLMN).

[0089] In this implementation, the observation terminal can calculate the message verification code based on the security parameters received from the DDNMF network element of the observation terminal's HPLMN. In one example, this security parameter can be the Discovery User Integrity Key (DUIK), and the observation terminal calculates the message verification code (MIC) based on the DUIK.

[0090] S3012 appends a message verification code to the end of the request message to protect the integrity of the request message.

[0091] After the observation terminal calculates the MIC, it can append the MIC to the end of the solicitation message to protect the integrity of the solicitation message.

[0092] S302, send an integrity-protected query message to the target terminal.

[0093] After performing integrity protection on the query message, the observation terminal sends the integrity-protected query message to the target terminal.

[0094] S303, Receive the query response message from the target terminal in response to the query message protected by integrity.

[0095] After receiving the integrity-protected query message, the target terminal needs to verify the integrity of the query message. Specifically, the target terminal can verify the query message according to the DUIK. If the verification is successful, the target terminal will send a query response message to the observation terminal; otherwise, it will not send a query response message.

[0096] The query response message is sent when the target terminal determines that it matches the observation terminal, and the query response message includes a feedback measurement signal.

[0097] After successfully verifying the integrity-protected solicitation message, the target terminal can perform a discovery process to determine whether it matches the observation terminal. If the target terminal matches the observation terminal, it can send a solicitation response message, including feedback measurement signals, to the observation terminal.

[0098] In other embodiments, if the target terminal and the observation terminal are not matched, the target terminal may not send a query response message to the observation terminal, which means that the target terminal and the observation terminal cannot communicate.

[0099] S304 calculates the distance to the target terminal based on the measurement signal and the feedback measurement signal.

[0100] For a description and specific details of step S304 above, please refer to the relevant description and details of step S203 above.

[0101] According to the ranging method of this disclosure, after protecting the integrity of the solicitation message, the observation terminal sends an integrity-protected solicitation message to the target terminal. If the target terminal matches the observation terminal, it sends a solicitation response message to the observation terminal, including a feedback measurement signal. The observation terminal can calculate the distance between itself and the target terminal based on the measurement signal in the solicitation message and the feedback measurement signal. Therefore, ranging between the two terminals can be performed during the discovery process, thereby reducing network resource consumption and saving terminal power consumption. Furthermore, since the solicitation message is integrity-protected, it can be prevented from being tampered with, thus improving the security of the solicitation message.

[0102] Figure 4 A flowchart illustrating a ranging method according to an embodiment of the present disclosure is shown. Figure 4 As shown, the method can be executed by an observation terminal and includes the following steps.

[0103] S401, send a query message to the target terminal.

[0104] For a description and specific details of step S401 above, please refer to the relevant description and details of step S201 above.

[0105] S402, Receive the integrity-protected query response message from the target terminal in response to the query message.

[0106] The integrity-protected query response message is sent when the target terminal determines that it matches the observation terminal, and the integrity-protected query response message includes a feedback measurement signal.

[0107] After receiving the query message sent by the observation terminal, the target terminal can perform a discovery process to determine whether the target terminal matches the observation terminal. If the target terminal matches the observation terminal, it can send a query response message to the observation terminal, including feedback measurement signals.

[0108] To prevent the query response message from being tampered with, the target terminal can send the integrity-protected query response message to the observation terminal after performing integrity protection on the message. Specifically, the target terminal can calculate a message verification code based on security parameters received from the DDNMF network element of its HPLMN, and append the verification code to the end of the query response message to protect its integrity. In one example, this security parameter can be a DUIK; the target terminal calculates the MIC based on the DUIK and appends the MIC to the end of the query response message.

[0109] In other embodiments, if the target terminal and the observation terminal are not matched, the target terminal may not send a query response message to the observation terminal, which means that the target terminal and the observation terminal cannot communicate.

[0110] S403, Verify the integrity of the integrity-protected query response message.

[0111] If the observation terminal receives an integrity-protected query response message, the observation terminal needs to perform integrity verification on the query response message.

[0112] In some embodiments, step S403 may include the following steps.

[0113] S4031, based on the security parameters received from the DDNMF network element of the HPLMN of the observation terminal, verify the integrity of the integrity-protected query response message.

[0114] In one example, the observation terminal can verify the query response message received from the DDNMF network element using the DUIK verification query message.

[0115] S404: If the integrity-protected query response message is successfully verified, the distance to the target terminal is calculated based on the measurement signal and the feedback measurement signal.

[0116] For a description and specific details of step S404 above, please refer to the relevant description and details of step S203 above.

[0117] According to the ranging method of this disclosure, an observation terminal sends a solicitation message including a measurement signal to a target terminal. If the target terminal matches the observation terminal, it sends a solicitation response message including a feedback measurement signal back to the observation terminal. This solicitation response message is an integrity-protected message. The observation terminal can calculate the distance between itself and the target terminal based on the measurement signal and the feedback measurement signal. Therefore, ranging between the two terminals can be performed during the discovery process, thereby reducing network resource consumption and saving terminal power consumption. Furthermore, since the solicitation response message is an integrity-protected message, it can be prevented from being tampered with, thus improving the security of the solicitation response message.

[0118] Figure 5 A flowchart illustrating a ranging method according to an embodiment of the present disclosure is shown. Figure 5 As shown, the method can be executed by an observation terminal and includes the following steps.

[0119] S501 protects the integrity of the solicitation message.

[0120] For a description and specific details of step S501 above, please refer to the relevant description and details of step S301 above.

[0121] S502 sends an integrity-protected query message to the target terminal.

[0122] For a description and specific details of step S502 above, please refer to the relevant description and details of step S302 above.

[0123] S503, Receive the integrity-protected query response message from the target terminal in response to the integrity-protected query message.

[0124] For a description and specific details of step S503 above, please refer to the relevant descriptions and details of steps S303 and S402 above.

[0125] S504, Verify the integrity of the integrity-protected query response message.

[0126] For a description and specific details of step S504 above, please refer to the relevant description and details of step S403 above.

[0127] S505: If the integrity-protected query response message is successfully verified, the distance to the target terminal is calculated based on the measurement signal and the feedback measurement signal.

[0128] For a description and specific details of step S505 above, please refer to the relevant description and details of step S404 above.

[0129] According to the ranging method of this disclosure, after the observation terminal performs integrity protection on the solicitation message, it sends an integrity-protected solicitation message to the target terminal. If the target terminal matches the observation terminal, it sends an integrity-protected solicitation response message back to the observation terminal. The observation terminal can calculate the distance between itself and the target terminal based on the measurement signal in the solicitation message and the feedback measurement signal in the solicitation response message. Therefore, ranging between the two terminals can be performed during the discovery process, thereby reducing network resource consumption and saving terminal power consumption. Furthermore, since both the solicitation message and the solicitation response message are integrity-protected, tampering with the solicitation message and the solicitation response message can be avoided, thus improving the security of the solicitation message and the solicitation response message.

[0130] Figure 6 A flowchart illustrating a ranging method according to an embodiment of the present disclosure is shown. Figure 6 As shown, the method can be executed by an observation terminal and includes the following steps.

[0131] S601, send a first discovery request message to the DDNMF network element of the HPLMN of the observation terminal.

[0132] The first discovery request message is used to request the execution of the discovery measurement combination process.

[0133] The DDNMF network element of the HPLMN of the observation terminal is used to send a first discovery measurement combination process verification request to the ranging application server in response to a first discovery request message. The ranging application server is used to verify whether the observation terminal is allowed to perform ranging during the discovery process based on the first discovery measurement combination process verification request. If the verification result indicates that the observation terminal is allowed to perform ranging during the discovery process, the DDNMF network element of the HPLMN of the observation terminal forwards the first discovery request message to the DDNMF network element of the HPLMN of the target terminal. The DDNMF network element of the HPLMN of the target terminal responds to the first discovery request message and sends a third discovery measurement combination process verification request to the ranging application server. The ranging application server is used to verify whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process based on the third discovery measurement combination process verification request. If the verification result indicates that the observation terminal is allowed to perform ranging on the target terminal during the discovery process, the DDNMF network element of the HPLMN of the target terminal generates parameter information for the discovery measurement combination process of the observation terminal.

[0134] In some embodiments, the first discovery request message may include a discovery measurement combination procedure instruction. The discovery measurement combination procedure instruction is used to request verification of whether the observation terminal is permitted to perform ranging during the discovery process.

[0135] In other words, the DDNMF network element of the HPLMN of the observation terminal can autonomously respond to the first discovery request message by sending a first discovery measurement combination process verification request to the ranging application server. That is, in response to any first discovery request message, the DDNMF network element of the HPLMN of the observation terminal sends a first discovery measurement combination process verification request to the ranging application server to verify whether the observation terminal is allowed to perform ranging during the discovery process.

[0136] Alternatively, the DDNMF network element of the HPLMN of the observation terminal sends a first discovery measurement combination process verification request to the ranging application server according to the discovery measurement combination process instruction in the first discovery request message. That is, only in response to the first discovery request message including the discovery measurement combination process instruction, the DDNMF network element of the HPLMN of the observation terminal sends a first discovery measurement combination process verification request to the ranging application server to verify whether the observation terminal is allowed to perform ranging during the discovery process.

[0137] In some embodiments, the first discovery request message further includes an additional discovery measurement combination procedure instruction, which is used to request verification of whether the observation terminal is permitted to perform ranging on the target terminal during the discovery process.

[0138] In other words, the DDNMF network element of the HPLMN of the target terminal can autonomously respond to the first discovery request message by sending a third discovery measurement combination process verification request to the ranging application server. That is, in response to any first discovery request message, the DDNMF network element of the HPLMN of the target terminal sends a third discovery measurement combination process verification request to the ranging application server to verify whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process.

[0139] Alternatively, the DDNMF network element of the HPLMN of the target terminal sends a third discovery measurement combination process verification request to the ranging application server according to another discovery measurement combination process instruction in the first discovery request message. That is, only in response to the first discovery request message including another discovery measurement combination process instruction, the DDNMF network element of the HPLMN of the target terminal sends a third discovery measurement combination process verification request to the ranging application server to verify whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process.

[0140] S602, receive a discovery response message from the DDNMF network element when it determines that the observed terminal is allowed to perform ranging on the target terminal during the discovery process.

[0141] The response message includes parameter information.

[0142] When the DDNMF network element is allowed to perform ranging on the target terminal during the discovery process based on the verification results, it can generate parameter information and feed back the discovery response message including the parameter information to the observation terminal, so that the observation terminal can obtain the parameter information used for the discovery measurement combination process.

[0143] S603, if the observation terminal is permitted to perform ranging on the target terminal during the discovery process, sends a solicitation message to the target terminal.

[0144] If the observation terminal obtains the parameter information for the discovery measurement combination process from the DDNMF network element, it means that the observation terminal is allowed to perform ranging on the target terminal during the discovery process, and the observation terminal can send a solicitation message to the target terminal.

[0145] For a description and specific details of step S603 above, please refer to the relevant description and details of step S201 above.

[0146] S604, Receive the query response message from the target terminal in response to the query message.

[0147] For a description and specific details of step S604 above, please refer to the relevant description and details of step S202 above.

[0148] S605 calculates the distance to the target terminal based on the measurement signal and the feedback measurement signal.

[0149] For a description and specific details of step S605 above, please refer to the relevant description and details of step S203 above.

[0150] It is worth noting that this embodiment is... Figure 2 Based on the illustrated embodiment, steps S601-S602 of this embodiment are described in conjunction with... Figure 2 The steps S201-S203 shown are combined, but it should be noted that steps S601-S602 in this embodiment can also be combined with... Figure 3 The S301-S304 shown are combined with, and Figure 4 The steps S401-S404 shown are combined with... Figure 5 The steps S501-S505 shown are combined and will not be discussed further here.

[0151] According to the ranging method of this disclosure, the observation terminal needs to be verified before sending a query message including a measurement signal to the target terminal. If the observation terminal is verified as permitted to perform ranging on the target terminal during the discovery process, it sends a query message to the target terminal. If the target terminal matches the observation terminal, it sends a query response message including a feedback measurement signal back to the observation terminal. The observation terminal can then calculate the distance between itself and the target terminal based on the measurement signal and the feedback measurement signal. Therefore, ranging between the two terminals can be performed during the discovery process, thereby reducing network resource consumption and saving terminal power consumption.

[0152] Figure 7 This is a flowchart illustrating a ranging method according to an embodiment of the present disclosure. Figure 7 As shown, the method can be executed by the target terminal and includes the following steps.

[0153] S701 receives query messages sent by the observation terminal.

[0154] The solicitation message is used to instruct the observation terminal and the target terminal to perform discovery matching, and the solicitation message includes a measurement signal to indicate that the observation terminal expects to perform ranging during the discovery process.

[0155] S702, when the target terminal is determined to be matched with the observation terminal, sends a query response message to the observation terminal.

[0156] The query response message includes a feedback measurement signal, which is used to determine the distance between the observation terminal and the target terminal.

[0157] After receiving a query message containing measurement signals from the observation terminal, the target terminal can perform a discovery process to determine whether the target terminal matches the observation terminal. If the target terminal matches the observation terminal, it can send a query response message containing feedback measurement signals to the observation terminal.

[0158] In some embodiments, if the target terminal and the observation terminal do not match, the target terminal may not send a query response message to the observation terminal, which means that the target terminal and the observation terminal cannot communicate.

[0159] After receiving a query response message that includes feedback measurement signals, the observation terminal can calculate the distance between the observation terminal and the target terminal based on the measurement signals and the feedback measurement signals.

[0160] In some embodiments, if the observation terminal does not receive a query response message from the target terminal within a preset time period, the observation terminal can determine that the target terminal does not match the observation terminal and will not communicate with the target terminal.

[0161] According to the ranging method of this disclosure, an observation terminal sends a query message including a measurement signal to a target terminal. If the target terminal matches the observation terminal, it sends a query response message including a feedback measurement signal back to the observation terminal. The observation terminal can then calculate the distance between itself and the target terminal based on the measurement signal and the feedback measurement signal. Therefore, ranging between the two terminals can be performed during the discovery process, thereby reducing network resource consumption and saving terminal power consumption.

[0162] Figure 8 A flowchart illustrating a ranging method according to an embodiment of the present disclosure is shown. Figure 8 As shown, the method can be executed by the target terminal and includes the following steps.

[0163] S801 receives an integrity-protected query message sent by the observation terminal.

[0164] The observation terminal can send the integrity-protected solicitation message to the target terminal after performing integrity protection on the solicitation message. The integrity-protected solicitation message is used to instruct the observation terminal and the target terminal to perform discovery matching and includes measurement signals to indicate that the observation terminal expects to perform ranging during the discovery process.

[0165] Specifically, the observation terminal can calculate a message verification code based on the security parameters received from the DDNMF network element of its HPLMN, and append the message verification code to the end of the solicitation message to protect its integrity. In one example, this security parameter can be a DUIK; the observation terminal calculates the MIC based on the DUIK and appends the MIC to the end of the solicitation message.

[0166] S802, verify the integrity of the integrity-protected solicitation message.

[0167] If the target terminal receives an integrity-protected query message, the target terminal needs to perform integrity verification on the query message.

[0168] In some embodiments, step S802 may include the following steps.

[0169] S8021 verifies the integrity of the integrity-protected solicitation message based on the security parameters received from the DDNMF network element of the HPLMN of the target terminal.

[0170] In one example, the target terminal can verify the query message using the DUIK received from the DDNMF network element.

[0171] S803: If the integrity of the integrity-protected solicitation message is successfully verified, and the target terminal is determined to match the observation terminal, a solicitation response message is sent back to the observation terminal.

[0172] The query response message includes a feedback measurement signal, which is used to determine the distance between the observation terminal and the target terminal.

[0173] For a description and specific details of step S803 above, please refer to the relevant description and details of step S702 above.

[0174] According to the ranging method of this disclosure, after the observation terminal performs integrity protection on the solicitation message, it sends an integrity-protected solicitation message to the target terminal. If the target terminal matches the observation terminal, it sends a solicitation response message to the observation terminal, including a feedback measurement signal. The observation terminal can calculate the distance between itself and the target terminal based on the measurement signal in the solicitation message and the feedback measurement signal. Therefore, ranging between the two terminals can be performed during the discovery process, thereby reducing network resource consumption and saving terminal power consumption. Furthermore, since the solicitation message is integrity-protected, it can be prevented from being tampered with, thus improving the security of the solicitation message.

[0175] Figure 9 A flowchart illustrating a ranging method according to an embodiment of the present disclosure is shown. Figure 9 As shown, the method can be executed by the target terminal and includes the following steps.

[0176] S901 receives query messages sent by the observation terminal.

[0177] For a description and specific details of step S901 above, please refer to the relevant description and details of step S701 above.

[0178] S902, when the target terminal is determined to match the observation terminal, performs integrity protection on the query response message.

[0179] The integrity-protected query response message includes a feedback measurement signal, which, along with the feedback measurement signal, is used to determine the distance between the observation terminal and the target terminal.

[0180] After receiving a query message containing measurement signals from the observation terminal, the target terminal can perform a discovery process to determine if it matches the observation terminal. If the target terminal matches the observation terminal, it can send a query response message containing feedback measurement signals to the observation terminal. To prevent the query response message from being tampered with, the target terminal can perform integrity protection on the query response message before sending it to the observation terminal.

[0181] In some embodiments, if the target terminal and the observation terminal do not match, the target terminal may not send a query response message to the observation terminal, which means that the target terminal and the observation terminal cannot communicate.

[0182] In some embodiments, step S902 may include the following steps.

[0183] S9021 calculates the message verification code based on the security parameters received from the DDNMF network element of the HPLMN of the target terminal.

[0184] In this implementation, the target terminal can calculate the message verification code based on the security parameters received from the DDNMF network element of the target terminal's HPLMN. In one example, this security parameter can be the Discovery User Integrity Key (DUIK), and the observation terminal calculates the message verification code (MIC) based on the DUIK.

[0185] S9022 appends a message verification code to the end of the query response message to protect the integrity of the query response message.

[0186] After calculating the MIC, the target terminal can append the MIC to the end of the query response message to protect the integrity of the query response message.

[0187] S903 sends an integrity-protected query response message to the observation terminal.

[0188] After performing integrity protection on the query response message, the target terminal sends the integrity-protected query response message to the observation terminal.

[0189] After receiving the integrity-protected query response message, the observation terminal needs to verify its integrity. Specifically, the observation terminal can verify the query response message according to the DUIK. If the verification passes, the observation terminal can calculate the distance between the observation terminal and the target terminal based on the measurement signal and the feedback measurement signal.

[0190] In some embodiments, if the observation terminal does not receive a query response message from the target terminal within a preset time period, the observation terminal can determine that the target terminal does not match the observation terminal and will not communicate with the target terminal.

[0191] According to the ranging method of this disclosure, an observation terminal sends a solicitation message including a measurement signal to a target terminal. If the target terminal matches the observation terminal, it sends a solicitation response message including a feedback measurement signal back to the observation terminal. This solicitation response message is an integrity-protected message. The observation terminal can calculate the distance between itself and the target terminal based on the measurement signal and the feedback measurement signal. Therefore, ranging between the two terminals can be performed during the discovery process, thereby reducing network resource consumption and saving terminal power consumption. Furthermore, since the solicitation response message is an integrity-protected message, it can be prevented from being tampered with, thus improving the security of the solicitation response message.

[0192] Figure 10 A flowchart illustrating a ranging method according to an embodiment of the present disclosure is shown. Figure 10 As shown, the method can be executed by an observation terminal and includes the following steps.

[0193] S1001, Receive the integrity-protected query message sent by the observation terminal.

[0194] For a description and specific details of step S1001 above, please refer to the relevant description and details of step S801 above.

[0195] S1002, Verify the integrity of the integrity-protected solicitation message.

[0196] For a description and specific details of step S1002 above, please refer to the relevant description and details of step S802 above.

[0197] S1003: If the integrity of the integrity-protected solicitation message is successfully verified, and the target terminal is determined to match the observation terminal, the integrity of the solicitation response message is protected.

[0198] For a description and specific details of step S1003 above, please refer to the relevant description and details of step S902 above.

[0199] S1004, send an integrity-protected query response message to the observation terminal.

[0200] For a description and specific details of step S1004 above, please refer to the relevant description and details of step S903 above.

[0201] According to the ranging method of this disclosure, after the observation terminal performs integrity protection on the solicitation message, it sends an integrity-protected solicitation message to the target terminal. If the target terminal matches the observation terminal, it sends an integrity-protected solicitation response message back to the observation terminal. The observation terminal can calculate the distance between itself and the target terminal based on the measurement signal in the solicitation message and the feedback measurement signal in the solicitation response message. Therefore, ranging between the two terminals can be performed during the discovery process, thereby reducing network resource consumption and saving terminal power consumption. Furthermore, since both the solicitation message and the solicitation response message are integrity-protected, tampering with the solicitation message and the solicitation response message can be avoided, thus improving the security of the solicitation message and the solicitation response message.

[0202] Figure 11 A flowchart illustrating a ranging method according to an embodiment of the present disclosure is shown, as follows: Figure 11 As shown, the method can be executed by the target terminal and includes the following steps.

[0203] S1101, send a second discovery request message to the DDNMF network element of the HPLMN of the target terminal.

[0204] The second discovery request message is used to request the execution of the discovery measurement combination process.

[0205] The DDNMF network element is used to send a second discovery measurement combination process verification request to the ranging application server in response to the second discovery request message. The ranging application server is used to verify whether the target terminal is allowed to perform ranging during the discovery process based on the second discovery measurement combination process verification request. If the verification result indicates that the target terminal is allowed to perform ranging during the discovery process, the DDNMF network element generates parameter information for the discovery measurement combination process.

[0206] In some embodiments, the second discovery request message includes a discovery measurement combination process instruction, which is used to request verification of whether the target terminal is permitted to perform ranging during the discovery process.

[0207] In other words, the DDNMF network element can autonomously respond to the second discovery request message by sending a second discovery measurement combination process verification request to the ranging application server. That is, in response to any second discovery request message, the DDNMF network element sends a second discovery measurement combination process verification request to the ranging application server to verify whether the target terminal is allowed to perform ranging during the discovery process.

[0208] Alternatively, the DDNMF network element sends a second discovery measurement combination process verification request to the ranging application server according to the discovery measurement combination process instruction in the second discovery request message. That is, only in response to the second discovery request message including the discovery measurement combination process instruction, the DDNMF network element sends a second discovery measurement combination process verification request to the ranging application server to verify whether the target terminal is allowed to perform ranging during the discovery process.

[0209] S1102, Receive the discovery response message fed back by the DDNMF network element when it determines that the target terminal is allowed to perform ranging during the discovery process.

[0210] The response message includes parameter information.

[0211] The DDNMF network element generates parameter information when the target terminal is allowed to perform ranging during the discovery process based on the verification results. It can also feed back a discovery response message including the parameter information to the target terminal, so that the target terminal can obtain the parameter information used for the discovery measurement combination process.

[0212] S1103 receives a query message sent by the observation terminal.

[0213] For a description and specific details of step S1103 above, please refer to the relevant description and details of step S701 above.

[0214] S1104, when the target terminal is determined to be matched with the observation terminal and the target terminal is allowed to perform ranging during the discovery process, a query response message is sent back to the observation terminal.

[0215] The query response message includes a feedback measurement signal, which is used to determine the distance between the observation terminal and the target terminal.

[0216] After receiving a query message containing measurement signals from the observation terminal, the target terminal can perform a discovery process to determine whether the target terminal matches the observation terminal. If the target terminal matches the observation terminal, it can send a query response message containing feedback measurement signals to the observation terminal.

[0217] In some embodiments, if the target terminal matches the observation terminal but the target terminal is not allowed to perform ranging during the discovery process, the target terminal may send a query response message to the observation terminal that does not include feedback measurement signals, in order to indicate that the target terminal cannot participate in the discovery measurement combination process.

[0218] In other embodiments, if the target terminal and the observation terminal are not matched, the target terminal may not send a query response message to the observation terminal, which means that the target terminal and the observation terminal cannot communicate.

[0219] After receiving a query response message that includes feedback measurement signals, the observation terminal can calculate the distance between the observation terminal and the target terminal based on the measurement signals and the feedback measurement signals.

[0220] In some embodiments, if the observation terminal receives a query response message that does not include a feedback measurement signal, the observation terminal needs to perform ranging on the target terminal after the discovery process is completed.

[0221] In other embodiments, if the observation terminal does not receive a query response message from the target terminal within a preset time period, the observation terminal can determine that the target terminal does not match the observation terminal and will not communicate with the target terminal.

[0222] It is worth noting that this embodiment is... Figure 7 Based on the illustrated embodiment, steps S1101-S1102 of this embodiment are described. Figure 7 The steps S701-S703 shown are combined, but it should be noted that steps S1101-S1102 in this embodiment can also be combined with... Figure 8 The S801-S803 shown are combined with, and Figure 9 The steps S901-S903 shown are combined with... Figure 10 The steps S1001-S1004 shown are combined and will not be discussed further here.

[0223] According to the ranging method of this disclosure, an observation terminal sends a query message including a measurement signal to a target terminal. If the target terminal matches the observation terminal and is permitted to perform ranging during the discovery process, it sends a query response message including a feedback measurement signal back to the observation terminal. The observation terminal can then calculate the distance between itself and the target terminal based on the measurement signal and the feedback measurement signal. Therefore, ranging between the two terminals can be performed during the discovery process, thereby reducing network resource consumption and saving terminal power consumption.

[0224] Figure 12 A flowchart illustrating a ranging method according to an embodiment of the present disclosure is shown. Figure 12 As shown, the method can be executed by both the observation terminal and the target terminal, and includes the following steps.

[0225] S1201, observation terminal 1 sends solicitation messages to target terminal 2, target terminal 3, target terminal 4, and target terminal 5 respectively. These solicitation messages include measurement signals. In some examples, in addition to measurement signals, the solicitation messages may also include discovery message types, etc.

[0226] S1202, the target terminal matched with observation terminal 1 sends a query response message back to observation terminal 1. This query response message includes a feedback measurement signal and the time difference between receiving the query message and sending the query response message. In some examples, the query response message may also include a discovery message type, etc.

[0227] exist Figure 12 In the example shown, target terminal 2 and target terminal 3 are matched with observation terminal 1, so S1202 includes S1202a and S1202b.

[0228] In S1202a, the target terminal 2 feeds back to the observation terminal 1, including the feedback measurement signal and the time difference ΔT. 21 The inquiry and response message.

[0229] In S1202a, the target terminal 3 feeds back to the observation terminal 1, including the feedback measurement signal and the time difference ΔT. 31 The inquiry and response message.

[0230] S1203, Observation terminal 1 calculates the time difference between sending the query message and receiving the query response message based on the received query response message, and calculates the distance between itself and the target terminal that sends the query response message based on the calculated time difference and the time difference contained in the query response message.

[0231] exist Figure 12 In the example shown, the observation terminal 1 calculates the time difference ΔT between sending the query message and receiving the query response message from the target terminal 2. 12 Therefore, the distance between observation terminal 1 and target terminal 2 can be calculated as (ΔT). 12 -ΔT 21 )x C / 2; Observation terminal 1 calculates the time difference ΔT between sending the query message and receiving the query response message from target terminal 3. 13 Therefore, the distance between observation terminal 1 and target terminal 3 can be calculated as (ΔT). 13 –ΔT 31 )xC / 2.

[0232] Figure 13 A flowchart illustrating a ranging verification method according to an embodiment of the present disclosure is shown. Figure 13 As shown, this method can be executed by the DDNMF network element of the HPLMN of the observation terminal, and includes the following steps.

[0233] S1301, Receive the first discovery request message sent by the observation terminal.

[0234] The first discovery request message is used to request the execution of the discovery measurement combination process and to indicate that the terminal that sends the first discovery request message is the observation terminal. That is, the DDNMF network element of the HPLMN of the observation terminal can know that the first discovery request message comes from the observation terminal based on the received first discovery request message.

[0235] S1302, in response to the first discovery request message, a first discovery measurement combination process verification request is sent to the ranging application server.

[0236] After receiving the first discovery request message, the DDNMF network element of the HPLMN of the observation terminal can send a first discovery measurement combination process verification request to the ranging application server. The ranging application server will then verify whether the observation terminal is allowed to perform ranging during the discovery process based on the first discovery measurement combination verification request.

[0237] In some embodiments, the first discovery request message may include a discovery measurement combination procedure instruction. The discovery measurement combination procedure instruction is used to request verification of whether the observation terminal is permitted to perform ranging during the discovery process.

[0238] In other words, the DDNMF network element of the HPLMN of the observation terminal can autonomously respond to the first discovery request message by sending a first discovery measurement combination process verification request to the ranging application server. That is, in response to any first discovery request message, the DDNMF network element of the HPLMN of the observation terminal sends a first discovery measurement combination process verification request to the ranging application server to verify whether the observation terminal is allowed to perform ranging during the discovery process.

[0239] Alternatively, the DDNMF network element of the HPLMN of the observation terminal sends a first discovery measurement combination process verification request to the ranging application server according to the discovery measurement combination process instruction in the first discovery request message. That is, only in response to the first discovery request message including the discovery measurement combination process instruction, the DDNMF network element of the HPLMN of the observation terminal sends a first discovery measurement combination process verification request to the ranging application server to verify whether the observation terminal is allowed to perform ranging during the discovery process.

[0240] S1303: Receive the verification result from the ranging application server, and if the verification result indicates that the observation terminal is allowed to perform ranging during the discovery process, forward the first discovery request message to the DDNMF network element of the HPLMN of the target terminal.

[0241] The DDNMF network element of the HPLMN of the observation terminal receives the verification result from the ranging application server. If the verification result indicates that the observation terminal is allowed to perform ranging during the discovery process, the DDNMF network element of the HPLMN of the observation terminal forwards the first discovery request message to the DDNMF network element of the HPLMN of the target terminal.

[0242] S1304, Receive a discovery response message from the DDNMF network element of the HPLMN of the target terminal when it is determined that the observing terminal is allowed to perform ranging on the target terminal during the discovery process.

[0243] Upon receiving the first discovery request message forwarded by the observer terminal's HPLMN's DDNMF network element, the target terminal's HPLMN's DDNMF network element will send a third discovery measurement combination procedure verification request to the ranging application server. The ranging application server will then verify, based on this request, whether the observer terminal is permitted to perform ranging on the target terminal during the discovery process. If the verification result from the ranging application server indicates that the observer terminal is permitted to perform ranging on the target terminal during the discovery process, the target terminal's HPLMN's DDNMF network element generates parameter information for the observer terminal's discovery measurement combination procedure. The target terminal's HPLMN's DDNMF network element then sends a discovery response message, including the parameter information, back to the observer terminal's HPLMN's DDNMF network element.

[0244] In some embodiments, the first discovery request message forwarded by the HPLMN's DDNMF network element of the observing terminal may include an additional discovery measurement combination procedure instruction. This additional discovery measurement combination procedure instruction is used to request verification of whether the observing terminal is permitted to perform ranging on the target terminal during the discovery process.

[0245] In other words, the DDNMF network element of the HPLMN of the target terminal can autonomously respond to the first discovery request message by sending a third discovery measurement combination process verification request to the ranging application server. That is, in response to any first discovery request message, the DDNMF network element of the HPLMN of the target terminal sends a third discovery measurement combination process verification request to the ranging application server to verify whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process.

[0246] Alternatively, the DDNMF network element of the HPLMN of the target terminal sends a third discovery measurement combination process verification request to the ranging application server according to another discovery measurement combination process instruction in the first discovery request message. That is, only in response to the first discovery request message including another discovery measurement combination process instruction, the DDNMF network element of the HPLMN of the target terminal sends a third discovery measurement combination process verification request to the ranging application server to verify whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process.

[0247] In some embodiments, the parameter information may include security parameters for integrity protection and / or verification of specified information. For example, the parameter information may include security parameters for integrity protection of the solicitation message, so that the observation terminal can send the solicitation information to the target terminal after integrity protection based on the security parameters. As another example, the parameter information may include security parameters for integrity verification of the solicitation response message, so that the observation terminal can verify the integrity of the solicitation response message after receiving it with integrity protection based on the security parameters.

[0248] S1305, a discovery response message is sent to the observation terminal.

[0249] According to the ranging verification method of this embodiment, the network device can verify the observation terminal to determine whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process.

[0250] Figure 14 A flowchart illustrating a ranging verification method according to an embodiment of the present disclosure is shown. Figure 14 As shown, this method can be executed by the DDNMF network element of the HPLMN of the target terminal, and includes the following steps.

[0251] S1401, Receive the second discovery request message sent by the target terminal.

[0252] The second discovery request message is used to request the execution of the discovery measurement combination procedure and to indicate that the terminal that sends the second discovery request message is the target terminal. That is, the DDNMF network element of the HPLMN of the target terminal can know that the second discovery request message comes from the target terminal based on the received second discovery request message.

[0253] S1402, in response to the second discovery request message, a second discovery measurement combination process verification request is sent to the ranging application server.

[0254] After receiving the second discovery request message, the DDNMF network element of the HPLMN of the target terminal can send a second discovery measurement combination process verification request to the ranging application server. The ranging application server will then verify whether the target terminal is allowed to perform ranging during the discovery process based on the second discovery measurement combination verification request.

[0255] In some embodiments, the second discovery request message may include a discovery measurement combination procedure instruction. The discovery measurement combination procedure instruction is used to request verification of whether the target terminal is permitted to perform ranging during the discovery process.

[0256] In other words, the DDNMF network element of the HPLMN of the target terminal can autonomously respond to the second discovery request message by sending a second discovery measurement combination process verification request to the ranging application server. That is, in response to any second discovery request message, the DDNMF network element of the HPLMN of the target terminal sends a second discovery measurement combination process verification request to the ranging application server to verify whether the target terminal is allowed to perform ranging during the discovery process.

[0257] Alternatively, the DDNMF network element of the HPLMN of the target terminal sends a second discovery measurement combination process verification request to the ranging application server according to the discovery measurement combination process instruction in the second discovery request message. That is, only in response to the second discovery request message including the discovery measurement combination process instruction, the DDNMF network element of the HPLMN of the target terminal sends a second discovery measurement combination process verification request to the ranging application server to verify whether the target terminal is allowed to perform ranging during the discovery process.

[0258] S1403, Receive verification results from the ranging application server indicating whether the target terminal is allowed to perform ranging during the discovery process.

[0259] S1404, if the verification result indicates that the target terminal is allowed to perform ranging during the discovery process, generate second parameter information for the discovery measurement combination procedure for the target terminal.

[0260] If the verification result returned by the ranging application server indicates that the target terminal is allowed to perform ranging during the discovery process, the DDNMF network element of the target terminal's HPLMN generates the second parameter information.

[0261] In some embodiments, the second parameter information may include security parameters for integrity protection and / or verification of specified information. For example, the second parameter information may include security parameters for integrity protection of the query response message, so that the target terminal can send the query response information to the observation terminal after integrity protection based on the security parameters. As another example, the second parameter information may include security parameters for integrity verification of the query message, so that the target terminal can verify the integrity of the query information based on the security parameters after receiving the integrity-protected query message.

[0262] S1405, a second discovery response message including the second parameter information is sent to the target terminal.

[0263] The target terminal's HPLMN's DDNMF network element will send a second discovery response message, including the second parameter information, back to the target terminal.

[0264] According to the ranging verification method of this embodiment, the network device can verify the target terminal to determine whether the target terminal is allowed to perform ranging during the discovery process.

[0265] Figure 15 A flowchart illustrating a ranging verification method according to an embodiment of the present disclosure is shown. Figure 15 As shown, this method can be executed by the DDNMF network element of the HPLMN of the target terminal, and includes the following steps.

[0266] S1501, Receive the second discovery request message sent by the target terminal.

[0267] S1502, in response to the second discovery request message, a second discovery measurement combination process verification request is sent to the ranging application server.

[0268] S1503, Receive verification results from the ranging application server indicating whether the target terminal is allowed to perform ranging during the discovery process.

[0269] S1504, if the verification result indicates that the target terminal is allowed to perform ranging during the discovery process, generate second parameter information for the discovery measurement combination procedure for the target terminal.

[0270] S1505, a second discovery response message including the second parameter information is sent to the target terminal.

[0271] For a description and specific details of steps S1501-S1505 above, please refer to the relevant description and details of steps S1401-S1405 above.

[0272] S1506, Receive the first discovery request message forwarded by the DDNMF network element of the HPLMN of the observation terminal.

[0273] The first discovery request message is used to request the execution of the discovery measurement combination process and to indicate that the terminal that sends the first discovery request message is the observation terminal. That is, the DDNMF network element of the HPLMN of the target terminal can know that the first discovery request message comes from the observation terminal based on the received first discovery request message.

[0274] The first discovery request message is forwarded by the DDNMF network element of the observer terminal's HPLMN to the DDNMF network element of the target terminal's HPLMN, provided that the observer terminal has been verified as being allowed to perform ranging during the discovery process.

[0275] S1507, in response to the first discovery request message, sends a third discovery measurement combination process verification request to the ranging application server.

[0276] After receiving the first discovery request message, the DDNMF network element of the HPLMN of the target terminal can send a third discovery measurement combination process verification request to the ranging application server. The ranging application server will then verify whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process based on the third discovery measurement combination verification request to obtain the first verification result.

[0277] In some embodiments, the first discovery request message may include a discovery measurement combination procedure instruction. The discovery measurement combination procedure instruction is used to request verification of whether the observation terminal is permitted to perform ranging on the target terminal during the discovery process.

[0278] In other words, the DDNMF network element of the HPLMN of the target terminal can autonomously respond to the first discovery request message by sending a third discovery measurement combination process verification request to the ranging application server. That is, in response to any first discovery request message, the DDNMF network element of the HPLMN of the target terminal sends a third discovery measurement combination process verification request to the ranging application server to verify whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process.

[0279] Alternatively, the DDNMF network element of the HPLMN of the target terminal sends a third discovery measurement combination process verification request to the ranging application server according to the discovery measurement combination process instruction in the first discovery request message. That is, only in response to the first discovery request message including the discovery measurement combination process instruction, the DDNMF network element of the HPLMN of the target terminal sends a third discovery measurement combination process verification request to the ranging application server to verify whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process.

[0280] S1508, Receive from the ranging application server the verification result indicating whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process.

[0281] S1509, if the verification result indicates that the observation terminal is allowed to perform ranging on the target terminal during the discovery process, the first parameter information for the discovery measurement combination procedure for the observation target terminal is generated.

[0282] When the verification result fed back by the ranging application server indicates that the observation terminal is allowed to perform ranging on the target terminal during the discovery process, the DDNMF network element of the HPLMN of the target terminal generates the first parameter information.

[0283] In some embodiments, the first parameter information may further include security parameters for integrity protection and / or verification of the specified information. For example, the first parameter information may include security parameters for integrity protection of the solicitation message, so that the observation terminal can send the solicitation information to the target terminal after integrity protection based on the security parameters. As another example, the first parameter information may include security parameters for integrity verification of the solicitation response message, so that the observation terminal can verify the integrity of the solicitation response message based on the security parameters after receiving the integrity-protected solicitation response message.

[0284] S1510, a first discovery response message including the first parameter information is sent to the DDNMF network element of the HPLMN of the observation terminal.

[0285] The target terminal's HPLMN's DDNMF network element feeds back a first discovery response message, including the first parameter information, to the observation terminal's HPLMN's DDNMF network element, and the observation terminal's HPLMN's DDNMF network element can feed back the first discovery response message to the observation terminal.

[0286] According to the ranging verification method of this embodiment, the network device can verify the target terminal to determine whether the target terminal is allowed to perform ranging during the discovery process, and verify the observation terminal to determine whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process.

[0287] Figure 16 A flowchart illustrating a ranging verification method according to an embodiment of the present disclosure is shown. Figure 16 As shown, this method is used to verify the observation terminal, and the method may include the following steps.

[0288] S1601, Receive the first discovery measurement combination process verification request sent by the DDNMF network element of the HPLMN of the observation terminal.

[0289] The first discovery measurement process verification request is used to request verification of whether the observation terminal is allowed to perform ranging during the discovery process.

[0290] The first discovery measurement combination process verification request is sent by the HPLMN's DDNMF network element of the observation terminal based on the first discovery request message received from the observation terminal.

[0291] S1602, verify whether the observation terminal is allowed to perform ranging during the discovery process to obtain intermediate verification results.

[0292] The ranging application server responds to the first discovery measurement combination verification request to verify whether the observation terminal is allowed to perform ranging during the discovery process.

[0293] S1603 feeds back the intermediate verification results to the HPLMN's DDNMF network element at the observation terminal.

[0294] S1604, Receive the third discovery measurement combination process verification request sent by the DDNMF network element of the HPLMN of the target terminal.

[0295] The third discovery measurement process verification request is used to request verification of whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process.

[0296] The third discovery measurement combination process verification request is sent by the target terminal's HPLMN's DDNMF network element based on the first discovery request message received from the observer terminal's HPLMN's DDNMF network element. This first discovery request message is forwarded by the observer terminal's HPLMN's DDNMF network element to the target terminal's HPLMN's DDNMF network element after the observer terminal has been verified as permitted to perform ranging during the discovery process (i.e., the intermediate verification result indicates that the observer terminal is permitted to perform ranging during the discovery process).

[0297] S1605, verify whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process to obtain the first verification result.

[0298] The ranging application server responds to the third discovery measurement combination verification request to verify whether the observing terminal is permitted to perform ranging on the target terminal during the discovery process. If the target terminal is not verified as permitted to perform ranging during the discovery process, the first verification result obtained by the ranging application server is that the observing terminal is not permitted to perform ranging on the target terminal during the discovery process. If the target terminal has been verified as permitted to perform ranging during the discovery process, the first verification result obtained by the ranging application server may be that the observing terminal is permitted to perform ranging on the target terminal during the discovery process.

[0299] S1606, the first verification result is fed back to the DDNMF network element of the HPLMN of the target terminal.

[0300] When the first verification result fed back by the ranging application server indicates that the observation terminal is allowed to perform ranging on the target terminal during the discovery process, the DDNMF network element of the HPLMN of the target terminal generates first parameter information and sends a first discovery response message including the first parameter information to the DDNMF network element of the HPLMN of the observation terminal. The DDNMF network element of the HPLMN of the observation terminal can feed back the first discovery response message to the observation terminal.

[0301] In some embodiments, the first parameter information may include security parameters for integrity protection and / or verification of specified information. For example, the first parameter information may include security parameters for integrity protection of the solicitation message, so that the observation terminal can send the solicitation information to the target terminal after integrity protection based on the security parameters. As another example, the first parameter information may include security parameters for integrity verification of the solicitation response message, so that the observation terminal can verify the integrity of the solicitation response message based on the security parameters after receiving the integrity-protected solicitation response message.

[0302] According to the ranging verification method of this embodiment, the network device can verify the observation terminal to determine whether the observation terminal is allowed to perform ranging during the discovery process and whether it is allowed to perform ranging on a specific target terminal during the discovery process.

[0303] Figure 17 A flowchart illustrating a ranging verification method according to an embodiment of the present disclosure is shown. Figure 17 As shown, this method is used to verify a target terminal, and the method may include the following steps.

[0304] S1701, Receive the second discovery measurement combination process verification request sent by the DDNMF network element of the HPLMN of the target terminal.

[0305] The second discovery measurement process verification request is used to request verification of whether the target terminal is allowed to perform ranging during the discovery process.

[0306] The second discovery measurement combination process verification request is sent by the DDNMF network element of the target terminal's HPLMN based on the second discovery request message received from the target terminal.

[0307] S1702, verify whether the target terminal is allowed to perform ranging during the discovery process to obtain a second verification result.

[0308] The ranging application server responds to the second discovery measurement combination verification request to verify whether the target terminal is allowed to perform ranging during the discovery process.

[0309] S1703, the second verification result is fed back to the DDNMF network element of the HPLMN of the target terminal.

[0310] The target terminal's HPLMN DDNMF network element generates second parameter information when the second verification result fed back by the ranging application server indicates that the target terminal is allowed to perform ranging during the discovery process, and sends a second discovery response message including the second parameter information to the target terminal.

[0311] In some embodiments, the second parameter information may further include security parameters for integrity protection and / or verification of the specified information. For example, the second parameter information may include security parameters for integrity protection of the query response message, so that the target terminal can send the query response information to the observation terminal after integrity protection based on the security parameters. As another example, the second parameter information may include security parameters for integrity verification of the query message, so that the target terminal can verify the integrity of the query information based on the security parameters after receiving the integrity-protected query message.

[0312] According to the ranging verification method of this embodiment, the network device can verify the observation terminal to determine whether the observation terminal is allowed to perform ranging during the discovery process and whether it is allowed to perform ranging on a specific target terminal during the discovery process, and can verify the target terminal to determine whether the target terminal is allowed to perform ranging during the discovery process.

[0313] Figure 18 A schematic flowchart of a discovery measurement combination process according to an embodiment of the present disclosure is shown. Figure 18 As shown, the process can be executed by the observation terminal, the target terminal, the DDNMF network element of the HPLMN of the observation terminal, the DDNMF network element of the HPLMN of the target terminal, the DDNMF network element of the VPLMN, and the ranging application server, and includes the following steps.

[0314] S1801, the target terminal sends a second discovery request message to the DDNMF network element of its HPLMN to obtain discovery query filter monitoring query and security protection parameters. This second discovery request message may include indicators to instruct the target terminal to request the discovery measurement combination procedure.

[0315] S1802, the DDNMF network element of the target terminal's HPLMN requests the ranging application server to perform a discovery measurement combination process verification based on an indicator or local configuration. The ranging application server verifies whether the target terminal is allowed to perform ranging during the discovery process and returns the verification result. Based on the verification result, the DDNMF network element of the target terminal's HPLMN generates parameter information for the target terminal's discovery measurement combination process.

[0316] S1803, the HPLMN's DDNMF network element and the VPLMN's DDNMF network element exchange authentication messages. This step can be omitted if the target terminal is not roaming.

[0317] S1804, the target terminal's HPLMN's DDNMF network element returns a discovery response message to the target terminal, including the following parameter information: security protection parameters corresponding to each discovery filter (such as transmit security parameters and receive security parameters), as well as parameters such as the current time and maximum offset. Specifically, the transmit security parameters provide the target terminal with necessary information to protect the transmission of the specified message, and the receive security parameters provide the target terminal with necessary information to remove the protection applied to the specified message by the observing terminal.

[0318] S1805, the observation terminal sends a first discovery request message to the DDNMF network element of its HPLMN to allow the discovery of one or more target terminals. This first discovery request message may include an indicator to instruct the observation terminal to request the discovery of the measurement combination procedure.

[0319] S1806, the DDNMF network element of the HPLMN of the observation terminal requests the ranging application server to perform the discovery measurement combination process verification based on the indicator or local configuration. The ranging application server verifies whether the observation terminal is allowed to perform ranging during the discovery process and feeds back the verification result.

[0320] S1807, if the first discovery request message sent by the observation terminal is verified, the DDNMF network element of the HPLMN of the observation terminal forwards the first discovery request message to the DDNMF network element of the HPLMN of the target terminal.

[0321] In step S1808, the DDNMF network element of the target terminal's HPLMN requests the ranging application server to perform a verification of the discovery-measurement combination process. The ranging application server verifies whether the observation terminal is allowed to perform ranging on the target terminal during the discovery process and returns the verification result. Based on the verification result, the DDNMF network element of the target terminal's HPLMN generates parameter information for the observation terminal's discovery-measurement combination process.

[0322] S1809, the target terminal's HPLMN's DDNMF network element returns a discovery response message to the observer terminal's HPLMN's DDNMF network element, including the following parameter information: sent security parameters and received security parameters, such as DUIK. The received security parameters provide the observer terminal with necessary information to remove the target terminal's protection against the specified message.

[0323] S1810, observe the exchange of authentication messages between the HPLMN's DDNMF network element and the VPLMN's DDNMF network element. This step can be omitted if the observed terminal is not roaming.

[0324] S1811, the DDNMF network element of the HPLMN of the observation terminal returns a discovery response message to the observation terminal, including parameters such as sending security parameters and receiving security parameters.

[0325] S1812, the observation terminal sends a solicitation message including the measurement signal to the target terminal and listens for the solicitation response message. Before sending the solicitation message, the integrity of the solicitation message is protected by appending the MIC calculated using DUIK to the end of the solicitation message.

[0326] S1813, the target terminal listens for solicitation messages that satisfy its discovery filter. In order to find a matching message, the target terminal uses the DUIK contained in the receive security parameters received by the target terminal to perform integrity verification on the received solicitation message.

[0327] S1814, if integrity verification is successful, the target terminal returns an integrity-protected query response message, which includes a feedback measurement signal and the time difference between receiving the query message and the feedback query response message. Integrity protection is achieved by appending the MIC calculated using DUIK to the end of the query response message.

[0328] S1815, the observing terminal listens for solicitation response messages that satisfy its discovery filter. To find a matching message, the target terminal performs integrity verification on the received solicitation response message using the DUIK included in the receive security parameters received by the observing terminal. Upon successful verification, the observing terminal can calculate the distance between itself and the target terminal.

[0329] S1816 After receiving the query response message, the observation terminal can also report a matching report to the DDNMF network element of the HPLMN of the observation terminal. The matching report may include information such as the current time and MIC.

[0330] S1817 After receiving the matching report, the DDNMF network element of the HPLMN of the observation terminal may optionally request re-verification from the ranging application server.

[0331] S1818 After successfully checking the MIC, the DDNMF network element of the HPLMN of the observation terminal can return a matching report confirmation information to the observation terminal. The matching report confirmation information may include the matching report refresh time.

[0332] S1819, Optionally, the DDNMF network element of the HPLMN of the observation terminal can also send a detection report to the DDNMF network element of the HPLMN of the target terminal.

[0333] S1816-S1819 above are optional and should only be executed when an inspection of the MIC is required.

[0334] The methods provided in the embodiments of this application above have been described from the perspectives of network devices and user equipment, respectively. To implement the functions of the methods provided in the embodiments of this application above, the network device and user equipment may include hardware structures and software modules, implementing the above functions in the form of hardware structures, software modules, or a combination of hardware structures and software modules. One of the above functions can be executed in the form of hardware structures, software modules, or a combination of hardware structures and software modules.

[0335] Corresponding to the ranging methods provided in the above embodiments, this disclosure also provides a ranging device. Since the ranging device provided in this disclosure corresponds to the ranging methods provided in the above embodiments, the implementation methods of the ranging methods are also applicable to the ranging device provided in this embodiment, and will not be described in detail in this embodiment.

[0336] Figure 19 This is a schematic diagram of the structure of a ranging device 1900 provided in an embodiment of this disclosure.

[0337] like Figure 19 As shown, the device 1900 is applied to a first terminal, wherein the first terminal is a terminal that initiates a discovery measurement combination process, the discovery measurement combination process is used to perform ranging during the discovery process, and the device 1900 may include a transceiver module 1901 and a processing module 1902.

[0338] The transceiver module 1901 is used to send a query message to a second terminal, wherein the second terminal is a terminal that will be discovered to perform a discovery measurement combination process, the query message is used to instruct the second terminal to perform discovery matching with the first terminal, and the query message includes a measurement signal; and to receive a query response message from the second terminal in response to the query message, wherein the query response message is sent by the second terminal when it determines that it matches with the first terminal, and the query response message includes a feedback measurement signal.

[0339] The processing module 1902 is used to calculate the distance between itself and the second terminal based on the measurement signal and the feedback measurement signal.

[0340] According to the ranging device of this disclosure, when an observation terminal is permitted to perform ranging on a target terminal during the discovery process, it sends a solicitation message to the target terminal. When the target terminal matches the observation terminal and is permitted to perform ranging during the discovery process, it sends a solicitation response message back to the observation terminal. The observation terminal calculates the distance between itself and the target terminal based on the measurement signal in the solicitation message and the feedback measurement signal in the solicitation response message. Therefore, ranging between the two terminals can be performed during the discovery process, thereby reducing network resource consumption and saving terminal power consumption.

[0341] In some embodiments, the processing module 1902 is used to perform integrity protection on the query message.

[0342] In some embodiments, the processing module 1902 is configured to calculate a message verification code based on security parameters received from a first proximity service discovery management function (DDNMF) network element of a first local public land mobile network (HPLMN) of the first terminal; and to append the message verification code to the end of the solicitation message to protect the integrity of the solicitation message.

[0343] In some embodiments, the processing module 1902 is used to verify the integrity of the query response message, and if the integrity of the query response message is successfully verified, to calculate the distance between the second terminal based on the measurement signal and the feedback measurement signal.

[0344] In some embodiments, the processing module 1902 is used to verify the integrity of the query response message based on security parameters received from the first DDNMF network element.

[0345] In some embodiments, the transceiver module 1901 is configured to: send a first discovery request message to a first DDNMF network element, wherein the first discovery request message is used to request the execution of a discovery measurement combination process; receive a discovery response message fed back by the first DDNMF network element when it determines that the first terminal is allowed to perform ranging on the second terminal during the discovery process, wherein the discovery response message includes parameter information for the discovery measurement combination process; and send a solicitation message to the second terminal when the first terminal is allowed to perform ranging on the second terminal during the discovery process.

[0346] In some embodiments, the first discovery request message includes a discovery measurement combination process instruction, which is used to request verification of whether the first terminal is permitted to perform ranging on the second terminal during the discovery process.

[0347] Figure 20 This is a schematic diagram of the structure of a ranging device 2000 provided in an embodiment of the present disclosure.

[0348] like Figure 20 As shown, the device 2000 is applied to a second terminal, wherein the second terminal is a terminal to be discovered for a discovery measurement combination process, the discovery measurement combination process is used to perform ranging during the discovery process, and the device 2000 may include a transceiver module 2001.

[0349] The transceiver module 2001 is used to receive a query message sent by a first terminal, wherein the first terminal is a terminal that initiates a discovery measurement combination process, the query message is used to instruct the second terminal to perform discovery matching with the first terminal, and the query message includes a measurement signal; and when the second terminal determines that it matches with the first terminal, it sends a query response message back to the first terminal, wherein the query response message includes a feedback measurement signal, wherein the measurement signal and the feedback measurement signal are used to determine the distance between the first terminal and the second terminal.

[0350] According to the ranging device of this disclosure, when an observation terminal is permitted to perform ranging on a target terminal during the discovery process, it sends a solicitation message to the target terminal. When the target terminal matches the observation terminal and is permitted to perform ranging during the discovery process, it sends a solicitation response message back to the observation terminal. The observation terminal calculates the distance between itself and the target terminal based on the measurement signal in the solicitation message and the feedback measurement signal in the solicitation response message. Therefore, ranging between the two terminals can be performed during the discovery process, thereby reducing network resource consumption and saving terminal power consumption.

[0351] In some embodiments, the apparatus 2000 further includes a processing module 2002 for verifying the integrity of the solicitation message; wherein feeding back the solicitation response message to the first terminal includes: feeding back the solicitation response message to the first terminal if the integrity of the solicitation message is successfully verified.

[0352] In some embodiments, the processing module 2002 is used to verify the integrity of the solicitation message based on security parameters received from the second proximity service discovery management function (DDNMF) network element of the second local public land mobile network (HPLMN) of the second terminal.

[0353] In some embodiments, the processing module 2002 is used to perform integrity protection on the query response message.

[0354] In some embodiments, the processing module 2002 is configured to calculate a message verification code based on security parameters received from the second DDNMF network element; and to append the message verification code to the end of the query response message to protect the integrity of the query response message.

[0355] In some embodiments, the transceiver module 2001 is configured to: send a second discovery request message to the second DDNMF network element, wherein the second discovery request message is used to request the execution of a discovery measurement combination process; and receive a discovery response message fed back by the second DDNMF network element when it determines that the second terminal is allowed to perform ranging during the discovery process, wherein the discovery response message includes parameter information for the discovery measurement combination process; wherein feeding back the solicitation response message to the first terminal includes: feeding back the solicitation response message to the first terminal when the second terminal determines that it matches the first terminal and the second terminal is allowed to perform ranging during the discovery process.

[0356] In some embodiments, the second discovery request message includes a discovery measurement combination verification instruction, the discovery measurement combination procedure instruction being used to request verification of whether the second terminal is permitted to perform ranging during the discovery process.

[0357] Corresponding to the ranging verification methods provided in the above embodiments, this disclosure also provides a ranging verification device. Since the ranging verification device provided in this disclosure corresponds to the ranging verification methods provided in the above embodiments, the implementation of the ranging methods is also applicable to the ranging verification device provided in this embodiment, and will not be described in detail in this embodiment.

[0358] Figure 21 This is a schematic diagram of the structure of a ranging verification device 2100 provided in an embodiment of the present disclosure.

[0359] like Figure 21 As shown, the device 2100 is applied to the first proximity service discovery management function (DDNMF) network element of the first local public land mobile network (HPLMN) of the first terminal, and the device 2100 may include a transceiver module 2101.

[0360] The transceiver module 2101 is configured to: receive a first discovery request message sent by the first terminal, wherein the first discovery request message is used to request the execution of a discovery measurement combination process and indicates that the first terminal sending the first discovery request message is the terminal initiating the discovery measurement combination process, the discovery measurement combination process being used to perform ranging during the discovery process; in response to the first discovery request message, send a first discovery measurement combination process verification request to a ranging application server, the ranging application server being configured to verify whether the first terminal is allowed to perform ranging during the discovery process based on the first discovery measurement combination verification request; receive a verification result from the ranging application server, and if the verification result indicates that the first terminal is allowed to perform ranging during the discovery process, forward the first discovery request message to the second DDNMF network element of the second HPLMN of the second terminal, the second terminal being the terminal to be discovered for the discovery measurement combination process; receive a discovery response message fed back by the second DDNMF network element when it determines that the first terminal is allowed to perform ranging on the second terminal during the discovery process, wherein the discovery response message includes parameter information for the discovery measurement combination process; and send the discovery response message to the first terminal.

[0361] According to the ranging verification apparatus of this embodiment, the network device can verify the observation terminal to determine whether the observation terminal is allowed to perform ranging during the discovery process and whether it is allowed to perform ranging on a specific target terminal during the discovery process. Furthermore, the network device can verify the target terminal to determine whether the target terminal is allowed to perform ranging during the discovery process. Thus, it is possible to verify whether the terminal can perform the discovery-measurement combination process.

[0362] In some embodiments, the parameter information includes security parameters for integrity protection and / or verification of specified information.

[0363] In some embodiments, the first discovery request message includes a discovery measurement combination process instruction, which is used to request verification of whether the first terminal is allowed to perform ranging during the discovery process and to verify whether the first terminal is allowed to perform ranging on the second terminal during the discovery process.

[0364] Figure 22 This is a schematic diagram of the structure of a ranging verification device 2200 provided in an embodiment of the present disclosure.

[0365] like Figure 22 As shown, the device 2200 is applied to the first proximity service discovery management function (DDNMF) network element of the first local public land mobile network (HPLMN) of the first terminal, and the device 2200 may include a transceiver module 2201 and a processing module 2202.

[0366] The transceiver module 2201 is configured to: receive a second discovery request message sent by a second terminal, wherein the second discovery request message is used to request the execution of a discovery measurement combination process and indicates that the second terminal sending the second discovery request message is a terminal that will be discovered to perform the discovery measurement combination process, the discovery measurement combination process being used to perform ranging during the discovery process; in response to the second discovery request message, send a second discovery measurement combination process verification request to a ranging application server, the ranging application server verifying whether the second terminal is allowed to perform ranging during the discovery process based on the second discovery measurement combination process verification request; and receive the verification result from the ranging application server.

[0367] The processing module 2202 is used to generate second parameter information for the discovery measurement combination process of the second terminal when the verification result indicates that the second terminal is allowed to perform ranging during the discovery process.

[0368] The transceiver module 2201 is also used to send a second discovery response message, including the second parameter information, to the second terminal.

[0369] According to the ranging verification apparatus of this embodiment, the network device can verify the observation terminal to determine whether the observation terminal is allowed to perform ranging during the discovery process and whether it is allowed to perform ranging on a specific target terminal during the discovery process. Furthermore, the network device can verify the target terminal to determine whether the target terminal is allowed to perform ranging during the discovery process. Thus, it is possible to verify whether the terminal can perform the discovery-measurement combination process.

[0370] The transceiver module 2201 is further configured to receive a first discovery request message forwarded by the first DDNMF network element of the first HPLMN of the first terminal, wherein the first discovery request message is used to request the execution of a discovery measurement combination process and to indicate that the first terminal that sent the first discovery request message is the terminal that initiated the discovery measurement combination process; in response to the first discovery request message, a first discovery measurement combination process verification request is sent to the ranging application server, wherein the ranging application server verifies whether the first terminal is allowed to perform ranging on the second terminal during the discovery process based on the first discovery measurement combination process verification request.

[0371] The processing module 2202 is further configured to generate first parameter information for the discovery measurement combination process of the first terminal when the verification result indicates that the first terminal is allowed to perform ranging on the second terminal during the discovery process.

[0372] The transceiver module 2201 is further configured to send a first discovery response message, including the first parameter information, to the first DDNMF network element.

[0373] In some embodiments, the first parameter information and the second parameter information each include security parameters for integrity protection and / or verification of the specified information.

[0374] In some embodiments, the second discovery request message includes a second discovery measurement combination process instruction, which is used to request verification of whether the second terminal is permitted to perform ranging during the discovery process.

[0375] In some embodiments, the first discovery request message includes a first discovery measurement combination process instruction, which is used to request verification of whether the first terminal is allowed to perform ranging on the second terminal during the discovery process.

[0376] Figure 23 This is a schematic diagram of the structure of a ranging verification device 2300 provided in an embodiment of the present disclosure.

[0377] like Figure 23 As shown, the device 2300 is applied to the first proximity service discovery management function (DDNMF) network element of the first local public land mobile network (HPLMN) of the first terminal, and the device 2300 may include a transceiver module 2301 and a processing module 2302.

[0378] The transceiver module 2301 is used to receive a first discovery measurement combination process verification request sent by the first DDNMF network element of the first local public land mobile network (HPLMN) of the first terminal, wherein the first terminal is the terminal that initiates the discovery measurement combination process, the discovery measurement combination process is used to perform ranging during the discovery process, and the first discovery measurement combination process verification request is used to request verification of whether the first terminal is allowed to perform ranging during the discovery process.

[0379] The processing module 2302 is used to verify whether the first terminal is allowed to perform ranging during the discovery process.

[0380] The transceiver module 2301 is further configured to feed back the first verification result to the first DDNMF network element; and receive a second discovery measurement combination process verification request sent by the second DDNMF network element of the second HPLMN of the second terminal, wherein the second terminal is a terminal that will be discovered to perform a discovery measurement combination process, and the second discovery measurement combination process verification request is used to request verification of whether the first terminal is allowed to perform ranging on the second terminal during the discovery process.

[0381] The processing module 2302 is also used to verify whether the first terminal is allowed to perform ranging on the second terminal during the discovery process.

[0382] The transceiver module 2301 is further configured to feed back the second verification result to the second DDNMF network element, wherein the second DDNMF network element generates first parameter information for the discovery measurement combination process of the first terminal when the second verification result indicates that the first terminal is allowed to perform ranging on the second terminal during the discovery process.

[0383] According to the ranging verification apparatus of this embodiment, the network device can verify the observation terminal to determine whether the observation terminal is allowed to perform ranging during the discovery process and whether it is allowed to perform ranging on a specific target terminal during the discovery process. Furthermore, the network device can verify the target terminal to determine whether the target terminal is allowed to perform ranging during the discovery process. Thus, it is possible to verify whether the terminal can perform the discovery-measurement combination process.

[0384] In some embodiments, the transceiver module 2301 is further configured to receive a third discovery measurement combination process verification request sent by the second DDNMF network element, wherein the third discovery measurement combination process verification request is used to request verification of whether the second terminal is allowed to perform ranging during the discovery process.

[0385] The processing module 2302 is also used to verify whether the second terminal is allowed to perform ranging during the discovery process.

[0386] The transceiver module 2301 is also used to feed back the verification result to the second DDNMF network element, and the second DDNMF network element generates second parameter information for the discovery measurement combination process of the second terminal when the verification result indicates that the second terminal is allowed to perform ranging during the discovery process.

[0387] Please see Figure 24 , Figure 24 This is a schematic diagram of the structure of a communication device 2400 provided in an embodiment of this application. The communication device 2400 can be a network device, a user device, a chip, chip system, or processor that supports the network device in implementing the above methods, or a chip, chip system, or processor that supports the user device in implementing the above methods. This device can be used to implement the methods described in the above method embodiments; for details, please refer to the descriptions in the above method embodiments.

[0388] The communication device 2400 may include one or more processors 2401. The processor 2401 may be a general-purpose processor or a dedicated processor, such as a baseband processor or a central processing unit (CPU). The baseband processor can be used to process communication protocols and communication data, while the CPU can be used to control the communication device (e.g., base station, baseband chip, terminal equipment, terminal equipment chip, DU or CU, etc.), execute computer programs, and process data from the computer programs.

[0389] Optionally, the communication device 2400 may further include one or more memories 2402, which may store a computer program 2404. The processor 2401 executes the computer program 2404 to cause the communication device 2400 to perform the method described in the above method embodiments. Optionally, the memory 2402 may also store data. The communication device 2400 and the memory 2402 may be provided separately or integrated together.

[0390] Optionally, the communication device 2400 may also include a transceiver 2405 and an antenna 2406. The transceiver 2405 may be referred to as a transceiver unit, transceiver, or transceiver circuit, etc., and is used to implement the transmission and reception functions. The transceiver 2405 may include a receiver and a transmitter. The receiver may be referred to as a receiver or receiving circuit, etc., and is used to implement the receiving function; the transmitter may be referred to as a transmitter or transmitting circuit, etc., and is used to implement the transmitting function.

[0391] Optionally, the communication device 2400 may further include one or more interface circuits 2407. The interface circuits 2407 are used to receive code instructions and transmit them to the processor 2401. The processor 2401 executes the code instructions to cause the communication device 2400 to perform the methods described in the above method embodiments.

[0392] In one implementation, the processor 2401 may include a transceiver for implementing receive and transmit functions. For example, the transceiver may be a transceiver circuit, an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit for implementing receive and transmit functions may be separate or integrated. The aforementioned transceiver circuit, interface, or interface circuit can be used for reading and writing code / data, or it can be used for transmitting or relaying signals.

[0393] In one implementation, processor 2401 may store computer program 2403, which runs on processor 2401 and enables communication device 2400 to perform the methods described in the above method embodiments. Computer program 2403 may be embedded in processor 2401; in this case, processor 2401 may be implemented in hardware.

[0394] In one implementation, the communication device 2400 may include circuitry capable of performing the functions of transmitting, receiving, or communicating as described in the foregoing method embodiments. The processor and transceiver described in this application can be implemented on integrated circuits (ICs), analog ICs, radio frequency integrated circuits (RFICs), mixed-signal ICs, application-specific integrated circuits (ASICs), printed circuit boards (PCBs), electronic devices, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductors (CMOS), n-metal-oxide-semiconductor (NMOS), positive channel metal oxide semiconductors (PMOS), bipolar junction transistors (BJTs), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.

[0395] The communication device described in the above embodiments may be a network device or a user equipment, but the scope of the communication device described in this application is not limited thereto, and the structure of the communication device may vary. Figure 24 The communication device may be a standalone device or part of a larger device. For example, the communication device may be:

[0396] (1) Independent integrated circuit IC, or chip, or chip system or subsystem;

[0397] (2) A collection of one or more ICs, optionally including storage components for storing data and computer programs;

[0398] (3) ASIC, such as modem;

[0399] (4) Modules that can be embedded in other devices;

[0400] (5) Receivers, terminal equipment, smart terminal equipment, cellular phones, wireless equipment, handheld devices, mobile units, vehicle-mounted equipment, network equipment, cloud equipment, artificial intelligence equipment, etc.

[0401] (6) Others, etc.

[0402] For cases where the communication device can be a chip or a chip system, please refer to [link / reference]. Figure 25 The diagram shows the structure of the chip. Figure 25 The chip shown includes a processor 2501 and an interface 2502. There can be one or more processors 2501, and multiple interfaces 2502.

[0403] Optionally, the chip also includes a memory 2503, which is used to store necessary computer programs and data.

[0404] Those skilled in the art will also understand that the various illustrative logical blocks and steps listed in the embodiments of this application can be implemented by electronic hardware, computer software, or a combination of both. Whether such functionality is implemented through hardware or software depends on the specific application and the overall system design requirements. Those skilled in the art can implement the described functionality using various methods for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of this application.

[0405] This application also provides a ranging system, which includes the aforementioned... Figures 19-20 The communication device in the embodiment serves as a user equipment and the aforementioned Figure 21-23 The communication device in the embodiment is a network device, or the system includes the aforementioned Figure 24 The embodiments include a communication device as a user equipment and a communication device as a network device.

[0406] This application also provides a readable storage medium having instructions stored thereon that, when executed by a computer, implement the functions of any of the above method embodiments.

[0407] This application also provides a computer program product that, when executed by a computer, implements the functions of any of the above method embodiments.

[0408] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer programs. When the computer program is loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer program can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program can be transferred from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to 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 (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0409] Those skilled in the art will understand that the various numerical designations such as "first," "second," etc., involved in this application are merely for the convenience of description and are not intended to limit the scope of the embodiments of this application, nor do they indicate the order of sequence.

[0410] At least one in this application can also be described as one or more, and multiple can be two, three, four or more, and this application does not impose any limitation. In the embodiments of this application, for a technical feature, the technical features in that technical feature are distinguished by "first", "second", "third", "A", "B", "C" and "D", and there is no order or size among the technical features described by "first", "second", "third", "A", "B", "C" and "D".

[0411] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) used to provide machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.

[0412] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0413] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

[0414] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0415] Furthermore, it should be understood that the various embodiments described in this application can be implemented individually or in combination with other embodiments, where the scheme allows.

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

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

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

Claims

1. A method of distance measurement, characterized by, The method is performed by a first terminal, wherein the first terminal is a terminal initiating a discovery measurement combination procedure, and the discovery measurement combination procedure is used to perform ranging in a discovery procedure, and the method comprises: sending an inquiry message to a second terminal, wherein the second terminal is a terminal to be discovered for the discovery measurement combination procedure, and the inquiry message is used to instruct the second terminal to perform discovery matching with the first terminal, and the inquiry message comprises a measurement signal; receiving an inquiry response message fed back by the second terminal in response to the inquiry message, wherein the inquiry response message is sent by the second terminal in a case that the second terminal determines to match the first terminal, and the inquiry response message comprises a feedback measurement signal; and calculating a distance between the first terminal and the second terminal based on the measurement signal and the feedback measurement signal. Before the sending of the inquiry message to the second terminal, the method further comprises: sending a first discovery request message to a first DDNMF network element, wherein the first discovery request message is used to request to perform the discovery measurement combination procedure; and receiving a discovery response message fed back by the first DDNMF network element in a case that the first DDNMF network element determines that the first terminal is allowed to perform ranging on the second terminal in the discovery procedure, and the discovery response message comprises parameter information for the discovery measurement combination procedure; wherein the sending of the inquiry message to the second terminal comprises: sending the inquiry message to the second terminal in a case that the first terminal is allowed to perform ranging on the second terminal in the discovery procedure.

2. The method of claim 1, wherein, Before the sending of the inquiry message to the second terminal, the method further comprises: performing integrity protection on the inquiry message.

3. The method of claim 2, wherein, The performing of the integrity protection on the inquiry message comprises: calculating a message authentication code based on security parameters received from a first DDNMF network element of a first home public land mobile network (HPLMN) of the first terminal; and appending the message authentication code to the end of the inquiry message to perform the integrity protection on the inquiry message.

4. The method of claim 1, wherein, The inquiry response message is an integrity-protected message, and the method further comprises: verifying the integrity of the inquiry response message; wherein the calculating of the distance between the first terminal and the second terminal based on the measurement signal and the feedback measurement signal comprises: calculating the distance between the first terminal and the second terminal based on the measurement signal and the feedback measurement signal in a case that the verification of the integrity of the inquiry response message is successful.

5. The method of claim 4, wherein, The verifying of the integrity of the inquiry response message comprises: verifying the integrity of the inquiry response message based on security parameters received from the first DDNMF network element.

6. The method of claim 1, wherein, The first discovery request message comprises a discovery measurement combination procedure indication, and the discovery measurement combination procedure indication is used to request to verify whether the first terminal is allowed to perform ranging on the second terminal in the discovery procedure.

7. A method of ranging, characterized by, The method is performed by a second terminal, wherein the second terminal is a terminal to be discovered for a discovery measurement combination procedure, and the discovery measurement combination procedure is used to perform ranging in a discovery procedure, and the method comprises: receiving an inquiry message sent by a first terminal, wherein the first terminal is a terminal initiating a discovery measurement combination procedure, the inquiry message is used to indicate that the second terminal performs discovery matching with the first terminal, and the inquiry message comprises a measurement signal; and in a case where the second terminal determines to match the first terminal, feeding back an inquiry response message to the first terminal, wherein the inquiry response message comprises a feedback measurement signal, wherein the measurement signal and the feedback measurement signal are used to determine a distance between the first terminal and the second terminal; before receiving the inquiry message sent by the first terminal, the method further comprises: sending a second discovery request message to a second DDNMF network element, wherein the second discovery request message is used to request to perform the discovery measurement combination procedure; and receiving a discovery response message fed back by the second DDNMF network element in a case where the second DDNMF network element determines that the second terminal is allowed to perform ranging in a discovery process, wherein the discovery response message comprises parameter information used for the discovery measurement combination procedure; wherein the feeding back the inquiry response message to the first terminal comprises: in a case where the second terminal determines to match the first terminal and the second terminal is allowed to perform ranging in the discovery process, feeding back the inquiry response message to the first terminal.

8. The method of claim 7, wherein, the inquiry message is an integrity-protected message, and the method further comprises: verifying the integrity of the inquiry message; wherein the feeding back the inquiry response message to the first terminal comprises: in a case where the integrity of the inquiry message is successfully verified, feeding back the inquiry response message to the first terminal.

9. The method of claim 8, wherein, the verifying the integrity of the inquiry message comprises: verifying the integrity of the inquiry message based on security parameters received from a second DDNMF network element of a second home public land mobile network (HPLMN) of the second terminal.

10. The method of claim 7, wherein, before sending the inquiry response message to the first terminal, the method further comprises: performing integrity protection on the inquiry response message.

11. The method of claim 10, wherein, the performing integrity protection on the inquiry response message comprises: calculating a message authentication code based on security parameters received from the second DDNMF network element; and appending the message authentication code to the end of the inquiry response message to perform integrity protection on the inquiry response message.

12. The method of claim 7, wherein, the second discovery request message comprises a discovery measurement combination verification indication, and the discovery measurement combination procedure indication is used to request to verify whether the second terminal is allowed to perform ranging in a discovery process.

13. A method of range verification, the method comprising: the method is performed by a first DDNMF network element of a first home public land mobile network (HPLMN) of a first terminal, and the method comprises: receiving a first discovery request message sent by the first terminal, wherein the first discovery request message is used to request to perform a discovery measurement combination procedure and indicates that the first terminal sending the first discovery request message is a terminal initiating the discovery measurement combination procedure, and the discovery measurement combination procedure is used to perform ranging in a discovery process; in response to the first discovery request message, sending a first discovery measurement combination procedure verification request to a ranging application server, the ranging application server verifying whether the first terminal is allowed to perform ranging in a discovery procedure based on the first discovery measurement combination verification request; receiving a verification result from the ranging application server, and in a case that the verification result indicates that the first terminal is allowed to perform ranging in a discovery procedure, forwarding the first discovery request message to a second DDNMF network element of a second HPLMN of a second terminal, the second terminal being a terminal to be discovered for a discovery measurement combination procedure; receiving a discovery response message fed back by the second DDNMF network element in a case that the first terminal is determined to be allowed to perform ranging in a discovery procedure on the second terminal, wherein the discovery response message comprises parameter information for the discovery measurement combination procedure; and sending the discovery response message to the first terminal.

14. The method of claim 13, wherein, The parameter information comprises security parameters for integrity protection and / or verification of specified information.

15. The method of claim 13 or 14, wherein, The first discovery request message comprises a discovery measurement combination procedure indication, the discovery measurement combination procedure indication being used to request verification of whether the first terminal is allowed to perform ranging in a discovery procedure and verification of whether the first terminal is allowed to perform ranging in a discovery procedure on the second terminal.

16. A method of range verification, the method comprising: The method is performed by a second discovery measurement combination procedure management function (DDNMF) network element of a second home public land mobile network (HPLMN) of a second terminal, and the method comprises: receiving a second discovery request message sent by a second terminal, wherein the second discovery request message is used to request performing a discovery measurement combination procedure and indicates that the second terminal sending the second discovery request message is a terminal to be discovered for the discovery measurement combination procedure, the discovery measurement combination procedure being used to perform ranging in a discovery procedure; in response to the second discovery request message, sending a second discovery measurement combination procedure verification request to a ranging application server, the ranging application server verifying whether the second terminal is allowed to perform ranging in a discovery procedure based on the second discovery measurement combination procedure verification request to obtain a second verification result; receiving the second verification result from the ranging application server; in a case that the second verification result indicates that the second terminal is allowed to perform ranging in a discovery procedure, generating second parameter information for a discovery measurement combination procedure of the second terminal; and sending a second discovery response message comprising the second parameter information to the second terminal.

17. The method of claim 16, wherein, Further comprising: receiving a first discovery request message forwarded by a first DDNMF network element of a first HPLMN of a first terminal, the first discovery request message being used to request performing a discovery measurement combination procedure and indicating that the first terminal sending the first discovery request message is a terminal initiating the discovery measurement combination procedure; in response to the first discovery request message, sending a third discovery measurement combination procedure verification request to the ranging application server, the ranging application server verifying whether the first terminal is allowed to perform ranging on the second terminal in a discovery procedure based on the third discovery measurement combination procedure verification request to obtain a first verification result; receiving the first verification result from the ranging application server; in a case where the first verification result indicates that the first terminal is allowed to perform ranging on the second terminal in a discovery procedure, generating first parameter information of a discovery measurement combination procedure for the first terminal; and sending a first discovery response message including the first parameter information to the first DDNMF network element.

18. The method of claim 17, wherein, The first parameter information and the second parameter information each include security parameters for integrity protection and / or verification of specified information.

19. The method of claim 16, wherein, The second discovery request message includes a second discovery measurement combination procedure indication, the second discovery measurement combination procedure indication being used to request verification of whether the second terminal is allowed to perform ranging in a discovery procedure.

20. The method of claim 17, wherein, The first discovery request message includes a first discovery measurement combination procedure indication, the first discovery measurement combination procedure indication being used to request verification of whether the first terminal is allowed to perform ranging on the second terminal in a discovery procedure.

21. A method of range verification, the method comprising: The method comprises: receiving a first discovery measurement combination procedure verification request sent by a first DDNMF network element of a first home public land mobile network (HPLMN) of a first terminal, wherein the first terminal is a terminal initiating a discovery measurement combination procedure, the discovery measurement combination procedure being used to perform ranging in a discovery procedure, the first discovery measurement combination procedure verification request being used to request verification of whether the first terminal is allowed to perform ranging in a discovery procedure; verifying whether the first terminal is allowed to perform ranging in a discovery procedure to obtain an intermediate verification result; feeding back the intermediate verification result to the first DDNMF network element; receiving a third discovery measurement combination procedure verification request sent by a second DDNMF network element of a second HPLMN of a second terminal, wherein the second terminal is a terminal to be discovered for a discovery measurement combination procedure, the third discovery measurement combination procedure verification request being used to request verification of whether the first terminal is allowed to perform ranging on the second terminal in a discovery procedure; verifying whether the first terminal is allowed to perform ranging on the second terminal in a discovery procedure to obtain a first verification result; and feeding back the first verification result to the second DDNMF network element, the second DDNMF network element generating first parameter information of a discovery measurement combination procedure for the first terminal in a case where the first verification result indicates that the first terminal is allowed to perform ranging on the second terminal in a discovery procedure.

22. The method of claim 21, wherein, Further comprising: receiving a second discovery measurement combination procedure verification request sent by the second DDNMF network element, the second discovery measurement combination procedure verification request being used to request verification of whether the second terminal is allowed to perform ranging in a discovery procedure; verifying whether the second terminal is allowed to perform ranging in a discovery procedure to obtain a second verification result; and feeding back the second verification result to the second DDNMF network element, the second DDNMF network element generating second parameter information of a discovery measurement combination procedure for the second terminal in a case that the second verification result indicates that the second terminal is allowed to perform ranging in a discovery process.

23. A ranging device, characterized by The application is applied to a first terminal, wherein the first terminal is a terminal initiating a discovery measurement combination procedure, and the discovery measurement combination procedure is used for performing ranging in a discovery process, and the apparatus comprises: a transceiver module, configured to: send an inquiry message to a second terminal, wherein the second terminal is a terminal to be discovered for a discovery measurement combination procedure, the inquiry message is used to instruct the second terminal to perform discovery matching with the first terminal, and the inquiry message comprises a measurement signal; and receive an inquiry response message fed back by the second terminal for the inquiry message, wherein the inquiry response message is sent by the second terminal in a case that the second terminal determines to match with the first terminal, and the inquiry response message comprises a feedback measurement signal; and a processing module, configured to calculate a distance between the first terminal and the second terminal based on the measurement signal and the feedback measurement signal. Before sending the inquiry message to the second terminal, the apparatus is further configured to: send a first discovery request message to a first DDNMF network element, wherein the first discovery request message is used to request to perform the discovery measurement combination procedure; and receive a discovery response message fed back by the first DDNMF network element in a case that the first DDNMF network element determines that the first terminal is allowed to perform ranging on the second terminal in a discovery process, the discovery response message comprising parameter information used for the discovery measurement combination procedure; wherein the sending of the inquiry message to the second terminal comprises: sending the inquiry message to the second terminal in a case that the first terminal is allowed to perform ranging on the second terminal in a discovery process.

24. A ranging device, comprising: The application is applied to a second terminal, wherein the second terminal is a terminal to be discovered for a discovery measurement combination procedure, and the discovery measurement combination procedure is used for performing ranging in a discovery process, and the apparatus comprises: a transceiver module, configured to: receive an inquiry message sent by a first terminal, wherein the first terminal is a terminal initiating a discovery measurement combination procedure, and the inquiry message is used to instruct the second terminal to perform discovery matching with the first terminal, and the inquiry message comprises a measurement signal; feed back an inquiry response message to the first terminal in a case that the second terminal determines to match with the first terminal, wherein the inquiry response message comprises a feedback measurement signal, and the measurement signal and the feedback measurement signal are used to determine a distance between the first terminal and the second terminal; Before receiving the inquiry message sent by the first terminal, the apparatus is further configured to: send a second discovery request message to a second DDNMF network element, wherein the second discovery request message is used to request to perform the discovery measurement combination procedure; and receive a discovery response message fed back by the second DDNMF network element in a case that the second DDNMF network element determines that the second terminal is allowed to perform ranging on the first terminal in a discovery process, the discovery response message comprising parameter information used for the discovery measurement combination procedure. receive a discovery response message fed back by the second DDNMF network element in a case where the second DDNMF network element determines that the second terminal is allowed to perform ranging in a discovery process, the discovery response message including parameter information for the discovery measurement combination procedure; wherein the feeding back of the query response message to the first terminal comprises: in a case where the second terminal determines that the first terminal matches and the second terminal is allowed to perform ranging in a discovery process, feeding back a query response message to the first terminal.

25. A ranging verification apparatus, comprising: A first discovery management function (DDNMF) network element of a first home public land mobile network (HPLMN) applied to a first terminal, the apparatus comprising a transceiver module; the transceiver module is configured to: receive a first discovery request message sent by the first terminal, wherein the first discovery request message is used to request to perform a discovery measurement combination procedure and indicates that the first terminal sending the first discovery request message is a terminal initiating the discovery measurement combination procedure, and the discovery measurement combination procedure is used to perform ranging in a discovery process; in response to the first discovery request message, send a first discovery measurement combination procedure verification request to a ranging application server, the ranging application server being configured to verify whether the first terminal is allowed to perform ranging in a discovery process based on the first discovery measurement combination procedure verification request; receive a verification result from the ranging application server, and in a case where the verification result indicates that the first terminal is allowed to perform ranging in a discovery process, forward the first discovery request message to a second DDNMF network element of a second HPLMN of a second terminal, the second terminal being a terminal to be discovered for the discovery measurement combination procedure; receive a discovery response message fed back by the second DDNMF network element in a case where the second DDNMF network element determines that the first terminal is allowed to perform ranging in a discovery process, the discovery response message including parameter information for the discovery measurement combination procedure; and send the discovery response message to the first terminal.

26. A ranging verification apparatus, comprising: A second discovery management function (DDNMF) network element of a second home public land mobile network (HPLMN) applied to a second terminal, the apparatus comprising a transceiver module and a processing module; the transceiver module is configured to: receive a second discovery request message sent by the second terminal, wherein the second discovery request message is used to request to perform a discovery measurement combination procedure and indicates that the second terminal sending the second discovery request message is a terminal to be discovered for the discovery measurement combination procedure, and the discovery measurement combination procedure is used to perform ranging in a discovery process; in response to the second discovery request message, send a second discovery measurement combination procedure verification request to a ranging application server, the ranging application server verifying whether the second terminal is allowed to perform ranging in a discovery process based on the second discovery measurement combination procedure verification request to obtain a second verification result; receive the second verification result from the ranging application server; The processing module generates second parameter information of a discovery measurement combination procedure of the second terminal in a case where the second verification result indicates that the second terminal is allowed to perform ranging in a discovery process. The transceiver module is further configured to send a second discovery response message including the second parameter information to the second terminal.

27. A ranging verification apparatus, comprising: The apparatus includes a transceiver module and a processing module. The transceiver module is configured to receive a first discovery measurement combination procedure verification request sent by a first DDNMF network element of a first home public land mobile network (HPLMN) of a first terminal, wherein the first terminal is a terminal initiating a discovery measurement combination procedure, the discovery measurement combination procedure is used to perform ranging in a discovery process, and the first discovery measurement combination procedure verification request is used to request verification of whether the first terminal is allowed to perform ranging in the discovery process. The processing module is configured to verify whether the first terminal is allowed to perform ranging in the discovery process to obtain an intermediate verification result. The transceiver module is further configured to feed back the intermediate verification result to the first DDNMF network element, receive a third discovery measurement combination procedure verification request sent by a second DDNMF network element of a second HPLMN of a second terminal, wherein the second terminal is a terminal to be discovered for a discovery measurement combination procedure, and the third discovery measurement combination procedure verification request is used to request verification of whether the first terminal is allowed to perform ranging in the discovery process on the second terminal. The processing module is further configured to verify whether the first terminal is allowed to perform ranging in the discovery process on the second terminal to obtain a first verification result. The transceiver module is further configured to feed back the first verification result to the second DDNMF network element, and the second DDNMF network element generates first parameter information of a discovery measurement combination procedure of the first terminal in a case where the first verification result indicates that the first terminal is allowed to perform ranging in the discovery process on the second terminal.

28. A communications device, comprising: It includes: a transceiver; a memory; a processor connected with the transceiver and the memory respectively, configured to control wireless signal transceiving of the transceiver by executing computer executable instructions on the memory, and capable of implementing the method in any one of claims 1-22.

29. A computer storage medium, wherein, The computer storage medium stores computer executable instructions; the computer executable instructions are executed by the processor, and capable of implementing the method in any one of claims 1-22. The computer storage medium stores computer executable instructions; the computer executable instructions are executed by the processor, and capable of implementing the method in any one of claims 1-22.

Citation Information

Patent Citations

  • Method of measuring distance between nan device, and nan device

    WO2016149890A1

  • Safe communication method and apparatus

    WO2022027522A1