METHOD FOR DETERMINING KEY DERIVATION METHOD, COMMUNICATION METHOD, AND COMMUNICATION DEVICE - Patent application

By determining key retrieval based on PLMN ID and Layer 2 relay service codes, the method optimizes PC5 key acquisition, reducing inefficiencies and improving link establishment success in UE-to-network relay communication.

JP7746552B2Active Publication Date: 2025-09-30HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024516957
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-09-16
Filing Date
2022-09-08
Publication Date
2025-09-30
Estimated Expiration
2042-09-08

AI Technical Summary

Technical Problem

The existing methods for determining whether to obtain a PC5 key in control plane or user plane manner for UE-to-network relay communication are not well-defined, leading to inefficiencies and increased signaling overhead.

Method used

A method is provided to determine the key retrieval scheme based on predefined conditions, such as PLMN ID mismatch and Layer 2 relay service codes, to decide the key acquisition method, ensuring efficient key acquisition in control or user plane modes.

Benefits of technology

This approach reduces signaling overhead and improves the efficiency and success rate of establishing PC5 links by optimizing key acquisition based on specific conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007746552000001
    Figure 0007746552000001
  • Figure 0007746552000002
    Figure 0007746552000002
  • Figure 0007746552000003
    Figure 0007746552000003
Patent Text Reader

Abstract

The present application provides a method, a communication method, and a communication device for determining a key acquisition method. The method for determining a key acquisition method includes the steps of: when a preset condition is met, a first terminal device sends a first message to a second terminal device, the first message includes first instruction information, the first instruction information instructs to acquire a first PC5 key in a control plane manner, and the first PC5 key is a key used for a PC5 link between the first terminal device and the second terminal device; and the first terminal device receives a response message of the first message from the second terminal device, the response message indicating whether the second terminal device can acquire the first PC5 key. Based on the present application, the problem of how to determine a method for acquiring a PC5 key can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application claims priority to Chinese Patent Application No. 202111089119.7, entitled "Method, communication method, and communication device for determining a key acquisition scheme," filed with the State Intellectual Property Office of the People's Republic of China on September 16, 2021, which is incorporated herein by reference in its entirety.

[0002] The present application relates to the field of communications, and more particularly to a method for determining a key derivation scheme, a communication method, and a communication device. [Background technology]

[0003] When a user equipment (UE) is located outside of network coverage or when the communication signal between the user equipment and a radio access network (RAN) device is insufficient, the remote UE may use a relay UE to assist communication. In other words, the remote UE obtains service through communication between the remote UE and the relay UE and communication between the relay UE and the mobile network. The communication method from the remote UE to the network via the relay UE is sometimes called UE-to-network relay communication.

[0004] Before a relay UE provides service to a remote UE, the remote UE and the relay UE establish a PC5 unicast link. During the process of establishing the PC5 unicast link, the remote UE and the relay UE can obtain a PC5 key used for the PC5 unicast link from the network side in a control plane manner or a user plane manner. However, currently, the conditions on which the remote UE and the relay UE select whether to obtain the PC5 key in the control plane manner or the user plane manner have not been defined. Summary of the Invention [Means for solving the problem]

[0005] To solve the problem of how to determine the method for obtaining a PC5 key, the present application provides a method for determining the key obtaining method.

[0006] According to a first aspect, there is provided a method for determining a key retrieval scheme, the method including the steps of: a first terminal device sending a first message to a second terminal device when a preset condition is satisfied, the first message including first instruction information, the first instruction information instructing to retrieve a first PC5 key in a control plane manner, the first PC5 key being a key used for a PC5 link between the first terminal device and the second terminal device; and receiving a response message from the second terminal device to the first message, the response message indicating whether the second terminal device can retrieve the first PC5 key, the preset condition being that a first public land mobile network identifier (PLMN ID) of a home network of the first terminal device does not match a second PLMN ID of a home network of the second terminal device, a first relay service code used by the first terminal device in a proximity direct discovery procedure, and a second relay service code used by the first terminal device in a proximity direct discovery procedure. the first RSC used by the second terminal device in the proximity direct discovery procedure corresponds to a Layer 2 terminal device-to-network relayed communication service; the key information for determining the first PC5 key, which is obtained by the first terminal device from the key management function network element, expires; and the first terminal device has not obtained the key information.

[0007] Based on the above technical solution, the first terminal device determines whether to obtain the first PC5 key in a control plane manner based on whether at least one of the pre-set conditions is satisfied, so that the first terminal device and the second terminal device obtain the first PC5 key in different manners in different scenarios, and obtain the PC5 key in a manner with lower signaling overhead and less wasted resources, thereby improving the efficiency and success rate of establishing a PC5 link.

[0008] For example, when the first terminal device and the second terminal device are terminal devices of different public land mobile networks (PLMNs), a remote terminal device among the first terminal device and the second terminal device cannot access an internal network element in another PLMN by using a user plane, so when the first PLMN ID does not match the second PLMN ID, the first terminal device determines to obtain a first PC5 key in a control plane manner and sends first indication information to the second terminal device to ensure that the first terminal device and the second terminal device successfully obtain the first PC5 key and successfully establish a PC5 link.

[0009] As another example, in a Layer 2 terminal device-to-network relay communication service scenario, the relay terminal device is not responsible for establishing a protocol data unit (PDU) session for the remote terminal device. If the first PC5 key is obtained in a user plane manner, the processing burden and processing logic of the relay terminal device will be further increased. Therefore, when the first RSC or the second RSC corresponds to a Layer 2 UE-to-network relay communication service, the first terminal device determines to obtain the first PC5 key in a control plane manner and sends first indication information to the second terminal device, thereby avoiding the processing logic and processing burden of the relay terminal device in the first terminal device and the second terminal device.

[0010] For another example, in the user plane method, the remote terminal device needs to obtain key information from the key management network element in advance, and the key information distributed from the key management network element has a corresponding validity period. Specifically, after the key information expires, the remote terminal device cannot obtain the PC5 key or needs to obtain the key information from the key management network element again. If the remote terminal device is not within network coverage, the remote terminal device cannot obtain the key information from the key management network element. Therefore, if the key information obtained by the first terminal device from the key management network element expires or the first terminal device has not obtained the key information, the first terminal device decides to obtain a first PC5 key in the control plane method and sends first instruction information to the second terminal device. This can ensure that the first terminal device and the second terminal device successfully obtain the first PC5 key and successfully establish a PC5 link.

[0011] In one possible implementation, the first terminal device is a remote terminal device and the second terminal device is a relay terminal device, and the pre-configured conditions include one or more of: the first PLMN ID does not match the second PLMN ID; the first RSC corresponds to a Layer 2 terminal device-to-network relay communication service; the second RSC corresponds to a Layer 2 terminal device-to-network relay communication service; key information obtained by the first terminal device from a key management function network element expires; and the first terminal device has not obtained the key information.

[0012] In another possible implementation, the first terminal device is a relay terminal device, the second terminal device is a remote terminal device, and the pre-configured conditions include one or more of: the first PLMN ID does not match the second PLMN ID; the first RSC corresponds to a Layer 2 terminal device to network relay communication service; and the second RSC corresponds to a Layer 2 terminal device to network relay communication service.

[0013] With respect to the first aspect, in some possible implementations of the first aspect, the method further includes a step of the first terminal device receiving a third message from the second terminal device, the third message including a second PLMN ID and a second RSC.

[0014] For example, the key management function network element corresponds to the first PLMN ID or the second PLMN ID, and the first terminal device not obtaining the key information includes the first terminal device not obtaining the key information from the key management function network element. In other words, the pre-set condition includes one or more of the following: the first terminal device not obtaining the key information from the key management network element corresponding to the first PLMN ID or the second PLMN ID, or the key information obtained by the first terminal device from the first PLMN ID or the second PLMN ID expires.

[0015] It should be noted that if the first terminal device determines that the first PC5 key can be obtained in the control plane manner and the user plane manner, the first terminal device sends a first message including first instruction information to the second terminal device when a preset condition is met.

[0016] For example, the method further includes: a first terminal device receiving first information, the first information indicating that the first terminal device can obtain the PC5 key in a control plane manner and a user plane manner; and, correspondingly, the first terminal device may determine, based on the first information, that the first PC5 key can be obtained in a control plane manner and a user plane manner.

[0017] For another example, the method further includes: a first terminal device receiving first information, the first information including a mapping relationship between the first PLMN ID and the second instruction information or a mapping relationship between the second PLMN ID and the second instruction information, the second instruction information instructing to obtain a PC5 key in a control plane manner and a user plane manner. Correspondingly, the first terminal device may determine, based on the second instruction information, that the first PC5 key can be obtained in a control plane manner and a user plane manner.

[0018] It should be noted that in addition to the mapping relationship between the first PLMN ID and the second indication information or the mapping relationship between the second PLMN ID and the second indication information, the first information may further include a mapping relationship between the PLMN ID and indication information in all PLMNs that have roaming agreements with the operator of the home network of the first terminal device, which indicates a manner to obtain a PC5 key.

[0019] Optionally, when the second indication information corresponds to a second PLMN ID, the first PC5 key is generated by a network element in the second PLMN, or when the second indication information corresponds to the first PLMN ID, the first PC5 key is generated by a network element in the first PLMN.

[0020] In yet another example, the method further includes a step of: a first terminal device receiving first information, the first information including a mapping relationship between identifier information of a relay service corresponding to the PC5 link and second instruction information, the second instruction information instructing to obtain a PC5 key in a control plane manner and a user plane manner. Correspondingly, the first terminal device determines, based on the second instruction information, that the first PC5 key can be obtained in a control plane manner and a user plane manner. The identifier information of the relay service may be RSC information.

[0021] It should be noted that in addition to the mapping relationship between the identifier information of the relay service corresponding to the PC5 link and the second indication information, the first information may further include a mapping relationship between the relay service identifier information of all relay services that can be used by the first terminal device and corresponding indication information that indicates a manner for obtaining the PC5 key. The identifier information of the relay service may be RSC information.

[0022] Regarding the first aspect, in some possible implementations of the first aspect, the method further includes a step in which the first terminal device determines first indication information based on the first information.

[0023] According to a second aspect, there is provided a method for determining a key acquisition method, the method including the steps of: receiving a first message from a first terminal device by a second terminal device, the first message including first instruction information, the first instruction information instructing the second terminal device to acquire a first PC5 key in a control plane manner, the first PC5 key being a key used for a PC5 link between the first terminal device and the second terminal device; and transmitting, by the second terminal device, a response message to the first message sent by the first terminal device, the response message indicating whether the second terminal device can acquire the first PC5 key.

[0024] Based on the above technical solution, the first message sent by the first terminal device to the second terminal device includes first indication information, and the second terminal device sends a response message to the first terminal device for the first message, whereby the first terminal device can determine whether the second terminal device can obtain the first PC5 key based on the response message to ensure the successful establishment of the PC5 link or reduce signaling. For example, if the response message indicates that the second terminal device can obtain the first PC5 key, the first terminal device continues to perform the PC5 link establishment procedure with the second terminal device to ensure the successful establishment of the PC5 link. As another example, if the response message indicates that the second terminal device cannot obtain the first PC5 key, the first terminal device terminates the PC5 link establishment procedure with the second terminal device and reduces signaling.

[0025] Please note that if the second terminal device determines that the first PC5 key can be obtained in a control plane manner, the response message indicates that the second terminal device can obtain the first PC5 key, or if the second terminal device determines that the first PC5 key cannot be obtained in a control plane manner, the response message indicates that the second terminal device cannot obtain the first PC5 key.

[0026] For example, the method may further include a step of: the second terminal device receiving second information, the second information indicating that the second terminal device can obtain the PC5 key in a control plane manner and / or a user plane manner. Correspondingly, the second terminal device may determine, based on the second information, that the first PC5 key can be obtained in a control plane manner and / or a user plane manner.

[0027] For another example, the method further includes: a step of the second terminal device receiving second information, the second information including a mapping relationship between a first PLMN ID of a home network of the first terminal device and third indication information or a mapping relationship between a second PLMN ID of a home network of the second terminal device and the third indication information, the third indication information instructing to obtain the PC5 key in a control plane manner and / or a user plane manner. Correspondingly, the second terminal device may determine, based on the third indication information, that the first PC5 key can be obtained in a control plane manner and / or a user plane manner.

[0028] It should be noted that in addition to the mapping relationship between the first PLMN ID and the third indication information or the mapping relationship between the second PLMN ID and the third indication information, the second information may further include a mapping relationship between the PLMN ID and indication information in all PLMNs that have a roaming agreement with the operator of the home network of the second terminal device, which indicates a manner to obtain a PC5 key.

[0029] In yet another example, the method further includes: a step of receiving, by a second terminal device, second information, the second information including a mapping relationship between identifier information of a relay service corresponding to the PC5 link and third instruction information, the third instruction information instructing the second terminal device to obtain the PC5 key in a control plane manner and / or a user plane manner. Correspondingly, the second terminal device may determine, based on the third instruction information, that the first PC5 key can be obtained in a control plane manner and / or a user plane manner.

[0030] It should be noted that in addition to the mapping relationship between the identifier information of the relay service corresponding to the PC5 link and the third indication information, the first information may further include a mapping relationship between the relay service identifier information of all relay services that can be used by the second terminal device and corresponding indication information that indicates a manner for obtaining the PC5 key. The identifier information of the relay service may be RSC information.

[0031] According to a third aspect, there is provided a communication method, which may include: receiving, by a policy control function network element, a request message for requesting proximity-based services (ProSe) parameters for a first terminal device from an access and mobility management function network element; and sending, by the policy control function network element, the ProSe parameters to the first terminal device, the ProSe parameters including first information, the first information for determining a manner of deriving a first PC5 key, the first PC5 key being a key used for a PC5 link between the first terminal device and a second terminal device, and the manner of deriving the first PC5 key including a control plane manner and / or a user plane manner.

[0032] According to the above technical solution, the policy control function network element sends first information to the first terminal device in the ProSe parameter, so that the first terminal device can determine a method for obtaining a first PC5 key according to the first information, which helps the first terminal device and the second terminal device to successfully establish a PC5 link.

[0033] For example, the first information instructs that the PC5 key be obtained in a control plane manner and / or a user plane manner.

[0034] As another example, the first information includes a mapping relationship between a first PLMN ID of a home network of the first terminal device and the second instruction information or a mapping relationship between a second PLMN ID of a home network of the second terminal device and the second instruction information, and the second instruction information instructs to obtain a PC5 key in a control plane manner and a user plane manner.

[0035] Optionally, when the second indication information corresponds to a second PLMN ID, the first PC5 key is generated by a network element in the second PLMN, or when the second indication information corresponds to the first PLMN ID, the first PC5 key is generated by a network element in the first PLMN.

[0036] In yet another example, the first information includes a mapping relationship between identifier information of a relay service corresponding to a PC5 link and second instruction information, and the second instruction information instructs the relay service to acquire a PC5 key in a control plane manner and a user plane manner. The identifier information of the relay service may be RSC information.

[0037] The manner in which the policy control function network element obtains the first information is not limited in this embodiment of the present application.

[0038] For example, the policy control function network element obtains the first information from the access and mobility management function network element. In other words, the first request message includes the first information.

[0039] As another example, the method further includes the policy control function network element obtaining the first information from a local configuration.

[0040] In yet another example, the policy control function network element obtains the first information from the application function network element. In other words, the method further includes the policy control function network element receiving the first information from the application function network element.

[0041] As yet another example, the first network element obtains the first information from the first network element. In other words, the method further includes the steps of: the policy control function network element sending a request message to the first network element to request the first information; and the policy control function network element receiving the first information from the first network element. The first network element is an integrated data management network element or a direct communication discovery name management network element.

[0042] According to a fourth aspect, there is provided a communication method, the method including: receiving, by an access and mobility management function network element, subscription data of a first terminal device and first information from an integrated data management network element, where the first information is used to determine a manner in which the first terminal device derives a first PC5 key, the first PC5 key being a key used for a PC5 link between the first terminal device and a second terminal device, where the manner in which the first PC5 key is derives includes a control plane manner and / or a user plane manner; and sending, by the access and mobility management function network element, a request message to a policy control function network element to request ProSe parameters of the first terminal device, where the first request message includes the first information.

[0043] Based on the above technical solution, the access and mobility management function network element sends first information to the policy control function network element, so that the policy control function network element can send the first information to the first terminal device in a ProSe parameter, and the first terminal device can determine a manner for obtaining a first PC5 key based on the first information, which helps the first terminal device and the second terminal device to successfully establish a PC5 link.

[0044] For example, the first information instructs that the PC5 key be obtained in a control plane manner and / or a user plane manner.

[0045] As another example, the first information includes a mapping relationship between a first PLMN ID of a home network of the first terminal device and the second instruction information or a mapping relationship between a second PLMN ID of a home network of the second terminal device and the second instruction information, and the second instruction information instructs to obtain a PC5 key in a control plane manner and a user plane manner.

[0046] Optionally, when the second indication information corresponds to a second PLMN ID, the first PC5 key is generated by a network element in the second PLMN, or when the second indication information corresponds to the first PLMN ID, the first PC5 key is generated by a network element in the first PLMN.

[0047] In yet another example, the first information includes a mapping relationship between identifier information of a relay service corresponding to a PC5 link and second instruction information, and the second instruction information instructs the relay service to acquire a PC5 key in a control plane manner and a user plane manner. The identifier information of the relay service may be RSC information.

[0048] According to a fifth aspect, there is provided a communications apparatus, the communications apparatus including a transceiver unit configured to: send a first message to a second terminal device when a preset condition is satisfied, the first message including first instruction information, the first instruction information instructing the second terminal device to obtain a first PC5 key in a control plane manner, the first PC5 key being a key used for a PC5 link between the first terminal device and the second terminal device; receive a response message to the first message from the second terminal device, the response message indicating whether the second terminal device can obtain the first PC5 key. The pre-set conditions include one or more of: a first PLMN ID of a home network of the first terminal device does not match a second PLMN ID of a home network of the second terminal device; a first RSC used by the first terminal device in the proximity direct discovery procedure corresponds to a Layer 2 terminal device-to-network relayed communication service; a second RSC used by the second terminal device in the proximity direct discovery procedure corresponds to a Layer 2 terminal device-to-network relayed communication service; key information for determining a first PC5 key, obtained by the first terminal device from a key management function network element, expires; and the first terminal device has not obtained the key information.

