Ranging method and apparatus

CN117501717BActive Publication Date: 2026-08-18BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202280001845.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-02
Publication Date
2026-08-18
Estimated Expiration
2042-06-02

AI Technical Summary

Technical Problem

当参考UE直接在PC5上发起测距过程时,没有隐私检查机制,参考UE可以在未经目标UE许可的情况下获得目标UE的高度精确的距离和方向信息,从而导致位置隐私泄露

Benefits of technology

[0102]This application provides a ranging method and apparatus that receives a ranging request message from a first terminal device, performs privacy verification on the ranging request message according to a privacy configuration file stored in the second terminal device, and sends a ranging response message to the first terminal device. The ranging response message is used to confirm whether to accept the ranging request. This ensures that the first terminal device must pass the privacy verification of the second terminal device and obtain its permission before it can perform the ranging service and obtain the distance and direction of the second terminal device being measured. This effectively protects the privacy of the terminal device from being leaked and improves the security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117501717B_ABST
    Figure CN117501717B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a ranging method and device, a ranging request message sent by a first terminal device is received, privacy verification is performed on the ranging request message according to a privacy profile stored by a second terminal device, and a ranging response message is sent to the first terminal device, the ranging response message being used for confirming whether to accept the ranging request, so that the first terminal device needs to pass the privacy verification of the second terminal device and obtain permission of the second terminal device before performing a ranging service, the distance and direction of the second terminal device being measured are obtained, the privacy of the terminal device is effectively protected from being leaked, and the security of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a ranging method and apparatus. Background Technology

[0002] The ranging service defined in 3GPP Technical Report TR 22.855 refers to determining the distance between two UEs (User Equipment) and / or the direction between one UE and another through a direct communication connection. The UE that needs to be ranging from another UE is called the reference UE, and the UE being ranging is called the target UE.

[0003] The reference UE can directly initiate the ranging process by sending a ranging request to the target UE on PC5 (the underlying direct cellular communication protocol interface). When the reference UE initiates the ranging process directly on PC5, there is no privacy check mechanism. The reference UE can obtain highly accurate distance and direction information of the target UE without the target UE's permission, thus leading to location privacy leakage. Summary of the Invention

[0004] A first aspect of this application provides a ranging method, which is executed by a second terminal device, and the method includes:

[0005] Receive a ranging request message sent by the first terminal device;

[0006] The ranging request message is subjected to privacy verification based on the privacy configuration file stored in the second terminal device.

[0007] A ranging response message is sent to the first terminal device, the ranging response message being used to confirm whether the ranging request is accepted.

[0008] Optionally, the privacy profile includes at least one of the following information:

[0009] A terminal device list, wherein the terminal device list includes the identifier of at least one terminal device that the second terminal device is allowed to connect to;

[0010] Distance measurement type restriction information;

[0011] Geographical area limitations for distance measurement;

[0012] Distance measurement time limit information;

[0013] Distance measurement accuracy limitations;

[0014] Distance measurement direction accuracy limitation information;

[0015] Information on the number of auxiliary terminal devices.

[0016] Optionally, the ranging request message includes: the first terminal device identifier, the second terminal device identifier, and the ranging type;

[0017] The ranging type includes either the first terminal device directly initiating a ranging request, or the first terminal device initiating a ranging request upon being triggered by a third terminal device.

[0018] Optionally, in response to the ranging type being initiated by the first terminal device under the trigger of the third terminal device, the ranging request message may further include the identifier of the third terminal device.

[0019] Optionally, the ranging request message further includes ranging information, which includes at least one of the following:

[0020] Geographical area information for distance measurement; distance measurement time information; distance measurement accuracy information; distance measurement direction accuracy information.

[0021] Optionally, the step of performing privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device includes:

[0022] In response to the first terminal device identifier being in the terminal device list, the privacy verification of the ranging request message is passed;

[0023] If the first terminal device identifier is not in the list of terminal devices, the privacy verification of the ranging request message fails.

[0024] Optionally, the step of performing privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device includes:

[0025] Since both the first terminal device identifier and the third terminal device identifier are in the terminal device list, the privacy verification of the ranging request message is successful.

[0026] If the first terminal device identifier and / or the third terminal device identifier are not in the list of terminal devices, the privacy verification of the ranging request message fails.

[0027] Optionally, the step of performing privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device further includes:

[0028] Determine the number of auxiliary terminal devices triggered by the third terminal device;

[0029] If the number of auxiliary terminal devices triggered by the third terminal device is less than or equal to the auxiliary terminal device number limit information, the privacy verification of the ranging request message is passed;

[0030] If the number of auxiliary terminal devices triggered by the third terminal device exceeds the limit information for the number of auxiliary terminal devices, the privacy verification of the ranging request message fails.

[0031] Optionally, the step of performing privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device includes:

[0032] In response to the first terminal device being identified in the terminal device list and the ranging information conforming to the restrictions in the privacy configuration file, the privacy verification of the ranging request message is successful.

[0033] Optionally, in response to the privacy verification failure of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

[0034] Optionally, the method further includes:

[0035] Verify the integrity of the ranging request message;

[0036] In response to the failure of the integrity check of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

[0037] Optionally, in response to the integrity verification of the ranging request message passing and the privacy verification of the ranging request message passing, the ranging response message is used to confirm acceptance of the ranging request from the first terminal device.

[0038] A second aspect of this application provides a ranging method, which is executed by a first terminal device, and the method includes:

[0039] Send a ranging request message to the second terminal device, the ranging request message being used to request ranging of the second terminal device;

[0040] The system receives a ranging response message sent by the second terminal device, which is used to confirm whether the ranging request is accepted.

[0041] Optionally, the ranging request message includes: the first terminal device identifier, the second terminal device identifier, and the ranging type;

[0042] The ranging type includes either the first terminal device directly initiating a ranging request, or the first terminal device initiating a ranging request upon being triggered by a third terminal device.

[0043] Optionally, in response to a ranging request message triggered by a third terminal device of the ranging type, the ranging request message may further include the identifier of the third terminal device.

[0044] Optionally, the ranging request message further includes ranging information, which includes at least one of the following:

[0045] Geographical area information for distance measurement; distance measurement time information; distance measurement accuracy information; distance measurement direction accuracy information.

[0046] Optionally, the method further includes:

[0047] Verify the integrity of the ranging response message;

[0048] The ranging response message is rejected in response to the failure of the integrity check.

[0049] A third aspect of this application provides a ranging device applied to a second terminal device, the device comprising:

[0050] The receiving unit is used to receive a ranging request message sent by the first terminal device;

[0051] The processing unit is configured to perform privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device;

[0052] The sending unit is used to send a ranging response message to the first terminal device, the ranging response message being used to confirm whether the ranging request is accepted.

[0053] Optionally, the privacy profile includes at least one of the following information:

[0054] A terminal device list, wherein the terminal device list includes the identifier of at least one terminal device that the second terminal device is allowed to connect to;

[0055] Distance measurement type restriction information;

[0056] Geographical area limitations for distance measurement;

[0057] Distance measurement time limit information;

[0058] Distance measurement accuracy limitations;

[0059] Distance measurement direction accuracy limitation information;

[0060] Information on the number of auxiliary terminal devices.

[0061] Optionally, the ranging request message includes: the first terminal device identifier, the second terminal device identifier, and the ranging type;

[0062] The ranging type includes either the first terminal device directly initiating a ranging request, or the first terminal device initiating a ranging request upon being triggered by a third terminal device.

[0063] Optionally, in response to the ranging type being initiated by the first terminal device under the trigger of the third terminal device, the ranging request message may further include the identifier of the third terminal device.

[0064] Optionally, the ranging request message further includes ranging information, which includes at least one of the following:

[0065] Geographical area information for distance measurement; distance measurement time information; distance measurement accuracy information; distance measurement direction accuracy information.

[0066] Optionally, the processing unit is specifically used for:

[0067] In response to the first terminal device identifier being in the terminal device list, the privacy verification of the ranging request message is passed;

[0068] If the first terminal device identifier is not in the list of terminal devices, the privacy verification of the ranging request message fails.

[0069] Optionally, the processing unit is specifically used for:

[0070] Since both the first terminal device identifier and the third terminal device identifier are in the terminal device list, the privacy verification of the ranging request message is successful.

[0071] If the first terminal device identifier and / or the third terminal device identifier are not in the list of terminal devices, the privacy verification of the ranging request message fails.

[0072] Optionally, the processing unit is further configured to:

[0073] Determine the number of auxiliary terminal devices triggered by the third terminal device;

[0074] If the number of auxiliary terminal devices triggered by the third terminal device is less than or equal to the auxiliary terminal device number limit information, the privacy verification of the ranging request message is passed;

[0075] If the number of auxiliary terminal devices triggered by the third terminal device exceeds the limit information for the number of auxiliary terminal devices, the privacy verification of the ranging request message fails.

[0076] Optionally, the processing unit is specifically used for:

[0077] In response to the first terminal device being identified in the terminal device list and the ranging information conforming to the restrictions in the privacy configuration file, the privacy verification of the ranging request message is successful.

[0078] Optionally, in response to the privacy verification failure of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

[0079] Optionally, the processing unit is further configured to:

[0080] Verify the integrity of the ranging request message;

[0081] In response to the failure of the integrity check of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

[0082] Optionally, in response to the integrity verification of the ranging request message passing and the privacy verification of the ranging request message passing, the ranging response message is used to confirm acceptance of the ranging request from the first terminal device.

[0083] A fourth aspect of this application provides a ranging device applied to a first terminal device, the device comprising:

[0084] A sending unit is configured to send a ranging request message to a second terminal device, the ranging request message being used to request ranging of the second terminal device;

[0085] The receiving unit is configured to receive a ranging response message sent by the second terminal device, the ranging response message being used to confirm whether the ranging request is accepted.

[0086] Optionally, the ranging request message includes: the first terminal device identifier, the second terminal device identifier, and the ranging type;

[0087] The ranging type includes either the first terminal device directly initiating a ranging request, or the first terminal device initiating a ranging request upon being triggered by a third terminal device.

[0088] Optionally, in response to a ranging request message triggered by a third terminal device of the ranging type, the ranging request message may further include the identifier of the third terminal device.