[0049] With regard to the fifth aspect, in some implementations of the fifth aspect, the first terminal device is a remote terminal device, the second terminal device is a relay terminal device, and the pre-configured conditions include one or more of: the first PLMN ID does not match the second PLMN ID; the first RSC corresponds to a Layer 2 terminal device-to-network relay communication service; the second RSC corresponds to a Layer 2 terminal device-to-network relay communication service; key information obtained by the first terminal device from a key management function network element expires; and the first terminal device has not obtained the key information.

[0050] With regard to the fifth aspect, in some implementations of the fifth aspect, the first terminal device is a relay terminal device, the second terminal device is a remote terminal device, and the pre-set conditions include one or more of: the first PLMN ID does not match the second PLMN ID; the first RSC corresponds to a Layer 2 terminal device-to-network relay communication service; and the second RSC corresponds to a Layer 2 terminal device-to-network relay communication service.

[0051] With respect to the fifth aspect, in some implementations of the fifth aspect, the transceiver unit is further configured to receive a third message from the second terminal device, the third message including the second PLMN ID and the second RSC.

[0052] With respect to the fifth aspect, in some implementations of the fifth aspect, the key management function network element corresponds to the first PLMN ID or the second PLMN ID, and the first terminal device not obtaining the key information includes the first terminal device not obtaining the key information from the key management function network element.

[0053] With regard to the fifth aspect, in some implementations of the fifth aspect, the transceiver unit is further configured to receive first information, the first information indicating that the first terminal device can obtain the PC5 key in a control plane manner and a user plane manner.

[0054] With regard to the fifth aspect, in some implementation examples of the fifth aspect, the transceiver unit is further configured to receive first information, where the first information includes a mapping relationship between the first PLMN ID and the second instruction information or a mapping relationship between the second PLMN ID and the second instruction information, and the second instruction information instructs to obtain a PC5 key in a control plane manner and a user plane manner.

[0055] Regarding the fifth aspect, in some implementations of the fifth aspect, the transceiver unit is further configured to receive first information, where the first information includes a mapping relationship between identifier information of a relay service corresponding to a PC5 link and second instruction information, and the second instruction information instructs to obtain a PC5 key in a control plane manner and a user plane manner.

[0056] With regard to the fifth aspect, in some implementations of the fifth aspect, the communication device further includes a processing unit, wherein the processing unit is configured to determine first indication information based on the first information.

[0057] According to a sixth aspect, there is provided a communications apparatus, the communications apparatus including a transceiver unit configured to receive a first message from a first terminal device, the first message including first instruction information, the first instruction information instructing the second terminal device to obtain a first PC5 key in a control plane manner, the first PC5 key being a key used for a PC5 link between the first terminal device and the second terminal device, the transceiver unit further configured to send a response message to the first terminal device in response to the first message, the response message indicating whether the second terminal device can obtain the first PC5 key.

[0058] With respect to the sixth aspect, in some implementations of the sixth aspect, if the second terminal device is able to obtain the first PC5 key in a control plane manner, the response message indicates that the second terminal device is able to obtain the first PC5 key, or if the second terminal device is not able to obtain the first PC5 key in a control plane manner, the response message indicates that the second terminal device is not able to obtain the first PC5 key.

[0059] With regard to the sixth aspect, in some implementations of the sixth aspect, the transceiver unit is further configured to receive second information, the second information indicating that the second terminal device can obtain the PC5 key in a control plane manner and / or a user plane manner.

[0060] With regard to the sixth aspect, in some implementation examples of the sixth aspect, the transceiver unit is further configured to receive second information, wherein the second information includes a mapping relationship between a first PLMN ID of a home network of the first terminal device and third instruction information or a mapping relationship between a second PLMN ID of a home network of the second terminal device and the third instruction information, and the third instruction information instructs to obtain a PC5 key in a control plane manner and / or a user plane manner.

[0061] With regard to the sixth aspect, in some implementations of the sixth aspect, the transceiver unit is further configured to receive second information, the second information including a mapping relationship between identifier information of a relay service corresponding to the PC5 link and third instruction information, and the third instruction information instructs the PC5 key to be obtained in a control plane manner and / or a user plane manner.

[0062] According to a seventh aspect, there is provided a communications apparatus, the communications apparatus including a transceiver unit configured to receive, from an access and mobility management function network element, a request message for requesting ProSe parameters for a first terminal device. The transceiver unit is further configured to send the ProSe parameters to the first terminal device, the ProSe parameters including first information, the first information for determining a manner of deriving a first PC5 key, the first PC5 key being a key used for a PC5 link between the first terminal device and a second terminal device, and the manner of deriving the first PC5 key including a control plane manner and / or a user plane manner.

[0063] For example, the first information instructs that the PC5 key be obtained in a control plane manner and / or a user plane manner.

[0064] As another example, the first information includes a mapping relationship between a first PLMN ID of a home network of the first terminal device and the second instruction information or a mapping relationship between a second PLMN ID of a home network of the second terminal device and the second instruction information, and the second instruction information instructs to obtain a PC5 key in a control plane manner and a user plane manner.

[0065] Optionally, when the second indication information corresponds to a second PLMN ID, the first PC5 key is generated by a network element in the second PLMN, or when the second indication information corresponds to the first PLMN ID, the first PC5 key is generated by a network element in the first PLMN.

[0066] In yet another example, the first information includes a mapping relationship between identifier information of a relay service corresponding to a PC5 link and second instruction information, and the second instruction information instructs to obtain a PC5 key in a control plane manner and a user plane manner.

[0067] Regarding the seventh aspect, in some possible implementations of the seventh aspect, the first request message includes first information.

[0068] With regard to the seventh aspect, in some possible implementations of the seventh aspect, the transceiver unit is further configured to obtain the first information from a local setting.

[0069] With regard to the seventh aspect, in some possible implementations of the seventh aspect, the transceiver unit is further configured to receive the first information from the application function network element.

[0070] Regarding the seventh aspect, in some possible implementation examples of the seventh aspect, the transceiver unit is further configured to: send a request message to a first network element to request the first information, and the transceiver unit is further configured to receive the first information from the first network element, wherein the first network element is an integrated data management network element or a direct communication discovery name management network element.

[0071] According to an eighth aspect, there is provided a communications apparatus, the communications apparatus including a transceiver unit configured to receive subscription data of a first terminal device and first information from an integrated data management network element, the first information being used by the first terminal device to determine a manner in which the first terminal device derives a first PC5 key, the first PC5 key being a key used for a PC5 link between the first terminal device and a second terminal device, the manner in which the first PC5 key is derives including a control plane manner and / or a user plane manner. The transceiver unit is further configured to send a request message to a policy control function network element to request ProSe parameters of the first terminal device, the first request message including the first information.

[0072] For example, the first information instructs that the PC5 key be obtained in a control plane manner and / or a user plane manner.

[0073] As another example, the first information includes a mapping relationship between a first PLMN ID of a home network of the first terminal device and the second instruction information or a mapping relationship between a second PLMN ID of a home network of the second terminal device and the second instruction information, and the second instruction information instructs to obtain a PC5 key in a control plane manner and a user plane manner.

[0074] Optionally, when the second indication information corresponds to a second PLMN ID, the first PC5 key is generated by a network element in the second PLMN, or when the second indication information corresponds to the first PLMN ID, the first PC5 key is generated by a network element in the first PLMN.

[0075] In yet another example, the first information includes a mapping relationship between identifier information of a relay service corresponding to a PC5 link and second instruction information, and the second instruction information instructs to obtain a PC5 key in a control plane manner and a user plane manner.

[0076] According to a ninth aspect, the present application provides a communications device including a processor. The processor may be coupled to a memory and configured to execute instructions in the memory to perform a method according to any of the first aspect and possible implementations of the first aspect. The communications device further includes the memory. The communications device further includes a communications interface, the processor being coupled to the communications interface.

[0077] In one embodiment, the communication device is a first terminal device. When the communication device is a first terminal device, the communication interface may be a transceiver or an input / output interface.

[0078] In another embodiment, the communication device is a chip or chip system configured in the first terminal device. When the communication device is a chip or chip system configured in the first terminal device, the communication interface may be an input / output interface.

[0079] The transceiver may be a transceiver circuit. The input / output interface may be an input / output circuit.

[0080] According to a tenth aspect, the present application provides a communications device including a processor. The processor may be coupled to a memory and configured to execute instructions in the memory to perform a method according to any of the second aspect and possible implementations of the second aspect. The communications device further includes the memory. The communications device further includes a communications interface, the processor being coupled to the communications interface.

[0081] In one embodiment, the communication device is a second terminal device. When the communication device is a second terminal device, the communication interface may be a transceiver or an input / output interface.

[0082] In another embodiment, the communication device is a chip or chip system configured in the second terminal device. When the communication device is a chip or chip system configured in the second terminal device, the communication interface may be an input / output interface.

[0083] The transceiver may be a transceiver circuit. The input / output interface may be an input / output circuit.

[0084] According to an eleventh aspect, the present application provides a communications device including a processor. The processor may be coupled to a memory and configured to execute instructions in the memory to perform a method according to any of the third aspect and possible implementations of the third aspect. The communications device further includes the memory. The communications device further includes a communications interface, the processor being coupled to the communications interface.

[0085] In one embodiment, the communication device is a policy control function network element. When the communication device is a policy control function network element, the communication interface may be a transceiver or an input / output interface.

[0086] In another embodiment, the communication device is a chip or chip system configured in a policy control function network element. When the communication device is a chip or chip system configured in a policy control function network element, the communication interface may be an input / output interface.

[0087] The transceiver may be a transceiver circuit. The input / output interface may be an input / output circuit.

[0088] According to a twelfth aspect, the present application provides a communications device including a processor. The processor may be coupled to a memory and configured to execute instructions in the memory to perform a method according to any of the fourth aspect and possible implementations of the fourth aspect. The communications device further includes the memory. The communications device further includes a communications interface, the processor being coupled to the communications interface.

[0089] In one embodiment, the communication device is an access and mobility management function network element. When the communication device is an access and mobility management function network element, the communication interface may be a transceiver or an input / output interface.

[0090] In another embodiment, the communication device is a chip or chip system configured in the access and mobility management function network element. When the communication device is a chip or chip system configured in the access and mobility management function network element, the communication interface may be an input / output interface.

[0091] The transceiver may be a transceiver circuit. The input / output interface may be an input / output circuit.

[0092] According to a thirteenth aspect, the present application provides a processor including an input circuit, an output circuit, and a processing circuit configured to receive signals via the input circuit and transmit signals via the output circuit such that the processor performs the method in the aforementioned aspect.

[0093] In a specific implementation, the processor may be a chip, the input circuit may be an input pin, the output circuit may be an output pin, and the processing circuit may be a transistor, a gate circuit, a trigger, various logic circuits, etc. The input signal received by the input circuit may be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit may be, for example, but not limited to, output to a transmitter and transmitted by the transmitter. The input circuit and the output circuit may be the same circuit, and the circuit may be used as an input circuit and an output circuit at different times. The specific implementation of the processor and various circuits is not limited to this embodiment of the present application.

[0094] According to a fourteenth aspect, the present application provides a processing device including a communication interface and a processor. The communication interface is coupled to the processor. The communication interface is configured to output and / or transmit information. The information includes at least one of instructions and data. The processor is configured to execute a computer program such that the processing device performs the method in the aforementioned aspect.

[0095] According to a fifteenth aspect, the present application provides a processing device including a processor and a memory, wherein the processor is configured to read instructions stored in the memory, receive a signal by using a receiver, and transmit a signal by using a transmitter, such that the processing device performs the method in the aforementioned aspect.

[0096] Optionally, there are one or more processors. Where there is a memory, there may alternatively be one or more memories.

[0097] Optionally, the memory and the processor may be integrated with each other, or the memory and the processor may be located separately.

[0098] In a specific implementation, the memory may be a non-transitory memory such as a read only memory (ROM). The memory and the processor may be integrated on the same chip or may be separately located on different chips. The type of memory and the arrangement manner of the memory and the processor are not limited in this embodiment of the present application.

[0099] It should be understood that in the related information exchange process, for example, sending instruction information may be a process of outputting instruction information from a processor, and receiving instruction information may be a process of inputting the received instruction information to a processor. Specifically, the information output by the processor may be output to a transmitter, and the input information received by the processor may be from a receiver. The transmitter and the receiver may be collectively referred to as a transceiver.

[0100] The devices according to the fourteenth and fifteenth aspects may each be a chip. The processor may be implemented by hardware or software. If the processor is implemented by hardware, it may be a logic circuit, an integrated circuit, or the like. If the processor is implemented by software, it may be a general-purpose processor and is implemented by reading software code stored in a memory. The memory may be integrated into the processor or may be located outside the processor and exist independently.

[0101] According to a sixteenth aspect, the present application provides a computer program product. The computer program product includes a computer program (also called code or instructions). When the computer program is executed, the computer is enabled to perform the method in the aforementioned aspect.

[0102] According to a seventeenth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program (also referred to as code or instructions), which, when executed on a computer, enables the computer to perform the method in the aforementioned aspect.

[0103] According to an eighteenth aspect, the present application provides a communication system including the aforementioned first terminal device and second terminal device, or including the aforementioned first terminal device and / or second terminal device, a policy control function network element, and an access and mobility management function network element. [Brief explanation of the drawings]

[0104] [Figure 1] FIG. 1 is a schematic diagram of a network architecture applicable to an embodiment of the present application. [Figure 2] 10 is a schematic flowchart of establishing a unicast connection between a remote UE and a relay UE; [Figure 3]1 is a schematic flowchart of a method for determining a key derivation scheme according to an embodiment of the present application; [Figure 4] 4 is a schematic flowchart of a method for determining a key derivation scheme according to another embodiment of the present application; [Figure 5] 4 is a schematic flowchart of a method for determining a key derivation scheme according to another embodiment of the present application; [Figure 6] 4 is a schematic flowchart of a method for determining a key derivation scheme according to another embodiment of the present application; [Figure 7] 4 is a schematic flowchart of a method for determining a key derivation scheme according to another embodiment of the present application; [Figure 8] 1 is a schematic flowchart of a communication method according to an embodiment of the present application; [Figure 9] 4 is a schematic flowchart of a method for determining a key derivation scheme according to another embodiment of the present application; [Figure 10] 4 is a schematic flowchart of a method for determining a key derivation scheme according to another embodiment of the present application; [Figure 11] 1 is a schematic block diagram of a communication device according to an embodiment of the present application; [Figure 12] 1 is a schematic block diagram of a communication device according to an embodiment of the present application; [Figure 13] FIG. 1 is a schematic diagram of a chip system according to an embodiment of the present application. DETAILED DESCRIPTION OF THE INVENTION

[0105] The following describes the technical solutions of the present application with reference to the accompanying drawings.

[0106] The technical solutions provided in the embodiments of the present application may be applied to various communication systems, such as a long term evolution (LTE) system, a frequency division duplex (FDD) system, a time division duplex (TDD) system, a universal mobile telecommunication system (UMTS), a worldwide interoperability for microwave access (WiMAX) communication system, a 5G system or a new radio (NR) system, or a sixth generation (6G) or future communication system. The 5G mobile communication system in the present application includes a non-standalone (NSA) 5G mobile communication system or a standalone (SA) 5G mobile communication system. The communication system may alternatively be a public land mobile network (PLMN), a device-to-device (D2D) communication system, a machine-to-machine (M2M) communication system, an Internet of Things (IoT) communication system, a vehicle-to-everything (V2X) communication system, an unmanned aerial vehicle (UAV) communication system, or another communication system.

[0107] The following describes the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. In the description of the present application, " / " represents an "or" relationship between associated objects unless otherwise specified. For example, A / B may represent A or B. The term "and / or" in the present application only indicates an associated relationship for describing associated objects and indicates that three relationships may exist. For example, A and / or B may represent the following three cases: only A exists, both A and B exist, and only B exists, where A and B may be singular or plural. In addition, in the description of the present application, "plurality" means two or more than two unless otherwise specified. "At least one of the following items" or similar expressions means any combination of these items, including any combination of a single item or multiple items. For example, at least one item of a, b, or c may refer to a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c may be singular or plural. Additionally, to clearly describe the technical solutions in the embodiments of the present application, terms such as "first" and "second" are used in the embodiments of the present application to distinguish between identical or similar items having essentially the same function or purpose. Those skilled in the art will understand that terms such as "first" and "second" do not limit the number or execution order, and terms such as "first" and "second" do not indicate clear distinctions. Additionally, in the embodiments of the present application, terms such as "example" or "for example" are used to represent providing an example, illustration, or explanation. Any embodiment or design scheme described in the embodiments of the present application as an "example" or accompanied by "for example" is not described as being preferred or having more advantages than another embodiment or design scheme. Rather, the use of words such as "example" or "for example" is intended to present relative concepts in a concrete manner for ease of understanding.

[0108] In addition, the network architectures and service scenarios described in the embodiments of the present application are intended to more clearly explain the technical solutions in the embodiments of the present application, and do not constitute limitations on the technical solutions provided in the embodiments of the present application. With the evolution of network architectures and the emergence of new service scenarios, those skilled in the art will understand that the technical solutions provided in the embodiments of the present application can also be applied to similar technical problems.

[0109] To facilitate understanding of the embodiments of the present application, an application scenario of the embodiments of the present application will first be described in detail with reference to FIG.

[0110] 1 is a schematic diagram of a network architecture applicable to the method according to an embodiment of the present application. As shown in the figure, the network architecture may specifically include the following network elements:

[0111] 1. User Equipment (UE): User equipment may be referred to as a terminal device, terminal, access terminal, subscriber unit, subscriber station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless communication device, user agent, or user equipment. Alternatively, a terminal device may be a mobile phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication capabilities, a computing device or another processing device connected to a wireless modem, an in-vehicle device, an unmanned aerial vehicle, a wearable device, a terminal device in a 5G network, a terminal device in an evolved public land mobile network (PLMN), etc. This is not limited to the embodiments of the present application. A UE may be connected to a next generation radio access network (NG-RAN) device via a Uu interface. For example, UE#A and UE#D shown in FIG. 1 are connected to an NG-RAN via a Uu interface. Two UEs having a proximity-based services application (ProSe application) function may also be connected via a PC5 interface. For example, as shown in Figure 1, UE#A and UE#B are connected via a PC5 interface, UE#B and UE#C are connected via a PC5 interface, and UE#A and UE#D are connected via a PC5 interface.

[0112] 2. Access Network (AN): An access network provides network access functions to authorized users within a specific area and can use transmission tunnels with different qualities based on user levels, service requirements, etc. Different access networks may use different access technologies. Current access network technologies include radio access network technologies used in third-generation (3G) systems, radio access network technologies used in 4G systems, and NG-RAN technologies (e.g., radio access technologies used in 5G systems) shown in FIG. 1 .