[0089] Optionally, the ranging request message further includes ranging information, which includes at least one of the following:

[0090] Geographical area information for distance measurement; distance measurement time information; distance measurement accuracy information; distance measurement direction accuracy information.

[0091] Optionally, the device further includes:

[0092] A processing unit is used to verify the integrity of the ranging response message;

[0093] The processing unit is further configured to reject the ranging response message in response to a failure to verify the integrity of the ranging response message.

[0094] A fifth aspect of this application provides a communication device comprising a processor and a memory, the memory storing a computer program, the processor executing the computer program stored in the memory to cause the device to perform the ranging method described in the first aspect of the embodiment.

[0095] A sixth aspect of this application provides a communication device comprising a processor and a memory, the memory storing a computer program, the processor executing the computer program stored in the memory to cause the device to perform the ranging method described in the second aspect of the application.

[0096] A seventh aspect of this application provides a communication device including a processor and an interface circuit. The interface circuit is used to receive code instructions and transmit them to the processor, which is used to execute the code instructions to cause the device to perform the ranging method described in the first aspect of the application.

[0097] An eighth aspect of this application provides a communication device including a processor and an interface circuit. The interface circuit is used to receive code instructions and transmit them to the processor, which is used to execute the code instructions to cause the device to perform the ranging method described in the second aspect of the application.

[0098] A ninth aspect of this application provides a computer-readable storage medium for storing instructions that, when executed, enable the ranging method described in the first aspect of this application to be implemented.

[0099] A tenth aspect of this application provides a computer-readable storage medium for storing instructions that, when executed, enable the ranging method described in the second aspect of the application to be implemented.

[0100] The eleventh aspect of this application provides a computer program that, when run on a computer, causes the computer to perform the ranging allocation method described in the first aspect embodiment.

[0101] The twelfth aspect of this application provides a computer program that, when run on a computer, causes the computer to perform the ranging method described in the second aspect embodiment.

[0102] This application provides a ranging method and apparatus that receives a ranging request message from a first terminal device, performs privacy verification on the ranging request message according to a privacy configuration file stored in the second terminal device, and sends a ranging response message to the first terminal device. The ranging response message is used to confirm whether to accept the ranging request. This ensures that the first terminal device must pass the privacy verification of the second terminal device and obtain its permission before it can perform the ranging service and obtain the distance and direction of the second terminal device being measured. This effectively protects the privacy of the terminal device from being leaked and improves the security of the system.

[0103] Additional aspects and advantages of this application 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 application. Attached Figure Description

[0104] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be described below.

[0105] Figure 1a This application provides a schematic diagram of the architecture of a communication system.

[0106] Figure 1b This is a diagram illustrating the provision of ranging services to terminal devices with or without network coverage.

[0107] Figure 2 This is a schematic flowchart of a ranging method provided in an embodiment of this application;

[0108] Figure 3 This is a schematic flowchart of a ranging method provided in an embodiment of this application;

[0109] Figure 4 This is a schematic flowchart of a ranging method provided in an embodiment of this application;

[0110] Figure 5 This is a schematic flowchart of a ranging method provided in an embodiment of this application;

[0111] Figure 6 This is a schematic flowchart of a ranging method provided in an embodiment of this application;

[0112] Figure 7 This is a schematic flowchart of a ranging method provided in an embodiment of this application;

[0113] Figure 8 This is a schematic flowchart of a ranging method provided in an embodiment of this application;

[0114] Figure 9This is a schematic diagram of the structure of a ranging device provided in an embodiment of this application;

[0115] Figure 10 This is a schematic diagram of the structure of a ranging device provided in an embodiment of this application;

[0116] Figure 11 This is a schematic diagram of another ranging device provided in an embodiment of this application;

[0117] Figure 12 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation

[0118] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0119] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the embodiments of this application. The singular forms “a” and “the” as used in the embodiments of this application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0120] It should be understood that although the terms first, second, third, etc., may be used to describe various information in the embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words "if" and "suppose" as used herein can be interpreted as "when," "when," or "in response to a determination."

[0121] Embodiments of this application 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 throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0122] To better understand the ranging method disclosed in the embodiments of this application, the communication system to which the embodiments of this application are applicable is described below.

[0123] Please see Figure 1a , Figure 1a This application provides a schematic diagram of the architecture of a communication system according to an embodiment. The communication system may include, but is not limited to, a first terminal device and a second terminal device. Figure 1a The number and form of devices shown are for illustrative purposes only and do not constitute a limitation on the embodiments of this application. In actual applications, it may include two or more network devices and two or more terminal devices. Figure 1a The communication system shown is exemplified by a first terminal device 101 and a second terminal device 102.

[0124] It should be noted that the technical solutions of this application embodiment can be applied to various communication systems. For example, Long Term Evolution (LTE) systems, fifth-generation mobile communication systems, 5G New Radio systems, or other future new mobile communication systems.

[0125] In the embodiments of this application, the first terminal device 101 and the second terminal device 102 are user-side entities used to receive or transmit signals, such as mobile phones. Terminal devices can also be called terminal equipment, user equipment (UE), mobile station (MS), mobile terminal equipment (MT), etc. Terminal devices can be communication-enabled vehicles, smart cars, mobile phones, wearable devices, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminal devices in industrial control, wireless terminal devices in self-driving, wireless terminal devices in remote medical surgery, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, wireless terminal devices in smart homes, etc. The embodiments of this application do not limit the specific technology or device form used in the terminal devices.

[0126] The ranging service defined in 3GPP Technical Report TR 22.855 refers to determining the distance between two terminal devices and / or the direction between one terminal device and another through a direct communication connection. The terminal device that needs to measure the distance to another terminal device can be called the reference terminal device (the first terminal device 101 in this application embodiment), and the terminal device being measured can be called the target terminal device (the second terminal device 102 in this application embodiment).

[0127] like Figure 1a As shown, the first terminal device 101 has a reference plane and a reference direction. The direction from the second terminal device 102 to the first terminal device 101 is the angle between the line connecting the first terminal device 101 and the second terminal device 102 and the reference direction. It is represented by its azimuth direction and elevation direction. The azimuth direction of the second terminal device 102 is the angle formed between the projection of the line connecting the first terminal device 101 and the second terminal device 102 onto a plane perpendicular to the reference direction at the vertex and the reference direction. The elevation direction of the second terminal device 102 is the angle above the horizontal plane.

[0128] Distance measurement services can be supported with or without 5G network coverage. For example... Figure 1b As shown, Figure 1b This is a diagram illustrating the provision of ranging services to terminal devices with or without network coverage. If a licensed frequency band is used for ranging, it should be entirely under operator control.

[0129] First terminal device 101 can directly initiate the ranging process by sending a ranging request to second terminal device 102 on PC5 (the underlying direct cellular communication protocol interface). This process can be considered a ranging process based on the terminal device. When first terminal device 101 initiates the ranging process directly on PC5, there is no privacy check mechanism. First terminal device 101 can obtain highly accurate distance and direction information of second terminal device 102 without the permission of second terminal device 102, thus leading to location privacy leakage. Therefore, when first terminal device 101 initiates the ranging process directly on PC5, a mechanism needs to be designed to protect the privacy of second terminal device 102.

[0130] It is understood that the communication system described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0131] The distance measuring method and apparatus provided in this application will be described in detail below with reference to the accompanying drawings.

[0132] Please see Figure 2 , Figure 2 This is a flowchart illustrating a ranging method provided in an embodiment of this application. It should be noted that the ranging method in this embodiment is executed by a second terminal device. This method can be executed independently or in conjunction with any other embodiment of this application. Figure 2 As shown, the method may include the following steps:

[0133] Step 201: Receive the ranging request message sent by the first terminal device.

[0134] In this embodiment of the application, the second terminal device can receive a ranging request message sent by the first terminal device, receive the ranging request initiated by the first terminal device, and perform privacy verification on the ranging request message to determine whether to allow the first terminal device to perform the ranging service.

[0135] In this embodiment of the application, the secure direct connection between the first terminal device and the second terminal device is established based on the ProSe (Proximity-based Services) process.

[0136] In some implementations, the ranging request message includes: a first terminal device identifier, a second terminal device identifier, and a ranging type.

[0137] The ranging type can be direct ranging, which means the first terminal device directly initiates the ranging request, or ranging triggered by the third terminal device, which means the first terminal device initiates the ranging request under the trigger of the third terminal device.

[0138] In some implementations, in response to the ranging type being initiated by the first terminal device upon triggering by the third terminal device, the ranging request message also includes the identifier of the third terminal device.

[0139] In some implementations, the ranging request message further includes ranging information, which includes at least one of the following: ranging geographic area information; ranging time information; ranging distance accuracy information; and ranging direction accuracy information.

[0140] Among them, the ranging geographic area information refers to the geographic area where the ranging task requested by the first terminal device is executed;

[0141] The ranging time information refers to the time period in which the ranging task requested by the first terminal device takes place;

[0142] The ranging accuracy information refers to the ranging accuracy required by the ranging task requested by the first terminal device;

[0143] The ranging direction accuracy information refers to the ranging direction accuracy required by the ranging task requested by the first terminal device.

[0144] In some implementations, the second terminal device can also perform an integrity check on the received ranging request message to verify whether the request message has been tampered with. If the integrity check fails, it indicates that the ranging request message has been tampered with, and the second terminal device can reject the ranging request from the first terminal device.

[0145] Step 202: Perform privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device.

[0146] In this embodiment of the application, the second terminal device can securely store a privacy configuration file and perform privacy verification on the ranging request message sent by the first terminal device according to the privacy configuration file to determine whether the first terminal device is allowed to perform the ranging service.

[0147] It should be noted that, in this embodiment of the application, the second terminal device is able to transfer the locally stored privacy configuration file from the public layer to the ProSe layer.

[0148] In some implementations, the privacy profile includes at least one of the following information: a list of terminal devices; ranging type restriction information; ranging geographical area restriction information; ranging time restriction information; ranging distance accuracy restriction information; ranging direction accuracy restriction information; and auxiliary terminal device number restriction information.