[0113] An access network that realizes network access functions based on wireless communication technology may be called a radio access network (RAN). The radio access network manages radio resources, provides access services to terminals, and can further complete the transfer of control signals and user data between terminals and a core network.

[0114] The radio access network device may be, for example, a NodeB, an evolved NodeB (eNB, or eNodeB), a next generation Node Base station (gNB) in a 5G mobile communication system, a base station in a mobile communication system, an access point (AP) in a Wi-Fi wireless hotspot (WiFi) system, or a radio controller in a cloud radio access network (CRAN) scenario. Alternatively, the radio access network device may be a relay station, an access point, an in-vehicle device, an unmanned aerial vehicle, a wearable device, a network device in a 5G network, a network device in an evolved PLMN, etc. The specific technology and the specific device form used by the radio access network device are not limited in the embodiments of the present application.

[0115] 3. Access Management Network Element: The access management network element is mainly used for mobility management and access management, and is responsible for roles such as user policy transfer between user equipment and policy control function (PCF) network elements, and may be configured to realize functions other than session management in the mobility management entity (MME) functions, such as lawful interception functions and access authorization (or authentication) functions.

[0116] In a 5G communication system, the access management network element may be an access and mobility management function (AMF) network element. In future communication systems, the access management network element may continue to be an AMF network element or may have another name, which is not limited in this application.

[0117] 4. Session Management Network Element: The session management network element is mainly configured to manage sessions, assign and manage internet protocol (IP) addresses for user equipment, select endpoints that can manage user plane function interfaces and policy control and charging function interfaces, perform downlink data notification, etc.

[0118] In a 5G communication system, the session management network element may be a session management function (SMF) network element. In future communication systems, the session management network element may continue to be an SMF network element or may have another name, which is not limited in this application.

[0119] 5. User Plane Network Element: The user plane is configured to perform functions such as packet routing and forwarding, quality of services (QoS) processing of user plane data, user plane data forwarding, session / flow level based charging statistics, bandwidth limiting, etc.

[0120] In a 5G communication system, the user plane network element may be a user plane function (UPF) network element. In future communication systems, the user plane network element may continue to be a UPF network element or may have another name, which is not limited in this application.

[0121] 6. Data Network Element: The data network element is configured to provide a network for data transmission.

[0122] In a 5G communication system, the data network element may be a data network (DN) network element. In future communication systems, the data network element may continue to be a DN network element or may have another name, which is not limited in this application.

[0123] 7. Policy Control Network Element: The policy control network element is configured to provide guidance on a unified policy framework for network behavior, provide policy rule information for control plane function network elements (e.g., AMF and SMF network elements), etc.

[0124] In a 4G communication system, the policy control network element may be a policy and charging rules function (PCRF) network element. In a 5G communication system, the policy control network element may be a policy control function (PCF) network element. In future communication systems, the policy control network element may continue to be a PCF network element or may have another name, which is not limited in this application.

[0125] 8. Data Management Network Element: The data management network element is configured to handle user equipment identifiers, perform access authentication, perform registration management and mobility management, and so on.

[0126] In a 5G communication system, the data management network element may be a unified data management (UDM) network element. In a 4G communication system, the data management network element may be a home subscriber server (HSS) network element. In future communication systems, the data management network element may continue to be a UDM network element or may have another name, which is not limited in this application.

[0127] 9. Data Repository Network Element: The data repository network element is configured to handle access functions for subscription data, policy data, application data, and other types of data.

[0128] In a 5G communication system, the data repository network element may be a unified data repository (UDR) network element. In future communication systems, the data repository network element may continue to be a UDR element or may have another name. This is not a limitation in this application.

[0129] 10. Network Exposure Function (NEF) Entity: The network exposure function entity is configured to securely expose the services and capabilities provided by 3GPP (registered trademark, the same applies hereinafter) network functions to the outside world.

[0130] 11. ProSe Application Server (AS): The ProSe application server may be an application function (AF) of a DN or an AS that provides ProSe services. An AF with ProSe application server functionality has all the functions of the AF defined in 23.501 Release R-15, as well as related functions used for ProSe services. In other words, in the user plane architecture, the ProSe application server and the UE perform user plane communication by using the UE-RAN-UPF-AF path. The ProSe application server may further communicate with another network function (NF) in the 5G core network (5GC) in a control plane architecture by using the NEF, for example, it may communicate with a PCF by using the NEF. If the ProSe application server is an AF of a DN and the AF is deployed by a 5GC operator, the ProSe application server may further communicate directly with another NF in the 5GC in a control plane architecture without using the NEF, for example, it may communicate directly with a PCF.

[0131] 12. 5G direct discovery name management function (DDNMF): The 5G direct discovery name management function has the function of assigning and processing the mapping relationship between proximity-based service application identifiers (ProSe application identifiers) and proximity-based service application codes (ProSe application codes) for open proximity-based service discovery. For restricted proximity-based service discovery, the 5G DDNMF may communicate with a proximity-based service application server via the PC2 interface to process authorization of discovery requests, and also has the function of assigning and processing the mapping relationship between application identifiers and codes used in restricted proximity-based services. The codes used in restricted proximity-based services include restricted proximity-based service codes (ProSe restricted codes), proximity-based service request codes (ProSe query codes), and proximity-based service response codes (ProSe response codes).

[0132] In the current standard definition, the 5G DDNMF is at PLMN granularity. Specifically, one PLMN has only one 5G DDNMF. One 5G DDNMF can be uniquely identified by using a mobile country code (MCC) and a mobile network code (MNC).

[0133] 13. Authentication Server Function (AUSF): The AUSF network element authenticates and authorizes users.

[0134] 14. Proximity-based service key management function (PKMF): The proximity-based service key management function may be responsible for generating and distributing keys used for PC5 interface connections for UEs that use proximity-based services, and the UE needs to interact with the PKMF by using the control plane to obtain the keys used for the PC5 interface.

[0135] It will be understood that the aforementioned network elements or functions may be network elements in a hardware device, software functions running on dedicated hardware, or virtualized functions instantiated on a platform (e.g., a cloud platform). The aforementioned network elements or functions may be realized by one device, or may be realized jointly by multiple devices, or may be one functional module in one device. This is not specifically limited in the embodiments of the present application.

[0136] It should be further understood that the above-described network architecture applicable to the embodiments of the present application shown in Figure 1 is merely an example for purposes of illustration, and the network architecture applicable to the embodiments of the present application is not limited thereto. Any network architecture capable of realizing the functions of the above-described network elements is applicable to the embodiments of the present application.

[0137] For example, in some network architectures, network function network element entities such as AMF, SMF network element, PCF network element, and UDM network element are all referred to as network function (NF) network elements. Alternatively, in some other network architectures, a set of network elements such as AMF, SMF network element, PCF network element, and UDM network element may be referred to as control plane function network elements. Because a UE needs to interact with the PKMF and DDNMF by using the user plane, network elements such as the PKMF and DDNMF may be referred to as user plane network elements.

[0138] With the rapid development of mobile communications, new service types, such as video services and data services such as virtual reality (VR) / augmented reality (AR), increase users' bandwidth requirements. D2D communication enables direct communication between UEs and can share spectrum resources with cell users under the control of the cell network to effectively improve spectrum resource utilization. Currently, D2D communication is applied in 4G network systems and is collectively referred to as proximity-based service (ProSe) communication.

[0139] D2D communication includes one-to-many communication and one-to-one communication. One-to-many communication corresponds to unicast and broadcast communication, while one-to-one communication corresponds to unicast communication. In one-to-one communication, if a transmitting UE and a receiving UE are within a short distance, they can communicate directly with each other after mutual discovery. In D2D communication, UEs communicate directly via the PC5 interface to transmit information on the data plane and signaling plane.

[0140] When a UE is located outside of network coverage or the communication signal between the UE and the RAN is insufficient, the remote UE may use a relay UE to assist communication. In other words, the remote UE obtains service through communication between the remote UE and the relay UE and communication between the relay UE and the mobile network. By establishing a communication method from the remote UE to the network via the relay UE, UE-to-network communication outside of network coverage can be extended to be supported. The communication method from the remote UE to the network via the relay UE may be referred to as UE-to-network relay communication.

[0141] For the ProSe UE-to-network relay communication service, before establishing PC5 unicast communication, the remote UE and relay UE must first perform a ProSe discovery procedure to determine the peer UE to communicate with. After the discovery procedure, the remote UE and relay UE perform a PC5 unicast communication security establishment procedure. The specific procedure is shown in Figure 2. Please note that the procedure in Figure 2 is described according to the reference technique for unicast establishment in 3GPP TS 33.536 (v16.4.0).

[0142] S210: The remote UE sends a direct communication request (DCR) message to the relay UE to initiate the establishment of PC5 unicast communication.

[0143] The direct communication request message may include random number information generated by the remote UE, where the random number information is used by the network side to generate a PC5 key used for PC5 unicast communication and a control plane security protection policy (signaling security policy) of the remote UE. The security capability of the UE is a security protection algorithm supported by the UE, where the security protection algorithm includes a confidentiality protection algorithm and / or an integrity protection algorithm.

[0144] S220: The remote UE and the relay UE perform a direct authentication and key establishment procedure.

[0145] In a ProSe UE-to-network communication service scenario, the direct authentication and key establishment procedure between the remote UE and the relay UE must be completed by using the network side. Specifically, during the direct authentication and key establishment procedure, the relay UE must interact with the network side to obtain the PC5 key used for PC5 unicast communication.

[0146] S230: The relay UE sends a direct security mode (DSM) command message to the remote UE.

[0147] After receiving the direct communication request message from the remote UE, the relay UE first determines a control plane security protection activation method based on the control plane security protection policies of the two UEs. If security protection is enabled, the relay UE interacts with the network side to perform a direct authentication and key establishment procedure in step S220 to obtain a PC5 key. Furthermore, the relay UE sends a direct security mode command message to the remote UE, where the direct security mode command message includes a selected security protection algorithm, and the security protection algorithm includes a confidentiality protection algorithm and an integrity protection algorithm.

[0148] The direct security mode command message may carry key derivation information or a key identifier obtained from the network side. The remote UE derives a PC5 key by using the key derivation information, or the remote UE determines a PC5 key based on the key identifier. The PC5 key is the same as the PC5 key obtained from the network side by the relay UE.

[0149] S240: The remote UE sends a security mode complete message directly to the relay UE.

[0150] After the remote UE receives the direct security mode command message from the relay UE, if the security activation scheme implied by the selected security algorithm carried in the direct security mode command message satisfies the control plane security policy of the local end, the remote UE sends a direct security mode complete message to the relay UE, and the direct security mode complete message includes the user plane security policy of the remote UE.

[0151] S250: The relay UE sends a direct communication accept (DCA) message to the remote UE.

[0152] After the relay UE receives the direct security mode completion message from the remote UE, the relay UE determines a user plane security protection activation mode based on the user plane security protection policies of the two UEs, and then sends a direct communication accept message to the remote UE, where the direct communication accept message includes user plane security configuration information and is used to notify UE#1 of the selected user plane security protection activation mode.

[0153] At S220, the remote UE and the relay UE share a key through mutual authentication and negotiation. Currently, there are two solutions for negotiating a PC5 key in UE-to-network relay communication: a control-plane-based solution and a user-plane-based solution. In the control-plane-based solution, the PC5 shared key is derived based on a key generated after primary authentication between the remote UE and the 3GPP network. In the user-plane-based solution, a ProSe key management function (PKMF) must be deployed for key generation, management, and distribution, and the UE must obtain the PC5 key from the PKMF by using the user plane. However, in the process of establishing a PC5 unicast connection between the remote UE and the relay UE, how to determine the solution for negotiating the PC5 key remains unresolved. Specifically, currently, the criteria for selecting the control-plane-based solution or the user-plane-based solution for obtaining the PC5 key have not been determined.

[0154] In view of this, the present application provides a method for determining a key derivation scheme to solve the problem of how to determine a scheme for obtaining a PC5 key.

[0155] It should be noted that the specific structure of the implementation entity of the method provided in the embodiment of the present application is not specifically limited in the embodiments described below, as long as a program recording the code of the method provided in the embodiment of the present application can be executed to perform communication according to the method provided in the embodiment of the present application. For example, the method provided in the embodiment of the present application may be performed by a terminal device, a core network device, or a functional module in the terminal device or core network device that can call and execute a program.

[0156] Without loss of generality, the following describes in detail the key determination method provided in the embodiments of the present application by using the interaction between terminal devices or core network devices as an example.

[0157] 3 is a schematic flowchart of a method for determining a key acquisition method according to an embodiment of the present application. As shown in FIG. 3, the method 300 may include S310 to S330. The following describes the steps in detail.

[0158] S310: A first terminal device transmits a first message, and in response, a second terminal device receives the first message at S310.

[0159] The first terminal device is a remote terminal device and the second terminal device is a relay terminal device, or the first terminal device is a relay terminal device and the second terminal device is a remote terminal device.

[0160] The first message includes first instruction information, which instructs the first PC5 key to be acquired via the control plane method. The first PC5 key is a key used for a PC5 link between the first terminal device and the second terminal device. The first instruction information may be explicit instruction information, for example, dedicated instruction information. Alternatively, a specific parameter specific to acquiring the first PC5 key via the control plane method may be used to implicitly instruct the first PC5 key to be acquired via the control plane method. For example, if the first PC5 key is to be acquired via the control plane method, the first message carries parameter A, and if the first PC5 key is to be acquired via the user plane method, the first message does not include parameter A. In this case, parameter A is the first instruction information, and carrying parameter A in the first message may implicitly instruct the first PC5 key to be acquired via the control plane method.

[0161] It should be noted that obtaining the first PC5 key in a control plane manner means that the relay terminal device obtains PC5 key information and information needed to generate the first PC5 key through interaction with a key management network element in the network by using the control plane. The relay terminal device obtains the first PC5 key directly from the PC5 key information. The relay terminal device needs to send information needed to generate the PC5 key to the remote terminal device, and the remote terminal device determines the first PC5 key based on the information needed to generate the PC5 key. Obtaining the first PC5 key in a user plane manner means that the relay terminal device obtains PC5 key information and information needed to generate the PC5 key through interaction with a key management network element in the network by using the user plane. The relay terminal device obtains the first PC5 key directly from the PC5 key information. The relay terminal device needs to send information needed to generate the PC5 key to the remote terminal device, and the remote terminal device determines the first PC5 key based on the information needed to generate the PC5 key. It should be further noted that the information needed to generate the PC5 key may be random number information or PC5 key identifier information. The information required to generate a PC5 key in a control plane manner and the information required to generate a PC5 key in a user plane manner may be different or the same.

[0162] Specifically, in S310, when a preset condition is met, the first terminal device sends a first message to the second terminal device.

[0163] For example, the pre-configured conditions include one or more of: a first PLMN identifier (ID) of the home network of the first terminal device does not match a second PLMN ID of the home network of the second terminal device; a first relay service code (RSC) used by the first terminal device in a proximity direct discovery (ProSe) procedure corresponds to a Layer 2 UE-to-network relay communication service; a second RSC used by the second terminal device in the proximity direct discovery procedure corresponds to a Layer 2 UE-to-network relay communication service; keying information for determining a first PC5 key, obtained by the first terminal device from a key management network element, has expired; and the first terminal device has not obtained the keying information. The keying information for determining the first PC5 key includes the first PC5 key and / or an identifier of the first PC5 key. For example, the key management network element is a PKMF, an AUSF, or an AMF. If the first PC5 key is obtained in a user plane manner, the key management network element is the PKMF. If the first PC5 key is obtained in a control plane manner, the key management network element is the AUSF or the AMF.

[0164] It should be noted that if the first terminal device determines that the first PC5 key can be obtained in the control plane manner and the user plane manner, the first terminal device determines whether to obtain the first PC5 key in the control plane manner according to whether a preset condition is met. If the preset condition is met, the first terminal device determines to obtain the first PC5 key in the control plane manner, or if none of the preset conditions is met, the first terminal device determines to obtain the first PC5 key in the control plane manner or the user plane manner. Furthermore, if the first terminal device determines to obtain the first PC5 key in a control plane manner, the first terminal device sends, to the second terminal device, a first message carrying first instruction information; or if the first terminal device determines to obtain the first PC5 key in a user plane manner, the first terminal device sends, to the second terminal device, a first message that does not carry the first instruction information, or sends, to the second terminal device, a first message that carries fourth instruction information, where the fourth instruction information instructs the second terminal device to obtain the first PC5 key in a user plane manner. Satisfaction of the preset conditions means that at least one of the preset conditions is satisfied.

[0165] Optionally, when at least one of preset conditions is satisfied, the first indication information instructs to obtain a first PC5 key in a user plane manner. The first PC5 key is a key used for a PC5 link between the first terminal device and the second terminal device. The preset conditions include one or more of: the first PLMN ID matches the second PLMN ID; the first RSC used by the first terminal device in the proximity direct discovery procedure corresponds to a Layer 3 UE-to-network relay communication service that uses a non-3GPP interworking function (N3IWF) for access; and the first RSC used by the first terminal device in the proximity direct discovery procedure corresponds to a Layer 3 UE-to-network relay communication service, and the first terminal device has obtained key information from a key management network element that obtains the first PC5 key in a user plane manner.

[0166] In one possible embodiment, the first terminal device determines that the first PC5 key can be obtained via the control plane method and the user plane method based on a predefined setting in a protocol or a default setting in the device. The predefined setting in the protocol or the default setting in the device may explicitly instruct the first PC5 key to be obtained via the control plane method and the user plane method, or may implicitly instruct the first PC5 key to be obtained via the control plane method and the user plane method. In this case, the implicit method may not define or limit the method for obtaining the first PC5 key. Specifically, before step S310 is performed, the first terminal does not determine the method for obtaining the first PC5 key by using a predefined setting in a protocol, a default setting in the device, or information received from the network side.

[0167] In another possible embodiment, the first terminal device determines that the first PC5 key can be obtained in a control plane manner and a user plane manner based on the first information, the first information being for determining a manner for obtaining the first PC5 key.

[0168] For example, the first information indicates that the PC5 key can be obtained in the control plane and the user plane. Correspondingly, the first terminal device determines, based on the first information, that the first PC5 key can be obtained in the control plane and the user plane. Note that the first information corresponds to a first PLMN ID, and the first information may not indicate a correspondence between the first information and the first PLMN ID, i.e., the first information does not include identifier information that may indicate the first PLMN ID. For example, the first information may be indication information obtained by a network element and / or a UE in a PLMN corresponding to the first PLMN ID.