[0149] The terminal device list is a list of terminal devices that the second terminal device trusts and allows to connect. The terminal device list includes the identifier of at least one terminal device that the second terminal device allows to connect.

[0150] The ranging type restriction information refers to the ranging types supported by the second terminal device;

[0151] The distance measurement geographical area restriction information refers to the area where the second terminal device is allowed to measure distances.

[0152] The ranging time limit information refers to the time period during which the second terminal device is allowed to be ranging.

[0153] The ranging distance accuracy limit information refers to the maximum accuracy of the ranging distance allowed by the second terminal device;

[0154] The ranging direction accuracy limit information refers to the highest accuracy of the ranging direction allowed by the second terminal device;

[0155] The auxiliary terminal device quantity limit information refers to the maximum number of auxiliary terminal devices that can participate in the collaborative ranging process.

[0156] It should be noted that auxiliary terminal devices participate in the collaborative ranging process; the more auxiliary terminal devices there are, the higher the accuracy of the final ranging result. If the first terminal device initiates the ranging request at the trigger of the third terminal device, then the first terminal device is an auxiliary terminal device. The third terminal device can trigger at least one auxiliary terminal device to initiate a ranging request to the second terminal device.

[0157] In some implementations, the ranging request message passes privacy verification in response to the first terminal device being identified in the list of terminal devices.

[0158] In some implementations, the ranging request message passes privacy verification in response to the fact that both the first terminal device identifier and the third terminal device identifier are in the terminal device list.

[0159] In some implementations, the second terminal device can also determine the number of auxiliary terminal devices triggered by the third terminal device. In response to the number of auxiliary terminal devices triggered by the third terminal device being less than or equal to the auxiliary terminal device number limit information, the ranging request message passes privacy verification.

[0160] In some implementations, in response to the first terminal device being identified in the list of terminal devices and the ranging information conforming to the restrictions in the privacy profile, the ranging request message passes privacy verification.

[0161] Step 203: Send a ranging response message to the first terminal device. The ranging response message is used to confirm whether the ranging request is accepted.

[0162] In this embodiment, after performing privacy verification on the ranging request message sent by the first terminal device, the second terminal device can send a ranging response message to the first terminal device. This ranging response message is used to confirm whether the ranging request is accepted. The first terminal device can determine whether the ranging request is allowed or rejected based on the ranging response message.

[0163] In some implementations, in response to the privacy verification failure of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

[0164] It is understood that in some implementations, in response to the privacy verification of the ranging request message being passed, the ranging response message is used to confirm acceptance of the ranging request from the first terminal device, and the second terminal device accepts the ranging request and continues to perform the ranging task.

[0165] In some implementations, in response to the ranging response message used to reject the ranging request of the first terminal device, the ranging response message also includes a reason for rejecting the ranging request.

[0166] In summary, by receiving a ranging request message from the first terminal device, and verifying the privacy of the ranging request message according to the privacy configuration file stored in the second terminal device, a ranging response message is sent to the first terminal device. This ranging response message is used to confirm whether the ranging request is accepted. This ensures that the first terminal device must pass the privacy verification of the second terminal device and obtain its permission before it can perform the ranging service and obtain the distance and direction of the second terminal device being measured. This effectively protects the privacy of the terminal devices from being leaked and improves the security of the system.

[0167] Please see Figure 3 , Figure 3 This is a flowchart illustrating a ranging method provided in an embodiment of this application. It should be noted that the ranging method in this embodiment is executed by a terminal device. This method can be executed independently or in conjunction with any other embodiment of this application. Figure 3 As shown, the method may include the following steps:

[0168] Step 301: Receive the ranging request message sent by the first terminal device.

[0169] In this embodiment of the application, the second terminal device can receive a ranging request message sent by the first terminal device, receive the ranging request initiated by the first terminal device, and perform privacy verification on the ranging request message to determine whether to allow the first terminal device to perform the ranging service.

[0170] In this embodiment of the application, the secure direct connection between the first terminal device and the second terminal device is established based on the ProSe process.

[0171] In some implementations, the ranging request message includes: a first terminal device identifier, a second terminal device identifier, and a ranging type.

[0172] The ranging type can be direct ranging, which means the first terminal device directly initiates the ranging request, or ranging triggered by the third terminal device, which means the first terminal device initiates the ranging request under the trigger of the third terminal device.

[0173] In some implementations, in response to the ranging type being initiated by the first terminal device upon triggering by the third terminal device, the ranging request message also includes the identifier of the third terminal device.

[0174] In some implementations, the ranging request message further includes ranging information, which includes at least one of the following: ranging geographic area information; ranging time information; ranging distance accuracy information; and ranging direction accuracy information.

[0175] Among them, the ranging geographic area information refers to the geographic area where the ranging task requested by the first terminal device is executed;

[0176] The ranging time information refers to the time period in which the ranging task requested by the first terminal device takes place;

[0177] The ranging accuracy information refers to the ranging accuracy required by the ranging task requested by the first terminal device;

[0178] The ranging direction accuracy information refers to the ranging direction accuracy required by the ranging task requested by the first terminal device.

[0179] Step 302: Verify the integrity of the ranging request message.

[0180] In this embodiment of the application, the second terminal device can perform integrity verification on the received ranging request message to determine that the ranging request message has not been tampered with.

[0181] In some implementations, if the integrity check of the ranging request message fails, it indicates that the ranging request message has been tampered with, and the second terminal device rejects the ranging request from the first terminal device.

[0182] In some implementations, if the integrity verification of the ranging request message passes, it indicates that the ranging request message has not been tampered with, and the second terminal device continues to perform privacy verification on the ranging request message.

[0183] Step 303: Perform privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device.

[0184] In this embodiment of the application, the second terminal device can securely store a privacy configuration file and perform privacy verification on the ranging request message sent by the first terminal device according to the privacy configuration file to determine whether the first terminal device is allowed to perform the ranging service.

[0185] It should be noted that, in this embodiment of the application, the second terminal device is able to transfer the locally stored privacy configuration file from the public layer to the ProSe layer.

[0186] In some implementations, the privacy profile includes at least one of the following information: a list of terminal devices; ranging type restriction information; ranging geographical area restriction information; ranging time restriction information; ranging distance accuracy restriction information; ranging direction accuracy restriction information; and auxiliary terminal device number restriction information.

[0187] The terminal device list is a list of terminal devices that the second terminal device trusts and allows to connect. The terminal device list includes the identifier of at least one terminal device that the second terminal device allows to connect.

[0188] The ranging type restriction information refers to the ranging types supported by the second terminal device;

[0189] The distance measurement geographical area restriction information refers to the area where the second terminal device is allowed to measure distances.

[0190] The ranging time limit information refers to the time period during which the second terminal device is allowed to be ranging.

[0191] The ranging distance accuracy limit information refers to the maximum accuracy of the ranging distance allowed by the second terminal device;

[0192] The ranging direction accuracy limit information refers to the highest accuracy of the ranging direction allowed by the second terminal device;

[0193] The auxiliary terminal device quantity limit information refers to the maximum number of auxiliary terminal devices that can participate in the collaborative ranging process.

[0194] It should be noted that auxiliary terminal devices participate in the collaborative ranging process; the more auxiliary terminal devices there are, the higher the accuracy of the final ranging result. If the first terminal device initiates the ranging request at the trigger of the third terminal device, then the first terminal device is an auxiliary terminal device. The third terminal device can trigger at least one auxiliary terminal device to initiate a ranging request to the second terminal device.

[0195] In some implementations, the privacy verification of the ranging request message passes if the first terminal device identifier is in the terminal device list. If the first terminal device identifier is not in the terminal device list, the privacy verification of the ranging request message fails.

[0196] In some implementations, the ranging type initiated by the first terminal device is ranging triggered by the third terminal device, and the second terminal device needs to verify whether the first terminal device and the third terminal device are both in the list of allowed connection terminal devices.

[0197] If both the first terminal device identifier and the third terminal device identifier are in the terminal device list, the privacy verification of the ranging request message passes. If neither the first terminal device identifier nor the third terminal device identifier is in the terminal device list, the privacy verification of the ranging request message fails. In other words, both the first terminal device and the third terminal device must be in the terminal device list for the privacy verification of the ranging request message to pass. If either the first terminal device or the third terminal device is not in the terminal device list, the privacy verification of the ranging request message will fail.

[0198] In some implementations, the ranging initiated by the first terminal device is a ranging method triggered by a third terminal device, where the first terminal device is an auxiliary terminal device. The second terminal device can also determine the number of auxiliary terminal devices triggered by the third terminal device.

[0199] If the number of auxiliary terminal devices triggered by the third terminal device is less than or equal to the auxiliary terminal device number limit, the privacy verification of the ranging request message passes. If the number of auxiliary terminal devices triggered by the third terminal device exceeds the auxiliary terminal device number limit, the privacy verification of the ranging request message fails.

[0200] In some implementations, the privacy verification of the ranging request message passes only if all the ranging information conforms to the restrictions in the privacy profile. That is, the privacy verification of the ranging request message will only pass if all the ranging information in the ranging request message conforms to the restrictions in the privacy profile. If any one of the ranging information in the ranging request message does not conform to the restrictions in the privacy profile, the privacy verification of the ranging request message will fail.

[0201] It is understandable that the first terminal device identifier, ranging type, and ranging information included in the ranging request message must all comply with the restrictions in the privacy profile for the privacy verification of the ranging request message to pass.

[0202] If the ranging request is triggered by a third terminal device, the first terminal device identifier, the third terminal device identifier, the ranging type, and the ranging information included in the ranging request message must all comply with the restrictions in the privacy configuration file, and the number of auxiliary terminal devices triggered by the third terminal device must be less than or equal to the auxiliary terminal device number limit information for the ranging request message to pass the privacy verification.

[0203] Step 304: Send a ranging response message to the first terminal device. The ranging response message is used to confirm whether the ranging request is accepted.

[0204] In this embodiment, after performing privacy verification on the ranging request message sent by the first terminal device, the second terminal device can send a ranging response message to the first terminal device. This ranging response message is used to confirm whether the ranging request is accepted. The first terminal device can determine whether the ranging request is allowed or rejected based on the ranging response message.

[0205] In some implementations, in response to the privacy verification failure of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

[0206] It is understood that in some implementations, in response to the privacy verification of the ranging request message being passed, the ranging response message is used to confirm acceptance of the ranging request from the first terminal device, and the second terminal device accepts the ranging request and continues to perform the ranging task.

[0207] In some implementations, in response to the ranging response message used to reject the ranging request of the first terminal device, the ranging response message also includes a reason for rejecting the ranging request.

[0208] In summary, by receiving a ranging request message from the first terminal device, verifying the integrity of the ranging request message, and performing privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device, a ranging response message is sent to the first terminal device. This ranging response message is used to confirm whether the ranging request is accepted. This ensures that the first terminal device needs to pass the privacy verification of the second terminal device and obtain its permission before it can execute the ranging service and obtain the distance and direction of the second terminal device being measured. This effectively protects the privacy of the terminal devices from being leaked and improves the security of the system.

[0209] Please see Figure 4 , Figure 4 This is a flowchart illustrating a ranging method provided in an embodiment of this application. It should be noted that the ranging method in this embodiment is executed by a first terminal device. This method can be executed independently or in conjunction with any other embodiment of this application. Figure 4 As shown, the method may include the following steps:

[0210] Step 401: Send a ranging request message to the second terminal device. The ranging request message is used to request ranging of the second terminal device.

[0211] In this embodiment of the application, the first terminal device can send a ranging request message to the second terminal device, and the second terminal device can receive the ranging request initiated by the first terminal device and perform privacy verification on the ranging request message to determine whether to allow the first terminal device to perform the ranging service.

[0212] It is understood that, in this embodiment of the application, the ranging request message sent by the first terminal device to the second terminal device is used to request ranging of the second terminal device. The second terminal device can perform privacy verification on the ranging request message according to its own stored privacy profile, that is, the ranging request message can also be used for privacy verification of the second terminal device.

[0213] In this embodiment of the application, the secure direct connection between the first terminal device and the second terminal device is established based on the ProSe process.

[0214] In some implementations, the ranging request message includes: a first terminal device identifier, a second terminal device identifier, and a ranging type.

[0215] The ranging type can be direct ranging, which means the first terminal device directly initiates the ranging request, or ranging triggered by the third terminal device, which means the first terminal device initiates the ranging request under the trigger of the third terminal device.

[0216] In some implementations, in response to the ranging type being initiated by the first terminal device upon triggering by the third terminal device, the ranging request message also includes the identifier of the third terminal device.

[0217] In some implementations, the ranging request message further includes ranging information, which includes at least one of the following: ranging geographic area information; ranging time information; ranging distance accuracy information; and ranging direction accuracy information.

[0218] Among them, the ranging geographic area information refers to the geographic area where the ranging task requested by the first terminal device is executed;

[0219] The ranging time information refers to the time period in which the ranging task requested by the first terminal device takes place;

[0220] The ranging accuracy information refers to the ranging accuracy required by the ranging task requested by the first terminal device;

[0221] The ranging direction accuracy information refers to the ranging direction accuracy required by the ranging task requested by the first terminal device.

[0222] Step 402: Receive a ranging response message sent by the second terminal device. The ranging response message is used to confirm whether the ranging request is accepted.

[0223] In this embodiment, the first terminal device can receive a ranging response message sent by the second terminal device. This ranging response message is used to confirm whether the ranging request is accepted. Based on the ranging response message, the first terminal device can determine whether the ranging request is allowed or denied.

[0224] In some implementations, in response to the privacy verification failure of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

[0225] It is understood that in some implementations, in response to the privacy verification of the ranging request message being passed, the ranging response message is used to confirm acceptance of the ranging request from the first terminal device, and the second terminal device accepts the ranging request and continues to perform the ranging task.

[0226] In some implementations, the first terminal device can also perform an integrity check on the received ranging response message to verify whether the response message has been tampered with. If the integrity check fails, it indicates that the ranging response message has been tampered with, and the first terminal device can reject the ranging response message.

[0227] In some implementations, in response to the ranging response message used to reject the ranging request of the first terminal device, the ranging response message also includes a reason for rejecting the ranging request.

[0228] In summary, by sending a ranging request message to the second terminal device to request ranging from the second terminal device, and receiving a ranging response message from the second terminal device to confirm whether the ranging request is accepted, the first terminal device must pass the privacy verification of the second terminal device and obtain its permission before it can perform the ranging service and obtain the distance and direction of the second terminal device being measured. This effectively protects the privacy of the terminal device from being leaked and improves the security of the system.

[0229] Please see Figure 5 , Figure 5 This is a flowchart illustrating a ranging method provided in an embodiment of this application. It should be noted that the ranging method in this embodiment is executed by a first terminal device. This method can be executed independently or in conjunction with any other embodiment of this application. Figure 5 As shown, the method may include the following steps:

[0230] Step 501: Send a ranging request message to the second terminal device. The ranging request message is used to request ranging of the second terminal device.

[0231] In this embodiment of the application, the first terminal device can send a ranging request message to the second terminal device, and the second terminal device can receive the ranging request initiated by the first terminal device and perform privacy verification on the ranging request message to determine whether to allow the first terminal device to perform the ranging service.

[0232] In this embodiment of the application, the secure direct connection between the first terminal device and the second terminal device is established based on the ProSe process.

[0233] It is understood that, in this embodiment of the application, the ranging request message sent by the first terminal device to the second terminal device is used to request ranging of the second terminal device. The second terminal device can perform privacy verification on the ranging request message according to its own stored privacy profile, that is, the ranging request message can also be used for privacy verification of the second terminal device.

[0234] In some implementations, the ranging request message includes: a first terminal device identifier, a second terminal device identifier, and a ranging type.

[0235] The ranging type can be direct ranging, which means the first terminal device directly initiates the ranging request, or ranging triggered by the third terminal device, which means the first terminal device initiates the ranging request under the trigger of the third terminal device.

[0236] In some implementations, in response to the ranging type being initiated by the first terminal device upon triggering by the third terminal device, the ranging request message also includes the identifier of the third terminal device.

[0237] In some implementations, the ranging request message further includes ranging information, which includes at least one of the following: ranging geographic area information; ranging time information; ranging distance accuracy information; and ranging direction accuracy information.

[0238] Among them, the ranging geographic area information refers to the geographic area where the ranging task requested by the first terminal device is executed;

[0239] The ranging time information refers to the time period in which the ranging task requested by the first terminal device takes place;

[0240] The ranging accuracy information refers to the ranging accuracy required by the ranging task requested by the first terminal device;

[0241] The ranging direction accuracy information refers to the ranging direction accuracy required by the ranging task requested by the first terminal device.

[0242] In this embodiment of the application, the second terminal device can perform privacy verification on the ranging request message according to its own stored privacy profile, and obtain the privacy verification result of the ranging request message.

[0243] Step 502: Receive a ranging response message sent by the second terminal device. The ranging response message is used to confirm whether the ranging request is accepted.

[0244] In this embodiment, the first terminal device can receive a ranging response message sent by the second terminal device. This ranging response message is used to confirm whether the ranging request is accepted. Based on the ranging response message, the first terminal device can determine whether the ranging request is allowed or denied.

[0245] In some implementations, in response to the privacy verification failure of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

[0246] It is understood that in some implementations, in response to the privacy verification of the ranging request message being passed, the ranging response message is used to confirm acceptance of the ranging request from the first terminal device, and the second terminal device accepts the ranging request and continues to perform the ranging task.

[0247] Step 503: Verify the integrity of the ranging response message.

[0248] In this embodiment of the application, the first terminal device can perform integrity verification on the received ranging response message to determine that the ranging response message has not been tampered with.

[0249] In some implementations, if the integrity verification of the ranging response message fails, it indicates that the ranging response message has been tampered with, and the first terminal device can reject the ranging response message.

[0250] In some implementations, if the integrity verification of the ranging response message passes, it indicates that the ranging response message has not been tampered with, and the first terminal device receives and parses the ranging response message.

[0251] In summary, by sending a ranging request message to the second terminal device to request ranging from the second terminal device, and receiving a ranging response message from the second terminal device to confirm acceptance of the ranging request and verify the integrity of the ranging response message, the first terminal device must obtain permission from the second terminal device through privacy verification before it can perform the ranging service and obtain the distance and direction of the second terminal device being measured. This effectively protects the privacy of the terminal device from being leaked and improves the security of the system.

[0252] Please see Figure 6 , Figure 6 This is a flowchart illustrating a ranging method provided in an embodiment of this application. It should be noted that the ranging method in this embodiment is executed by a first terminal device. This method can be executed independently or in conjunction with any other embodiment of this application. Figure 6 As shown, the method may include the following steps:

[0253] Step 601: Upon triggering by the third terminal device, a ranging request message is sent to the second terminal device. This ranging request message is used to request ranging of the second terminal device.

[0254] In this embodiment of the application, the first terminal device sends a ranging request message to the second terminal device when triggered by the third terminal device. The second terminal device can receive the ranging request initiated by the first terminal device and perform privacy verification on the ranging request message to determine whether to allow the first terminal device to perform the ranging service.

[0255] In this embodiment of the application, the secure direct connection between the first terminal device and the second terminal device is established based on the ProSe process.

[0256] It is understood that, in this embodiment of the application, the ranging request message sent by the first terminal device to the second terminal device is used to request ranging of the second terminal device. The second terminal device can perform privacy verification on the ranging request message according to its own stored privacy profile, that is, the ranging request message can also be used for privacy verification of the second terminal device.

[0257] Optionally, in some embodiments, the first terminal device may receive indication information sent by the third terminal device, which is used to instruct the first terminal device to initiate a ranging request to the second terminal device.

[0258] It is understood that in this embodiment, the first terminal device initiates a ranging request to the second terminal device upon being triggered by the third terminal device. Therefore, the first terminal device is an auxiliary terminal device, serving the third terminal device. The third terminal device can trigger at least one terminal device to initiate a ranging request to the second terminal device, and the triggering at least one terminal device is at least one auxiliary terminal device serving the third terminal device.

[0259] In some implementations, the ranging request message includes: a first terminal device identifier, a second terminal device identifier, a third terminal device identifier, and a ranging type.