[0169] As another example, the first information includes a first mapping relationship, where the first mapping relationship includes a correspondence relationship between at least one piece of instruction information and at least one PLMN ID, where each of the at least one piece of instruction information instructs the terminal device to obtain a PC5 key via a control plane manner and / or a user plane manner, and the at least one PLMN ID includes a first PLMN ID and / or a second PLMN ID. Correspondingly, the first terminal device determines, based on the second instruction information, that the first PC5 key can be obtained via the control plane manner and the user plane manner, where the second instruction information instructs the terminal device to obtain the PC5 key via the control plane manner and the user plane manner, and the second instruction information is instruction information corresponding to the first PLMN ID or the second PLMN ID in the at least one piece of instruction information. For example, if the first mapping relationship includes a first PLMN ID and instruction information corresponding to the first PLMN ID, the second instruction information is instruction information corresponding to the first PLMN ID. In other words, in this case, the first mapping relationship includes a mapping relationship between the second indication information and the first PLMN ID. As another example, if the first mapping relationship includes a second PLMN ID and indication information corresponding to the second PLMN ID, the second indication information is indication information corresponding to the second PLMN ID. In other words, in this case, the first mapping relationship includes a mapping relationship between the second indication information and the second PLMN ID. As yet another example, if the first mapping relationship includes a first PLMN ID, indication information corresponding to the first PLMN ID, a second PLMN ID, and indication information corresponding to the second PLMN ID, the second indication information is indication information corresponding to the first PLMN ID and indication information corresponding to the second PLMN ID. In other words, in this case, the first mapping relationship includes a mapping relationship between the second indication information and the second PLMN ID or the first PLMN ID.

[0170] Optionally, when the second indication information corresponds to the first PLMN ID, the first PC5 key is generated by a network element in the first PLMN. When the second indication information corresponds to the second PLMN ID, the first PC5 key is generated by a network element in the second PLMN.

[0171] In yet another example, the first information includes a second mapping relationship, the second mapping relationship including a correspondence relationship between at least one of the instruction information and identifier information of at least one relay service, each of the at least one instruction information instructing to obtain a PC5 key in a control plane manner and a user plane manner, the at least one relay service including a first relay service, the first relay service corresponding to a PC5 link between the first terminal device and the second terminal device, i.e., the PC5 link is established for the first relay service. Note that the identifier information of the relay service may identify a specific proximity-based service (ProSe service), and may be an RSC or service name information, for example, a service identifier. In response, the first terminal device determines, based on the second instruction information, that the first PC5 key can be obtained in the control plane manner and the user plane manner, the second instruction information instructing the first terminal device to obtain the PC5 key in the control plane manner and the user plane manner, the second instruction information being instruction information corresponding to the identifier information of the first relay service in at least one of the instruction information, where each of the at least one relay service is a UE-to-network relay communication service.

[0172] It should be noted that when the first information includes a first mapping relationship, in addition to the correspondence relationship between the first PLMN ID and the second indication information or the mapping relationship between the second PLMN ID and the second indication information, the first mapping relationship may further include a mapping relationship between the PLMN ID and indication information in all PLMNs that have roaming agreements with the operator of the home network of the first terminal device, which indicates a manner to obtain a PC5 key. When the first information includes a second mapping relationship, in addition to the mapping relationship between the identifier information of the first relay service and the second indication information, the second mapping relationship may further include a mapping relationship between relay service identifier information of all relay services that can be used by the first terminal device and corresponding indication information that indicates a manner to obtain a PC5 key.

[0173] The manner in which the first terminal device obtains the first information is not limited in this embodiment of the present application.

[0174] In one example, the first terminal device obtains ProSe parameters from the PCF, and the ProSe parameters include the first information. With respect to method 800, the following describes in detail how the first terminal device obtains the ProSe parameters including the first information from the PCF. For brevity, the details will not be described herein.

[0175] In another example, the first terminal device obtains the first information from the AF or AS. Specifically, after registering with the network and establishing a link to the AF or AS, the first terminal device may obtain the first information from the AF or AS. The link from the first terminal device to the AF or AS may be a user plane link. Note that the first information obtained by the first terminal device from the AF or AS includes the first mapping relationship or the second mapping relationship.

[0176] In yet another example, the first terminal device obtains the first information locally, for example, the first terminal device obtains the first information from a universal integrated circuit card (UICC), or the first terminal device obtains the first information from a mobile terminal (MT) corresponding to the first terminal device or a mobile equipment (ME) corresponding to the first terminal device, and the first terminal device includes the UICC and the MT, or the first terminal device includes the UICC and the ME. It should be noted that if the first information indicates that the PC5 key can be obtained in a control plane manner and a user plane manner, the first information is pre-configured in the first terminal device by an operator of a home network of the first terminal device; if the first information includes a first mapping relationship, the operator of the home network of the first terminal device pre-configures a correspondence relationship between the indication information and a PLMN ID in the first terminal device; the operator of the home network of the first terminal device needs to obtain in advance indication information in all PLMNs that have roaming agreements with the operator of the home network of the first terminal device, which indicates the manner of obtaining the PC5 key; or if the first information includes a second mapping relationship, a service provider of a different relay service pre-configures a correspondence relationship between the indication information and identifier information of the relay service in the first terminal device by using the operator of the home network of the first terminal device.

[0177] Optionally, before S310, the method 300 further includes: S330: a step in which the second terminal device sends a second message to the first terminal device, the second message including a second PLMN ID and a second RSC.

[0178] S320: The second terminal device sends a response message to the first message. Correspondingly, in S320, the first terminal device receives the response message to the first message.

[0179] The response message indicates to the first terminal device whether the second terminal device can obtain the first PC5 key, or the response message indicates to the first terminal device whether the second terminal device can obtain the first PC5 key in a control plane manner.

[0180] Optionally, when the first instruction information further instructs to obtain the first PC5 key in a user plane manner, the response message indicates to the first terminal device whether the second terminal device is able to obtain the first PC5 key, or the response message indicates to the first terminal device whether the second terminal device is able to obtain the first PC5 key in a user plane manner.

[0181] Specifically, at S320, if the second terminal device determines that the first PC5 key can be obtained in a control plane manner or a user plane manner, the response message sent by the second terminal device to the first terminal device indicates to the first terminal device that the second terminal device can obtain the first PC5 key, or the response message indicates to the first terminal device that the second terminal device can obtain the first PC5 key in a control plane manner or a user plane manner; or if the second terminal device determines that the first PC5 key cannot be obtained in a control plane manner or a user plane manner, the response message sent by the second terminal device to the first terminal device indicates to the first terminal device that the second terminal device cannot obtain the first PC5 key, or the response message indicates to the first terminal device that the second terminal device cannot obtain the first PC5 key in a control plane manner or a user plane manner.

[0182] Optionally, at S320, if the second terminal device determines that the first PC5 key can be obtained in a control plane manner or a user plane manner, the second terminal device sends a response message of the first message to the first terminal device, where the response message indicates to the first terminal device that the second terminal device can obtain the first PC5 key, or the response message indicates to the first terminal device that the second terminal device can obtain the first PC5 key in a control plane manner or a user plane manner. If the second terminal device determines that the first PC5 key cannot be obtained in a control plane manner or a user plane manner, the second terminal device does not send the response message of the first message to the first terminal device.

[0183] It should be noted that when the second terminal device determines that the first PC5 key can be obtained in the control plane manner or the user plane manner, the response message sent by the second terminal device to the first terminal device does not necessarily explicitly indicate that the second terminal device can obtain the first PC5 key. It can be understood that after the second terminal device sends a response message of the first message to the first terminal device, the second terminal device can obtain the first PC5 key by default.

[0184] The manner in which the second terminal device determines how to obtain the first PC5 key is not limited in this embodiment of the present application.

[0185] In one possible embodiment, the second terminal device determines that the first PC5 key can be obtained via the control plane method and / or the user plane method based on a predefined setting in a protocol or a default setting in the device. The predefined setting in the protocol or the default setting in the device may explicitly instruct the first PC5 key to be obtained via the control plane method and / or the user plane method, or may implicitly instruct the first PC5 key to be obtained via the control plane method and / or the user plane method. In this case, the implicit method may not define or limit the method for obtaining the first PC5 key. Specifically, before step S320 is performed, the second terminal device does not determine the method for obtaining the first PC5 key by using a predefined setting in a protocol, a default setting in the device, or information received from the network side.

[0186] In another possible embodiment, the second terminal device determines that the first PC5 key can be obtained in a control plane manner and / or a user plane manner based on the second information, the second information being for determining a manner for obtaining the first PC5 key.

[0187] For example, the second information indicates that the PC5 key can be obtained in a control plane manner and / or a user plane manner. Correspondingly, the second terminal device determines, based on the second information, that the first PC5 key can be obtained in a control plane manner and / or a user plane manner. For example, if the second information indicates that the PC5 key can be obtained in a control plane manner or a user plane manner, the second terminal device determines that the first PC5 key can be obtained in a control plane manner or a user plane manner, or if the second information indicates that the PC5 key can be obtained in both a control plane manner and a user plane manner, the second terminal device determines that the first PC5 key can be obtained in both a control plane manner and a user plane manner. Note that the second information corresponds to a second PLMN ID, but the second information may not indicate a correspondence between the second information and the second PLMN ID, i.e., the second information does not include identifier information that may indicate the second PLMN ID. For example, the second information may be indication information obtained by a network element and / or a UE in a PLMN corresponding to the second PLMN ID.

[0188] As another example, the second information includes a third mapping relationship, where the third mapping relationship includes a correspondence relationship between at least one piece of instruction information and at least one PLMN ID, where each of the at least one piece of instruction information instructs the first terminal device to obtain the PC5 key via a control plane manner and / or a user plane manner, and the at least one PLMN ID includes a first PLMN ID and / or a second PLMN ID. Correspondingly, the first terminal device determines a manner for obtaining the first PC5 key based on the third instruction information, where the third instruction information instructs the first terminal device to obtain the PC5 key via a control plane manner and / or a user plane manner, and the third instruction information is instruction information corresponding to the first PLMN ID or the second PLMN ID included in the at least one piece of instruction information. For example, if the third mapping relationship includes a first PLMN ID and instruction information corresponding to the first PLMN ID, the third instruction information is instruction information corresponding to the first PLMN ID. In other words, in this case, the third mapping relationship includes a mapping relationship between the third indication information and the first PLMN ID. As another example, if the third mapping relationship includes a second PLMN ID and indication information corresponding to the second PLMN ID, the third indication information is indication information corresponding to the second PLMN ID. In other words, in this case, the third mapping relationship includes a mapping relationship between the third indication information and the second PLMN ID. As yet another example, if the third indication information includes a first PLMN ID, indication information corresponding to the first PLMN ID, a second PLMN ID, and indication information corresponding to the second PLMN ID, the third indication information is indication information corresponding to the first PLMN ID and indication information corresponding to the second PLMN ID. In other words, in this case, the third mapping relationship includes a mapping relationship between the third indication information and the second PLMN ID or the first PLMN ID.

[0189] Optionally, when the third indication information corresponds to the first PLMN ID, the first PC5 key is generated by a network element in the first PLMN, and when the third indication information corresponds to the second PLMN ID, the first PC5 key is generated by a network element in the second PLMN.

[0190] In yet another example, the second information includes a fourth mapping relationship, the fourth mapping relationship including a correspondence relationship between at least one of the instruction information and identifier information of at least one relay service, each of which instructs the PC5 key to be acquired via a control plane and / or a user plane, the at least one relay service including a first relay service, the first relay service corresponding to a PC5 link between the first terminal device and the second terminal device, i.e., the PC5 link is established for the first relay service. Note that the identifier information of the relay service may identify a specific proximity-based service, and the identifier information of the relay service may be an RSC or service name information, such as a service identifier. Correspondingly, the first terminal device determines, based on the third instruction information, that the first PC5 key can be acquired via a control plane and / or a user plane, the third instruction information instructs the PC5 key to be acquired via a control plane and / or a user plane, the third instruction information being instruction information corresponding to the identifier information of the first relay service included in at least one of the instruction information. It should be noted that each of the at least one relay service is a UE-to-network relay communication service.

[0191] It should be noted that when the second information includes a third mapping relationship, in addition to the correspondence relationship between the first PLMN ID and the third indication information or the correspondence relationship between the second PLMN ID and the third indication information, the third mapping relationship may further include a correspondence relationship between the PLMN ID and indication information in all PLMNs that have roaming agreements with the operator of a home network of the second terminal device, which indicates a manner of obtaining a PC5 key. When the second information includes a fourth mapping relationship, in addition to the correspondence relationship between the identifier information of the first relay service and the third indication information, the fourth mapping relationship may further include a correspondence relationship between relay service identifier information of all relay services that can be used by the second terminal device and corresponding indication information, which indicates a manner of obtaining a PC5 key.

[0192] The manner in which the second terminal device obtains the second information is not limited in this embodiment of the present application.

[0193] In one example, the second terminal device obtains ProSe parameters from the PCF, and the ProSe parameters include the second information. With respect to method 800, the following describes in detail how the second terminal device obtains the ProSe parameters including the second information from the PCF. For brevity, the details will not be described herein.

[0194] In another example, the second terminal device obtains the second information from the AF or AS. Specifically, after registering with the network and establishing a link to the AF or AS, the second terminal device may obtain the second information from the AF or AS. The link from the second terminal device to the AF or AS may be a user plane link. Note that the second information obtained by the second terminal device from the AF or AS includes a third mapping relationship or a fourth mapping relationship.

[0195] In yet another example, the second terminal device acquires the second information locally, for example, the second terminal device acquires the second information from a UICC, or the second terminal device acquires the second information from an MT or ME corresponding to the second terminal device, and the second terminal device includes a UICC and an MT, or the second terminal device includes a UICC and an ME. It should be noted that if the second information indicates that the PC5 key can be obtained in a control plane manner and / or a user plane manner, the second information is pre-configured in the second terminal device by an operator of a home network of the second terminal device; if the second information includes a third mapping relationship, the operator of the home network of the second terminal device pre-configures a correspondence relationship between the indication information and a PLMN ID in the second terminal device; the operator of the home network of the second terminal device needs to obtain in advance indication information in all PLMNs that have roaming agreements with the operator of the home network of the second terminal device, which indicates the manner of obtaining the PC5 key; or if the second information includes a fourth mapping relationship, a service provider of a different relay service pre-configures a correspondence relationship between the indication information and identifier information of the relay service in the first terminal device by using the operator of the home network of the second terminal device.

[0196] In this embodiment of the present application, the first terminal device determines whether to obtain the first PC5 key in a control plane manner based on whether at least one of the pre-set conditions is met, so that the first terminal device and the second terminal device can obtain the first PC5 key in different manners in different scenarios, and obtain the PC5 key in a manner with lower signaling overhead and less wasted resources, thereby improving the efficiency and success rate of establishing a PC5 link.

[0197] For example, when the first terminal device and the second terminal device are terminal devices of different PLMNs, the remote terminal devices in the first terminal device and the second terminal device cannot access internal network elements in another PLMN by using the user plane, so when the first PLMN ID does not match the second PLMN ID, the first terminal device decides to obtain the first PC5 key in a control plane manner and sends first indication information to the second terminal device to ensure that the first terminal device and the second terminal device successfully obtain the first PC5 key and successfully establish a PC5 link.

[0198] For example, in a Layer 2 UE-to-network relay communication service scenario, the relay terminal device does not play a role in establishing a PDU session for the remote terminal device. If the first PC5 key is obtained in a user plane manner, the processing burden and processing logic of the relay terminal device will be further increased. Therefore, when the first RSC or the second RSC corresponds to the Layer 2 UE-to-network relay communication service, the first terminal device determines to obtain the first PC5 key in a control plane manner and sends first indication information to the second terminal device, thereby avoiding the processing logic and processing burden of the relay terminal device in the first terminal device and the second terminal device.

[0199] For another example, in the user plane method, the remote terminal device needs to obtain key information from the key management network element in advance, and the key information distributed from the key management network element has a corresponding validity period. Specifically, after the key information expires, the remote terminal device cannot obtain the PC5 key or needs to obtain the key information from the key management network element again. If the remote terminal device is not within network coverage, the remote terminal device cannot obtain the key information from the key management network element. Therefore, if the key information obtained by the first terminal device from the key management network element expires or the first terminal device has not obtained the key information, the first terminal device decides to obtain a first PC5 key in the control plane method and sends first instruction information to the second terminal device. This can ensure that the first terminal device and the second terminal device successfully obtain the first PC5 key and successfully establish a PC5 link.

[0200] In this embodiment of the present application, the first terminal device determines whether to obtain the first PC5 key in a user plane manner based on whether at least one of the pre-set conditions is met, so that the first terminal device and the second terminal device obtain the first PC5 key in different manners in different scenarios, and obtain the PC5 key in a manner with lower signaling overhead and less wasted resources, thereby improving the efficiency and success rate of establishing a PC5 link.

[0201] For example, in a Layer 3 UE-to-network relay communication service scenario or a Layer 3 UE-to-network relay communication service that uses an N3IWF for access, the relay terminal device needs to be responsible for establishing a PDU session for the remote terminal device. If the first PC5 key is obtained through a control plane method, the relay terminal device needs to perform additional control plane signaling exchange with the network, which increases the processing burden and processing logic of the relay terminal device. Therefore, considering the consistency of the processing method, the first terminal device determines to obtain the first PC5 key through a user plane method and sends first indication information to the second terminal device. This can ensure the consistency of the processing method in which the first terminal device and the second terminal device generate the PC5 key.

[0202] As another example, in the user plane method, the remote terminal device needs to obtain key information from the key management network element in advance. If the remote terminal device has obtained a PC5 key from the key management network element, which obtains a first PC5 key in the user plane method, and the first PC5 key is obtained in the control plane method, the remote terminal device then needs to continue generating PC5 keys by using another key. This increases the processing burden, key storage burden, and processing logic of the remote terminal device. In this case, the first terminal device determines to obtain the first PC5 key in the user plane method and sends first instruction information to the second terminal device. This can ensure the consistency of the processing methods in which the first terminal device and the second terminal device generate PC5 keys.

[0203] The following describes four scenarios in which the method 300 is applicable, with reference to FIGS.

[0204] Fig. 4 is a schematic flowchart of a method for determining a key acquisition scheme according to an embodiment of the present application. The method 400 shown in Fig. 4 is a specific implementation of the method 300. The remote UE shown in Fig. 4 is the first terminal device of the aforementioned method 300, and the relay UE is the second terminal device of the aforementioned method 300. The following describes the steps included in the method 400.