[0260] In this embodiment of the application, the ranging type is ranging triggered by a third terminal device, that is, the first terminal device initiates a ranging request under the triggering of the third terminal device.

[0261] In some implementations, the ranging request message further includes ranging information, which includes at least one of the following: ranging geographic area information; ranging time information; ranging distance accuracy information; and ranging direction accuracy information.

[0262] Among them, the ranging geographic area information refers to the geographic area where the ranging task requested by the first terminal device is executed;

[0263] The ranging time information refers to the time period in which the ranging task requested by the first terminal device takes place;

[0264] The ranging accuracy information refers to the ranging accuracy required by the ranging task requested by the first terminal device;

[0265] The ranging direction accuracy information refers to the ranging direction accuracy required by the ranging task requested by the first terminal device.

[0266] In this embodiment of the application, the second terminal device can perform privacy verification on the ranging request message according to its own stored privacy profile, and obtain the privacy verification result of the ranging request message.

[0267] Step 602: Receive a ranging response message sent by the second terminal device. The ranging response message is used to confirm whether the ranging request is accepted.

[0268] In this embodiment, the first terminal device can receive a ranging response message sent by the second terminal device. This ranging response message is used to confirm whether the ranging request is accepted. Based on the ranging response message, the first terminal device can determine whether the ranging request is allowed or denied.

[0269] In some implementations, in response to the privacy verification failure of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

[0270] It is understood that in some implementations, in response to the privacy verification of the ranging request message being passed, the ranging response message is used to confirm acceptance of the ranging request from the first terminal device, and the second terminal device accepts the ranging request and continues to perform the ranging task.

[0271] It is understood that, in this embodiment, the second terminal device can verify whether it supports ranging triggered by the third terminal device, verify whether the first terminal device identifier and the third terminal device identifier are both in the terminal device list in the privacy configuration file, verify whether the number of auxiliary terminal devices triggered by the third terminal device is less than or equal to the auxiliary terminal device number limit information, and verify whether the ranging information in the ranging request message complies with the limits in the privacy configuration file. If all verifications pass, the privacy verification of the ranging request message passes.

[0272] Step 603: Verify the integrity of the ranging response message.

[0273] In this embodiment of the application, the first terminal device can perform integrity verification on the received ranging response message to determine that the ranging response message has not been tampered with.

[0274] In some implementations, if the integrity verification of the ranging response message fails, it indicates that the ranging response message has been tampered with, and the first terminal device can reject the ranging response message.

[0275] In some implementations, if the integrity verification of the ranging response message passes, it indicates that the ranging response message has not been tampered with, and the first terminal device receives and parses the ranging response message.

[0276] Step 604: In response to the successful integrity verification of the ranging response message and the successful privacy verification of the ranging request message, the ranging result is sent to the third terminal device.

[0277] In this embodiment, if the integrity verification of the ranging response message passes, it indicates that the ranging response message has not been tampered with. The first terminal device receives and parses the ranging response message, and the privacy verification of the ranging request message passes, enabling the first terminal device to execute the ranging service. The first terminal device can then send the ranging result obtained from executing the ranging service to the third terminal device. In other words, the first terminal device acts as an auxiliary terminal device serving the third terminal device, sending its measured ranging result to the third terminal device.

[0278] In summary, by sending a ranging request message to the second terminal device upon triggering by the third terminal device, this ranging request message requests ranging of the second terminal device. The system then receives a ranging response message from the second terminal device, which confirms acceptance of the ranging request and verifies its integrity. Upon successful integrity verification and privacy verification of the ranging request message, the ranging result is sent to the third terminal device. This ensures that the first terminal device must obtain permission from the second terminal device through its privacy verification before executing the ranging service and obtaining the distance and direction of the measured second terminal device. This effectively protects the privacy of the terminal devices from leakage and improves system security.

[0279] Please see Figure 7 , Figure 7 This is a schematic flowchart of a ranging method provided in an embodiment of this application. This method can be executed independently or in conjunction with any other embodiment of this application. Figure 7 As shown, the method may include the following steps:

[0280] Step 701: The first terminal device sends a ranging request message to the second terminal device.

[0281] In this embodiment of the application, the secure direct connection between the first terminal device and the second terminal device is established based on the ProSe process.

[0282] It is understood that, in this embodiment of the application, the first terminal device sends a ranging request message to the second terminal device to request that the second terminal device perform ranging on the second terminal device. The second terminal device can perform privacy verification on the ranging request message according to its stored privacy profile.

[0283] In some implementations, the ranging request message includes: a first terminal device identifier, a second terminal device identifier, and a ranging type.

[0284] The ranging type can be direct ranging, which means the first terminal device directly initiates the ranging request, or ranging triggered by the third terminal device, which means the first terminal device initiates the ranging request under the trigger of the third terminal device.

[0285] In some implementations, in response to the ranging type being initiated by the first terminal device upon triggering by the third terminal device, the ranging request message also includes the identifier of the third terminal device.

[0286] In some implementations, the ranging request message further includes ranging information, which includes at least one of the following: ranging geographic area information; ranging time information; ranging distance accuracy information; and ranging direction accuracy information.

[0287] Among them, the ranging geographic area information refers to the geographic area where the ranging task requested by the first terminal device is executed;

[0288] The ranging time information refers to the time period in which the ranging task requested by the first terminal device takes place;

[0289] The ranging accuracy information refers to the ranging accuracy required by the ranging task requested by the first terminal device;

[0290] The ranging direction accuracy information refers to the ranging direction accuracy required by the ranging task requested by the first terminal device.

[0291] In this embodiment of the application, the second terminal device can perform privacy verification on the ranging request message according to its own stored privacy profile, and obtain the privacy verification result of the ranging request message.

[0292] Step 702: The second terminal device performs privacy verification on the ranging request message according to the stored privacy configuration file.

[0293] In this embodiment of the application, the second terminal device is able to transfer the locally stored privacy configuration file from the public layer to the ProSe layer.

[0294] In some implementations, the privacy profile includes at least one of the following information: a list of terminal devices; ranging type restriction information; ranging geographical area restriction information; ranging time restriction information; ranging distance accuracy restriction information; ranging direction accuracy restriction information; and auxiliary terminal device number restriction information.

[0295] The terminal device list is a list of terminal devices that the second terminal device trusts and allows to connect. The terminal device list includes the identifier of at least one terminal device that the second terminal device allows to connect.

[0296] The ranging type restriction information refers to the ranging types supported by the second terminal device;

[0297] The distance measurement geographical area restriction information refers to the area where the second terminal device is allowed to measure distances.

[0298] The ranging time limit information refers to the time period during which the second terminal device is allowed to be ranging.

[0299] The ranging distance accuracy limit information refers to the maximum accuracy of the ranging distance allowed by the second terminal device;

[0300] The ranging direction accuracy limit information refers to the highest accuracy of the ranging direction allowed by the second terminal device;

[0301] The auxiliary terminal device quantity limit information refers to the maximum number of auxiliary terminal devices that can participate in the collaborative ranging process.

[0302] It should be noted that auxiliary terminal devices participate in the collaborative ranging process; the more auxiliary terminal devices there are, the higher the accuracy of the final ranging result. If the first terminal device initiates the ranging request at the trigger of the third terminal device, then the first terminal device is an auxiliary terminal device. The third terminal device can trigger at least one auxiliary terminal device to initiate a ranging request to the second terminal device.

[0303] In some implementations, the privacy verification of the ranging request message passes if the first terminal device identifier is in the terminal device list. If the first terminal device identifier is not in the terminal device list, the privacy verification of the ranging request message fails.

[0304] In some implementations, the ranging type initiated by the first terminal device is ranging triggered by the third terminal device, and the second terminal device needs to verify whether the first terminal device and the third terminal device are both in the list of allowed connection terminal devices.

[0305] If both the first terminal device identifier and the third terminal device identifier are in the terminal device list, the privacy verification of the ranging request message passes. If neither the first terminal device identifier nor the third terminal device identifier is in the terminal device list, the privacy verification of the ranging request message fails. In other words, both the first terminal device and the third terminal device must be in the terminal device list for the privacy verification of the ranging request message to pass. If either the first terminal device or the third terminal device is not in the terminal device list, the privacy verification of the ranging request message will fail.

[0306] In some implementations, the ranging initiated by the first terminal device is a ranging method triggered by a third terminal device, where the first terminal device is an auxiliary terminal device. The second terminal device can also determine the number of auxiliary terminal devices triggered by the third terminal device.

[0307] If the number of auxiliary terminal devices triggered by the third terminal device is less than or equal to the auxiliary terminal device number limit, the privacy verification of the ranging request message passes. If the number of auxiliary terminal devices triggered by the third terminal device exceeds the auxiliary terminal device number limit, the privacy verification of the ranging request message fails.

[0308] In some implementations, the privacy verification of the ranging request message passes only if all the ranging information conforms to the restrictions in the privacy profile. That is, the privacy verification of the ranging request message will only pass if all the ranging information in the ranging request message conforms to the restrictions in the privacy profile. If any one of the ranging information in the ranging request message does not conform to the restrictions in the privacy profile, the privacy verification of the ranging request message will fail.

[0309] It is understandable that the first terminal device identifier, ranging type, and ranging information included in the ranging request message must all comply with the restrictions in the privacy profile for the privacy verification of the ranging request message to pass.

[0310] If the ranging request is triggered by a third terminal device, the first terminal device identifier, the third terminal device identifier, the ranging type, and the ranging information included in the ranging request message must all comply with the restrictions in the privacy configuration file, and the number of auxiliary terminal devices triggered by the third terminal device must be less than or equal to the auxiliary terminal device number limit information for the ranging request message to pass the privacy verification.

[0311] Step 703: The second terminal device sends a ranging response message to the first terminal device.

[0312] In this embodiment, after performing privacy verification on the ranging request message sent by the first terminal device, the second terminal device can send a ranging response message to the first terminal device. This ranging response message is used to confirm whether the ranging request is accepted. The first terminal device can determine whether the ranging request is allowed or rejected based on the ranging response message.

[0313] In some implementations, in response to the privacy verification failure of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