[0205] S410: The remote UE obtains the first information from the PCF#1.

[0206] PCF#1 provides services to the remote UE. For a description of the first information, see S310 above. For a description of how the remote UE obtains the first information from PCF#1, see method 800 below.

[0207] S420: The relay UE obtains the second information from PCF#2.

[0208] The PCF#2 serves the relay UE. For a description of the second information, see S320 above. For a description of how the relay UE obtains the second information from the PCF#2, see method 800 below.

[0209] It should be noted that PCF#1 and PCF#2 may be the same PCF network element or different PCF network elements. When the remote UE and the relay UE have the same home PLMN, PCF#1 and PCF#2 are the same PCF network element. When the remote UE and the relay UE have different home PLMNs, PCF#1 and PCF#2 are different PCF network elements.

[0210] S430: The remote UE sends a discovery request message (an example of a first message) to the relay UE.

[0211] If the remote UE determines, based on the first information, that the first PC5 key can be obtained via the control plane and the user plane, the remote UE determines whether to obtain the first PC5 key via the control plane depending on whether a preset condition is met. If the preset condition is met, the remote UE determines to obtain the first PC5 key via the control plane, or if none of the preset conditions is met, the remote UE determines to obtain the first PC5 key via the control plane or the user plane. The first PC5 key is a key used for the PC5 link between the remote UE and the relay UE. For a description of how the remote UE determines to obtain the first PC5 key based on the first information, see S310 above. Satisfaction of the preset conditions means that at least one of the preset conditions is met.

[0212] The pre-configured conditions include one or more of: the first RSC used by the remote UE in the proximity direct discovery procedure corresponds to a Layer 2 UE-to-network relay communication service; key information for determining the first PC5 key, obtained by the remote UE from a key management network element, has expired; or the remote UE has not obtained the key information.

[0213] Furthermore, if the remote UE determines to obtain the first PC5 key in a control plane manner, the discovery request message sent to the relay UE includes first instruction information, which instructs the remote UE to obtain the first PC5 key in a control plane manner. For further description of the first instruction information, please refer to S310 above.

[0214] The discovery request message may be a discovery request message sent by a discoverer UE in a Model B discovery model.

[0215] S440: The relay UE sends a discovery response message (an example of a response message to the first message) or a reject message (an example of a response message to the first message) to the remote UE.

[0216] If the relay UE determines, based on the second information, that the first PC5 key can be obtained in a control plane manner, the relay UE sends a discovery response message to the remote UE. The discovery response message includes a second RSC used by the relay UE in the proximity direct discovery procedure. Optionally, the discovery response message further includes a second PLMN ID of the home network of the relay UE.

[0217] If the relay UE determines, based on the second information, that the first PC5 key cannot be obtained in a control plane manner, the relay UE does not send a discovery response message to the remote UE, or the relay UE sends a rejection message to the remote UE. Optionally, the rejection message indicates that the relay UE cannot obtain the first PC5 key, or the rejection message indicates that the relay UE cannot obtain the first PC5 key in a control plane manner.

[0218] For a description of how the relay UE determines to obtain the first PC5 key based on the second information, see S320 above.

[0219] The discovery response message may be a discovery response message sent by a discoveree UE in a Model B discovery model.

[0220] S450: The remote UE sends a direct communication request message (an example of a first message) to the relay UE.

[0221] If the remote UE receives the discovery response message in S440, the remote UE sends a direct communication request message to the relay UE.

[0222] Optionally, if the discovery request message sent by the remote UE to the relay UE at S430 does not include first indication information, before the remote UE sends a direct communication request message to the relay UE, the remote UE determines whether to obtain the first PC5 key in a control plane manner according to whether the second RSC corresponds to a Layer 2 UE-to-network relay communication service. If the second RSC corresponds to a Layer 2 UE-to-network relay communication service, the remote UE determines to obtain the first PC5 key in a control plane manner and carries the first indication information in the direct communication request message.

[0223] Optionally, if the discovery response message includes a second PLMN ID, the remote UE may further determine whether to obtain the first PC5 key in a control plane manner according to whether the first PLMN ID of the home network of the remote UE matches the second PLMN ID. If the first PLMN ID does not match the second PLMN ID, the remote UE determines to obtain the first PC5 key in a control plane manner, and carries first indication information in the direct communication request message.

[0224] Optionally, if the discovery response message includes a second PLMN ID, the remote UE may further determine whether to obtain the first PC5 key in a control plane manner, depending on whether key information for determining the first PC5 key, which is obtained from a key management network element corresponding to the second PLMN ID, expires and / or whether the remote UE has obtained key information from a key management network element corresponding to the second PLMN. If the key information for determining the first PC5 key, which is obtained by the remote UE from a key management network element corresponding to the second PLMN ID, expires or if the remote UE has not obtained key information from a key management network element corresponding to the second PLMN, the remote UE determines to obtain the first PC5 key in a control plane manner and carries first indication information in the direct communication request message. For further description of the first indication information, see above S310.

[0225] The direct communication request may be a DCR message to initiate the establishment of a PC5 link.

[0226] S460: The relay UE directly sends a security mode command message (an example of a response message to the first message) or a rejection message to the remote UE.

[0227] If the direct communication request message includes first indication information, when the relay UE determines, based on the second information, that the first PC5 key can be obtained in a control plane manner, the relay UE sends a direct connection mode security command message to the remote UE; or when the relay UE determines, based on the second information, that the first PC5 key cannot be obtained in a control plane manner, the relay UE does not send a direct security mode command message to the remote UE, or the relay UE sends a rejection message to the remote UE.

[0228] The direct security mode command may be a direct security mode command message in a PC5 link establishment process.

[0229] S470: The remote UE and the relay UE continue to perform the PC5 link establishment procedure.

[0230] If the relay UE sends a security mode command message directly to the remote UE, the remote UE and the relay UE continue to perform the PC5 link establishment procedure.

[0231] Fig. 5 is a schematic flowchart of a method for determining a key acquisition scheme according to an embodiment of the present application. The method 500 shown in Fig. 5 is a specific implementation of the method 300. The remote UE shown in Fig. 5 is the first terminal device of the aforementioned method 300, and the relay UE is the second terminal device of the aforementioned method 300. The following describes the steps included in the method 500.

[0232] S510 and S520 are the same as S410 and S420 of method 400.

[0233] S530: The relay UE sends a discovery announcement message (an example of a third message) to the remote UE.

[0234] The discovery announcement message includes a second RSC used by the relay UE in the proximity direct discovery procedure. Optionally, the discovery announcement message further includes a second PLMN ID of the home network of the relay UE.

[0235] The discovery request message may be a discovery announcing message sent by an announcing UE in the Model A discovery model.

[0236] S540: The remote UE sends a direct communication request message (an example of a first message) to the relay UE.

[0237] If the remote UE determines based on the discovery announcement message that the relay UE can provide the first service required by the remote UE, the remote UE sends a direct communication request message to the relay UE. If the remote UE determines based on the first information that the first PC5 key can be obtained via the user plane and the control plane, before sending the direct communication request message to the relay UE, the remote UE determines whether to obtain the first PC5 key via the control plane depending on whether a preset condition is met. If the preset condition is met, the remote UE determines to obtain the first PC5 key via the control plane, or if none of the preset conditions are met, the remote UE determines to obtain the first PC5 key via the control plane or the user plane. The first PC5 key is a key used for the PC5 link between the remote UE and the relay UE. For a description of how the remote UE determines to obtain the first PC5 key based on the first information, see S310 above. Satisfaction of the preset conditions means that at least one of the preset conditions is met.

[0238] The pre-configured conditions include one or more of: a first RSC used by the remote UE in the proximity direct discovery procedure corresponds to a Layer 2 UE-to-network relay communication service; a second RSC corresponds to a Layer 2 UE-to-network relay communication service; key information for determining the first PC5 key, obtained by the remote UE from a key management network element, expires; or the remote UE has not obtained the key information.

[0239] Optionally, if the discovery response message includes a second PLMN ID, the remote UE may further determine whether to obtain the first PC5 key in a control plane manner based on one or more of the following pre-configured conditions: key information for determining the first PC5 key, which is obtained by the remote UE from a key management network element corresponding to the first PLMN ID of the remote UE's home network, is expired; key information obtained by the remote UE from a key management network element corresponding to the second PLMN ID is expired; the first terminal device has not obtained key information from a key management network element corresponding to the first PLMN ID or the second PLMN ID, or the first PLMN ID does not match the second PLMN ID.

[0240] Furthermore, if the remote UE decides to obtain the first PC5 key in a control plane manner, the direct communication request message sent by the relay UE includes first instruction information, which instructs the remote UE to obtain the first PC5 key in a control plane manner. For further description of the first instruction information, please refer to S310 above.

[0241] The direct communication request may be a DCR message to initiate the establishment of a PC5 link.

[0242] S550: The relay UE directly sends a security mode command message (an example of a response message to the first message) or a rejection message (an example of a response message to the first message) to the remote UE.

[0243] If the relay UE determines, based on the second information, that the first PC5 key can be obtained in a control plane manner, the relay UE sends a security mode command message directly to the remote UE.

[0244] If the relay UE determines, based on the second information, that the first PC5 key cannot be obtained in a control plane manner, the relay UE does not send a security mode command message directly to the remote UE, or the relay UE sends a rejection message to the remote UE. Optionally, the rejection message indicates that the relay UE cannot obtain the first PC5 key, or the rejection message indicates that the relay UE cannot obtain the first PC5 key in a control plane manner.

[0245] For a description of how the relay UE determines to obtain the first PC5 key based on the second information, see S320 above.

[0246] The direct security mode command may be a direct security mode command message in a PC5 link establishment process.

[0247] S560: The remote UE and the relay UE continue to perform the PC5 link establishment procedure.

[0248] If the relay UE sends a security mode command message directly to the remote UE, the remote UE and the relay UE continue to perform the PC5 link establishment procedure.

[0249] Fig. 6 is a schematic flowchart of a method for determining a key acquisition scheme according to an embodiment of the present application. The method 600 shown in Fig. 6 is a specific implementation of the method 300. The remote UE shown in Fig. 6 is the second terminal device of the aforementioned method 300, and the relay UE is the first terminal device of the aforementioned method 300. The following describes the steps included in the method 600.

[0250] S610: The relay UE obtains the first information from the PCF#1.

[0251] The PCF#1 provides services to the relay UE. For a description of the first information, see S310 above. For a description of how the relay UE obtains the first information from the PCF#1, see method 800 below.

[0252] S620: The remote UE obtains the second information from PCF#2.

[0253] PCF#2 provides services to the remote UE. For a description of the second information, see S320 above. For a description of how the remote UE obtains the second information from PCF#2, see method 800 below.

[0254] It should be noted that PCF#1 and PCF#2 may be the same PCF network element or different PCF network elements. When the remote UE and the relay UE have the same home PLMN, PCF#1 and PCF#2 are the same PCF network element. When the remote UE and the relay UE have different home PLMNs, PCF#1 and PCF#2 are different PCF network elements.

[0255] S630: The relay UE sends a discovery announcement message (an example of a first message) to the remote UE.

[0256] If the relay UE determines, based on the first information, that the first PC5 key can be obtained via the control plane manner and the user plane manner, the relay UE determines whether to obtain the first PC5 key via the control plane manner depending on whether a preset condition is met. If the preset condition is met, the relay UE determines to obtain the first PC5 key via the control plane manner, or if none of the preset conditions is met, the relay UE determines to obtain the first PC5 key via the control plane manner or the user plane manner. The first PC5 key is a key used for the PC5 link between the remote UE and the relay UE. For a description of how the relay UE determines to obtain the first PC5 key based on the first information, see S310 above. Satisfaction of the preset conditions means that at least one of the preset conditions is met.

[0257] The pre-configured conditions include that the first RSC used by the relay UE in the neighbor direct discovery procedure corresponds to a Layer 2 UE-to-network relay communication service.

[0258] Furthermore, if the relay UE determines to obtain the first PC5 key in a control plane manner, the discovery announcement message sent to the remote UE includes first instruction information, which instructs the remote UE to obtain the first PC5 key in a control plane manner. For further description of the first instruction information, see S310 above.

[0259] The discovery request message may be a discovery announcing message sent by an announcing UE in the Model A discovery model.

[0260] S540: The remote UE sends a direct communication request message (an example of a response message to the first message) to the relay UE.

[0261] If the remote UE determines, based on the discovery announcement message, that the relay UE can provide the first relay service required by the remote UE, and if the remote UE determines, based on the second information, that the first PC5 key can be obtained in a control plane manner, the remote UE sends a communication request message directly to the relay UE.

[0262] If the remote UE determines, based on the discovery announcement message, that the relay UE can provide the first relay service required by the remote UE, but determines, based on the second information, that the first PC5 key cannot be obtained in a control plane manner, the remote UE does not send a communication request message directly to the relay UE.

[0263] For a description of how the remote UE determines to obtain the first PC5 key based on the second information, see S320 above.

[0264] The direct communication request message may be a DCR message to initiate the establishment of a PC5 link.

[0265] S650: The remote UE and the relay UE continue to perform the PC5 link establishment procedure.

[0266] If the remote UE sends a communication request message directly to the relay UE, the remote UE and the relay UE continue to perform the PC5 link establishment procedure.

[0267] 7 is a schematic flowchart of a method for determining a key acquisition scheme according to an embodiment of the present application. The method 700 shown in FIG. 7 is a specific implementation of the method 300. The remote UE shown in FIG. 7 is the second terminal device of the aforementioned method 300, and the relay UE is the first terminal device of the aforementioned method 300. The following describes the steps included in the method 700.

[0268] S710 and S720 are the same as S610 and S620 of method 600.

[0269] S730: The remote UE sends a discovery request message (an example of a third message) to the relay UE.

[0270] The discovery request message includes a second RSC used by the remote UE in the proximity direct discovery procedure. Optionally, the discovery request message further includes a second PLMN ID of the home network of the remote UE.

[0271] The discovery request message may be a discovery request message sent by a discoverer UE in a Model B discovery model.

[0272] S740: The relay UE sends a discovery response message (an example of a first message) to the remote UE.

[0273] If the relay UE determines, based on the discovery request message, that the relay UE can provide a first relay service to the remote UE, the relay UE sends a discovery response message to the remote UE.

[0274] Before the relay UE sends a discovery response message to the remote UE, if the relay UE determines based on the first information that the first PC5 key can be obtained through the control plane and the user plane, the relay UE determines whether to obtain the first PC5 key through the control plane depending on whether a preset condition is met. If the preset condition is met, the relay UE determines to obtain the first PC5 key through the control plane, or if none of the preset conditions are met, the relay UE determines to obtain the first PC5 key through the control plane or the user plane. The first PC5 key is a key used for the PC5 link between the remote UE and the relay UE. For a description of how the relay UE determines to obtain the first PC5 key based on the first information, see S310 above. Satisfaction of the preset conditions means that at least one of the preset conditions is met.

[0275] The pre-configured conditions include one or more of: a first RSC used by the relay UE in the proximity direct discovery procedure corresponds to a Layer 2 UE-to-network relay communication service; and a second RSC corresponds to a Layer 2 UE-to-network relay communication service communication service.

[0276] Optionally, if the discovery request message includes a second PLMN ID, the relay UE may further determine whether to obtain the first PC5 key in a control plane manner according to whether the first PLMN ID of the home network of the relay UE matches the second PLMN ID.

[0277] Furthermore, if the relay UE determines to obtain the first PC5 key in a control plane manner, the discovery response message sent to the remote UE includes first instruction information, which instructs the remote UE to obtain the first PC5 key in a control plane manner. For further description of the first instruction information, please refer to S310 above.

[0278] The discovery response message may be a discovery response message sent by a discoveree UE in a Model B discovery model.

[0279] S750: The remote UE sends a direct communication request message (an example of a response message to the first message) to the relay UE.

[0280] If the remote UE determines, based on the second information, that the first PC5 key can be obtained in a control plane manner, the remote UE sends a communication request message directly to the relay UE.

[0281] If the remote UE determines, based on the second information, that the first PC5 key cannot be obtained in a control plane manner, the remote UE does not send a communication request message directly to the relay UE.

[0282] For a description of how the remote UE determines to obtain the first PC5 key based on the second information, see S320 above.

[0283] The direct communication request may be a DCR message to initiate the establishment of a PC5 link.

[0284] S760: The remote UE and the relay UE continue to perform the PC5 link establishment procedure.

[0285] If the remote UE sends a communication request message directly to the relay UE, the remote UE and the relay UE continue to perform the PC5 link establishment procedure.

[0286] 8, the following describes how the first terminal device obtains the first information from the PCF in the aforementioned S310. It should be noted that the way the second terminal device obtains the second information from the PCF in the aforementioned S320 is the same as the way the first terminal device obtains the first information. For brevity, the details will not be described again in this embodiment of the present application.

[0287] 8 is a schematic flowchart of a communication method according to an embodiment of the present application. As shown in FIG. 8, the method 800 may include steps S810 to S850. The following describes the steps in detail.