[0314] It is understood that in some implementations, in response to the privacy verification of the ranging request message being passed, the ranging response message is used to confirm acceptance of the ranging request from the first terminal device, and the second terminal device accepts the ranging request and continues to perform the ranging task.

[0315] In summary, by sending a ranging request message from the first terminal device to the second terminal device, and the second terminal device performing privacy verification on the ranging request message according to the stored privacy configuration file, the second terminal device sends a ranging response message to the first terminal device. This ensures that the first terminal device must pass the privacy verification of the second terminal device and obtain its permission before it can execute the ranging service and obtain the distance and direction of the second terminal device being measured. This effectively protects the privacy of the terminal devices from being leaked and improves the security of the system.

[0316] Please see Figure 8 , Figure 8 This is a schematic flowchart of a ranging method provided in an embodiment of this application. This method can be executed independently or in conjunction with any other embodiment of this application. Figure 8 As shown, the method may include the following steps:

[0317] Step 801: The third terminal device sends an indication message to the first terminal device, which triggers the first terminal device to initiate a ranging request to the second terminal device.

[0318] It should be noted that, in the embodiments of this application, the secure direct connection between the third terminal device and the first terminal device, and the secure direct connection between the first terminal device and the second terminal device, can both be established based on the ProSe process.

[0319] In this embodiment, the third terminal device can trigger the first terminal device to initiate a ranging request to the second terminal device. As one possible implementation, the first terminal device can receive indication information sent by the third terminal device, which instructs the first terminal device to initiate a ranging request to the second terminal device.

[0320] Optionally, the indication information may include a second terminal device identifier.

[0321] It is understood that in this embodiment, the first terminal device initiates a ranging request to the second terminal device upon being triggered by the third terminal device. Therefore, the first terminal device is an auxiliary terminal device, serving the third terminal device. The third terminal device can trigger at least one terminal device to initiate a ranging request to the second terminal device, and the triggering at least one terminal device is at least one auxiliary terminal device serving the third terminal device.

[0322] Step 802: Triggered by the third terminal device, the first terminal device sends a ranging request message to the second terminal device.

[0323] In this embodiment of the application, the first terminal device initiates a ranging request to the second terminal device when triggered by the third terminal device. The ranging request message includes: the identifier of the first terminal device, the identifier of the second terminal device, the identifier of the third terminal device, and the ranging type.

[0324] In this embodiment of the application, the ranging type is ranging triggered by a third terminal device, that is, the first terminal device initiates a ranging request under the triggering of the third terminal device.

[0325] In some implementations, the ranging request message further includes ranging information, which includes at least one of the following: ranging geographic area information; ranging time information; ranging distance accuracy information; and ranging direction accuracy information.

[0326] Among them, the ranging geographic area information refers to the geographic area where the ranging task requested by the first terminal device is executed;

[0327] The ranging time information refers to the time period in which the ranging task requested by the first terminal device takes place;

[0328] The ranging accuracy information refers to the ranging accuracy required by the ranging task requested by the first terminal device;

[0329] The ranging direction accuracy information refers to the ranging direction accuracy required by the ranging task requested by the first terminal device.

[0330] In this embodiment of the application, the second terminal device can perform privacy verification on the ranging request message according to its own stored privacy profile, and obtain the privacy verification result of the ranging request message.

[0331] Step 803: The second terminal device performs privacy verification on the ranging request message according to the stored privacy configuration file.

[0332] In this embodiment of the application, the second terminal device is able to transfer the locally stored privacy configuration file from the public layer to the ProSe layer.

[0333] In some implementations, the privacy profile includes at least one of the following information: a list of terminal devices; ranging type restriction information; ranging geographical area restriction information; ranging time restriction information; ranging distance accuracy restriction information; ranging direction accuracy restriction information; and auxiliary terminal device number restriction information.

[0334] The terminal device list is a list of terminal devices that the second terminal device trusts and allows to connect. The terminal device list includes the identifier of at least one terminal device that the second terminal device allows to connect.

[0335] The ranging type restriction information refers to the ranging types supported by the second terminal device;

[0336] The distance measurement geographical area restriction information refers to the area where the second terminal device is allowed to measure distances.

[0337] The ranging time limit information refers to the time period during which the second terminal device is allowed to be ranging.

[0338] The ranging distance accuracy limit information refers to the maximum accuracy of the ranging distance allowed by the second terminal device;

[0339] The ranging direction accuracy limit information refers to the highest accuracy of the ranging direction allowed by the second terminal device;

[0340] The auxiliary terminal device quantity limit information refers to the maximum number of auxiliary terminal devices that can participate in the collaborative ranging process.

[0341] It should be noted that auxiliary terminal devices participate in the collaborative ranging process; the more auxiliary terminal devices there are, the higher the accuracy of the final ranging result. In this embodiment, the first terminal device initiates the ranging request upon being triggered by the third terminal device, thus the first terminal device is an auxiliary terminal device. The third terminal device can trigger at least one auxiliary terminal device to initiate a ranging request to the second terminal device.

[0342] In some implementations, the second terminal device can perform integrity verification on the received ranging request message. In response to the integrity verification of the ranging request message passing, the second terminal device performs privacy verification on the ranging request message according to the stored privacy configuration file.

[0343] In response to the failure of the integrity check of the ranging request message, the second terminal device rejects the ranging request. That is, the ranging response message sent by the second terminal device to the first terminal device is used to reject the ranging request.

[0344] In this embodiment of the application, the second terminal device needs to verify whether the first terminal device and the third terminal device are both in the list of allowed connection terminal devices.

[0345] If both the first terminal device identifier and the third terminal device identifier are in the terminal device list, the privacy verification of the ranging request message passes. If neither the first terminal device identifier nor the third terminal device identifier is in the terminal device list, the privacy verification of the ranging request message fails. In other words, both the first terminal device and the third terminal device must be in the terminal device list for the privacy verification of the ranging request message to pass. If either the first terminal device or the third terminal device is not in the terminal device list, the privacy verification of the ranging request message will fail.

[0346] In this embodiment of the application, the second terminal device can also determine the number of auxiliary terminal devices triggered by the third terminal device.

[0347] If the number of auxiliary terminal devices triggered by the third terminal device is less than or equal to the auxiliary terminal device number limit, the privacy verification of the ranging request message passes. If the number of auxiliary terminal devices triggered by the third terminal device exceeds the auxiliary terminal device number limit, the privacy verification of the ranging request message fails.

[0348] In some implementations, the privacy verification of the ranging request message passes only if all the ranging information conforms to the restrictions in the privacy profile. That is, the privacy verification of the ranging request message will only pass if all the ranging information in the ranging request message conforms to the restrictions in the privacy profile. If any one of the ranging information in the ranging request message does not conform to the restrictions in the privacy profile, the privacy verification of the ranging request message will fail.

[0349] It is understood that, in the embodiments of this application, the first terminal device identifier, the third terminal device identifier, the ranging type, and the ranging information included in the ranging request message must all comply with the restrictions in the privacy configuration file, and the number of auxiliary terminal devices triggered by the third terminal device must be less than or equal to the auxiliary terminal device number restriction information for the privacy verification of the ranging request message to pass.

[0350] Step 804: The second terminal device sends a ranging response message to the first terminal device.

[0351] In this embodiment, after performing privacy verification on the ranging request message sent by the first terminal device, the second terminal device can send a ranging response message to the first terminal device. This ranging response message is used to confirm whether the ranging request is accepted. The first terminal device can determine whether the ranging request is allowed or rejected based on the ranging response message.

[0352] In some implementations, in response to the privacy verification failure of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

[0353] It is understood that, in some implementations, in response to the successful privacy verification of the ranging request message, the ranging response message is used to confirm acceptance of the ranging request from the first terminal device. The second terminal device accepts the ranging request and continues the ranging task.

[0354] In some implementations, in response to the ranging response message used to reject the ranging request of the first terminal device, the ranging response message also includes a reason for rejecting the ranging request.

[0355] Step 805: The first terminal device sends the ranging result to the third terminal device.

[0356] In some implementations, the first terminal device can perform integrity verification on the ranging response message sent by the second terminal device.

[0357] If the integrity verification of the ranging response message fails, it indicates that the ranging response message has been tampered with, and the first terminal device can reject the ranging response message.

[0358] If the integrity verification of the ranging response message passes, it means that the ranging response message has not been tampered with, and the first terminal device receives and parses the ranging response message.

[0359] In this embodiment, if the integrity verification of the ranging response message passes, it indicates that the ranging response message has not been tampered with. The first terminal device receives and parses the ranging response message, and the privacy verification of the ranging request message passes, enabling the first terminal device to execute the ranging service. The first terminal device can then send the ranging result obtained from executing the ranging service to the third terminal device. In other words, the first terminal device acts as an auxiliary terminal device serving the third terminal device, sending its measured ranging result to the third terminal device.

[0360] In summary, by sending an instruction message from a third terminal device to a first terminal device, which triggers the first terminal device to initiate a ranging request to a second terminal device, the first terminal device sends a ranging request message to the second terminal device. The second terminal device performs privacy verification on this ranging request message based on its stored privacy configuration file, then sends a ranging response message to the first terminal device. Finally, the first terminal device sends the ranging result to the third terminal device. This ensures that the first terminal device must pass the privacy verification of the second terminal device and obtain its permission before it can perform the ranging service and obtain the distance and direction of the measured second terminal device. This effectively protects the privacy of the terminal devices from leakage and improves system security.

[0361] Corresponding to the ranging methods provided in the above embodiments, this application also provides a ranging device. Since the ranging device provided in this application corresponds to the methods provided in the above embodiments, the implementation of the ranging method is also applicable to the ranging device provided in the following embodiments, which will not be described in detail in the following embodiments.

[0362] Please see Figure 9 , Figure 9 This is a schematic diagram of a ranging device provided in an embodiment of this application.

[0363] like Figure 9 As shown, the ranging device 900 includes: a receiving unit 910, a processing unit 920, and a transmitting unit 930, wherein:

[0364] The receiving unit 910 is used to receive a ranging request message sent by the first terminal device;

[0365] The processing unit 920 is used to perform privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device;

[0366] The sending unit 930 is also configured to send a ranging response message to the first terminal device, the ranging response message being used to confirm whether the ranging request is accepted.

[0367] Optionally, the privacy profile includes at least one of the following information:

[0368] A list of terminal devices, which includes the identifiers of at least one terminal device that the second terminal device is allowed to connect to;

[0369] Distance measurement type restriction information;

[0370] Geographical area limitations for distance measurement;

[0371] Distance measurement time limit information;

[0372] Distance measurement accuracy limitations;

[0373] Distance measurement direction accuracy limitation information;

[0374] Information on the number of auxiliary terminal devices.

[0375] Optionally, the ranging request message includes: the identifier of the first terminal device, the identifier of the second terminal device, and the ranging type;

[0376] The ranging type includes either the first terminal device directly initiating a ranging request, or the first terminal device initiating a ranging request upon being triggered by a third terminal device.

[0377] Optionally, in response to the ranging type being initiated by the first terminal device under the trigger of the third terminal device, the ranging request message may also include the identifier of the third terminal device.

[0378] Optionally, the ranging request message may also include ranging information, which may include at least one of the following:

[0379] Geographical area information for distance measurement; distance measurement time information; distance measurement accuracy information; distance measurement direction accuracy information.

[0380] Optionally, the processing unit 920 is specifically used for:

[0381] In response to the first terminal device being identified in the list of terminal devices, the privacy verification of the ranging request message is successful;

[0382] Since the first terminal device identifier is not in the list of terminal devices, the privacy verification of the ranging request message fails.

[0383] Optionally, the processing unit 920 is specifically used for:

[0384] Since both the first terminal device identifier and the third terminal device identifier are in the terminal device list, the privacy verification of the ranging request message is successful.

[0385] If the first terminal device identifier and / or the third terminal device identifier are not in the terminal device list, the privacy verification of the ranging request message fails.

[0386] Optionally, the processing unit 920 is also used for:

[0387] Determine the number of auxiliary terminal devices triggered by the third terminal device;

[0388] If the number of auxiliary terminal devices triggered by the third terminal device is less than or equal to the auxiliary terminal device number limit information, the privacy verification of the ranging request message is passed;

[0389] If the number of auxiliary terminal devices triggered by the third terminal device exceeds the limit for the number of auxiliary terminal devices, the privacy verification of the ranging request message fails.

[0390] Optionally, the processing unit 920 is specifically used for:

[0391] In response to the first terminal device being identified in the list of terminal devices, and the ranging information conforming to the restrictions in the privacy profile, the privacy verification of the ranging request message is successful.

[0392] Optionally, in response to the privacy verification failure of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

[0393] Optionally, the processing unit 920 is also used for:

[0394] Verify the integrity of the ranging request message;

[0395] In response to the failure of the integrity check of the ranging request message, the ranging request message is used to reject the ranging request of the first terminal device.

[0396] Optionally, in response to the integrity verification of the ranging request message passing and the privacy verification of the ranging request message passing, the ranging response message is used to confirm acceptance of the ranging request from the first terminal device.

[0397] The ranging device in this embodiment can receive a ranging request message sent by a first terminal device, perform privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device, and send a ranging response message to the first terminal device. The ranging response message is used to confirm whether to accept the ranging request. This means that the first terminal device needs to pass the privacy verification of the second terminal device and obtain the permission of the second terminal device before it can perform the ranging service and obtain the distance and direction of the second terminal device being measured. This effectively protects the privacy of the terminal device from being leaked and improves the security of the system.

[0398] Please see Figure 10 , Figure 10 This is a schematic diagram of a ranging device provided in an embodiment of this application.

[0399] like Figure 10 As shown, the ranging device 1000 includes: a receiving unit 1010 and a receiving unit 1020, wherein:

[0400] The sending unit 1010 is used to send a ranging request message to the second terminal device, the ranging request message being used to request ranging of the second terminal device.

[0401] The receiving unit 1020 is also configured to receive a ranging response message sent by the second terminal device, the ranging response message being used to confirm whether the ranging request is accepted.

[0402] Optionally, the ranging request message includes: the identifier of the first terminal device, the identifier of the second terminal device, and the ranging type;

[0403] The ranging type includes either the first terminal device directly initiating a ranging request, or the first terminal device initiating a ranging request upon being triggered by a third terminal device.

[0404] Optionally, in response to ranging triggered by a third terminal device, the ranging request message may also include the identifier of the third terminal device.

[0405] Optionally, the ranging request message may also include ranging information, which may include at least one of the following:

[0406] Geographical area information for distance measurement; distance measurement time information; distance measurement accuracy information; distance measurement direction accuracy information.

[0407] Optionally, the device further includes:

[0408] A processing unit (not shown in the figure) is used to verify the integrity of the ranging response message;

[0409] The processing unit is also configured to reject the ranging response message in response to a failure to verify the integrity of the ranging response message.

[0410] The ranging device in this embodiment can send a ranging request message to a second terminal device to request ranging from the second terminal device, and receive a ranging response message from the second terminal device to confirm whether to accept the ranging request. This ensures that the first terminal device needs to pass the privacy verification of the second terminal device and obtain its permission before it can perform the ranging service and obtain the distance and direction of the second terminal device being measured. This effectively protects the privacy of the terminal device from being leaked and improves the security of the system.

[0411] To implement the above embodiments, this application also proposes a communication device, including: a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program stored in the memory to cause the device to perform... Figures 2 to 3 The method shown in the embodiment.

[0412] To implement the above embodiments, this application also proposes a communication device, including: a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program stored in the memory to cause the device to perform... Figures 4 to 6 The method shown in the embodiment.

[0413] To implement the above embodiments, this application also proposes a communication device, including: a processor and an interface circuit, wherein the interface circuit is used to receive code instructions and transmit them to the processor, and the processor is used to execute the code instructions to perform... Figures 2 to 3 The method shown in the embodiment.

[0414] To implement the above embodiments, this application also proposes a communication device, including: a processor and an interface circuit, wherein the interface circuit is used to receive code instructions and transmit them to the processor, and the processor is used to execute the code instructions to perform... Figures 4 to 6 The method shown in the embodiment.

[0415] Please see Figure 11 , Figure 11 This is a schematic diagram of another ranging device provided in an embodiment of this application. The ranging device 1100 can be a network device, a terminal 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 terminal device in implementing the above methods. This device can be used to implement the methods described in the above method embodiments, and for details, please refer to the description in the above method embodiments.

[0416] The ranging device 1100 may include one or more processors 1101. The processor 1101 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 ranging device (e.g., a base station, baseband chip, terminal equipment, terminal equipment chip, DU or CU, etc.), execute computer programs, and process data from the computer programs.

[0417] Optionally, the ranging device 1100 may further include one or more memories 1102, on which a computer program 1103 may be stored. The processor 1101 executes the computer program 1103 to cause the ranging device 1100 to perform the method described in the above method embodiments. The computer program 1103 may be embedded in the processor 1101, in which case the processor 1101 may be implemented in hardware.

[0418] Optionally, the memory 1102 may also store data. The ranging device 1100 and the memory 1102 can be configured separately or integrated together.

[0419] Optionally, the ranging device 1100 may also include a transceiver 1105 and an antenna 1106. The transceiver 1105 may be referred to as a transceiver unit, transceiver, or transceiver circuit, etc., and is used to implement the transmitting and receiving functions. The transceiver 1105 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.

[0420] Optionally, the ranging device 1100 may further include one or more interface circuits 1107. The interface circuit 1107 is used to receive code instructions and transmit them to the processor 1101. The processor 1101 executes the code instructions to cause the ranging device 1100 to perform the method described in the above method embodiments.

[0421] In one implementation, the processor 1101 may include a transceiver for implementing receiving and transmitting 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 receiving and transmitting 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.

[0422] In one implementation, the ranging device 1100 may include circuitry capable of transmitting, receiving, or communicating as described in the aforementioned 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.

[0423] The ranging device described in the above embodiments can be a network device or a terminal device, but the scope of the ranging device described in this application is not limited to this, and the structure of the ranging device can be unrestricted. Figures 9-10 The distance measuring device has limitations. It can be a standalone device or part of a larger device. For example, a distance measuring device can be:

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

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

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

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

[0428] (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.

[0429] (6) Others, etc.

[0430] For cases where the ranging device can be a chip or a chip system, please refer to [link / reference]. Figure 12 The diagram shows the structure of the chip. Figure 12 The chip shown includes a processor 1201 and an interface 1202. There can be one or more processors 1201, and multiple interfaces 1202.

[0431] For cases where the chip is used to implement the functions of the network device in the embodiments of this application:

[0432] Interface 1202 is used for code instructions and their transmission to the processor;

[0433] Processor 1201 is used to run code instructions to perform, such as Figures 2 to 3 The method.

[0434] Regarding the case where the chip is used to implement the functions of the terminal device in the embodiments of this application:

[0435] Interface 1202 is used for code instructions and their transmission to the processor;

[0436] Processor 1201 is used to run code instructions to perform, such as Figures 4 to 5 The method.

[0437] Optionally, the chip also includes a memory 1203 for storing necessary computer programs and data.

[0438] 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 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.

[0439] This application also provides a communication system, which includes the aforementioned... Figures 9-10 In the embodiments, the ranging device serves as a terminal device; alternatively, the system includes the aforementioned... Figure 11The ranging device in this embodiment serves as the terminal device.

[0440] 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.

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

[0442] 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. A computer program product includes one or more computer programs. When a computer program is loaded and executed on a computer, it generates, in whole or in part, the processes or functions according to the embodiments of this application. 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, a 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 that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can 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)).

[0443] 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.

[0444] 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".

[0445] The correspondences shown in the tables of this application can be configured or predefined. The values ​​of the information in each table are merely examples and can be configured to other values; this application is not limited to these values. When configuring the correspondences between information and parameters, it is not necessarily required to configure all the correspondences shown in each table. For example, the correspondences shown in some rows of the tables in this application may not be configured. Furthermore, appropriate modifications and adjustments can be made based on the above tables, such as splitting, merging, etc. The names of the parameters shown in the headings of the above tables can also use other names that the communication device can understand, and the values ​​or representations of the parameters can also be other values ​​or representations that the communication device can understand. In the implementation of the above tables, other data structures can also be used, such as arrays, queues, containers, stacks, linear lists, pointers, linked lists, trees, graphs, structures, classes, heaps, hash tables, or hash tables, etc.