[0288] S810: A first terminal device (represented by UE#1) sends a third request message to an access and mobility management network element (represented by AMF).

[0289] The third request message is for requesting proximity-based service policy configuration, and the third request message includes relay capability information of UE #1, where the relay capability information indicates that UE #1 supports use of the UE-to-network relay communication service. For example, the third request message is a 5G ProSe policy configuration request message, and the 5G ProSe policy configuration request includes 5G ProSe UE-to-network relay communication capabilities.

[0290] It should be noted that UE#1 supporting the use of the UE-to-network relay communication service specifically means that UE#1 has the ability to support the use of the UE-to-network relay communication service or the ability to provide a network relay service for the UE-to-network relay communication service.

[0291] Optionally, if UE#1 locally stores the first information, UE#1 may carry the first information in the third request message. The first information may instruct to obtain the PC5 key in a control plane manner and / or a user plane manner, or the first information may include one or more of the first mapping relationship and the second mapping relationship.

[0292] Optionally, the service provider of the relay service may alternatively pre-configure the first information in UE#1 by using the operator of the home network of UE#1.

[0293] Optionally, the AS or AF of the relay service may alternatively pre-configure the first information in UE#1 by using the user plane.

[0294] It is further noted that in this embodiment of the present application, the first mapping relationship may include one or more of the following mapping relationships: a mapping relationship between the second indication information and a first PLMN ID; a mapping relationship between the second indication information and a second PLMN ID; a mapping relationship between the fifth indication information and a first PLMN ID; and a mapping relationship between the fifth indication information and a second PLMN ID. The first PLMN ID is the PLMN ID of the home network of UE#1, and the second PLMN ID is the PLMN ID of the home network of the second terminal device (represented as UE#2). The second mapping relationship includes a mapping relationship between the second indication information or the fifth indication information and identifier information of a relay service. The second indication information instructs to obtain a PC5 key in a control plane manner and a user plane manner, and the fifth indication information instructs to obtain a PC5 key in a control plane manner or a user plane manner.

[0295] It should be noted that the first mapping relationship may indicate a mapping relationship between the second indication information or the fifth indication information and the PLMN in which the terminal is located, and the first mapping relationship may further indicate a mapping relationship between the second indication information or the fifth indication information and the PLMN in which the key management network element is located.

[0296] S820: The AMF sends a fourth request message to the integrated data management network element (represented by UDM).

[0297] The fourth request message is for requesting subscription data of UE#1, for example, ProSe subscription information, which is for determining that UE#1 can use a UE-to-network relay communication service, or the ProSe subscription information is for determining that UE#1 can provide a network relay service for a UE-to-network relay communication service.

[0298] S830: The AMF receives subscription data from the UDM.

[0299] Optionally, the AMF further receives first information from the UDM. For a description of the first information, see S310 above. For the sake of brevity, details will not be described herein.

[0300] It should be noted that if the AMF further receives the first information from the UDM, the UDM stores the first information, and the first information may instruct the PC5 key to be obtained in a control plane manner and / or a user plane manner, or the first information may include one or more of a first mapping relationship and a second mapping relationship. If the first information instructs the PC5 key to be obtained in a control plane manner and / or a user plane manner, the first information stored in the UDM is pre-configured by an operator of the home network of UE#1. If the first information includes a first mapping relationship, the operator of the home network of UE#1 pre-configures a correspondence relationship between the instruction information and the PLMN ID in the UDM, and the correspondence relationship between the instruction information and the PLMN ID may be a correspondence relationship between the PLMN ID and the instruction information in all PLMNs that indicate a method for obtaining a PC5 key and have a roaming agreement with the operator of the home network of UE#1; if the first information includes a second mapping relationship, a service provider of a different relay service pre-configures a correspondence relationship between the instruction information and the identifier information of the relay service in the UDM of the home PLMN of UE#1 by using the operator of the home network of UE#1.

[0301] Optionally, the service provider of the relay service may configure a first mapping relationship or first information instructing the UE#1 to obtain a PC5 key in a control plane manner and / or a user plane manner in the UDM of the UE#1's home PLMN by using the UE#1's home network operator.

[0302] Optionally, the operator of the home network of UE#1 may alternatively pre-configure a second mapping relationship in the UDM of the home PLMN of UE#1.

[0303] It should be noted that when UE#2 performs this procedure, the UDM stores second information, and the second information instructs to obtain the PC5 key in a control plane manner and / or a user plane manner, or the second information may include one or more of the third mapping relationship and the fourth mapping relationship. In this embodiment of the present application, it should be noted that the third mapping relationship may include one or more of the following mapping relationships: a mapping relationship between the third indication information and the first PLMN ID, a mapping relationship between the third indication information and the second PLMN ID, a mapping relationship between the sixth indication information and the first PLMN ID, and a mapping relationship between the sixth indication information and the second PLMN ID. The first PLMN ID is the PLMN ID of the home network of UE#1, and the second PLMN ID is the PLMN ID of the home network of UE#2. The fourth mapping relationship includes a mapping relationship between the third indication information or the sixth indication information and identifier information of the relay service. The third mapping relationship may indicate a mapping relationship between the third instruction information or the sixth instruction information and a PLMN where the terminal is located, and the third mapping relationship may further indicate a mapping relationship between the third instruction information or the sixth instruction information and a PLMN where a key management network element is located. The third instruction information instructs the terminal to obtain the PC5 key in a control plane manner and / or a user plane manner, and the sixth instruction information instructs the terminal to obtain the PC5 key in a control plane manner or a user plane manner. For specific steps of the UE#2, AMF, PCF, and UDM obtaining the second information, please refer to the description of the UE#1, AMF, PCF, and UDM obtaining the first information. Details will not be described again.

[0304] S840: The AMF sends a first request message to a policy control function network element (represented by PCF).

[0305] The first request message is for requesting ProSe parameters of UE#1, and the ProSe parameters include ProSe discovery parameters and PC5 communication parameters related to UE-to-network relay communication.

[0306] Specifically, after receiving subscription data from the UDM, if the AMF determines, based on the UE#1 relay capability information and UE#1 subscription data contained in the third request message, that UE#1 can use the UE-to-network relay communication service or can provide the UE-to-network relay communication service with a network relay service, the AMF sends a first request message to the PCF based on the received third request message.

[0307] Optionally, the first request message further includes relay capability information of UE#1.

[0308] Optionally, if the AMF obtains the first information from the UDM, the first request message may further include the first information.

[0309] Optionally, if UE#1 carries the first information in the third request message, the AMF carries the first information in the first request message.

[0310] Optionally, the AMF does not obtain the first information from the UDM, but obtains the first information locally. Note that if the first information instructs the PC5 key to be obtained via a control plane manner and / or a user plane manner, the first information locally stored in the AMF is pre-configured by the operator of the home network of the UE#1. If the first information includes a first mapping relationship, the operator of the home network of the UE#1 pre-configures a correspondence relationship between the instruction information and a PLMN ID in the AMF, where the correspondence relationship between the instruction information and the PLMN ID instructs the manner of obtaining the PC5 key and may be a correspondence relationship between the PLMN ID and the instruction information in all PLMNs that have a roaming agreement with the operator of the home network of the UE#1. If the first information includes a second mapping relationship, a service provider of a different relay service pre-configures a correspondence relationship between the instruction information and identifier information of the relay service in the AMF of the home PLMN of the UE#1 by using the operator of the home network of the UE#1.

[0311] S850: The PCF sends ProSe parameters to UE#1.

[0312] The ProSe parameters include first information. It can be understood that the ProSe parameters further include RSC information used by UE#1 in the neighbor direct discovery procedure and other parameters used in the neighbor direct discovery procedure.

[0313] In one possible embodiment, upon receiving the first request message from the AMF, the PCF may determine that the UE #1 can use the UE-to-network relay communication service, or may determine that the UE #1 can provide the network relay service for the UE-to-network relay communication service. Further, the PCF carries the first information in a ProSe parameter and sends the ProSe parameter to the UE #1.

[0314] In another possible embodiment, if the first request message includes the relay capability information of UE#1, the PCF determines, based on the relay capability information of UE#1, that UE#1 can use the UE-to-network relay communication service, or that UE#1 can provide the network relay service for the UE-to-network relay communication service. Further, the PCF carries the first information in a ProSe parameter and sends the ProSe parameter to UE#1.

[0315] The manner in which the PCF obtains the first information is not limited in this embodiment of the present application.

[0316] In one example, the PCF obtains the first information from the AMF. As described above, when the AMF obtains the subscription data of UE#1 from the UDM, if the UDM pre-configures the first information, the UDM may send the first information to the AMF. Furthermore, the AMF may carry the first information in a first request message and send the first request message to the PCF.

[0317] Optionally, when the AMF carries the first information in the first request message, the PCF obtains the first information from the first request message and determines third information based on the first information, where the third information is one of obtaining a PC5 key in a control plane manner or obtaining a PC5 key in a user plane manner.

[0318] In another example, the method 800 further includes the step of: S841: the PCF locally acquiring first information. Note that if the first information instructs the PCF to acquire the PC5 key via a control plane manner and / or a user plane manner, the first information locally stored in the PCF is pre-configured by the operator of the home network of the UE#1. If the first information includes a first mapping relationship, the operator of the home network of the UE#1 pre-configures a correspondence relationship between the instruction information and a PLMN ID in the PCF, where the correspondence relationship between the instruction information and the PLMN ID instructs the manner of acquiring the PC5 key and may be a correspondence relationship between the PLMN ID and the instruction information in all PLMNs that have a roaming agreement with the operator of the home network of the UE#1. If the first information includes a second mapping relationship, a service provider of a different relay service pre-configures a correspondence relationship between the instruction information and identifier information of the relay service in the PCF of the home PLMN of the UE#1 by using the operator of the home network of the UE#1.

[0319] Optionally, when the first information includes a second mapping relationship, the method 800 further includes: S842: the AF sending the first information to the PCF. Specifically, in S842, the AF corresponding to a different relay service may send the correspondence relationship between the identifier information of the relay service and the indication information to the PCF at any time by using the NEF network element. Correspondingly, after receiving the correspondence relationship between the indication information and the identifier information of the relay service from the AF, the PCF locally stores the correspondence relationship.

[0320] Optionally, the service provider or AF of the relay service may configure a first mapping relationship or first information instructing the PCF of the home PLMN of UE#1 to obtain a PC5 key in a control plane manner and / or a user plane manner by using the operator of the home network of UE#1.

[0321] In yet another example, the method 800 further includes: S843: the PCF obtains the first information from the UDM. Specifically, in S843, the PCF sends a second request message to the UDM, where the second request message is for requesting the first information. In response, the UDM sends the first information to the PCF based on the second request message.

[0322] In yet another example, the method 800 further includes S844: the PCF obtaining the first information from the DDNMF. Specifically, in S844, the PCF sends a second request message to the DDNMF, where the second request message is for requesting the first information. In response, the DDNMF sends the first information to the PCF based on the second request message.

[0323] It should be noted that if the PCF further receives the first information from the DDNMF, the DDNMF stores the first information, and the first information may instruct the PC5 key to be obtained in a control plane manner and / or a user plane manner, or the first information may include one or more of a first mapping relationship and a second mapping relationship. If the first information instructs the PC5 key to be obtained in a control plane manner and / or a user plane manner, the first information stored locally in the DDNMF is pre-configured by an operator of the home network of UE#1. If the first information includes a first mapping relationship, the operator of the home network of UE#1 pre-configures a correspondence relationship between the instruction information and the PLMN ID in the DDNMF, and the correspondence relationship between the instruction information and the PLMN ID may be a correspondence relationship between the PLMN ID and the instruction information in all PLMNs that indicate a method for obtaining a PC5 key and have a roaming agreement with the operator of the home network of UE#1; if the first information includes a second mapping relationship, a service provider of a different relay service pre-configures a correspondence relationship between the instruction information and the identifier information of the relay service in the DDNMF by using the operator of the home network of UE#1.

[0324] Optionally, when the first information includes a second mapping relationship and the DDNMF does not locally pre-configure the first information, the DDNMF may obtain indication information corresponding to the identifier information of the different relay services from the servers of the different relay services by using the user plane, and locally store the correspondence relationship between the relay service identifier information and the indication information.

[0325] Optionally, the service provider of the relay service may configure a first mapping relationship or first information instructing the DDNMF of the home PLMN of UE#1 to obtain a PC5 key in a control plane manner and / or a user plane manner by using the operator of the home network of UE#1.

[0326] It can be seen that in S850, the PCF sends the ProSe parameters to the AMF, and then the AMF forwards the ProSe parameters to UE#1.

[0327] Optionally, if the AMF obtains the first information from the UDM and the ProSe parameters received by the AMF from the PCF do not include the first information, the AMF sends the first information and the ProSe parameters to UE#1.

[0328] Optionally, if the PCF determines the third information at S850, the PCF sends the third information to UE#1 by using the AMF, and UE#1 directly determines the method of obtaining the first PC5 key by using the third information.

[0329] In this embodiment of the present application, when UE#1 can use the UE-to-network relay communication service or can provide the network relay service for the UE-to-network relay communication service, UE#1 can obtain first information for determining the first PC5 key from the network side (PCF or AMF), so that UE#1 determines a manner for obtaining the first PC5 key based on the first information, which helps UE#1 to successfully establish a PC5 link.

[0330] The above embodiments describe how a remote UE determines a manner to obtain the first PC5 key when the remote UE can obtain the first PC5 key in both the control plane and user plane manners, and further describe how a relay UE determines a manner to obtain the first PC5 key when the relay UE can obtain the first PC5 key in both the control plane and user plane manners. With reference to Figure 9, the following describes how a relay UE negotiates with a remote UE to obtain the first PC5 key when the relay UE can obtain the first PC5 key only in the control plane manner or only in the user plane manner. With reference to Figure 10, the following describes how a remote UE negotiates with a relay UE to obtain the first PC5 key when the remote UE can obtain the first PC5 key only in the control plane manner or only in the user plane manner.

[0331] 9 is a schematic flowchart of determining a key acquisition method according to an embodiment of the present application. As shown in FIG. 9, a method 900 may include S910 to S950. The following describes the steps in detail.

[0332] S910: The remote UE obtains first information from the PCF#1.

[0333] PCF#1 provides services to remote UEs.

[0334] For example, the first information may instruct the remote UE to obtain a PC5 key in a control plane manner or a user plane manner. Note that although the first information corresponds to the PLMN ID of the home network of the remote UE, the first information may not indicate a correspondence between the first information and the PLMN ID of the home network of the remote UE, i.e., the first information does not include identifier information that may indicate the PLMN ID of the home network of the remote UE. For example, the first information may be instruction information obtained by a network element and / or the UE in a PLMN that corresponds to the PLMN ID of the home network of the remote UE.

[0335] As another example, the first information includes a first mapping relationship, and the first mapping relationship includes a correspondence relationship between at least one of the instruction information and at least one PLMN ID, each of the at least one of the instruction information instructs to obtain a PC5 key in a control plane manner and / or a control plane manner, and the at least one PLMN ID includes a PLMN ID of a home network of the remote UE and / or a PLMN ID of a home network of the relay UE.

[0336] It should be noted that the first mapping relationship may indicate a correspondence relationship between at least one of the indication information and a PLMN in which the terminal is located, and the first mapping relationship may further indicate a correspondence relationship between at least one of the indication information and a PLMN in which the key management network element is located.

[0337] In yet another example, the second information includes a fourth mapping relationship, the fourth mapping relationship including a correspondence relationship between at least one of the instruction information and identifier information of at least one relay service, each of the at least one of the instruction information instructing to obtain a PC5 key in a control plane manner and / or a user plane manner, and the at least one relay service includes a first relay service, and the first relay service corresponds to a PC5 link between the first terminal device and the second terminal device, i.e., the PC5 link is established for the first relay service.

[0338] S920: The relay UE obtains the second information from PCF#2.

[0339] PCF#2 provides services to the relay UE.

[0340] For example, the second information may instruct the relay UE to obtain the PC5 key in a control plane manner or a user plane manner. Note that although the second information corresponds to the PLMN ID of the home network of the relay UE, the second information may not indicate a correspondence between the second information and the PLMN ID of the home network of the relay UE, i.e., the second information does not include identifier information that may indicate the PLMN ID of the home network of the relay UE. For example, the second information may be instruction information obtained by a network element and / or the UE in a PLMN that corresponds to the PLMN ID of the home network of the relay UE.

[0341] As another example, the second information includes a third mapping relationship, and the third mapping relationship includes a correspondence relationship between at least one of the instruction information and at least one PLMN ID, each of the at least one piece of instruction information instructing to obtain a PC5 key in a control plane manner and / or a user plane manner, and the at least one PLMN ID includes a PLMN ID of a home network of the remote UE and / or a PLMN ID of a home network of the relay UE.

[0342] It should be noted that the third mapping relationship may indicate a correspondence relationship between at least one of the indication information and a PLMN in which the terminal is located, and the third mapping relationship may further indicate a correspondence relationship between at least one of the indication information and a PLMN in which the key management network element is located.

[0343] In yet another example, the second information includes a fourth mapping relationship, the fourth mapping relationship including a correspondence relationship between at least one of the instruction information and identifier information of at least one relay service, each of the at least one of the instruction information instructing to obtain a PC5 key in a control plane manner and / or a user plane manner, and the at least one relay service includes a first relay service, and the first relay service corresponds to a PC5 link between the first terminal device and the second terminal device, i.e., the PC5 link is established for the first relay service.

[0344] It should be noted that PCF#1 and PCF#2 may be the same PCF network element or different PCF network elements. When the remote UE and the relay UE have the same home PLMN, PCF#1 and PCF#2 are the same PCF network element. When the remote UE and the relay UE have different home PLMNs, PCF#1 and PCF#2 are different PCF network elements.

[0345] Case 1: In method 900, S930a and S940a are performed.

[0346] S930a: The relay UE sends a discovery announcement message to the remote UE.

[0347] The discovery announcement message includes seventh instruction information, which instructs the remote UE how to obtain the first PC5 key, as determined by the relay UE.

[0348] Specifically, the relay UE determines a manner for obtaining the first PC5 key based on the second information.

[0349] In one example, when the second information instructs the relay UE to acquire the PC5 key via a control plane manner or a user plane manner, the relay UE determines a manner to acquire the first PC5 key based on the second information. For example, when the second information instructs the relay UE to acquire the PC5 key via a control plane manner, the relay UE determines to acquire the first PC5 key via a control plane manner, or when the second information instructs the relay UE to acquire the PC5 key via a user plane manner, the relay UE determines to acquire the first PC5 key via a user plane manner.

[0350] In another example, when the second information includes a third mapping relationship, the relay UE determines a manner for obtaining the first PC5 key based on sixth instruction information, where the sixth instruction information instructs the relay UE to obtain the PC5 key in a control plane manner or a user plane manner, and the sixth instruction information corresponds to a PLMN ID of a home network of the remote UE or a PLMN ID of a home network of the relay UE.

[0351] In another example, when the second information includes a fourth mapping relationship, the relay UE determines a manner to obtain the first PC5 key based on the sixth instruction information, where the sixth instruction information instructs the relay UE to obtain the PC5 key in a control plane manner or a user plane manner, and the sixth instruction information corresponds to the first relay service associated with the RSC in the discovery announcement message.

[0352] The specific form of the seventh instruction information is not limited in this embodiment of the present application.

[0353] In one example, the seventh instruction information is equivalent to the sixth instruction information or the second information, i.e., the relay UE carries the sixth instruction information or the second information in a discovery announcement message and sends the discovery announcement message to the remote UE, and the second information instructs the remote UE to obtain the PC5 key via a control plane or a user plane.

[0354] In one example, the relay UE determines a manner to acquire the first PC5 key based on the second information, and determines seventh instruction information based on the manner to acquire the first PC5 key. Specifically, when it is determined that the first PC5 key is acquired via the control plane manner, the seventh instruction information is to acquire the PC5 key via the control plane manner, or when it is determined that the first PC5 key is acquired via the user plane manner, the seventh instruction information is to acquire the PC5 key via the user plane manner.

[0355] In another example, the seventh indication information is a PLMN ID corresponding to the sixth indication information. For example, if the sixth indication information corresponds to the PLMN ID of the home network of the remote UE, the seventh indication information is the PLMN ID of the home network of the remote UE, or if the sixth indication information corresponds to the PLMN ID of the home network of the relay UE, the seventh indication information is the PLMN ID of the home network of the relay UE.

[0356] In another example, the seventh indication information is identifier information of a first relay service corresponding to the sixth indication information. For example, if the sixth indication information corresponds to a first relay service, the seventh indication information is identifier information of the first relay service, and the identifier information may be RSC or ID information of the first relay service.

[0357] In one example, when the seventh instruction information is to obtain the PC5 key in a control plane manner, the seventh instruction information may be represented by 00, or when the seventh instruction information is to obtain the PC5 key in a user plane manner, the seventh instruction information may be represented by 01. This is not limited in this embodiment of the present application.

[0358] Note that the discovery announcement message may be a discovery announcing message in a model A discovery procedure.

[0359] S940a: The remote UE sends a direct communication request message to the relay UE.

[0360] If the method for obtaining the first PC5 key determined by the remote UE is the same as the method for obtaining the first PC5 key determined by the relay UE, the remote UE sends a communication request message directly to the relay UE.

[0361] If the method for obtaining the first PC5 key determined by the remote UE is different from the method for obtaining the first PC5 key determined by the relay UE, the remote UE does not send a communication request message directly to the relay UE.

[0362] Specifically, the remote UE determines, based on the first information and the seventh instruction information, whether the methods for obtaining the first PC5 key determined separately by the remote UE and the relay UE are the same.

[0363] In one example, if the first information instructs the remote UE to acquire the PC5 key via a control plane manner or a user plane manner, and the seventh instruction information is equivalent to the sixth instruction information or the second information, the remote UE may determine whether the manners for acquiring the first PC5 key separately determined by the remote UE and the relay UE are the same depending on whether the first information and the seventh instruction information are the same. If the first information and the seventh instruction information are the same, the remote UE determines that the manners for acquiring the first PC5 key separately determined by the remote UE and the relay UE are the same; or if the first information and the seventh instruction information are different, the remote UE determines that the manners for acquiring the first PC5 key separately determined by the remote UE and the relay UE are different.

[0364] If the first information instructs the remote UE to acquire the PC5 key via the control plane manner or the user plane manner, and the seventh instruction information instructs the remote UE to acquire the PC5 key via the control plane manner or the user plane manner, the remote UE may determine a manner to acquire the PC5 key based on the first information, and determine by comparison whether the manner determined based on the first information and the manner instructed by the seventh instruction information are the same. If the PC5 key acquisition manner determined based on the first information and the PC5 key acquisition manner instructed by the seventh instruction information are the same, the remote UE may determine that the manners to acquire the first PC5 key separately determined by the remote UE and the relay UE are the same; or if the PC5 key acquisition manner determined based on the first information and the PC5 key acquisition manner instructed by the seventh instruction information are different, the remote UE may determine that the manners to acquire the first PC5 key separately determined by the remote UE and the relay UE are different.

[0365] In another example, when the first information includes the first mapping relationship and the seventh instruction information is equivalent to the sixth instruction information or the second information, the remote UE may determine whether the manners for deriving the first PC5 key separately determined by the remote UE and the relay UE are the same depending on whether the fifth instruction information and the seventh instruction information are the same, where the fifth instruction information instructs the remote UE to derive the PC5 key via a control plane manner or a user plane manner, and the fifth instruction information corresponds to a PLMN ID of a home network of the remote UE or a PLMN ID of a home network of the relay UE.

[0366] If the first information includes the first mapping relationship and the seventh instruction information instructs the remote UE to acquire the PC5 key via a control plane manner or a user plane manner, the remote UE may determine a manner to acquire the PC5 key based on the fifth instruction information and determine, by comparison, whether the manner determined based on the fifth instruction information and the manner instructed by the seventh instruction information are the same. If the PC5 key acquisition manner determined based on the fifth instruction information and the PC5 key acquisition manner instructed by the seventh instruction information are the same, the remote UE may determine that the manners to acquire the first PC5 key separately determined by the remote UE and the relay UE are the same; or if the PC5 key acquisition manner determined based on the fifth instruction information and the PC5 key acquisition manner instructed by the seventh instruction information are different, the remote UE may determine that the manners to acquire the first PC5 key separately determined by the remote UE and the relay UE are different.

[0367] In another example, when the first information includes the second mapping relationship and the seventh instruction information is equivalent to the sixth instruction information or the second information, the remote UE may determine whether the methods for obtaining the first PC5 key separately determined by the remote UE and the relay UE are the same depending on whether the fifth instruction information and the seventh instruction information are the same, where the fifth instruction information instructs the remote UE to obtain the PC5 key via a control plane method or a user plane method, and the fifth instruction information corresponds to identifier information of the first relay service.

[0368] If the first information includes the second mapping relationship and the seventh instruction information instructs the remote UE to acquire the PC5 key via a control plane manner or a user plane manner, the remote UE may determine a manner to acquire the PC5 key based on the fifth instruction information and determine, by comparison, whether the manner determined based on the fifth instruction information and the manner instructed by the seventh instruction information are the same. If the PC5 key acquisition manner determined based on the fifth instruction information and the PC5 key acquisition manner instructed by the seventh instruction information are the same, the remote UE may determine that the manners to acquire the first PC5 key separately determined by the remote UE and the relay UE are the same; or if the PC5 key acquisition manner determined based on the fifth instruction information and the PC5 key acquisition manner instructed by the seventh instruction information are different, the remote UE may determine that the manners to acquire the first PC5 key separately determined by the remote UE and the relay UE are different.

[0369] In yet another example, if the first information includes a first mapping relationship and the seventh instruction information is a PLMN ID, the remote UE determines a method for acquiring a PC5 key based on the seventh instruction information and the first mapping relationship, and determines whether the methods for acquiring the PC5 key determined separately by the remote UE and the relay UE are the same depending on whether the method for acquiring the PC5 key is the same as the method indicated by the fifth instruction information. If the method for acquiring the PC5 key determined by the remote UE based on the seventh instruction information and the first mapping relationship is the same as the method indicated by the fifth instruction information for acquiring the PC5 key, it is determined that the methods for acquiring the first PC5 key by the remote UE and the relay UE are the same; otherwise, it is determined that the methods for acquiring the first PC5 key by the remote UE and the relay UE are different. The method for acquiring the PC5 key determined by the remote UE based on the seventh instruction information and the first mapping relationship is the method indicated by the instruction information corresponding to the seventh instruction information in the first mapping relationship.

[0370] In yet another example, if the first information includes a second mapping relationship and the seventh instruction information is identifier information of a first relay service, the remote UE determines a method for acquiring a PC5 key based on the seventh instruction information and the second mapping relationship, and determines whether the methods for acquiring the PC5 key determined separately by the remote UE and the relay UE are the same depending on whether the method for acquiring the PC5 key is the same as the method indicated by the fifth instruction information. If the method for acquiring the PC5 key determined by the remote UE based on the seventh instruction information and the second mapping relationship is the same as the method indicated by the fifth instruction information, it is determined that the methods for acquiring the first PC5 key by the remote UE and the relay UE are the same. Otherwise, it is determined that the methods for acquiring the first PC5 key by the remote UE and the relay UE are different. The method for acquiring the PC5 key determined by the remote UE based on the seventh instruction information and the second mapping relationship is the method indicated by the instruction information corresponding to the seventh instruction information in the second mapping relationship.

[0371] Case 2: In method 900, S930b and S940b are performed.

[0372] S930b: The remote UE sends a discovery request message to the relay UE.

[0373] The discovery request message may be a discovery request message sent by a discoverer UE in a Model B discovery model.

[0374] S940b: The relay UE sends a discovery response message to the remote UE.

[0375] If the relay UE determines based on the discovery request message that the relay UE can provide the remote UE with a first relay service, the relay UE sends a discovery response message to the remote UE. The discovery response message includes seventh indication information, which indicates to the remote UE the manner of obtaining the first PC5 key determined by the relay UE. For further explanation of how the relay UE determines the manner of obtaining the first PC5 key and the seventh indication information, please refer to S930a.

[0376] Note that the discovery response message may be a discovery response message in a model B discovery procedure.

[0377] S950: The remote UE and the relay UE continue to perform the PC5 link establishment procedure.

[0378] If S930a and S940a are performed in method 900, in S940a, the remote UE sends a direct communication request message to the relay UE, and the remote UE and the relay UE continue to perform a PC5 link establishment procedure.

[0379] When S930b and S940b are performed in method 900, after the remote UE receives the discovery response message, if the remote UE and the relay UE determine, based on the first information and the seventh indication information, whether the methods for obtaining the first PC5 key separately determined by the remote UE and the relay UE are the same, the remote UE and the relay UE perform a PC5 link establishment procedure. For how the remote UE determines, based on the first information and the seventh indication information, whether the methods for obtaining the first PC5 key separately determined by the remote UE and the relay UE are the same, see the description of S940a above.

[0380] In this embodiment of the present application, the relay UE carries seventh indication information in the discovery announcement or discovery response message, so that the remote UE can determine based on the seventh indication information whether the methods for obtaining the first PC5 key separately determined by the relay UE and the remote UE are the same. When the methods for obtaining the first PC5 key separately determined by the relay UE and the remote UE are the same, the remote UE sends a direct communication request message to the relay UE to avoid a PC5 link establishment failure caused by different methods for obtaining the first PC5 key separately determined by the two UEs at both ends. When the methods for obtaining the first PC5 key separately determined by the relay UE and the remote UE are different, the remote UE does not send a direct communication request message to the relay UE to reduce signaling.

[0381] 10 is a schematic flowchart of determining a key acquisition method according to an embodiment of the present application. As shown in FIG. 10, a method 1000 may include S1010 to S1050. The following describes the steps in detail.

[0382] S1010 and S1020 are the same as S910 and S920 of method 900.

[0383] Case 1: In method 1000, S1030a and S1040a are performed.

[0384] S1030a: The remote UE sends a discovery request message to the relay UE.

[0385] The discovery request message includes eighth instruction information, which instructs the relay UE how to obtain the first PC5 key, as determined by the remote UE.

[0386] Specifically, the remote UE determines, based on the first information, a manner for obtaining the first PC5 key.

[0387] In one example, when the first information instructs the PC5 key to be acquired via a control plane manner or a user plane manner, the remote UE determines a manner of acquiring the first PC5 key based on the first information. For example, when the first information instructs the PC5 key to be acquired via a control plane manner, the remote UE determines to acquire the first PC5 key via a control plane manner, or when the first information instructs the PC5 key to be acquired via a user plane manner, the remote UE determines to acquire the first PC5 key via a user plane manner.

[0388] In another example, when the first information includes a first mapping relationship, the remote UE determines a manner for obtaining the first PC5 key based on fifth instruction information, where the fifth instruction information instructs the remote UE to obtain the PC5 key in a control plane manner or a user plane manner, and the fifth instruction information corresponds to a PLMN ID of a home network of the remote UE or a PLMN ID of a home network of the relay UE.

[0389] In another example, when the first information includes a second mapping relationship, the remote UE determines a manner for obtaining the first PC5 key based on the fifth instruction information, where the fifth instruction information instructs the remote UE to obtain the PC5 key via a control plane manner or a user plane manner, and the fifth instruction information corresponds to a first relay service associated with the RSC in the discovery request message.

[0390] The specific form of the eighth instruction information is not limited in this embodiment of the present application.

[0391] In one example, the eighth instruction information is equivalent to the fifth instruction information or the first information, i.e., the remote UE carries the fifth instruction information or the first information in a discovery request message and sends the discovery request message to the relay UE, and the first information instructs the relay UE to obtain the PC5 key via a control plane or a user plane.

[0392] In one example, the remote UE determines a manner for acquiring the first PC5 key based on the first information, and determines eighth instruction information based on the manner for acquiring the first PC5 key. Specifically, when it is determined that the first PC5 key is acquired via a control plane manner, the eighth instruction information is to acquire the PC5 key via a control plane manner, or when it is determined that the first PC5 key is acquired via a user plane manner, the eighth instruction information is to acquire the PC5 key via a user plane manner.

[0393] In another example, the eighth indication information is a PLMN ID corresponding to the fifth indication information. For example, if the fifth indication information corresponds to the PLMN ID of the home network of the remote UE, the eighth indication information is the PLMN ID of the home network of the remote UE, or if the fifth indication information corresponds to the PLMN ID of the home network of the relay UE, the eighth indication information is the PLMN ID of the home network of the relay UE.

[0394] In another example, the eighth indication information is identifier information of a first relay service corresponding to the fifth indication information. For example, if the fifth indication information corresponds to a first relay service, the eighth indication information is identifier information of the first relay service, and the identifier information may be RSC or ID information of the first relay service.

[0395] In one example, when the eighth instruction information is to obtain the PC5 key in a control plane manner, the eighth instruction information may be represented by 00, or when the eighth instruction information is to obtain the PC5 key in a user plane manner, the eighth instruction information may be represented by 01. This is not limited in this embodiment of the present application.

[0396] Note that the discovery request message may be a discovery request message in a model B discovery procedure.

[0397] S1040a: The relay UE sends a discovery response message to the remote UE.

[0398] If the manner of obtaining the first PC5 key determined by the relay UE is the same as the manner of obtaining the first PC5 key determined by the remote UE, the relay UE sends a discovery response message to the remote UE.

[0399] If the method for obtaining the first PC5 key determined by the relay UE is different from the method for obtaining the first PC5 key determined by the remote UE, the relay UE does not send a discovery response message to the remote UE or sends a rejection message to the remote UE.

[0400] Specifically, the relay UE determines, based on the second information and the eighth instruction information, whether the methods for obtaining the first PC5 key determined separately by the remote UE and the relay UE are the same.

[0401] In one example, if the second information instructs the remote UE to acquire the PC5 key via a control plane manner or a user plane manner, and the eighth instruction information is equivalent to the fifth instruction information or the first information, the relay UE may determine whether the manners for acquiring the first PC5 key separately determined by the remote UE and the relay UE are the same depending on whether the second information and the eighth instruction information are the same. If the second information and the eighth instruction information are the same, the relay UE determines that the manners for acquiring the first PC5 key separately determined by the remote UE and the relay UE are the same; or if the second information and the eighth instruction information are different, the relay UE determines that the manners for acquiring the first PC5 key separately determined by the remote UE and the relay UE are different.

[0402] If the second information instructs the relay UE to acquire the PC5 key via the control plane manner or the user plane manner, and the eighth instruction information instructs the relay UE to acquire the PC5 key via the control plane manner or the user plane manner, the relay UE may determine a manner to acquire the PC5 key based on the second information, and determine by comparison whether the manner determined based on the second information and the manner instructed by the eighth instruction information are the same. If the PC5 key acquisition manner determined based on the second information and the PC5 key acquisition manner instructed by the eighth instruction information are the same, the relay UE determines that the manners to acquire the first PC5 key separately determined by the remote UE and the relay UE are the same, or if the PC5 key acquisition manner determined based on the second information and the PC5 key acquisition manner instructed by the eighth instruction information are different, the relay UE determines that the manners to acquire the first PC5 key separately determined by the remote UE and the relay UE are different.

[0403] In another example, when the second information includes the third mapping relationship and the eighth instruction information is equivalent to the fifth instruction information or the first information, the relay UE may determine whether the manners for deriving the first PC5 key separately determined by the remote UE and the relay UE are the same depending on whether the sixth instruction information and the eighth instruction information are the same. The sixth instruction information instructs the remote UE to derive the PC5 key via a control plane manner or a user plane manner, and the sixth instruction information corresponds to a PLMN ID of a home network of the remote UE or a PLMN ID of a home network of the relay UE.

[0404] If the second information includes the third mapping relationship and the eighth instruction information instructs to obtain the PC5 key via the control plane manner or the user plane manner, the relay UE may determine a manner to obtain the PC5 key based on the sixth instruction information, and determine by comparison whether the manner determined based on the sixth instruction information and the manner instructed by the eighth instruction information are the same. If the PC5 key obtainment manner determined based on the sixth instruction information and the PC5 key obtainment manner instructed by the eighth instruction information are the same, the relay UE may determine that the manners to obtain the first PC5 key separately determined by the remote UE and the relay UE are the same; or if the PC5 key obtainment manner determined based on the sixth instruction information and the PC5 key obtainment manner instructed by the eighth instruction information are different, the relay UE may determine that the manners to obtain the first PC5 key separately determined by the remote UE and the relay UE are different.

[0405] In another example, when the second information includes the fourth mapping relationship and the eighth instruction information is equivalent to the fifth instruction information or the first information, the relay UE may determine whether the manners for obtaining the first PC5 key separately determined by the remote UE and the relay UE are the same depending on whether the sixth instruction information and the eighth instruction information are the same. The sixth instruction information instructs the remote UE to obtain the PC5 key via a control plane manner or a user plane manner, and the sixth instruction information corresponds to identifier information of the first relay service.

[0406] If the second information includes the fourth mapping relationship and the eighth instruction information instructs the relay UE to obtain the PC5 key via the control plane manner or the user plane manner, the relay UE may determine a manner to obtain the PC5 key based on the sixth instruction information and determine, by comparison, whether the manner determined based on the sixth instruction information and the manner instructed by the eighth instruction information are the same. If the PC5 key obtainment manner determined based on the sixth instruction information and the PC5 key obtainment manner instructed by the eighth instruction information are the same, the relay UE may determine that the manners to obtain the first PC5 key separately determined by the remote UE and the relay UE are the same; or if the PC5 key obtainment manner determined based on the sixth instruction information and the PC5 key obtainment manner instructed by the seventh instruction information are different, the remote UE may determine that the manners to obtain the first PC5 key separately determined by the remote UE and the relay UE are different.

[0407] In yet another example, if the second information includes a third mapping relationship and the eighth instruction information is a PLMN ID, the relay UE determines a method for acquiring a PC5 key based on the eighth instruction information and the third mapping relationship, and determines whether the methods for acquiring the PC5 key separately determined by the remote UE and the relay UE are the same depending on whether the method for acquiring the PC5 key is the same as the method indicated by the sixth instruction information. If the method for acquiring the PC5 key determined by the relay UE based on the eighth instruction information and the third mapping relationship is the same as the method indicated by the sixth instruction information for acquiring the PC5 key, it is determined that the methods for acquiring the first PC5 key by the remote UE and the relay UE are the same; otherwise, it is determined that the methods for acquiring the first PC5 key by the remote UE and the relay UE are different. The method for acquiring the PC5 key determined by the relay UE based on the eighth instruction information and the third mapping relationship is the method indicated by the instruction information corresponding to the eighth instruction information in the third mapping relationship.

[0408] In yet another example, if the first information includes a fourth mapping relationship and the eighth instruction information is identifier information of a first relay service, the relay UE determines a method for acquiring a PC5 key based on the eighth instruction information and the fourth mapping relationship, and determines whether the methods for acquiring the PC5 key separately determined by the relay UE and the remote UE are the same depending on whether the method for acquiring the PC5 key is the same as the method indicated by the sixth instruction information. If the method for acquiring the PC5 key determined by the relay UE based on the eighth instruction information and the fourth mapping relationship is the same as the method indicated by the sixth instruction information for acquiring the PC5 key, it is determined that the methods for acquiring the first PC5 key by the relay UE and the remote UE are the same; otherwise, it is determined that the methods for acquiring the first PC5 key by the relay UE and the remote UE are different. The method for acquiring the PC5 key determined by the relay UE based on the eighth instruction information and the second mapping relationship is the method indicated by the instruction information corresponding to the eighth instruction information in the fourth mapping relationship.

[0409] Note that the discovery response message may be a discovery response message in a model B discovery procedure.

[0410] Case 2: In method 1000, S1030b and S1040b are performed.

[0411] S1030b: The relay UE sends a discovery announcement message to the remote UE.

[0412] The discovery announcement message may be a discovery announcing message sent by an announcing UE in a Model A discovery model.

[0413] S1040b: The remote UE sends a direct communication request message to the relay UE.

[0414] If the remote UE determines based on the discovery announcement message that the relay UE can provide the first relay service required by the remote UE, the remote UE sends a direct communication request message to the remote UE. The direct communication request message includes eighth instruction information, which instructs the relay UE on the manner of obtaining the first PC5 key, as determined by the remote UE. For further explanation of how the remote UE determines the manner of obtaining the first PC5 key and the eighth instruction information, see S1030a.

[0415] Note that the direct communication message may be a DCR message to initiate a PC5 link.

[0416] S1050: The remote UE and the relay UE perform a PC5 link establishment procedure.

[0417] If S1030a and S1040a are performed in method 1000, in S1040a, the relay UE sends a discovery response message to the source UE, and the remote UE and the relay UE perform a PC5 link establishment procedure.

[0418] When S1030b and S1040b are performed in method 1000, after the relay UE receives the direct communication request message, if the relay UE determines, based on the second information and the eighth instruction information, that the schemes for obtaining the first PC5 key separately determined by the remote UE and the relay UE are the same, the relay UE and the remote UE perform a PC5 link establishment procedure; or if the relay UE determines, based on the second information and the eighth instruction information, that the schemes for obtaining the first PC5 key separately determined by the remote UE and the relay UE are different, the relay UE terminates the PC5 link establishment procedure or sends a rejection message to the remote UE, where the rejection message carries cause value information indicating that the schemes for obtaining the first PC5 key are different. For how the relay UE determines, based on the second information and the eighth instruction information, whether the schemes for obtaining the first PC5 key separately determined by the remote UE and the relay UE are the same, see the description of S1040a above.

[0419] In this embodiment of the present application, the remote UE carries eighth indication information in the discovery request message or the direct communication request message, so that the relay UE can determine, based on the eighth indication information, whether the methods for obtaining the first PC5 key separately determined by the relay UE and the remote UE are the same. When the methods for obtaining the first PC5 key separately determined by the relay UE and the remote UE are the same, the relay UE sends a discovery response message to the remote UE to avoid a PC5 link establishment failure caused by different methods for obtaining the first PC5 key separately determined by the two UEs at both ends. When the methods for obtaining the first PC5 key separately determined by the relay UE and the remote UE are different, the relay UE does not send a discovery response message to the remote UE or sends a rejection message to the remote UE to reduce signaling.

[0420] The above describes in detail the method provided in the embodiment of the present application with reference to Figures 3 to 10. The following describes in detail the communication device provided in the embodiment of the present application with reference to Figures 11 to 13.

[0421] 11 is a schematic block diagram of a communication device according to an embodiment of the present application. As shown in FIG. 11, the communication device 1100 may include a processing unit 1110 and a transceiver unit 1120.

[0422] In one possible design, the communications apparatus 1100 may correspond to a terminal device in an embodiment of the method described above, and may be, for example, a terminal device or a component (e.g., a chip or chip system) configured within a terminal device.

[0423] It should be understood that the communication device 1100 may correspond to the first terminal device in the method 300 according to the embodiment of the present application, and the communication device 1100 may include units configured to perform the method performed by the first terminal device in the method 300 of Fig. 3. In addition, the units in the communication device 1100 and other operations and / or functions described above are separately used to implement the corresponding procedures of the method 300 of Fig. 3. It should be understood that the specific processes by which the units perform the corresponding steps described above have been described in detail in the embodiment of the method described above, and will not be described in detail herein for the sake of brevity.

[0424] It should be understood that the communication device 1100 may correspond to a remote UE in the method 400, the method 500, the method 600, the method 700, the method 900, or the method 1000 according to the embodiments of the present application. The communication device 1100 may include units configured to perform the method performed by the remote UE in the method 400 of FIG. 4, the method 500 of FIG. 5, the method 600 of FIG. 6, the method 700 of FIG. 7, the method 900 of FIG. 9, or the method 1000 of FIG. 10. In addition, the units in the communication device 1100 and other operations and / or functions described above may be separately used to implement corresponding procedures in the method 400 of FIG. 4, the method 500 of FIG. 5, the method 600 of FIG. 6, the method 700 of FIG. 7, the method 900 of FIG. 9, or the method 1000 of FIG. 10. It should be understood that the specific processes by which the units perform the corresponding steps described above have been described in detail in the embodiments of the methods described above, and will not be described in detail herein for the sake of brevity.

[0425] It should be understood that the communication device 1100 may correspond to a relay UE in method 400, method 500, method 600, method 700, method 900, or method 1000 according to the embodiments of the present application. The communication device 1100 may include units configured to perform the methods performed by the relay UE in method 400 of FIG. 4, method 500 of FIG. 5, method 600 of FIG. 6, method 700 of FIG. 7, method 900 of FIG. 9, or method 1000 of FIG. 10. In addition, the units in the communication device 1100 and other operations and / or functions described above may be separately used to implement corresponding procedures in method 400 of FIG. 4, method 500 of FIG. 5, method 600 of FIG. 6, method 700 of FIG. 7, method 900 of FIG. 9, or method 1000 of FIG. 10. It should be understood that the specific processes by which the units perform the corresponding steps described above have been described in detail in the embodiments of the methods described above, and will not be described in detail herein for the sake of brevity.

[0426] It should be understood that the communication device 1100 may correspond to UE#1 in the method 800 according to the embodiment of the present application, and the communication device 1100 may include units configured to perform the method performed by UE#1 in the method 800 of Fig. 8. In addition, the units in the communication device 1100 and other operations and / or functions described above are separately used to implement the corresponding procedures of the method 800 of Fig. 8. It should be understood that the specific processes by which the units perform the corresponding steps described above have been described in detail in the embodiment of the method described above, and will not be described in detail herein for the sake of brevity.

[0427] It should be further understood that if the communication device 1100 is a chip configured in a terminal device, the transceiver unit 1120 in the communication device 1100 may be realized by using an input / output interface, and the processing unit 1110 in the communication device 1100 may be realized by using a chip, processor, microprocessor, integrated circuit, etc. integrated into a chip system.

[0428] In another possible design, the communications device 1100 may correspond to a policy control function network element in an embodiment of the above method, and may be, for example, a policy control function network element or a component (e.g., a chip or chip system) configured within the policy control function network element.

[0429] It should be understood that the communication device 1100 may correspond to the policy control function network element in the method 800 according to the embodiment of the present application, and the communication device 1100 may include a unit configured to perform the method performed by the policy control function network element in the method 800 of Figure 8. In addition, the units in the communication device 1100 and other operations and / or functions described above are separately used to implement the corresponding procedures of the method 800 of Figure 8. It should be understood that the specific processes by which the units perform the corresponding steps described above have been described in detail in the embodiment of the method described above, and will not be described in detail herein for the sake of brevity.

[0430] It should be further understood that if the communication device 1100 is a chip configured in a policy control function network element, the transceiver unit 1120 in the communication device 1100 may be realized by using an input / output interface, and the processing unit 1120 in the communication device 1100 may be realized by using a chip, processor, microprocessor, integrated circuit, etc. integrated into a chip system.

[0431] In yet another possible design, the communications device 1100 may correspond to an access and mobility management function network element in an embodiment of the method described above, and may be, for example, an access and mobility management function network element, or may be a component (e.g., a chip or chip system) configured within the access and mobility management function network element.

[0432] It should be understood that the communication device 1100 may correspond to the access and mobility management function network element in the method 800 according to the embodiment of the present application, and the communication device 1100 may include a unit configured to perform the method performed by the access and mobility management function network element in the method 800 of Figure 8. In addition, the units in the communication device 1100 and other operations and / or functions described above are separately used to implement the corresponding procedures of the method 800 of Figure 8. It should be understood that the specific processes by which the units perform the corresponding steps described above have been described in detail in the embodiment of the method described above, and will not be described in detail herein for the sake of brevity.

[0433] It should be further understood that if the communication device 1100 is a chip configured in an access and mobility management function network element, the transceiver unit 1120 in the communication device 1100 may be realized by using an input / output interface, and the processing unit 1110 in the communication device 1100 may be realized by using a chip, processor, microprocessor, integrated circuit, etc. integrated into a chip system.

[0434] 12 is a schematic block diagram of a wireless communication device according to another embodiment of the present application. The communication device 1200 shown in FIG. 12 may include a memory 1210, a processor 1220, and a communication interface 1230. The memory 1210, the processor 1220, and the communication interface 1230 are connected via an internal connection path. The memory 1210 is configured to store instructions. The processor 1220 is configured to execute the instructions stored in the memory 1210 to control the input / output interface to receive / transmit packets. Optionally, the memory 1210 may be coupled to the processor 1220 via an interface or may be integrated with the processor 1220.

[0435] It should be noted that the communication interface 1230 implements communication between the communication apparatus 1200 and another device or a communication network using a transceiver device, such as, but not limited to, a transceiver. The communication interface 1230 may further include an input / output interface.

[0436] In the implementation process, the steps of the aforementioned method may be completed by using a hardware integrated logic circuit in the processor 1220 or by using instructions in the form of software. The communication method disclosed with reference to the embodiments of the present application may be directly executed by a hardware processor, or may be executed by using a combination of hardware and software modules in the processor. The software modules may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory 1210, and the processor 1220 reads information in the memory 1210 and completes the steps of the aforementioned method in combination with the hardware of the processor 1220. To avoid repetition, the details will not be described again in this specification.

[0437] It should be understood that the processor in embodiments of the present application may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or another programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc.

[0438] It should also be understood that in the embodiments of the present application, the memory may include read-only memory and random access memory to provide instructions and data to the processor. A part of the processor may further include non-volatile random access memory. For example, the processor may further store device type information.

[0439] 13 is a schematic diagram of a chip system according to an embodiment of the present application. The chip system here may alternatively be a system including a circuit. The chip system 1300 shown in FIG. 13 includes a logic circuit 1310 and an input / output interface 1320. The logic circuit is coupled to the input interface and configured to transmit data (e.g., first instruction information) by using the input / output interface to perform the methods described in FIGS. 3 to 10 .

[0440] An embodiment of the present application further provides a processing device including a processor and an interface, the processor configured to perform the method in any of the aforementioned method embodiments.

[0441] It should be understood that the processing device may be one or more chips. For example, the processing device may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or another integrated chip.

[0442] According to the method provided in the embodiment of the present application, the present application further provides a computer program product, which includes computer program code, which, when executed on a computer, enables the computer to execute the method performed by the terminal device, the policy control function network element, or the access and mobility management function network element in the embodiments shown in Figures 3 to 10.

[0443] According to the method provided in the embodiment of the present application, the present application further provides a computer-readable storage medium, which stores program code, which, when executed on a computer, enables the computer to execute the method performed by the terminal device, the policy control function network element, or the access and mobility management function network element in the embodiments shown in Figures 3 to 10.

[0444] According to the method provided in the embodiment of the present application, the present application further provides a system, which includes one or more of the above-mentioned terminal devices, policy control function network elements, or access and mobility management function network elements.

[0445] The terminal device in the above-mentioned apparatus embodiments corresponds to the terminal device in the method embodiments, the policy control function network element in the above-mentioned apparatus embodiments corresponds to the policy control function network element in the method embodiments, and the access and mobility management function network element in the above-mentioned apparatus embodiments corresponds to the access and mobility management function network element in the method embodiments. Corresponding modules or units perform corresponding steps. For example, a transceiver unit (transceiver) performs the receiving step or the transmitting step in the method embodiments, and steps other than the transmitting step and the receiving step may be performed by a processing unit (processor). For specific unit functions, please refer to the corresponding method embodiments. One or more processors may be present.

[0446] As used herein, terms such as “component,” “module,” and “system” are used to refer to computer-related entities, hardware, firmware, a combination of hardware and software, software, or software running on it. For example, a component may be, but is not limited to, a process running on a processor, a processor, an object, an executable file, a thread of execution, a program, and / or a computer. As shown in the figures, both computing devices and applications running on computing devices may be components. One or more components may reside within a process and / or thread of execution, and components may be located on one computer and / or distributed between two or more computers. Additionally, these components may execute from various computer-readable media having various data structures stored thereon. For example, components may communicate by using local and / or remote processes, based on signals having one or more data packets (e.g., data from two components interacting with another component in a local and / or distributed system and / or over a network such as the Internet that interacts with other systems using signals).

[0447] Those skilled in the art will recognize that the illustrative logical blocks and steps described with reference to the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether a function is performed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may realize the described functions using various methods for each specific application, but such implementation should not be considered as going beyond the scope of this application.

[0448] For the sake of convenience, it will be clearly understood by those skilled in the art that the detailed operation processes of the aforementioned systems, devices and units may be referred to the corresponding processes in the aforementioned method embodiments, and the details will not be described again in this specification.

[0449] In some embodiments provided in the present application, it should be understood that the disclosed system, device, and method may be realized in other ways. For example, the described device embodiment is merely an example. For example, the division into units is merely a logical division of functions, and other divisions may be used in actual implementation. For example, multiple units or components may be combined or integrated into other systems, or some features may be omitted or not implemented. In addition, the mutual couplings or direct couplings or communication connections shown or discussed may be realized through some interfaces. Indirect couplings or communication connections between devices or units may be realized in electronic, mechanical, or other forms.

[0450] The units described as separate parts may or may not be physically separate, and the parts shown as units may or may not be physical units, i.e., they may be located in one place or distributed over multiple network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.

[0451] In addition, the functional units in the embodiments of the present application may be integrated into one processing unit, or each of the units may exist physically alone, or two or more units may be integrated into one unit.

[0452] In the above-described embodiments, all or part of the functions of the functional units may be realized by using software, hardware, firmware, or any combination thereof. When software is used to realize the embodiments, all or part of the embodiments may be realized in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part.

[0453] When functions are realized in the form of software functional units and sold or used as independent products, the functions may be stored in a computer-readable storage medium. Based on this understanding, a part of the technical solution in the present application that substantially contributes to the current technology, or a part of the technical solution, may be expressed in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for instructing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0454] The above description is merely a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. Any variations or replacements that can be easily devised by those skilled in the art within the technical scope disclosed in the present application shall fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims. [Explanation of symbols]