[0446] The term "predefined" in this application can be understood as definition, pre-defined, stored, pre-stored, pre-negotiated, pre-configured, solidified, or pre-burned.

[0447] 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.

[0448] 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.

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

[0450] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A distance measurement method, characterized in that, The method is executed by a second terminal device, and the method includes: Receive a ranging request message sent by the first terminal device; The ranging request message is subjected to privacy verification based on the privacy configuration file stored in the second terminal device. Send a ranging response message to the first terminal device, the ranging response message being used to confirm whether to accept the ranging request; The ranging request message is sent by the first terminal device upon triggering by the third terminal device. The ranging request message includes: the identifier of the first terminal device, the identifier of the second terminal device, the identifier of the third terminal device, and the ranging type. The ranging type is: the first terminal device initiates a ranging request upon triggering by the third terminal device. The step of performing privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device includes: Verify whether both the first terminal device identifier and the third terminal device identifier are in the list of allowed connection terminal devices; Determine whether the number of auxiliary terminal devices triggered by the third terminal device exceeds the limit for the number of auxiliary terminal devices.

2. The method according to claim 1, characterized in that, The privacy profile includes at least one of the following information: A terminal device list, wherein the terminal device list includes the identifier of at least one terminal device that the second terminal device is allowed to connect to; Distance measurement type restriction information; Geographical area limitations for distance measurement; Distance measurement time limit information; Distance measurement accuracy limitations; Distance measurement direction accuracy limitation information; Information on the number of auxiliary terminal devices.

3. The method according to claim 2, characterized in that, The ranging request message further includes ranging information, which includes at least one of the following: Geographical area information for distance measurement; distance measurement time information; distance measurement accuracy information; distance measurement direction accuracy information.

4. The method according to claim 2, characterized in that, The step of performing privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device includes: In response to the first terminal device identifier being in the terminal device list, the privacy verification of the ranging request message is passed; If the first terminal device identifier is not in the list of terminal devices, the privacy verification of the ranging request message fails.

5. The method according to claim 2, characterized in that, The verification of whether the first terminal device identifier and the third terminal device identifier are both in the list of allowed connection terminal devices includes: Since both the first terminal device identifier and the third terminal device identifier are in the terminal device list, the privacy verification of the ranging request message is successful. If the first terminal device identifier and / or the third terminal device identifier are not in the list of terminal devices, the privacy verification of the ranging request message fails.

6. The method according to claim 5, characterized in that, The determination of whether the number of auxiliary terminal devices triggered by the third terminal device exceeds the auxiliary terminal device number limit information includes: If the number of auxiliary terminal devices triggered by the third terminal device is less than or equal to the auxiliary terminal device number limit information, the privacy verification of the ranging request message is passed; If the number of auxiliary terminal devices triggered by the third terminal device exceeds the limit information for the number of auxiliary terminal devices, the privacy verification of the ranging request message fails.

7. The method according to claim 3, characterized in that, The step of performing privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device includes: In response to the first terminal device being identified in the terminal device list and the ranging information conforming to the restrictions in the privacy configuration file, the privacy verification of the ranging request message is successful.

8. The method according to any one of claims 4-7, characterized in that, In response to the privacy verification failure of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

9. The method according to claim 1, characterized in that, The method further includes: Verify the integrity of the ranging request message; In response to the failure of the integrity check of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

10. The method according to claim 9, characterized in that, In response to the successful integrity verification of the ranging request message and the successful privacy verification of the ranging request message, the ranging response message is used to confirm acceptance of the ranging request from the first terminal device.

11. A distance measurement method, characterized in that, The method is executed by a first terminal device, and the method includes: Send a ranging request message to the second terminal device, the ranging request message being used to request ranging of the second terminal device; Receive a ranging response message sent by the second terminal device, the ranging response message being used to confirm whether to accept the ranging request; The ranging request message is sent by the first terminal device under the trigger of the third terminal device. The ranging request message includes: the identifier of the first terminal device, the identifier of the second terminal device, the identifier of the third terminal device, and the ranging type. The ranging type is: the first terminal device initiates the ranging request under the trigger of the third terminal device.

12. The method according to claim 11, characterized in that, The ranging request message further includes ranging information, which includes at least one of the following: Geographical area information for distance measurement; distance measurement time information; distance measurement accuracy information; distance measurement direction accuracy information.

13. The method according to claim 12, characterized in that, The method further includes: Verify the integrity of the ranging response message; The ranging response message is rejected in response to the failure of the integrity check.

14. A ranging device, characterized in that, The device is applied to a second terminal device, and the device includes: The receiving unit is used to receive a ranging request message sent by the first terminal device; The processing unit is configured to perform privacy verification on the ranging request message according to the privacy configuration file stored in the second terminal device; The sending unit is used to send a ranging response message to the first terminal device, the ranging response message being used to confirm whether the ranging request is accepted. The ranging request message is sent by the first terminal device upon triggering by the third terminal device. The ranging request message includes: the identifier of the first terminal device, the identifier of the second terminal device, the identifier of the third terminal device, and the ranging type. The ranging type is: the first terminal device initiates a ranging request upon triggering by the third terminal device. The processing unit is specifically used for: Verify whether both the first terminal device identifier and the third terminal device identifier are in the list of allowed connection terminal devices; Determine whether the number of auxiliary terminal devices triggered by the third terminal device exceeds the limit for the number of auxiliary terminal devices.

15. The apparatus according to claim 14, characterized in that, The privacy profile includes at least one of the following information: A terminal device list, wherein the terminal device list includes the identifier of at least one terminal device that the second terminal device is allowed to connect to; Distance measurement type restriction information; Geographical area limitations for distance measurement; Distance measurement time limit information; Distance measurement accuracy limitations; Distance measurement direction accuracy limitation information; Information on the number of auxiliary terminal devices.

16. The apparatus according to claim 15, characterized in that, The ranging request message further includes ranging information, which includes at least one of the following: Geographical area information for distance measurement; distance measurement time information; distance measurement accuracy information; distance measurement direction accuracy information.

17. The apparatus according to claim 15, characterized in that, The processing unit is specifically used for: In response to the first terminal device identifier being in the terminal device list, the privacy verification of the ranging request message is passed; If the first terminal device identifier is not in the list of terminal devices, the privacy verification of the ranging request message fails.

18. The apparatus according to claim 15, characterized in that, The processing unit is specifically used for: Since both the first terminal device identifier and the third terminal device identifier are in the terminal device list, the privacy verification of the ranging request message is successful. If the first terminal device identifier and / or the third terminal device identifier are not in the list of terminal devices, the privacy verification of the ranging request message fails.

19. The apparatus according to claim 18, characterized in that, The processing unit is also used for: Determine the number of auxiliary terminal devices triggered by the third terminal device; If the number of auxiliary terminal devices triggered by the third terminal device is less than or equal to the auxiliary terminal device number limit information, the privacy verification of the ranging request message is passed; If the number of auxiliary terminal devices triggered by the third terminal device exceeds the limit information for the number of auxiliary terminal devices, the privacy verification of the ranging request message fails.

20. The apparatus according to claim 16, characterized in that, The processing unit is specifically used for: In response to the first terminal device being identified in the terminal device list and the ranging information conforming to the restrictions in the privacy configuration file, the privacy verification of the ranging request message is successful.

21. The apparatus according to any one of claims 17-20, characterized in that, In response to the privacy verification failure of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

22. The apparatus according to claim 14, characterized in that, The processing unit is also used for: Verify the integrity of the ranging request message; In response to the failure of the integrity check of the ranging request message, the ranging response message is used to reject the ranging request of the first terminal device.

23. The apparatus according to claim 22, characterized in that, In response to the successful integrity verification of the ranging request message and the successful privacy verification of the ranging request message, the ranging response message is used to confirm acceptance of the ranging request from the first terminal device.

24. A ranging device, characterized in that, The device is applied to a first terminal device, and the device includes: A sending unit is configured to send a ranging request message to a second terminal device, the ranging request message being used to request ranging of the second terminal device; The receiving unit is configured to receive a ranging response message sent by the second terminal device, wherein the ranging response message is used to confirm whether the ranging request is accepted. The ranging request message is sent by the first terminal device under the trigger of the third terminal device. The ranging request message includes: the identifier of the first terminal device, the identifier of the second terminal device, the identifier of the third terminal device, and the ranging type. The ranging type is: the first terminal device initiates the ranging request under the trigger of the third terminal device.

25. The apparatus according to claim 24, characterized in that, The ranging request message further includes ranging information, which includes at least one of the following: Geographical area information for distance measurement; distance measurement time information; distance measurement accuracy information; distance measurement direction accuracy information.

26. The apparatus according to claim 25, characterized in that, The device further includes: A processing unit is used to verify the integrity of the ranging response message; The processing unit is further configured to reject the ranging response message in response to a failure to verify the integrity of the ranging response message.

27. A communication device, characterized in that, The device includes a processor and a memory, the memory storing a computer program, the processor executing the computer program stored in the memory to cause the device to perform the method as described in any one of claims 1 to 10.

28. A communication device, characterized in that, The device includes a processor and a memory, the memory storing a computer program, the processor executing the computer program stored in the memory to cause the device to perform the method as described in any one of claims 11 to 13.

29. A communication device, characterized in that, include: Processor and interface circuitry; The interface circuit is used to receive code instructions and transmit them to the processor; The processor is configured to run the code instructions to perform the method as described in any one of claims 1 to 10.

30. A communication device, characterized in that, include: Processor and interface circuitry; The interface circuit is used to receive code instructions and transmit them to the processor; The processor is configured to run the code instructions to perform the method as described in any one of claims 11 to 13.

31. A computer-readable storage medium for storing instructions that, when executed, cause the method as described in any one of claims 1 to 10 to be implemented.

32. A computer-readable storage medium for storing instructions that, when executed, cause the method of any one of claims 11 to 13 to be implemented.

Citation Information

Patent Citations

  • Responding to a ranging request from a peer device in a wireless network

    US20170041926A1