[0455] 300 ways 400 ways 500 ways 600 ways 700 methods 800 ways 900 ways 1000 ways 1100 Communication equipment 1110 Processing Unit 1120 Transceiver Unit 1200 Communication Equipment 1210 memory 1220 processor 1230 Communication Interface 1300 Chip System 1310 Logic Circuits 1320 Input / Output Interface

Claims

1. receiving, by a policy control function network element, from an access and mobility management function network element, a request message for requesting proximity-based service (ProSe) parameters for a first terminal device; sending the ProSe parameters to the first terminal device by the policy control function network element, the ProSe parameters including first information, the first information for determining a method for deriving a first PC5 key, the first PC5 key being a key used for a PC5 link between the first terminal device and a second terminal device, and the method for deriving the first PC5 key including a control plane method or a user plane method; A communication method comprising: A communication method, wherein the first information includes a mapping relationship between identifier information of a relay service corresponding to the PC5 link and second instruction information, and the second instruction information instructs the PC5 key to be obtained in the control plane manner or the user plane manner.

2. The communication method of claim 1, wherein the first request message includes the first information.

3. The communication method comprises: obtaining, by the policy control function network element, the first information from a local configuration; The communication method of claim 1 further comprising:

4. The communication method comprises: receiving, by the policy control function network element, the first information from an application function network element; The communication method of claim 3, further comprising:

5. The communication method comprises: sending, by the policy control function network element, a request message to a first network element to request the first information; receiving, by the policy control function network element, the first information from the first network element; The communication method of claim 1 further comprising:

6. 6. A communication device comprising at least one processor, the at least one processor coupled to at least one memory, the at least one processor configured to execute computer programs or instructions stored in the at least one memory to enable the communication device to perform the communication method of any one of claims 1 to 5.

7. 6. A chip comprising a processor and a communication interface, the communication interface configured to receive data and / or information and transmit the received data and / or information to the processor, the processor processing the data and / or information to perform the communication method of any one of claims 1 to 5.

8. 6. A computer-readable storage medium having a computer program stored therein, the computer program executing to perform the communication method according to any one of claims 1 to 5.

9. A computer program comprising instructions, when said computer program is run on a computer, which enables said computer to carry out the communication method according to any one of claims 1 to 5.

10. A system including a policy control function network element and an access and mobility management function network element, The mobility management function network element comprises: configured to send a request message to request proximity-based service (ProSe) parameters for the first terminal device; The policy control function network element includes: receiving the request message; A system configured to transmit the ProSe parameters to the first terminal device, the ProSe parameters including first information, the first information for determining a method for obtaining a first PC5 key, the first PC5 key being a key used for a PC5 link between the first terminal device and a second terminal device, and the method for obtaining the first PC5 key including a control plane method or a user plane method.

11. A policy control function network element configured to perform the communication method of any one of claims 1 to 5. Including, the system.

Citation Information

Patent Citations

  • Method for operating the secondary station

    JP2024522159A

  • Method and apparatus for supporting UE-to-network relay communication in a wireless communication system

    US20220095398A1

  • Method for operating a secondary station

    WO2022258640A1