Transmitting method and receiving method for relay discovery message, terminal, and device

By using the direct discovery key set and the relay discovery key set to encrypt the terminal identification in 5G ProSe relay discovery mode B, the problem of terminal information security management during the relay discovery process is solved, and information security and reliable medium is achieved Following discovery.

WO2024230412A1PCT designated stage expired Publication Date: 2024-11-14DATANG MOBILE COMM EQUIP CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/087741
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-11
Filing Date
2024-04-15
Publication Date
2024-11-14

AI Technical Summary

Technical Problem

In the prior art, the specific relay discovery process in 5G ProSe relay discovery mode B has not been resolved, especially in terms of security management of terminal information.

Method used

By including the identity of the discoverer terminal and the discovered terminal in the relay discovery request message, and using the direct discovery key set and the relay discovery key set for encryption and integrity protection, the terminal during the relay discovery process is specifically defined. The method of providing information and implementing the security management of terminal information.

Benefits of technology

The specific implementation of the relay discovery process and the security management of terminal information are realized, ensuring the security and reliability of information during the relay discovery process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024087741_14112024_PF_FP_ABST
    Figure CN2024087741_14112024_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a transmitting method and receiving method for a relay discovery message, a terminal, and a device. The transmitting method comprises: a discoverer terminal generating a first relay discovery request message, wherein a direct discovery dataset of the first relay discovery request message comprises an identifier of the discoverer terminal and an identifier of a discoveree terminal; and transmitting the first relay discovery request message.
Need to check novelty before this filing date? Find Prior Art

Description

Method for sending and receiving relay discovery messages, terminal and device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application No. 202310532369.6, filed on May 11, 2023, entitled “Method for sending, method for receiving, terminal and device for relay discovery message”, which is incorporated herein by reference in its entirety. Technical Field

[0003] The present disclosure relates to the field of wireless communication technologies, and in particular to a method for sending and receiving a relay discovery message, a terminal, and a device. Background Art

[0004] The fifth generation mobile communication (5G) Proximity Services (ProSe) will support user equipment (UE) to user equipment (U2U Relay) communication scenarios, where a source UE (Source UE) establishes a communication connection with a target UE (Target UE) via a relay UE (Relay UE). U2U relay communication first involves the two end UEs (Source UE and Target UE) discovering each other through the relay UE and then establishing a communication connection.

[0005] 5G ProSe supports two discovery modes: Model A and Model B. In Model B, the source UE can be the discoverer UE, and the target UE can be the discoveree UE. Although the U2U Model B relay discovery message flow and its main data content have been defined, the specific implementation of this discovery process is a technical issue that needs to be resolved.

[0006] Summary of the Invention

[0007] In response to the problems existing in the prior art, the embodiments of the present disclosure provide a method for sending, a method for receiving, a terminal, and a device for relaying discovery messages.

[0008] In a first aspect, an embodiment of the present disclosure provides a method for sending a relay discovery message, which is applied to a discoverer terminal, including:

[0009] Generate a first relay discovery request message; wherein the direct discovery data set of the first relay discovery request message includes the identifier of the discoverer terminal and the identifier of the discoverer terminal;

[0010] Send the first relay discovery request message.

[0011] In some embodiments, generating the first relay discovery request message includes one or more of the following:

[0012] Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using a direct discovery key set;

[0013] Generate a message integrity protection code MIC of the direct discovery data set in the first relay discovery request message using the direct discovery key set;

[0014] The MIC of the first relay discovery request message is generated using the relay discovery key set.

[0015] In some embodiments, generating a first relay discovery request message includes:

[0016] Generate the first relay discovery request message according to the relay discovery security solution;

[0017] The relay discovery security solution includes one or more of the following:

[0018] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0019] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0020] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0021] In some embodiments, the first relay discovery request message includes an identifier of the relay discovery security scheme.

[0022] In some embodiments, the relay discovery data set of the first relay discovery request message includes an identifier of the relay discovery security scheme.

[0023] In some embodiments, the method further comprises:

[0024] A first relay discovery response message sent by a relay terminal is received; wherein the relay discovery data set of the first relay discovery response message includes an identifier of the relay terminal and an identifier of the discoverer terminal.

[0025] In some embodiments, in the first relay discovery response message, the identifier of the relay terminal and the identifier of the discoverer terminal are encrypted by a relay discovery key set.

[0026] In some embodiments, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0027] In some embodiments, the method further comprises:

[0028] Receive the direct discovery key set and relay discovery key set sent by the key management function.

[0029] In a second aspect, an embodiment of the present disclosure further provides a method for sending a relay discovery message, which is applied to a relay terminal, including:

[0030] Receiving a first relay discovery request message sent by a discoverer terminal; wherein the direct discovery data set of the first relay discovery request message includes an identifier of the discoverer terminal and an identifier of a discoverer terminal;

[0031] Generate a second relay discovery request message according to the first relay discovery request message; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; the first relay discovery data set includes an identifier of the relay terminal;

[0032] Send the second relay discovery request message.

[0033] In some embodiments, generating the second relay discovery request message includes one or more of the following:

[0034] Encrypting the identifier of the relay terminal using a relay discovery key set;

[0035] A message integrity protection code MIC of the second relay discovery request message is generated using the relay discovery key set.

[0036] In some embodiments, generating a second relay discovery request message according to the first relay discovery request message includes:

[0037] generating the second relay discovery request message according to the relay discovery security scheme indicated in the first relay discovery request message;

[0038] The relay discovery security solution includes one or more of the following:

[0039] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0040] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0041] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0042] In some embodiments, the second relay discovery request message includes an identifier of the relay discovery security scheme.

[0043] In some embodiments, the first relay discovery data set includes an identifier of the relay discovery security scheme.

[0044] In some embodiments, the method further comprises:

[0045] Receiving a second relay discovery response message sent by the discoverer terminal; wherein the relay discovery data set of the second relay discovery response message includes the identifier of the discoverer terminal and the identifier of the discoverer terminal;

[0046] Generate a first relay discovery response message according to the second relay discovery response message; the first relay discovery response message includes the direct discovery data set in the second relay discovery response message and the second relay discovery data set generated by the relay terminal; the second relay discovery data set includes the identifier of the relay terminal and the identifier of the discoverer terminal;

[0047] Sending the first relay discovery response message to the discoverer terminal.

[0048] In some embodiments, in the second relay discovery response message, the identifier of the discoverer terminal and the identifier of the discoverer terminal are encrypted by a relay discovery key set.

[0049] In some embodiments, the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0050] In some embodiments, generating the first relay discovery response message includes one or more of the following:

[0051] Encrypting the identifier of the relay terminal and the identifier of the discoverer terminal using a relay discovery key set;

[0052] The MIC of the first relay discovery response message is generated using the relay discovery key set.

[0053] In some embodiments, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0054] In some embodiments, the second relay discovery data set includes an identifier of the relay discovery security scheme.

[0055] In some embodiments, the method further comprises:

[0056] Receive the relay discovery key set sent by the key management function.

[0057] In a third aspect, an embodiment of the present disclosure further provides a method for receiving a relay discovery message, which is applied to a discoverer terminal, comprising:

[0058] Receiving a second relay discovery request message sent by the relay terminal; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; wherein the direct discovery data set includes the identifier of the discoverer terminal and the identifier of the discoverer terminal, and the first relay discovery data set includes the identifier of the relay terminal;

[0059] Generate a second relay discovery response message according to the second relay discovery request message; wherein the relay discovery data set of the second relay discovery response message includes the identifier of the discoverer terminal and the identifier of the discovered terminal;

[0060] Send the second relay discovery response message to the relay terminal.

[0061] In some embodiments, generating the second relay discovery response message includes one or more of the following:

[0062] Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using a relay discovery key set;

[0063] Generate a message integrity protection code MIC of the direct discovery data set in the second relay discovery response message using the direct discovery key set;

[0064] The MIC of the second relay discovery response message is generated using the relay discovery key set.

[0065] In some embodiments, generating a second relay discovery response message according to the second relay discovery request message includes:

[0066] generating, according to the relay discovery security scheme indicated in the second relay discovery request message, the second relay discovery response message;

[0067] The relay discovery security solution includes one or more of the following:

[0068] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0069] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0070] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0071] In some embodiments, the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0072] In some embodiments, the relay discovery data set of the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0073] In some embodiments, the method further comprises:

[0074] Receive the direct discovery key set and relay discovery key set sent by the key management function.

[0075] In a fourth aspect, an embodiment of the present disclosure further provides a discoverer terminal, comprising a memory, a transceiver, and a processor;

[0076] A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations:

[0077] Generate a first relay discovery request message; wherein the direct discovery data set of the first relay discovery request message includes the identifier of the discoverer terminal and the identifier of the discoverer terminal;

[0078] Send the first relay discovery request message.

[0079] In some embodiments, generating the first relay discovery request message includes one or more of the following:

[0080] Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using a direct discovery key set;

[0081] Generate a message integrity protection code MIC of the direct discovery data set in the first relay discovery request message using the direct discovery key set;

[0082] The MIC of the first relay discovery request message is generated using the relay discovery key set.

[0083] In some embodiments, generating a first relay discovery request message includes:

[0084] Generate the first relay discovery request message according to the relay discovery security solution;

[0085] The relay discovery security solution includes one or more of the following:

[0086] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0087] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0088] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0089] In some embodiments, the first relay discovery request message includes an identifier of the relay discovery security scheme.

[0090] In some embodiments, the relay discovery data set of the first relay discovery request message includes an identifier of the relay discovery security scheme.

[0091] In some embodiments, the operations further include:

[0092] A first relay discovery response message sent by a relay terminal is received; wherein the relay discovery data set of the first relay discovery response message includes an identifier of the relay terminal and an identifier of the discoverer terminal.

[0093] In some embodiments, in the first relay discovery response message, the identifier of the relay terminal and the identifier of the discoverer terminal are encrypted by a relay discovery key set.

[0094] In some embodiments, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0095] In some embodiments, the operations further include:

[0096] Receive the direct discovery key set and relay discovery key set sent by the key management function.

[0097] In a fifth aspect, an embodiment of the present disclosure further provides a relay terminal, comprising a memory, a transceiver, and a processor;

[0098] A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations:

[0099] Receiving a first relay discovery request message sent by a discoverer terminal; wherein the direct discovery data set of the first relay discovery request message includes an identifier of the discoverer terminal and an identifier of a discoverer terminal;

[0100] Generate a second relay discovery request message according to the first relay discovery request message; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; the first relay discovery data set includes an identifier of the relay terminal;

[0101] Send the second relay discovery request message.

[0102] In some embodiments, generating the second relay discovery request message includes one or more of the following:

[0103] Encrypting the identifier of the relay terminal using a relay discovery key set;

[0104] A message integrity protection code MIC of the second relay discovery request message is generated using the relay discovery key set.

[0105] In some embodiments, generating a second relay discovery request message according to the first relay discovery request message includes:

[0106] generating the second relay discovery request message according to the relay discovery security scheme indicated in the first relay discovery request message;

[0107] The relay discovery security solution includes one or more of the following:

[0108] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0109] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0110] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0111] In some embodiments, the second relay discovery request message includes an identifier of the relay discovery security scheme.

[0112] In some embodiments, the first relay discovery data set includes an identifier of the relay discovery security scheme.

[0113] In some embodiments, the operations further include:

[0114] Receiving a second relay discovery response message sent by the discoverer terminal; wherein the relay discovery data set of the second relay discovery response message includes the identifier of the discoverer terminal and the identifier of the discoverer terminal;

[0115] Generate a first relay discovery response message according to the second relay discovery response message; the first relay discovery response message includes the direct discovery data set in the second relay discovery response message and the second relay discovery data set generated by the relay terminal; the second relay discovery data set includes the identifier of the relay terminal and the identifier of the discoverer terminal;

[0116] Sending the first relay discovery response message to the discoverer terminal.

[0117] In some embodiments, in the second relay discovery response message, the identifier of the discoverer terminal and the identifier of the discoverer terminal are encrypted by a relay discovery key set.

[0118] In some embodiments, the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0119] In some embodiments, generating the first relay discovery response message includes one or more of the following:

[0120] Encrypting the identifier of the relay terminal and the identifier of the discoverer terminal using a relay discovery key set;

[0121] The MIC of the first relay discovery response message is generated using the relay discovery key set.

[0122] In some embodiments, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0123] In some embodiments, the second relay discovery data set includes an identifier of the relay discovery security scheme.

[0124] In some embodiments, the operations further include:

[0125] Receive the relay discovery key set sent by the key management function.

[0126] In a sixth aspect, an embodiment of the present disclosure further provides a discoverer terminal, comprising a memory, a transceiver, and a processor;

[0127] A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations:

[0128] Receiving a second relay discovery request message sent by the relay terminal; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; wherein the direct discovery data set includes the identifier of the discoverer terminal and the identifier of the discoverer terminal, and the first relay discovery data set includes the identifier of the relay terminal;

[0129] Generate a second relay discovery response message according to the second relay discovery request message; wherein the relay discovery data set of the second relay discovery response message includes the identifier of the discoverer terminal and the identifier of the discovered terminal;

[0130] Send the second relay discovery response message to the relay terminal.

[0131] In some embodiments, generating the second relay discovery response message includes one or more of the following:

[0132] Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using a relay discovery key set;

[0133] Generate a message integrity protection code MIC of the direct discovery data set in the second relay discovery response message using the direct discovery key set;

[0134] The MIC of the second relay discovery response message is generated using the relay discovery key set.

[0135] In some embodiments, generating a second relay discovery response message according to the second relay discovery request message includes:

[0136] generating, according to the relay discovery security scheme indicated in the second relay discovery request message, the second relay discovery response message;

[0137] The relay discovery security solution includes one or more of the following:

[0138] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0139] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0140] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0141] In some embodiments, the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0142] In some embodiments, the relay discovery data set of the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0143] In some embodiments, the operations further include:

[0144] Receive the direct discovery key set and relay discovery key set sent by the key management function.

[0145] In a seventh aspect, an embodiment of the present disclosure further provides a device for sending a relay discovery message, including:

[0146] A first generating unit is configured to generate a first relay discovery request message; wherein the direct discovery data set of the first relay discovery request message includes an identifier of the discoverer terminal and an identifier of the discoverer terminal;

[0147] The first sending unit is used to send the first relay discovery request message.

[0148] In some embodiments, generating the first relay discovery request message includes one or more of the following:

[0149] Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using a direct discovery key set;

[0150] Generate a message integrity protection code MIC of the direct discovery data set in the first relay discovery request message using the direct discovery key set;

[0151] The MIC of the first relay discovery request message is generated using the relay discovery key set.

[0152] In some embodiments, generating a first relay discovery request message includes:

[0153] Generate the first relay discovery request message according to the relay discovery security solution;

[0154] The relay discovery security solution includes one or more of the following:

[0155] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0156] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0157] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0158] In some embodiments, the first relay discovery request message includes an identifier of the relay discovery security scheme.

[0159] In some embodiments, the relay discovery data set of the first relay discovery request message includes an identifier of the relay discovery security scheme.

[0160] In some embodiments, the apparatus further comprises:

[0161] The first receiving unit is configured to receive a first relay discovery response message sent by a relay terminal; wherein the relay discovery data set of the first relay discovery response message includes an identifier of the relay terminal and an identifier of the discoverer terminal.

[0162] In some embodiments, in the first relay discovery response message, the identifier of the relay terminal and the identifier of the discoverer terminal are encrypted by a relay discovery key set.

[0163] In some embodiments, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0164] In some embodiments, the apparatus further comprises:

[0165] The second receiving unit is configured to receive the direct discovery key set and the relay discovery key set sent by the key management function.

[0166] In an eighth aspect, an embodiment of the present disclosure further provides a device for sending a relay discovery message, including:

[0167] A third receiving unit is configured to receive a first relay discovery request message sent by a discoverer terminal; wherein the direct discovery data set of the first relay discovery request message includes an identifier of the discoverer terminal and an identifier of the discoverer terminal;

[0168] A second generating unit is configured to generate a second relay discovery request message according to the first relay discovery request message; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; the first relay discovery data set includes an identifier of the relay terminal;

[0169] The second sending unit is configured to send the second relay discovery request message.

[0170] In some embodiments, generating the second relay discovery request message includes one or more of the following:

[0171] Encrypting the identifier of the relay terminal using a relay discovery key set;

[0172] A message integrity protection code MIC of the second relay discovery request message is generated using the relay discovery key set.

[0173] In some embodiments, generating a second relay discovery request message according to the first relay discovery request message includes:

[0174] generating the second relay discovery request message according to the relay discovery security scheme indicated in the first relay discovery request message;

[0175] The relay discovery security solution includes one or more of the following:

[0176] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0177] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0178] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0179] In some embodiments, the second relay discovery request message includes an identifier of the relay discovery security scheme.

[0180] In some embodiments, the first relay discovery data set includes an identifier of the relay discovery security scheme.

[0181] In some embodiments, the third receiving unit is further configured to receive a second relay discovery response message sent by the discoverer terminal; wherein the relay discovery data set of the second relay discovery response message includes an identifier of the discoverer terminal and an identifier of the discoverer terminal;

[0182] The second generating unit is further configured to generate a first relay discovery response message according to the second relay discovery response message; the first relay discovery response message includes the direct discovery data set in the second relay discovery response message and the second relay discovery data set generated by the relay terminal; the second relay discovery data set includes the identifier of the relay terminal and the identifier of the discoverer terminal;

[0183] The second sending unit is further configured to send the first relay discovery response message to the discoverer terminal.

[0184] In some embodiments, in the second relay discovery response message, the identifier of the discoverer terminal and the identifier of the discoverer terminal are encrypted by a relay discovery key set.

[0185] In some embodiments, the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0186] In some embodiments, generating the first relay discovery response message includes one or more of the following:

[0187] Encrypting the identifier of the relay terminal and the identifier of the discoverer terminal using a relay discovery key set;

[0188] The MIC of the first relay discovery response message is generated using the relay discovery key set.

[0189] In some embodiments, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0190] In some embodiments, the second relay discovery data set includes an identifier of the relay discovery security scheme.

[0191] In some embodiments, the third receiving unit is further configured to:

[0192] Receive the relay discovery key set sent by the key management function.

[0193] In a ninth aspect, an embodiment of the present disclosure further provides a device for receiving a relay discovery message, including:

[0194] A fourth receiving unit, configured to receive a second relay discovery request message sent by the relay terminal; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message, and the first relay discovery data set generated by the relay terminal; wherein the direct discovery data set includes an identifier of the discoverer terminal and an identifier of the discoverer terminal, and the first relay discovery data set includes an identifier of the relay terminal;

[0195] A third generating unit is configured to generate a second relay discovery response message according to the second relay discovery request message; wherein the relay discovery data set of the second relay discovery response message includes the identifier of the discoverer terminal and the identifier of the discovered terminal;

[0196] The third sending unit is configured to send the second relay discovery response message to the relay terminal.

[0197] In some embodiments, generating the second relay discovery response message includes one or more of the following:

[0198] Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using a relay discovery key set;

[0199] Generate a message integrity protection code MIC of the direct discovery data set in the second relay discovery response message using the direct discovery key set;

[0200] The MIC of the second relay discovery response message is generated using the relay discovery key set.

[0201] In some embodiments, generating a second relay discovery response message according to the second relay discovery request message includes:

[0202] generating, according to the relay discovery security scheme indicated in the second relay discovery request message, the second relay discovery response message;

[0203] The relay discovery security solution includes one or more of the following:

[0204] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0205] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0206] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0207] In some embodiments, the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0208] In some embodiments, the relay discovery data set of the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0209] In some embodiments, the fourth receiving unit is further configured to:

[0210] Receive the direct discovery key set and relay discovery key set sent by the key management function.

[0211] In the tenth aspect, an embodiment of the present disclosure also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is used to enable a computer to execute the method for sending a relay discovery message as described in the first aspect, or execute the method for sending a relay discovery message as described in the second aspect, or execute the method for receiving a relay discovery message as described in the third aspect.

[0212] In the eleventh aspect, an embodiment of the present disclosure also provides a communication device, in which a computer program is stored, and the computer program is used to enable the communication device to execute the method for sending the relay discovery message as described in the first aspect above, or execute the method for sending the relay discovery message as described in the second aspect above, or execute the method for receiving the relay discovery message as described in the third aspect above.

[0213] In the twelfth aspect, an embodiment of the present disclosure also provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the method for sending the relay discovery message as described in the first aspect as described above, or execute the method for sending the relay discovery message as described in the second aspect as described above, or execute the method for receiving the relay discovery message as described in the third aspect as described above.

[0214] In the thirteenth aspect, an embodiment of the present disclosure also provides a chip product, in which a computer program is stored, and the computer program is used to enable the chip product to execute the method for sending the relay discovery message as described in the first aspect as described above, or execute the method for sending the relay discovery message as described in the second aspect as described above, or execute the method for receiving the relay discovery message as described in the third aspect as described above.

[0215] The relay discovery message sending method, receiving method, terminal and device provided by the embodiments of the present disclosure, by including the identifier of the discoverer terminal and the identifier of the discoverer terminal in the direct discovery data set of the first relay discovery request message for sending, not only specifically defines the way in which the terminal information is provided to the relay terminal during the relay discovery process, so that the relay discovery process can be specifically implemented, but also facilitates the secure management of terminal information during the relay discovery process. BRIEF DESCRIPTION OF THE DRAWINGS

[0216] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0217] FIG1 is a flow chart of a method for sending a relay discovery message according to an embodiment of the present disclosure;

[0218] FIG2 is an example diagram of a first relay discovery request message provided by an embodiment of the present disclosure;

[0219] FIG3 is an example diagram of a first relay discovery response message provided by an embodiment of the present disclosure;

[0220] FIG4 is a second flow chart of a method for sending a relay discovery message according to an embodiment of the present disclosure;

[0221] FIG5 is an example diagram of a second relay discovery request message provided by an embodiment of the present disclosure;

[0222] FIG6 is an example diagram of a second relay discovery response message provided by an embodiment of the present disclosure;

[0223] FIG7 is a flow chart of a method for receiving a relay discovery message according to an embodiment of the present disclosure;

[0224] FIG8 is a schematic diagram of a basic process of relay discovery mode B provided by an embodiment of the present disclosure;

[0225] FIG9 is a schematic structural diagram of a discoverer terminal provided in an embodiment of the present disclosure;

[0226] FIG10 is a schematic structural diagram of a relay terminal provided in an embodiment of the present disclosure;

[0227] FIG11 is a schematic structural diagram of a discoverer terminal provided in an embodiment of the present disclosure;

[0228] FIG12 is a schematic diagram of a structure of a device for sending a relay discovery message according to an embodiment of the present disclosure;

[0229] FIG13 is a second structural diagram of the apparatus for sending a relay discovery message according to an embodiment of the present disclosure;

[0230] FIG14 is a schematic structural diagram of a receiving device for relaying discovery messages provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0231] In the embodiments of the present disclosure, the term "and / or" describes the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0232] In the embodiments of the present disclosure, the term "plurality" refers to two or more than two, and other quantifiers are similar thereto.

[0233] In the embodiments of the present disclosure, the terms "first," "second," and the like are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present disclosure can be implemented in an order other than that illustrated or described herein. Furthermore, the objects distinguished by "first" and "second" are generally of the same type, and do not limit the number of objects. For example, the first object can be one or more.

[0234] The following will be combined with the accompanying drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure and not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0235] In order to facilitate a clearer understanding of the technical solutions of the various embodiments of the present disclosure, some technical contents related to the various embodiments of the present disclosure are first introduced.

[0236] 1. 5G ProSe discovery mode.

[0237] 5G ProSe supports two discovery modes:

[0238] Model A: The announcing UE sends an announcement message to announce its presence. The monitoring UE does not need to reply to the announcement message. The monitoring UE can establish a communication connection with the announcing UE as needed.

[0239] Model B: The discoverer UE actively sends a discovery solicitation message to find the discoveree UE. The discoverer UE needs to reply to the discoverer UE after receiving the message. Then, the discoverer UE establishes a communication connection with the discoveree UE.

[0240] 5G ProSe will support UE-to-UE relay (U2U Relay) communication scenarios, where a source UE (Source UE) establishes a communication connection with a target UE (Target UE) via a relay UE (Relay UE). U2U relay communication first involves the end UEs (source UE, target UE) discovering each other through the relay UE and then establishing a communication connection. In relay communication scenarios, the source UE can be the Monitoring UE or Discoverer UE during the discovery process, and the target UE can be the Announcing UE or Discoveree UE during the discovery process.

[0241] The U2U relay discovery message contains two parts: the data required for interaction between the source UE / target UE and the relay UE, which is called the relay discovery data set (U2U discovery set); the data required for interaction between the source UE and the target UE, which is called the direct discovery data set (direct discovery set).

[0242] 2. Explanation of relevant terms.

[0243] Discoverer UE: The source UE in the ProSe Model B discovery process, which broadcasts a message to discover a Discoveree UE. Upon discovering a Discoveree UE, it initiates communication with the Discoveree UE.

[0244] Discoveree UE: The target UE in the ProSe Model B discovery process. It responds to the discovery message broadcast by the Discoverer UE to let the Discoverer UE know of its existence.

[0245] Relay UE: In U2U relay communication, it is located between the source UE and the target UE, forwarding the discovery messages of both. After receiving the discovery request or response message from the source UE / target UE, it generates a new discovery message after performing corresponding processing and sends it to the UE that receives the message.

[0246] End UE: A UE for which a relay UE can provide relay services, also known as the Discoverer UE and Discoveree UE in Model B.

[0247] Relay Service Code (RSC): used to identify a specific relay service.

[0248] Message Integrity Code (MIC): used to protect the integrity of the message.

[0249] ProSe Query Code: A code included in a ProSe Model B discovery request message. This code is associated with the ProSe application and the ProSe user. A portion of the code is used by the receiving UE to monitor the identity information of the sending UE's message and is unencrypted. Another portion may be privacy-related and requires encryption. The key protecting the direct discovery dataset is associated with the ProSe Query Code.

[0250] ProSe Response Code: A code included in the ProSe Model B Discovery Response message as a response to the ProSe Query Code. Security handling for the ProSe Response Code is similar to that for the ProSe Query Code. The key protecting the Direct Discovery Data Set is associated with the ProSe Response Code.

[0251] The number of bits in the UTC-based counter (LSB): This is the time parameter associated with the key set used to protect discovery messages. This parameter allows for some wiggle room between the sender's and receiver's clocks, but must remain within a specified range to prevent replay attacks.

[0252] FIG1 is a flow chart of a method for sending a relay discovery message according to an embodiment of the present disclosure. The method can be applied to a discoverer terminal. As shown in FIG1 , the method includes the following steps:

[0253] Step 100: Generate a first relay discovery request message; wherein the direct discovery data set of the first relay discovery request message includes an identifier of a discoverer terminal and an identifier of a discoverer terminal.

[0254] Step 101: Send a first relay discovery request message.

[0255] Specifically, the embodiments of the present disclosure provide a method for sending a relay discovery message for the discovery mode B (Model B) described above, wherein the relay discovery message may refer to various messages in the discovery process under the relay communication scenario, for example: a relay discovery request message (UE-to-UE Relay Discovery Solicitation message) sent by the Discoverer UE to the Relay UE, a relay discovery request message (UE-to-UE Relay Discovery Solicitation message) sent by the Relay UE to the Discoveree UE, etc.

[0256] For the Discoverer UE, it can first generate a first relay discovery request message, which includes the identifier of the Discoverer UE (Discoverer UE ID) and the identifier of the Discoveree UE (Discoveree UE ID), wherein the identifier of the Discoverer UE and the identifier of the Discoveree UE are included in the direct discovery data set of the first relay discovery request message.

[0257] In some embodiments, the identifier of the Discoverer UE may be a layer 2 identifier (Layer-2 ID) of the Discoverer UE or other identification information.

[0258] In some embodiments, the identifier of the Discoveree UE may be a layer 2 identifier (Layer-2 ID) of the Discoveree UE or other identification information.

[0259] After generating the first relay discovery request message, the Discoverer UE may send the first relay discovery request message, for example, broadcast the first relay discovery request message, so that the Relay UE receives the first relay discovery request message.

[0260] The method for sending a relay discovery message provided by the embodiment of the present disclosure includes the identifier of the Discoverer UE and the identifier of the Discoveree UE in the direct discovery data set of the first relay discovery request message for sending. It not only specifically defines the way in which the terminal information is provided to the Relay UE during the relay discovery process, so that the relay discovery process can be specifically implemented, but also facilitates the secure management of terminal information during the relay discovery process.

[0261] In some embodiments, generating the first relay discovery request message includes one or more of the following:

[0262] Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using the direct discovery key set;

[0263] Generate a message integrity protection code MIC of the direct discovery data set in the first relay discovery request message using the direct discovery key set;

[0264] The MIC of the first relay discovery request message is generated using the relay discovery key set.

[0265] Specifically, when generating the first relay discovery request message, the Discoverer UE may also perform corresponding security processing such as encryption and integrity protection on the first relay discovery request message. For example, the Discoverer UE identifier and the Discoveree UE identifier may be encrypted using the direct discovery key set, the direct discovery key set may be used to perform integrity protection on the direct discovery data set in the first relay discovery request message, and the relay discovery key set may be used to perform integrity protection on the first relay discovery request message, etc.

[0266] The direct discovery key set refers to the key set used between the Discoverer UE and the Discoveree UE to protect the direct discovery data set. This key set includes keys for confidentiality protection, integrity protection, and message scrambling. Symmetric key technology can be used for protection, where the key value of the message sender and the message receiver is the same.

[0267] The relay discovery key set is the key set used to protect relay discovery messages between the Discoverer UE, Discoveree UE, and Relay UE. This key set includes keys for confidentiality protection, integrity protection, and message scrambling. Symmetric key technology can be used for protection, with the sender's key and the receiver's key being the same.

[0268] In some embodiments, the method further comprises:

[0269] Receive the direct discovery key set and relay discovery key set sent by the key management function.

[0270] Specifically, in some embodiments, the key management function may provide the direct discovery key set and the relay discovery key set to the Discoverer UE so that the Discoverer UE uses the corresponding key set to protect the sent relay discovery message, or to verify and decrypt the subsequently received relay discovery message.

[0271] In some embodiments, generating a first relay discovery request message includes:

[0272] Generate a first relay discovery request message according to the relay discovery security solution;

[0273] Relay discovery security solutions include one or more of the following:

[0274] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0275] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0276] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0277] Specifically, the relay discovery security solution may be provided to the Discoverer UE by a key management function or other devices, or may be pre-configured in the Discoverer UE, which is not specifically limited in the present disclosure.

[0278] Relay discovery security solutions can include one or a combination of the following:

[0279] (1) Use direct discovery key set and / or relay discovery key set to protect relay discovery messages, or do not use direct discovery key set and relay discovery key set to protect relay discovery messages.

[0280] (2) Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection.

[0281] Enabling end terminal privacy protection may include encrypting the identifiers of the end terminals (Discoverer UE and Discoveree UE), and enabling relay terminal privacy protection may include encrypting the identifier of the Relay UE.

[0282] (3) Enable integrity protection of the direct discovery dataset and / or integrity protection of the relay discovery message, or disable integrity protection of the direct discovery dataset and integrity protection of the relay discovery message.

[0283] Among them, turning on the integrity protection of the direct discovery data set may include using the direct discovery key set to perform integrity protection on the direct discovery data set, and turning on the integrity protection of the relay discovery message may include using the relay discovery key set to perform integrity protection on the relay discovery message.

[0284] During the U2U relay discovery process, different application scenarios require different levels of security protection for relay discovery messages. For example, IoT devices may have limited computing and energy capabilities, requiring only basic security capabilities or no security at all. This means the system needs to be able to flexibly control the message protection mechanisms employed.

[0285] In some implementations, the key management function may provide the relay discovery security policy used when performing relay discovery to the Discoverer UE, Discoveree UE, and Relay UE. The relay discovery security policy may include multiple relay discovery security schemes (Security Scheme) and their identifiers (Security Scheme ID). Each Security Scheme describes a security policy for relay discovery messages, for example: using only the relay discovery key set to protect the relay discovery message, using both the direct discovery key set and the relay discovery key set to protect the relay discovery message, whether to enable end UE privacy protection, whether to enable relay UE privacy protection, whether to enable privacy protection for both the end UE and the relay UE, whether to enable integrity protection for the direct discovery data set, whether to enable integrity protection for the relay discovery message, etc.

[0286] When generating the first relay discovery request message, the Discoverer UE can perform corresponding security processing according to the relay discovery security solution, for example, using the direct discovery key set to encrypt the identifier of the Discoverer UE and the identifier of the Discoveree UE, using the direct discovery key set to generate the MIC of the direct discovery data set in the first relay discovery request message, using the relay discovery key set to generate the MIC of the first relay discovery request message, etc. This allows for flexible control of the adopted security mechanism based on application requirements.

[0287] In some embodiments, the first relay discovery request message may include an identifier of a relay discovery security scheme. That is, the Discoverer UE may carry the identifier of the relay discovery security scheme (Security Scheme ID) in the first relay discovery request message and send it to the Relay UE, so that the Relay UE can search for a locally stored Security Scheme based on the Security Scheme ID in the message, and then verify and decrypt the received message based on the security scheme described in the Security Scheme, and perform corresponding security processing on subsequently generated messages based on the scheme.

[0288] In some embodiments, the identifier of the relay discovery security scheme may be included in the relay discovery data set of the first relay discovery request message, so that the relay UE can obtain it.

[0289] Figure 2 is an example diagram of the first relay discovery request message provided in an embodiment of the present disclosure. It should be understood that the figure is merely an example of a specific structural form of the first relay discovery request message, and does not constitute a limitation on the first relay discovery request message described in each embodiment of the present disclosure. As shown in Figure 2, the first relay discovery request message includes an identifier of the relay discovery security scheme (Security Scheme ID). The Discoverer UE ID and the Discoveree UE ID are included in the direct discovery data set and are encrypted by the direct discovery key set. The direct discovery data set is integrity protected by the direct discovery key set. The first relay discovery request message composed of the relay discovery data set and the direct discovery data set is integrity protected by the relay discovery key set.

[0290] In Figure 2 , bit 2 of the UTC-based counter, counted from the lowest order, is the time parameter associated with the relay discovery key set. Bit 1 of the UTC-based counter, counted from the lowest order, is the time parameter associated with the direct discovery key set. MIC1 is the MIC generated using the direct discovery key set. MIC2 is the MIC generated using the relay discovery key set. Query Code 1 is the ProSe query code used in the direct discovery process between the Discoverer UE and the Discoveree UE. The meanings of the relevant concepts involved in subsequent figures remain consistent throughout the text and are not repeated here.

[0291] In some embodiments, the method further comprises:

[0292] A first relay discovery response message sent by the relay terminal is received; wherein the relay discovery data set of the first relay discovery response message includes an identifier of the relay terminal and an identifier of the discoverer terminal.

[0293] Specifically, after the Relay UE receives the first relay discovery request message sent by the Discoverer UE, it can generate a second relay discovery request message based on the first relay discovery request message, and then send the second relay discovery request message. After the Discoveree UE receives the second relay discovery request message, it can return a second relay discovery response message (UE-to-UE Relay Discovery Response message) to the Relay UE, and then the Relay UE returns the first relay discovery response message to the Discoverer UE. The contents of the second relay discovery request message and the second relay discovery response message are described below and will not be repeated here.

[0294] The first relay discovery response message returned by the Relay UE to the Discoverer UE includes the Relay UE ID and the Discoveree UE ID, and the Relay UE ID and the Discoveree UE ID are included in the relay discovery data set of the first relay discovery response message.

[0295] In some embodiments, the identifier of the relay UE may be a layer 2 identifier (Layer-2 ID) of the relay UE or other identification information.

[0296] In some embodiments, in the first relay discovery response message, the identifier of the relay terminal and the identifier of the discoverer terminal are encrypted by the relay discovery key set.

[0297] Specifically, when generating the first relay discovery response message, the Relay UE may further use the relay discovery key set to encrypt the identifier of the Relay UE and the identifier of the Discoveree UE.

[0298] In some embodiments, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0299] Specifically, when generating the first relay discovery response message, the Relay UE can perform corresponding encryption, integrity protection and other security processing according to the relay discovery security scheme. At the same time, the Relay UE can carry the identifier (Security Scheme ID) of the relay discovery security scheme used in the first relay discovery response message and send it to the Discoverer UE.

[0300] Figure 3 is an example diagram of the first relay discovery response message provided in an embodiment of the present disclosure. It should be understood that the diagram is merely an example of a specific structural form of the first relay discovery response message, and does not constitute a limitation on the first relay discovery response message described in each embodiment of the present disclosure. As shown in Figure 3, the first relay discovery response message includes an identifier of the relay discovery security scheme (Security Scheme ID). The Relay UE ID and the Discoveree UE ID are included in the relay discovery data set generated by the Relay UE and are encrypted by the relay discovery key set. The first relay discovery response message consisting of the relay discovery data set and the direct discovery data set from the second relay discovery response message is integrity protected by the relay discovery key set.

[0301] In Figure 3 , response code 1 is a ProSe response code used for the direct discovery process between the Discoverer UE and the Discoveree UE, which corresponds to query code 1. The meanings of the relevant concepts involved in other subsequent figures remain consistent throughout the text and are not repeated here.

[0302] FIG4 is a second flow chart of a method for sending a relay discovery message provided in an embodiment of the present disclosure. The method can be applied to a relay terminal. As shown in FIG4 , the method includes the following steps:

[0303] Step 400: Receive a first relay discovery request message sent by a discoverer terminal; wherein the direct discovery data set of the first relay discovery request message includes an identifier of the discoverer terminal and an identifier of the discoverer terminal.

[0304] Step 401: Generate a second relay discovery request message based on the first relay discovery request message; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; the first relay discovery data set includes the identifier of the relay terminal.

[0305] Step 402: Send a second relay discovery request message.

[0306] Specifically, for the Model B relay discovery process, the Discoverer UE first generates a first relay discovery request message, which includes the identifier of the Discoverer UE (Discoverer UE ID) and the identifier of the Discoveree UE (Discoveree UE ID), where the identifier of the Discoverer UE and the identifier of the Discoveree UE are included in the direct discovery data set of the first relay discovery request message.

[0307] After the Discoverer UE sends the first relay discovery request message, the Relay UE receives the first relay discovery request message. The Relay UE can generate a second relay discovery request message based on the first relay discovery request message. The second relay discovery request message includes two parts: one part is the direct discovery data set carried in the first relay discovery request message, and the other part is the first relay discovery data set generated by the Relay UE. The Relay UE's identifier (Relay UE ID) is included in the first relay discovery data set.

[0308] After generating the second relay discovery request message, the Relay UE may send the second relay discovery request message, for example, broadcast the second relay discovery request message, so that the Discoveree UE receives the second relay discovery request message.

[0309] The method for sending a relay discovery message provided by an embodiment of the present disclosure includes the identifier of the Discoverer UE and the identifier of the Discoveree UE in the direct discovery data set of the first relay discovery request message and sends them, and the second relay discovery request message generated by the Relay UE includes the direct discovery data set in the first relay discovery request message, and the identifier of the Relay UE is included in the relay discovery data set of the second relay discovery request message and sent. This not only specifically defines the method for providing terminal information in the relay discovery process, so that the relay discovery process can be implemented specifically, but also is beneficial to the secure management of terminal information in the relay discovery process.

[0310] In some embodiments, generating the second relay discovery request message includes one or more of the following:

[0311] Encrypting the relay terminal's identity using the relay discovery key set;

[0312] A message integrity protection code MIC of the second relay discovery request message is generated using the relay discovery key set.

[0313] Specifically, when generating the second relay discovery request message, the relay UE may also perform corresponding security processing such as encryption and integrity protection on the second relay discovery request message. For example, the relay discovery key set may be used to encrypt the relay UE identifier, and the relay discovery key set may be used to perform integrity protection on the second relay discovery request message, etc.

[0314] In some embodiments, the method further comprises:

[0315] Receive the relay discovery key set sent by the key management function.

[0316] Specifically, in some embodiments, the key management function may provide the relay discovery key set to the Relay UE so that the Relay UE may use the relay discovery key set to perform verification and decryption on the received relay discovery message, or to protect the subsequently sent relay discovery message.

[0317] In some embodiments, generating a second relay discovery request message according to the first relay discovery request message includes:

[0318] Generate a second relay discovery request message according to the relay discovery security scheme indicated in the first relay discovery request message;

[0319] Relay discovery security solutions include one or more of the following:

[0320] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0321] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0322] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0323] Specifically, the Discoverer UE may indicate the relay discovery security scheme through the first relay discovery request message, for example, the first relay discovery request message may include an identifier of the relay discovery security scheme.

[0324] After receiving the first relay discovery request message, the relay UE can perform corresponding security processing when generating the second relay discovery request message based on the relay discovery security scheme indicated in the first relay discovery request message. For example, the relay UE identifier can be encrypted using the relay discovery key set, and the second relay discovery request message can be integrity protected using the relay discovery key set. This allows for flexible control of the adopted security mechanism based on application requirements.

[0325] In some implementations, the key management function may provide the relay discovery security policy used when performing relay discovery to the Discoverer UE, Discoveree UE, and Relay UE. The relay discovery security policy may include multiple relay discovery security schemes (Security Scheme) and their identifiers (Security Scheme ID). Each Security Scheme describes a security policy for relay discovery messages, for example: only using the relay discovery key set to protect the relay discovery message, using the direct discovery key set and the relay discovery key set to protect the relay discovery message, whether to enable end UE privacy protection, whether to enable relay UE privacy protection, whether to enable privacy protection of the end UE and relay UE at the same time, whether to enable integrity protection of the direct discovery data set, whether to enable integrity protection of the relay discovery message, etc. Different relay discovery security schemes are pre-configured in the UE through the relay discovery security policy. The relay discovery message carries the identifier of a specific relay discovery security scheme (Security Scheme ID). The receiver searches for the locally stored Security Scheme based on the Security Scheme ID in the message, and then verifies and decrypts the received message based on the security scheme described in the Security Scheme. It also performs corresponding security processing on subsequently generated messages (relay forwarding messages or response messages, etc.) based on the scheme.

[0326] In some embodiments, the second relay discovery request message may include an identifier of a relay discovery security scheme.

[0327] Specifically, when the Relay UE generates a second relay discovery request message, it can include the identifier of the relay discovery security scheme it uses (Security Scheme ID) in the second relay discovery request message, so that the Discoveree UE that receives the second relay discovery request message can search for the locally stored Security Scheme based on the Security Scheme ID in the message, and then verify and decrypt the received message based on the security scheme described in the Security Scheme, and perform corresponding security processing on subsequently generated messages based on the scheme.

[0328] In some embodiments, an identification of the relay discovery security scheme may be included in the first relay discovery data set.

[0329] Figure 5 is an example diagram of the second relay discovery request message provided in an embodiment of the present disclosure. It should be understood that the figure is merely an example of a specific structural form of the second relay discovery request message, and does not constitute a limitation on the second relay discovery request message described in each embodiment of the present disclosure. As shown in Figure 5, the second relay discovery request message includes an identifier of the relay discovery security scheme (Security Scheme ID). The Relay UE ID is included in the relay discovery data set generated by the Relay UE and is encrypted by the relay discovery key set. The second relay discovery request message composed of the relay discovery data set and the direct discovery data set from the first relay discovery request message is integrity protected by the relay discovery key set.

[0330] In some embodiments, the method further comprises:

[0331] receiving a second relay discovery response message sent by the discoverer terminal; wherein the relay discovery data set of the second relay discovery response message includes an identifier of the discoverer terminal and an identifier of the discoverer terminal;

[0332] Generate a first relay discovery response message according to the second relay discovery response message; the first relay discovery response message includes the direct discovery data set in the second relay discovery response message and the second relay discovery data set generated by the relay terminal; the second relay discovery data set includes the identifier of the relay terminal and the identifier of the discoverer terminal;

[0333] A first relay discovery response message is sent to the discoverer terminal.

[0334] Specifically, after the Relay UE sends the second relay discovery request message, the Discoveree UE receives the second relay discovery request message. The Discoveree UE can generate a second relay discovery response message based on the second relay discovery request message and send it to the Relay UE. The second relay discovery response message includes the Discoverer UE ID and the Discoveree UE ID, where the Discoverer UE ID and the Discoveree UE ID are included in the relay discovery data set of the second relay discovery response message.

[0335] After receiving the second relay discovery response message, the Relay UE can generate a first relay discovery response message based on the second relay discovery response message and send it to the Discoverer UE. The first relay discovery response message returned by the Relay UE to the Discoverer UE includes the Relay UE ID and the Discoveree UE ID, and the Relay UE identifier and the Discoveree UE identifier are included in the relay discovery data set of the first relay discovery response message. The first relay discovery response message also includes the direct discovery data set in the second relay discovery response message.

[0336] In some embodiments, in the second relay discovery response message, the identifier of the discoverer terminal and the identifier of the discoverer terminal are encrypted by the relay discovery key set.

[0337] Specifically, when generating the second relay discovery response message, the Discoveree UE may also use the relay discovery key set to encrypt the Discoverer UE ID and the Discoveree UE ID, so that the Relay UE can perform information verification and decryption.

[0338] In some embodiments, the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0339] Specifically, when generating the second relay discovery response message, the Discoveree UE can perform corresponding encryption, integrity protection and other security processing according to the relay discovery security scheme. At the same time, the Discoveree UE can carry the identifier (Security Scheme ID) of the relay discovery security scheme used in the second relay discovery response message and send it to the Relay UE.

[0340] Figure 6 is an example diagram of the second relay discovery response message provided in an embodiment of the present disclosure. It should be understood that the figure is merely an example of a specific structural form of the second relay discovery response message, and does not constitute a limitation on the second relay discovery response message described in each embodiment of the present disclosure. As shown in Figure 6, the second relay discovery response message includes an identifier (Security Scheme ID) of the relay discovery security scheme. The Discoverer UE ID and the Discoveree UE ID are included in the relay discovery data set and are encrypted by the relay discovery key set. The direct discovery data set is integrity protected by the direct discovery key set. The second relay discovery response message composed of the relay discovery data set and the direct discovery data set is integrity protected by the relay discovery key set.

[0341] In some embodiments, generating the first relay discovery response message includes one or more of the following:

[0342] Encrypting the relay terminal's identifier and the discoverer's identifier using the relay discovery key set;

[0343] The MIC of the first relay discovery response message is generated using the relay discovery key set.

[0344] Specifically, when generating the first relay discovery response message, the Relay UE may also perform corresponding security processing such as encryption and integrity protection on the first relay discovery response message. For example, the Relay UE ID and the Discoveree UE ID may be encrypted using the Relay Discovery Key Set, and the first Relay Discovery Response message may be integrity protected using the Relay Discovery Key Set, etc.

[0345] In some embodiments, the first relay discovery response message may include an identifier of the relay discovery security scheme.

[0346] Specifically, when the Relay UE generates the first relay discovery response message, it can include the identifier of the relay discovery security scheme it uses (Security Scheme ID) in the first relay discovery response message, so that the Discoverer UE that receives the first relay discovery response message can search for the locally stored Security Scheme based on the Security Scheme ID in the message, and then verify and decrypt the received message based on the security scheme described in the Security Scheme.

[0347] In some embodiments, an identification of the relay discovery security scheme may be included in the second relay discovery data set.

[0348] FIG7 is a flow chart of a method for receiving a relay discovery message provided by an embodiment of the present disclosure. The method can be applied to a discoverer terminal. As shown in FIG7 , the method includes the following steps:

[0349] Step 700: Receive a second relay discovery request message sent by the relay terminal; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message, and the first relay discovery data set generated by the relay terminal; wherein the direct discovery data set includes the identifier of the discoverer terminal and the identifier of the discoverer terminal, and the first relay discovery data set includes the identifier of the relay terminal.

[0350] Step 701: Generate a second relay discovery response message according to the second relay discovery request message; wherein the relay discovery data set of the second relay discovery response message includes an identifier of the discoverer terminal and an identifier of the discovered terminal.

[0351] Step 702: Send a second relay discovery response message to the relay terminal.

[0352] Specifically, for the Model B relay discovery process, the Discoverer UE first generates a first relay discovery request message, which includes the identifier of the Discoverer UE (Discoverer UE ID) and the identifier of the Discoveree UE (Discoveree UE ID), where the identifier of the Discoverer UE and the identifier of the Discoveree UE are included in the direct discovery data set of the first relay discovery request message.

[0353] After the Discoverer UE sends the first relay discovery request message, the Relay UE receives the first relay discovery request message. The Relay UE can generate a second relay discovery request message based on the first relay discovery request message. The second relay discovery request message includes two parts: one part is the direct discovery data set carried in the first relay discovery request message, and the other part is the first relay discovery data set generated by the Relay UE. The Relay UE's identifier (Relay UE ID) is included in the first relay discovery data set.

[0354] After the Relay UE sends the second relay discovery request message, the Discoveree UE receives the second relay discovery request message. The Discoveree UE can generate a second relay discovery response message based on the second relay discovery request message and send it to the Relay UE. The second relay discovery response message includes the Discoverer UE ID and the Discoveree UE ID, wherein the Discoverer UE ID and the Discoveree UE ID are included in the relay discovery data set of the second relay discovery response message.

[0355] The method for sending a relay discovery message provided by the embodiment of the present disclosure includes the identifier of the Discoverer UE and the identifier of the Discoveree UE in the relay discovery data set of the second relay discovery response message and sends it to the Relay UE. This not only specifically defines the method for providing terminal information in the relay discovery process, so that the relay discovery process can be implemented specifically, but also facilitates the secure management of terminal information in the relay discovery process.

[0356] In some embodiments, generating the second relay discovery response message includes one or more of the following:

[0357] Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using the relay discovery key set;

[0358] Generate a message integrity protection code MIC for the direct discovery data set in the second relay discovery response message using the direct discovery key set;

[0359] The MIC of the second relay discovery response message is generated using the relay discovery key set.

[0360] Specifically, when generating the second relay discovery response message, the Discoveree UE may also perform corresponding security processing such as encryption and integrity protection on the second relay discovery response message. For example, the Discoverer UE identifier and the Discoveree UE identifier are encrypted using the relay discovery key set, the direct discovery data set in the second relay discovery response message is integrity protected using the direct discovery key set, and the second relay discovery response message is integrity protected using the relay discovery key set, etc.

[0361] In some embodiments, the method further comprises:

[0362] Receive the direct discovery key set and relay discovery key set sent by the key management function.

[0363] Specifically, in some embodiments, the key management function may provide the direct discovery key set and the relay discovery key set to the Discoveree UE so that the Discoveree UE uses the corresponding key set to perform verification and decryption on the received relay discovery message, or to protect the subsequently sent relay discovery message.

[0364] In some embodiments, generating a second relay discovery response message according to the second relay discovery request message includes:

[0365] Generate a second relay discovery response message according to the relay discovery security scheme indicated in the second relay discovery request message;

[0366] Relay discovery security solutions include one or more of the following:

[0367] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0368] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0369] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0370] Specifically, the Relay UE may indicate the relay discovery security solution through the second relay discovery request message, for example, the second relay discovery request message includes an identifier of the relay discovery security solution.

[0371] After receiving the second relay discovery request message, the Discoveree UE can perform corresponding security processing when generating the second relay discovery response message according to the relay discovery security scheme indicated in the second relay discovery request message. For example, the Discoverer UE identifier and the Discoveree UE identifier are encrypted using the relay discovery key set, the direct discovery data set in the second relay discovery response message is integrity protected using the direct discovery key set, and the second relay discovery response message is integrity protected using the relay discovery key set, etc. This allows for flexible control of the adopted security mechanism based on application requirements.

[0372] In some implementations, the key management function may provide the relay discovery security policy used when performing relay discovery to the Discoverer UE, Discoveree UE, and Relay UE. The relay discovery security policy may include multiple relay discovery security schemes (Security Scheme) and their identifiers (Security Scheme ID). Each Security Scheme describes a security policy for relay discovery messages, for example: only using the relay discovery key set to protect the relay discovery message, using the direct discovery key set and the relay discovery key set to protect the relay discovery message, whether to enable end UE privacy protection, whether to enable relay UE privacy protection, whether to enable privacy protection of the end UE and relay UE at the same time, whether to enable integrity protection of the direct discovery data set, whether to enable integrity protection of the relay discovery message, etc. Different relay discovery security schemes are pre-configured in the UE through the relay discovery security policy. The relay discovery message carries the identifier of a specific relay discovery security scheme (Security Scheme ID). The receiver searches for the locally stored Security Scheme based on the Security Scheme ID in the message, and then verifies and decrypts the received message based on the security scheme described in the Security Scheme. It also performs corresponding security processing on subsequently generated messages (relay forwarding messages or response messages, etc.) based on the scheme.

[0373] In some embodiments, the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0374] Specifically, when the Discoveree UE generates a second relay discovery response message, it can include the identifier of the relay discovery security scheme it uses (Security Scheme ID) in the second relay discovery response message, so that the Relay UE that receives the second relay discovery response message can search for the locally stored Security Scheme based on the Security Scheme ID in the message, and then verify and decrypt the received message based on the security scheme described in the Security Scheme, and perform corresponding security processing on subsequently generated messages based on the scheme.

[0375] In some embodiments, the identification of the relay discovery security scheme is included in a relay discovery data set of the second relay discovery response message.

[0376] The methods provided in the various embodiments of the present disclosure are based on the same application concept, so the implementation of each method can refer to each other, and the repeated parts will not be repeated.

[0377] The following describes the methods provided in the above embodiments of the present disclosure through examples of specific application scenarios.

[0378] Example 1: Relay discovery model B (Model B) security processing flow.

[0379] FIG8 is a schematic diagram of a basic process of the relay discovery mode B provided by an embodiment of the present disclosure. As shown in FIG8 , the main process includes:

[0380] 1. The key management function provides the direct discovery key set and related usage parameters to the discoverer UE and the discoveree UE.

[0381] The key management function provides the relay discovery key set and related usage parameters to the discoverer UE, discoveree UE and relay UE. The relay discovery key set is associated with the RSC.

[0382] The key management function can provide the relay discovery security policy used when performing relay discovery to the discoverer UE, discoveree UE, and relay UE. The relay discovery security policy is associated with the RSC. The relay discovery security policy can include multiple relay discovery security schemes (Security Schemes) and their identifiers (Security Scheme IDs). Each Security Scheme describes a security policy for relay discovery messages, such as whether to use only the relay discovery key set to protect relay discovery messages, whether to use both the direct discovery key set and the relay discovery key set to protect relay discovery messages, whether to enable end UE privacy protection, whether to enable relay UE privacy protection, whether to enable privacy protection for both end UE and relay UE, whether to enable integrity protection for the direct discovery data set, whether to enable integrity protection for relay discovery messages, etc. Different relay discovery message protection security schemes are pre-configured in the UE through the relay discovery security policy. The relay discovery message carries the identifier (Security Scheme ID) of a specific relay discovery security scheme. The receiver searches for the locally stored Security Scheme based on the Security Scheme ID in the message, verifies and decrypts the received message based on the security scheme described in the Security Scheme, and performs corresponding security processing on subsequently generated messages (relay forwarding messages or response messages) based on the scheme.

[0383] 2. The Discoverer UE selects a Security Scheme, generates a first relay discovery request message, and provides security protection for the message based on the Security Scheme. The first relay discovery request message contains a direct discovery data set and a relay discovery data set, as well as a Security Scheme ID that describes the security scheme used by the relay discovery message. The Discoverer UE ID and the Discoveree UE ID are included in the direct discovery data set. If the Security Scheme stipulates that end UE privacy security is enabled, the Discoverer UE ID and the Discoveree UE ID are encrypted with the encryption key in the direct discovery key set. Based on the provisions of the Security Scheme, the Discoverer UE uses the direct discovery key set to provide further protection for the direct discovery data set, and uses the relay discovery key set to provide further protection for the relay discovery data set and the first relay discovery request message.

[0384] 3. The Discoverer UE sends a first relay discovery request message.

[0385] 4. The Relay UE receives the first relay discovery request message, uses the Security Scheme ID in the message to obtain the locally stored Security Scheme, and then verifies and decrypts the first relay discovery request message sent by the Discoverer UE based on the security scheme described in the Security Scheme.

[0386] The Relay UE generates a second relay discovery request message. The second relay discovery request message includes the relay discovery data set generated by the relay UE, the direct discovery data set from the first relay discovery request message, and the Security Scheme ID from the first relay discovery request message. The Relay UE ID is included in the relay discovery data set. If the Security Scheme stipulates that relay UE privacy security is enabled, the Relay UE ID is encrypted with the encryption key in the relay discovery key set. Based on the provisions of the Security Scheme, the Relay UE uses the relay discovery key set to provide further protection for the relay discovery data set and the second relay discovery request message.

[0387] 5. The Relay UE sends a second relay discovery request message.

[0388] 6. The Discoveree UE receives the second relay discovery request message, uses the Security Scheme ID in the message to obtain the locally stored Security Scheme, and then verifies and decrypts the second relay discovery request message sent by the Relay UE based on the security scheme described in the Security Scheme.

[0389] The Discoveree UE generates a second relay discovery response message. The second relay discovery response message contains the direct discovery data set and relay discovery data set generated by it, as well as the Security Scheme ID from the second relay discovery request message. The Discoverer UE ID and the Discoveree UE ID are included in the relay discovery data set. If the Security Scheme stipulates that the end UE privacy security is enabled, the Discoverer UE ID and the Discoveree UE ID are encrypted by the encryption key in the relay discovery key set. Based on the provisions of the Security Scheme, the Discoveree UE uses the direct discovery key set to provide further protection for the direct discovery data set, and uses the relay discovery key set to provide further protection for the relay discovery data set and the second relay discovery response message.

[0390] 7. The Discoveree UE sends a second relay discovery response message.

[0391] 8. The Relay UE receives the second relay discovery response message, uses the Security Scheme ID in the message to obtain the locally stored Security Scheme, and then verifies and decrypts the second relay discovery response message sent by the Discoveree UE based on the security scheme described in the Security Scheme.

[0392] The Relay UE generates a first relay discovery response message. The first relay discovery response message includes the relay discovery data set generated by the relay UE and the direct discovery data set from the second relay discovery response message, as well as the Security Scheme ID from the second relay discovery response message. The Relay UE ID and the Discoveree UE ID are included in the relay discovery data set. If the Security Scheme stipulates that the relay UE privacy security is enabled, the Relay UE ID and the Discoveree UE ID are encrypted by the encryption key in the relay discovery key set. Based on the provisions of the Security Scheme, the Relay UE uses the relay discovery key set to provide further protection for the relay discovery data set and the first relay discovery response message.

[0393] 9. The Relay UE sends a first relay discovery response message.

[0394] 10. The Discoverer UE receives the first relay discovery response message, uses the Security Scheme ID in the message to obtain the locally stored Security Scheme, then verifies and decrypts the first relay discovery response message sent by the Relay UE based on the security scheme described in the Security Scheme, and performs subsequent operations.

[0395] The methods and devices provided in the various embodiments of the present disclosure are based on the same application concept. Since the methods and devices solve problems based on similar principles, the implementation of the devices and methods can refer to each other, and the repeated parts will not be repeated.

[0396] FIG9 is a schematic structural diagram of a discoverer terminal provided in an embodiment of the present disclosure. As shown in FIG9 , the discoverer terminal includes a memory 920 , a transceiver 910 , and a processor 900 ; wherein the processor 900 and the memory 920 may also be physically arranged separately.

[0397] The memory 920 is used to store computer programs; the transceiver 910 is used to send and receive data under the control of the processor 900.

[0398] Specifically, the transceiver 910 is configured to receive and send data under the control of the processor 900 .

[0399] In FIG9 , the bus architecture may include any number of interconnected buses and bridges, specifically various circuits of one or more processors represented by processor 900 and memory represented by memory 920, linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described in this disclosure. The bus interface provides an interface. The transceiver 910 may be a plurality of components, i.e., a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, such as a wireless channel, a wired channel, an optical cable, and other transmission media. For different user devices, the user interface 930 may also be an interface capable of connecting external or internal devices as required, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like.

[0400] The processor 900 is responsible for managing the bus architecture and general processing, and the memory 920 can store data used by the processor 900 when performing operations.

[0401] The processor 900 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or a complex programmable logic device (CPLD). The processor may also adopt a multi-core architecture.

[0402] The processor 900 calls the computer program stored in the memory 920 to execute any of the methods provided in the embodiments of the present disclosure according to the obtained executable instructions, for example: generating a first relay discovery request message; wherein the direct discovery data set of the first relay discovery request message includes the identifier of the discoverer terminal and the identifier of the discoverer terminal; sending the first relay discovery request message.

[0403] In some embodiments, generating the first relay discovery request message includes one or more of the following:

[0404] Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using the direct discovery key set;

[0405] Generate a message integrity protection code MIC of the direct discovery data set in the first relay discovery request message using the direct discovery key set;

[0406] The MIC of the first relay discovery request message is generated using the relay discovery key set.

[0407] In some embodiments, generating a first relay discovery request message includes:

[0408] Generate a first relay discovery request message according to the relay discovery security solution;

[0409] Relay discovery security solutions include one or more of the following:

[0410] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0411] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0412] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0413] In some embodiments, the first relay discovery request message includes an identifier of a relay discovery security scheme.

[0414] In some embodiments, the relay discovery data set of the first relay discovery request message includes an identifier of a relay discovery security scheme.

[0415] In some embodiments, the method further comprises:

[0416] A first relay discovery response message sent by the relay terminal is received; wherein the relay discovery data set of the first relay discovery response message includes an identifier of the relay terminal and an identifier of the discoverer terminal.

[0417] In some embodiments, in the first relay discovery response message, the identifier of the relay terminal and the identifier of the discoverer terminal are encrypted by the relay discovery key set.

[0418] In some embodiments, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0419] In some embodiments, the method further comprises:

[0420] Receive the direct discovery key set and relay discovery key set sent by the key management function.

[0421] FIG10 is a schematic structural diagram of a relay terminal provided in an embodiment of the present disclosure. As shown in FIG10 , the relay terminal includes a memory 1020 , a transceiver 1010 , and a processor 1000 ; wherein the processor 1000 and the memory 1020 may also be physically arranged separately.

[0422] The memory 1020 is used to store computer programs; the transceiver 1010 is used to send and receive data under the control of the processor 1000.

[0423] Specifically, the transceiver 1010 is used to receive and send data under the control of the processor 1000 .

[0424] In FIG10 , the bus architecture may include any number of interconnected buses and bridges, specifically various circuits of one or more processors represented by processor 1000 and memory represented by memory 1020. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be further described in this disclosure. The bus interface provides an interface. The transceiver 1010 may be a plurality of components, i.e., a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, such as a wireless channel, a wired channel, an optical cable, and the like. For different user devices, the user interface 1030 may also be an interface capable of connecting external or internal devices as required, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like.

[0425] The processor 1000 is responsible for managing the bus architecture and general processing, and the memory 1020 can store data used by the processor 1000 when performing operations.

[0426] The processor 1000 may be a CPU, an ASIC, an FPGA, or a CPLD, and the processor may also adopt a multi-core architecture.

[0427] The processor 1000 calls the computer program stored in the memory 1020 to execute any of the methods provided by the embodiments of the present disclosure according to the obtained executable instructions, for example: receiving a first relay discovery request message sent by a discoverer terminal; wherein the direct discovery data set of the first relay discovery request message includes the identifier of the discoverer terminal and the identifier of the discoverer terminal; generating a second relay discovery request message based on the first relay discovery request message; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; the first relay discovery data set includes the identifier of the relay terminal; and sending a second relay discovery request message.

[0428] In some embodiments, generating the second relay discovery request message includes one or more of the following:

[0429] Encrypting the relay terminal's identity using the relay discovery key set;

[0430] A message integrity protection code MIC of the second relay discovery request message is generated using the relay discovery key set.

[0431] In some embodiments, generating a second relay discovery request message according to the first relay discovery request message includes:

[0432] Generate a second relay discovery request message according to the relay discovery security scheme indicated in the first relay discovery request message;

[0433] Relay discovery security solutions include one or more of the following:

[0434] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0435] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0436] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0437] In some embodiments, the second relay discovery request message includes an identifier of a relay discovery security scheme.

[0438] In some embodiments, the first relay discovery data set includes an identifier of a relay discovery security scheme.

[0439] In some embodiments, the method further comprises:

[0440] receiving a second relay discovery response message sent by the discoverer terminal; wherein the relay discovery data set of the second relay discovery response message includes an identifier of the discoverer terminal and an identifier of the discoverer terminal;

[0441] Generate a first relay discovery response message according to the second relay discovery response message; the first relay discovery response message includes the direct discovery data set in the second relay discovery response message and the second relay discovery data set generated by the relay terminal; the second relay discovery data set includes the identifier of the relay terminal and the identifier of the discoverer terminal;

[0442] A first relay discovery response message is sent to the discoverer terminal.

[0443] In some embodiments, in the second relay discovery response message, the identifier of the discoverer terminal and the identifier of the discoverer terminal are encrypted by the relay discovery key set.

[0444] In some embodiments, the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0445] In some embodiments, generating the first relay discovery response message includes one or more of the following:

[0446] Encrypting the relay terminal's identifier and the discoverer's identifier using the relay discovery key set;

[0447] The MIC of the first relay discovery response message is generated using the relay discovery key set.

[0448] In some embodiments, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0449] In some embodiments, the second relay discovery data set includes an identifier of a relay discovery security scheme.

[0450] In some embodiments, the method further comprises:

[0451] Receive the relay discovery key set sent by the key management function.

[0452] FIG11 is a schematic structural diagram of a discoverer terminal provided by an embodiment of the present disclosure. As shown in FIG11 , the discoverer terminal includes a memory 1120 , a transceiver 1110 , and a processor 1100 ; wherein the processor 1100 and the memory 1120 may also be physically separated.

[0453] The memory 1120 is used to store computer programs; the transceiver 1110 is used to send and receive data under the control of the processor 1100.

[0454] Specifically, the transceiver 1110 is used to receive and send data under the control of the processor 1100 .

[0455] In FIG11 , the bus architecture may include any number of interconnected buses and bridges, specifically various circuits of one or more processors represented by the processor 1100 and the memory represented by the memory 1120. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described in this disclosure. The bus interface provides an interface. The transceiver 1110 may be a plurality of components, i.e., a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, such as a wireless channel, a wired channel, an optical cable, and the like. For different user devices, the user interface 1130 may also be an interface capable of connecting external or internal devices as required, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like.

[0456] The processor 1100 is responsible for managing the bus architecture and general processing, and the memory 1120 can store data used by the processor 1100 when performing operations.

[0457] The processor 1100 may be a CPU, an ASIC, an FPGA, or a CPLD, and the processor may also adopt a multi-core architecture.

[0458] The processor 1100 calls the computer program stored in the memory 1120 to execute any of the methods provided by the embodiments of the present disclosure according to the obtained executable instructions, for example: receiving a second relay discovery request message sent by the relay terminal; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message, and the first relay discovery data set generated by the relay terminal; wherein the direct discovery data set includes the identifier of the discoverer terminal and the identifier of the discoverer terminal, and the first relay discovery data set includes the identifier of the relay terminal; generating a second relay discovery response message according to the second relay discovery request message; wherein the relay discovery data set of the second relay discovery response message includes the identifier of the discoverer terminal and the identifier of the discoverer terminal; and sending a second relay discovery response message to the relay terminal.

[0459] In some embodiments, generating the second relay discovery response message includes one or more of the following:

[0460] Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using the relay discovery key set;

[0461] Generate a message integrity protection code MIC for the direct discovery data set in the second relay discovery response message using the direct discovery key set;

[0462] The MIC of the second relay discovery response message is generated using the relay discovery key set.

[0463] In some embodiments, generating a second relay discovery response message according to the second relay discovery request message includes:

[0464] Generate a second relay discovery response message according to the relay discovery security scheme indicated in the second relay discovery request message;

[0465] Relay discovery security solutions include one or more of the following:

[0466] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0467] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0468] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0469] In some embodiments, the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0470] In some embodiments, the relay discovery data set of the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0471] In some embodiments, the method further comprises:

[0472] Receive the direct discovery key set and relay discovery key set sent by the key management function.

[0473] It should be noted here that the above-mentioned discoverer terminal, relay terminal and discoverer terminal provided in the embodiment of the present disclosure can implement all the method steps implemented in the above-mentioned method embodiment and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.

[0474] FIG12 is a schematic diagram of a structure of a device for sending a relay discovery message according to an embodiment of the present disclosure. As shown in FIG12 , the device includes:

[0475] The first generating unit 1200 is configured to generate a first relay discovery request message; wherein the direct discovery data set of the first relay discovery request message includes an identifier of a discoverer terminal and an identifier of a discoverer terminal;

[0476] The first sending unit 1210 is configured to send a first relay discovery request message.

[0477] In some embodiments, generating the first relay discovery request message includes one or more of the following:

[0478] Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using the direct discovery key set;

[0479] Generate a message integrity protection code MIC of the direct discovery data set in the first relay discovery request message using the direct discovery key set;

[0480] The MIC of the first relay discovery request message is generated using the relay discovery key set.

[0481] In some embodiments, generating a first relay discovery request message includes:

[0482] Generate a first relay discovery request message according to the relay discovery security solution;

[0483] Relay discovery security solutions include one or more of the following:

[0484] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0485] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0486] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0487] In some embodiments, the first relay discovery request message includes an identifier of a relay discovery security scheme.

[0488] In some embodiments, the relay discovery data set of the first relay discovery request message includes an identifier of a relay discovery security scheme.

[0489] In some embodiments, the apparatus further comprises:

[0490] The first receiving unit is configured to receive a first relay discovery response message sent by a relay terminal; wherein the relay discovery data set of the first relay discovery response message includes an identifier of the relay terminal and an identifier of a discoverer terminal.

[0491] In some embodiments, in the first relay discovery response message, the identifier of the relay terminal and the identifier of the discoverer terminal are encrypted by the relay discovery key set.

[0492] In some embodiments, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0493] In some embodiments, the apparatus further comprises:

[0494] The second receiving unit is configured to receive the direct discovery key set and the relay discovery key set sent by the key management function.

[0495] FIG13 is a second structural diagram of a device for sending a relay discovery message according to an embodiment of the present disclosure. As shown in FIG13 , the device includes:

[0496] The third receiving unit 1300 is configured to receive a first relay discovery request message sent by a discoverer terminal; wherein the direct discovery data set of the first relay discovery request message includes an identifier of the discoverer terminal and an identifier of the discoverer terminal;

[0497] The second generating unit 1310 is configured to generate a second relay discovery request message according to the first relay discovery request message; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; the first relay discovery data set includes an identifier of the relay terminal;

[0498] The second sending unit 1320 is configured to send a second relay discovery request message.

[0499] In some embodiments, generating the second relay discovery request message includes one or more of the following:

[0500] Encrypting the relay terminal's identity using the relay discovery key set;

[0501] A message integrity protection code MIC of the second relay discovery request message is generated using the relay discovery key set.

[0502] In some embodiments, generating a second relay discovery request message according to the first relay discovery request message includes:

[0503] Generate a second relay discovery request message according to the relay discovery security scheme indicated in the first relay discovery request message;

[0504] Relay discovery security solutions include one or more of the following:

[0505] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0506] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0507] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0508] In some embodiments, the second relay discovery request message includes an identifier of a relay discovery security scheme.

[0509] In some embodiments, the first relay discovery data set includes an identifier of a relay discovery security scheme.

[0510] In some embodiments, the third receiving unit is further configured to receive a second relay discovery response message sent by the discoverer terminal; wherein the relay discovery data set of the second relay discovery response message includes an identifier of the discoverer terminal and an identifier of the discoverer terminal;

[0511] The second generating unit is further configured to generate a first relay discovery response message according to the second relay discovery response message; the first relay discovery response message includes the direct discovery data set in the second relay discovery response message and the second relay discovery data set generated by the relay terminal; the second relay discovery data set includes an identifier of the relay terminal and an identifier of the discoverer terminal;

[0512] The second sending unit is further configured to send a first relay discovery response message to the discoverer terminal.

[0513] In some embodiments, in the second relay discovery response message, the identifier of the discoverer terminal and the identifier of the discoverer terminal are encrypted by the relay discovery key set.

[0514] In some embodiments, the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0515] In some embodiments, generating the first relay discovery response message includes one or more of the following:

[0516] Encrypting the relay terminal's identifier and the discoverer's identifier using the relay discovery key set;

[0517] The MIC of the first relay discovery response message is generated using the relay discovery key set.

[0518] In some embodiments, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0519] In some embodiments, the second relay discovery data set includes an identifier of a relay discovery security scheme.

[0520] In some embodiments, the third receiving unit is further configured to:

[0521] Receive the relay discovery key set sent by the key management function.

[0522] FIG14 is a schematic structural diagram of a device for receiving a relay discovery message according to an embodiment of the present disclosure. As shown in FIG14 , the device includes:

[0523] The fourth receiving unit 1400 is configured to receive a second relay discovery request message sent by the relay terminal; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; wherein the direct discovery data set includes the identifier of the discoverer terminal and the identifier of the discoverer terminal, and the first relay discovery data set includes the identifier of the relay terminal;

[0524] The third generating unit 1410 is configured to generate a second relay discovery response message according to the second relay discovery request message; wherein the relay discovery data set of the second relay discovery response message includes an identifier of the discoverer terminal and an identifier of the discovered terminal;

[0525] The third sending unit 1420 is configured to send a second relay discovery response message to the relay terminal.

[0526] In some embodiments, generating the second relay discovery response message includes one or more of the following:

[0527] Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using the relay discovery key set;

[0528] Generate a message integrity protection code MIC for the direct discovery data set in the second relay discovery response message using the direct discovery key set;

[0529] The MIC of the second relay discovery response message is generated using the relay discovery key set.

[0530] In some embodiments, generating a second relay discovery response message according to the second relay discovery request message includes:

[0531] Generate a second relay discovery response message according to the relay discovery security scheme indicated in the second relay discovery request message;

[0532] Relay discovery security solutions include one or more of the following:

[0533] protecting the relay discovery message using the direct discovery key set and / or the relay discovery key set, or protecting the relay discovery message without using the direct discovery key set and the relay discovery key set;

[0534] Enable or disable end-terminal privacy protection and / or relay-terminal privacy protection;

[0535] Enable integrity protection for direct discovery datasets and / or integrity protection for relay discovery messages, or disable integrity protection for direct discovery datasets and integrity protection for relay discovery messages.

[0536] In some embodiments, the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0537] In some embodiments, the relay discovery data set of the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0538] In some embodiments, the fourth receiving unit is further configured to:

[0539] Receive the direct discovery key set and relay discovery key set sent by the key management function.

[0540] It should be noted that the division of units in the embodiments of the present disclosure is schematic and is merely a logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0541] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0542] It should be noted here that the above-mentioned device provided in the embodiment of the present disclosure can implement all the method steps implemented in the above-mentioned method embodiment and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.

[0543] On the other hand, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores a computer program, and the computer program is used to enable a computer to execute the method for sending or receiving the relay discovery message provided by the above embodiments.

[0544] It should be noted here that the computer-readable storage medium provided in the embodiment of the present disclosure can implement all the method steps implemented in the above-mentioned method embodiment and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.

[0545] The computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NAND FLASH), solid-state drives (SSDs), etc.).

[0546] The technical solution provided by the embodiment of the present disclosure can be applicable to a variety of systems, especially 5G systems. For example, the applicable system can be a global system of mobile communication (GSM) system, a code division multiple access (CDMA) system, a wideband code division multiple access (WCDMA) general packet radio service (GPRS) system, a long term evolution (LTE) system, a LTE frequency division duplex (FDD) system, a LTE time division duplex (TDD) system, an advanced long term evolution (LTE-A) system, a universal mobile telecommunication system (UMTS), a world-wide interoperability for microwave access (WiMAX) system, a 5G new air interface (NR) system, etc. These various systems include terminal equipment and network equipment. The system may also include a core network part, such as an evolved packet system (EPS), a 5G system (5GS), etc.

[0547] The terminal involved in the embodiments of the present disclosure may be a device that provides voice and / or data connectivity to a user, a handheld device with wireless connection function, or other processing devices connected to a wireless modem. In different systems, the name of the terminal may also be different. For example, in a 5G system, the terminal may be called User Equipment (UE). A wireless terminal device can communicate with one or more core networks (CN) via a radio access network (RAN). The wireless terminal device may be a mobile terminal device, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal device. For example, it may be a portable, pocket-sized, handheld, computer-built-in or vehicle-mounted mobile device that exchanges voice and / or data with a radio access network. For example, personal communication service (PCS) phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), and other devices. The wireless terminal device may also be referred to as a system, a subscriber unit, a subscriber station, a mobile station, a mobile station, a remote station, an access point, a remote terminal device, an access terminal device, a user terminal device, a user agent, or a user device, but is not limited in the embodiments of the present disclosure.

[0548] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.

[0549] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0550] These processor-executable instructions may also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0551] These processor-executable instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0552] Obviously, those skilled in the art may make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is intended to include these modifications and variations.

Claims

1. A method for sending a relay discovery message, applied to a discoverer terminal, comprising: Generate a first relay discovery request message; wherein the direct discovery data set of the first relay discovery request message includes the identifier of the discoverer terminal and the identifier of the discoverer terminal; Send the first relay discovery request message.

2. The method for sending a relay discovery message according to claim 1, wherein: The generating of the first relay discovery request message includes one or more of the following: Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using a direct discovery key set; Generate a message integrity protection code MIC of the direct discovery data set in the first relay discovery request message using the direct discovery key set; The MIC of the first relay discovery request message is generated using the relay discovery key set.

3. The method for sending a relay discovery message according to claim 1 or 2, wherein: The generating a first relay discovery request message includes: Generate the first relay discovery request message according to the relay discovery security solution; The relay discovery security solution includes one or more of the following: protecting the relay discovery message using a direct discovery key set and / or a relay discovery key set, or not protecting the relay discovery message using a direct discovery key set and a relay discovery key set; Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection; Enable integrity protection of direct discovery data sets and / or integrity protection of relay discovery messages, or disable integrity protection of direct discovery data sets and integrity protection of relay discovery messages.

4. The method for sending a relay discovery message according to claim 3, wherein: The first relay discovery request message includes an identifier of the relay discovery security solution.

5. The method for sending a relay discovery message according to claim 4, wherein: The relay discovery data set of the first relay discovery request message includes an identifier of the relay discovery security solution.

6. The method for sending a relay discovery message according to claim 1, wherein: The method further comprises: A first relay discovery response message sent by a relay terminal is received; wherein the relay discovery data set of the first relay discovery response message includes an identifier of the relay terminal and an identifier of the terminal to be discovered.

7. The method for sending a relay discovery message according to claim 6, wherein: In the first relay discovery response message, the identifier of the relay terminal and the identifier of the discoverer terminal are encrypted by a relay discovery key set.

8. The method for sending a relay discovery message according to claim 6 or 7, wherein: The first relay discovery response message includes an identifier of the relay discovery security solution.

9. The method for sending a relay discovery message according to claim 1 or 2, wherein: The method further comprises: Receive the direct discovery key set and relay discovery key set sent by the key management function.

10. A method for sending a relay discovery message, applied to a relay terminal, comprising: Receiving a first relay discovery request message sent by a discoverer terminal; wherein the direct discovery data set of the first relay discovery request message includes an identifier of the discoverer terminal and an identifier of a discoverer terminal; Generate a second relay discovery request message according to the first relay discovery request message; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; the first relay discovery data set includes the identifier of the relay terminal; Send the second relay discovery request message.

11. The method for sending a relay discovery message according to claim 10, wherein: The generating of the second relay discovery request message includes one or more of the following: Encrypting the identifier of the relay terminal using a relay discovery key set; A message integrity protection code MIC of the second relay discovery request message is generated using the relay discovery key set.

12. The method for sending a relay discovery message according to claim 10 or 11, wherein: The generating a second relay discovery request message according to the first relay discovery request message includes: generating the second relay discovery request message according to the relay discovery security scheme indicated in the first relay discovery request message; The relay discovery security solution includes one or more of the following: protecting the relay discovery message using a direct discovery key set and / or a relay discovery key set, or not protecting the relay discovery message using a direct discovery key set and a relay discovery key set; Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection; Enable integrity protection of direct discovery data sets and / or integrity protection of relay discovery messages, or disable integrity protection of direct discovery data sets and integrity protection of relay discovery messages.

13. The method for sending a relay discovery message according to claim 12, wherein: The second relay discovery request message includes an identifier of the relay discovery security solution.

14. The method for sending a relay discovery message according to claim 13, wherein: The first relay discovery data set includes an identifier of the relay discovery security solution.

15. The method for sending a relay discovery message according to claim 10, wherein: The method further comprises: Receiving a second relay discovery response message sent by a discoverer terminal; wherein the relay discovery data set of the second relay discovery response message includes an identifier of the discoverer terminal and an identifier of a discoverer terminal; Generate a first relay discovery response message according to the second relay discovery response message; the first relay discovery response message includes the direct discovery data set in the second relay discovery response message and the second relay discovery data set generated by the relay terminal; the second relay discovery data set includes the identifier of the relay terminal and the identifier of the discoverer terminal; Sending the first relay discovery response message to the discoverer terminal.

16. The method for sending a relay discovery message according to claim 15, wherein: In the second relay discovery response message, the identifier of the discoverer terminal and the identifier of the discoverer terminal are encrypted by the relay discovery key set.

17. The method for sending a relay discovery message according to claim 15 or 16, wherein: The second relay discovery response message includes an identifier of the relay discovery security solution.

18. The method for sending a relay discovery message according to claim 15, wherein: The generating of the first relay discovery response message includes one or more of the following: Encrypting the identifier of the relay terminal and the identifier of the discoverer terminal using a relay discovery key set; The MIC of the first relay discovery response message is generated using the relay discovery key set.

19. The method for sending a relay discovery message according to claim 15 or 18, wherein: The first relay discovery response message includes an identifier of the relay discovery security solution.

20. The method for sending a relay discovery message according to claim 19, wherein: The second relay discovery data set includes an identifier of the relay discovery security solution.

21. The method for sending a relay discovery message according to claim 10 or 11, wherein: The method further comprises: Receive the relay discovery key set sent by the key management function.

22. A method for receiving a relay discovery message, applied to a discoverer terminal, comprising: Receiving a second relay discovery request message sent by the relay terminal; The second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; wherein the direct discovery data set includes the identifier of the discoverer terminal and the identifier of the discoverer terminal, and the first relay discovery data set includes the identifier of the relay terminal; Generate a second relay discovery response message according to the second relay discovery request message; wherein the relay discovery data set of the second relay discovery response message includes the identifier of the discoverer terminal and the identifier of the discoverer terminal; Send the second relay discovery response message to the relay terminal.

23. The method for receiving a relay discovery message according to claim 22, wherein: The generating of the second relay discovery response message includes one or more of the following: Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using a relay discovery key set; Generate a message integrity protection code MIC of the direct discovery data set in the second relay discovery response message using the direct discovery key set; The MIC of the second relay discovery response message is generated using the relay discovery key set.

24. The method for receiving a relay discovery message according to claim 22 or 23, wherein: The generating, according to the second relay discovery request message, a second relay discovery response message comprises: generating the second relay discovery response message according to the relay discovery security scheme indicated in the second relay discovery request message; The relay discovery security solution includes one or more of the following: protecting the relay discovery message using a direct discovery key set and / or a relay discovery key set, or not protecting the relay discovery message using a direct discovery key set and a relay discovery key set; Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection; Enable integrity protection of direct discovery data sets and / or integrity protection of relay discovery messages, or disable integrity protection of direct discovery data sets and integrity protection of relay discovery messages.

25. The method for receiving a relay discovery message according to claim 24, wherein: The second relay discovery response message includes an identifier of the relay discovery security solution.

26. The method for receiving a relay discovery message according to claim 25, wherein: The relay discovery data set of the second relay discovery response message includes an identifier of the relay discovery security solution.

27. The method for receiving a relay discovery message according to claim 22 or 23, wherein: The method further comprises: Receive the direct discovery key set and relay discovery key set sent by the key management function.

28. A discoverer terminal, comprising a memory, a transceiver, and a processor; Memory for storing computer programs; a transceiver, for transmitting and receiving data under the control of the processor; A processor is configured to read the computer program in the memory and perform the following operations: Generate a first relay discovery request message; wherein the direct discovery data set of the first relay discovery request message includes the identifier of the discoverer terminal and the identifier of the discoverer terminal; Send the first relay discovery request message.

29. The finder terminal according to claim 28, wherein: The generating of the first relay discovery request message includes one or more of the following: Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using a direct discovery key set; Generate a message integrity protection code MIC of the direct discovery data set in the first relay discovery request message using the direct discovery key set; The MIC of the first relay discovery request message is generated using the relay discovery key set.

30. The finder terminal according to claim 28 or 29, wherein: The generating a first relay discovery request message includes: Generate the first relay discovery request message according to the relay discovery security solution; The relay discovery security solution includes one or more of the following: protecting the relay discovery message using a direct discovery key set and / or a relay discovery key set, or not protecting the relay discovery message using a direct discovery key set and a relay discovery key set; Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection; Enable integrity protection of direct discovery data sets and / or integrity protection of relay discovery messages, or disable integrity protection of direct discovery data sets and integrity protection of relay discovery messages.

31. The finder terminal according to claim 30, wherein: The first relay discovery request message includes an identifier of the relay discovery security solution.

32. The finder terminal according to claim 31, wherein: The relay discovery data set of the first relay discovery request message includes an identifier of the relay discovery security solution.

33. The finder terminal according to claim 28, wherein: The operations also include: A first relay discovery response message sent by a relay terminal is received; wherein the relay discovery data set of the first relay discovery response message includes an identifier of the relay terminal and an identifier of the terminal to be discovered.

34. The finder terminal according to claim 33, wherein: In the first relay discovery response message, the identifier of the relay terminal and the identifier of the discoverer terminal are encrypted by a relay discovery key set.

35. The finder terminal according to claim 33 or 34, wherein: The first relay discovery response message includes an identifier of the relay discovery security solution.

36. The finder terminal according to claim 28 or 29, wherein: The operations also include: Receive the direct discovery key set and relay discovery key set sent by the key management function.

37. A relay terminal comprising a memory, a transceiver, and a processor; A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations: Receive a first relay discovery request message sent by a discoverer terminal; wherein, The direct discovery data set of the first relay discovery request message includes the identifier of the discoverer terminal and the identifier of the discoverer terminal; Generate a second relay discovery request message according to the first relay discovery request message; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; the first relay discovery data set includes the identifier of the relay terminal; Send the second relay discovery request message.

38. The relay terminal according to claim 37, wherein: The generating of the second relay discovery request message includes one or more of the following: Encrypting the identifier of the relay terminal using a relay discovery key set; A message integrity protection code MIC of the second relay discovery request message is generated using the relay discovery key set.

39. The relay terminal according to claim 37 or 38, wherein: The generating a second relay discovery request message according to the first relay discovery request message includes: generating the second relay discovery request message according to the relay discovery security scheme indicated in the first relay discovery request message; The relay discovery security solution includes one or more of the following: protecting the relay discovery message using a direct discovery key set and / or a relay discovery key set, or not protecting the relay discovery message using a direct discovery key set and a relay discovery key set; Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection; Enable integrity protection of direct discovery data sets and / or integrity protection of relay discovery messages, or disable integrity protection of direct discovery data sets and integrity protection of relay discovery messages.

40. The relay terminal according to claim 39, wherein: The second relay discovery request message includes an identifier of the relay discovery security solution.

41. The relay terminal according to claim 40, wherein: The first relay discovery data set includes an identifier of the relay discovery security solution.

42. The relay terminal according to claim 37, wherein: The operations also include: Receiving a second relay discovery response message sent by a discoverer terminal; wherein the relay discovery data set of the second relay discovery response message includes an identifier of the discoverer terminal and an identifier of a discoverer terminal; Generate a first relay discovery response message according to the second relay discovery response message; the first relay discovery response message includes the direct discovery data set in the second relay discovery response message and the second relay discovery data set generated by the relay terminal; the second relay discovery data set includes the identifier of the relay terminal and the identifier of the discoverer terminal; Sending the first relay discovery response message to the discoverer terminal.

43. The relay terminal according to claim 42, wherein: In the second relay discovery response message, the identifier of the discoverer terminal and the identifier of the discoverer terminal are encrypted by the relay discovery key set.

44. The relay terminal according to claim 42 or 43, wherein: The second relay discovery response message includes an identifier of the relay discovery security solution.

45. The relay terminal according to claim 42, wherein: The generating of the first relay discovery response message includes one or more of the following: Encrypting the identifier of the relay terminal and the identifier of the discoverer terminal using a relay discovery key set; The MIC of the first relay discovery response message is generated using the relay discovery key set.

46. ​​The relay terminal according to claim 42 or 45, wherein: The first relay discovery response message includes an identifier of the relay discovery security solution.

47. The relay terminal according to claim 46, wherein: The second relay discovery data set includes an identifier of the relay discovery security solution.

48. The relay terminal according to claim 37 or 38, wherein: The operations also include: Receive the relay discovery key set sent by the key management function.

49. A discoverer terminal, comprising a memory, a transceiver, and a processor; Memory for storing computer programs; a transceiver, for transmitting and receiving data under the control of the processor; A processor is configured to read the computer program in the memory and perform the following operations: Receive a second relay discovery request message sent by a relay terminal; the second relay discovery request message includes a direct discovery data set in the first relay discovery request message, and a first relay discovery data set generated by the relay terminal; wherein the direct discovery data set includes an identifier of a discoverer terminal and an identifier of the discoverer terminal, and the first relay discovery data set includes an identifier of the relay terminal; Generate a second relay discovery response message according to the second relay discovery request message; wherein the relay discovery data set of the second relay discovery response message includes the identifier of the discoverer terminal and the identifier of the discoverer terminal; Send the second relay discovery response message to the relay terminal.

50. The discoverer terminal according to claim 49, wherein: The generating of the second relay discovery response message includes one or more of the following: Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using a relay discovery key set; Generate a message integrity protection code MIC of the direct discovery data set in the second relay discovery response message using the direct discovery key set; The MIC of the second relay discovery response message is generated using the relay discovery key set.

51. The discoverer terminal according to claim 49 or 50, wherein: The generating, according to the second relay discovery request message, a second relay discovery response message comprises: generating the second relay discovery response message according to the relay discovery security scheme indicated in the second relay discovery request message; The relay discovery security solution includes one or more of the following: protecting the relay discovery message using a direct discovery key set and / or a relay discovery key set, or not protecting the relay discovery message using a direct discovery key set and a relay discovery key set; Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection; Enable integrity protection of direct discovery data sets and / or integrity protection of relay discovery messages, or disable integrity protection of direct discovery data sets and integrity protection of relay discovery messages.

52. The discoverer terminal according to claim 51, wherein: The second relay discovery response message includes an identifier of the relay discovery security solution.

53. The discoverer terminal according to claim 52, wherein: The relay discovery data set of the second relay discovery response message includes an identifier of the relay discovery security solution.

54. The discoverer terminal according to claim 49 or 50, wherein: The operations also include: Receive the direct discovery key set and relay discovery key set sent by the key management function.

55. A device for sending a relay discovery message, comprising: A first generating unit, configured to generate a first relay discovery request message; wherein the direct discovery data set of the first relay discovery request message includes an identifier of the discoverer terminal and an identifier of the discoverer terminal; The first sending unit is used to send the first relay discovery request message.

56. The apparatus for sending a relay discovery message according to claim 55, wherein: The generating of the first relay discovery request message includes one or more of the following: Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using a direct discovery key set; Generate a message integrity protection code MIC of the direct discovery data set in the first relay discovery request message using the direct discovery key set; The MIC of the first relay discovery request message is generated using the relay discovery key set.

57. The apparatus for sending a relay discovery message according to claim 55 or 56, wherein: The generating a first relay discovery request message includes: Generate the first relay discovery request message according to the relay discovery security solution; The relay discovery security solution includes one or more of the following: protecting the relay discovery message using a direct discovery key set and / or a relay discovery key set, or not protecting the relay discovery message using a direct discovery key set and a relay discovery key set; Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection; Enable integrity protection of direct discovery data sets and / or integrity protection of relay discovery messages, or disable integrity protection of direct discovery data sets and integrity protection of relay discovery messages.

58. The apparatus for sending a relay discovery message according to claim 57, wherein: The first relay discovery request message includes an identifier of the relay discovery security solution.

59. The apparatus for sending a relay discovery message according to claim 58, wherein: The relay discovery data set of the first relay discovery request message includes an identifier of the relay discovery security solution.

60. The apparatus for sending a relay discovery message according to claim 55, wherein: The device also includes: The first receiving unit is configured to receive a first relay discovery response message sent by a relay terminal; wherein the relay discovery data set of the first relay discovery response message includes an identifier of the relay terminal and an identifier of the discoverer terminal.

61. The apparatus for sending a relay discovery message according to claim 60, wherein: In the first relay discovery response message, the identifier of the relay terminal and the identifier of the discoverer terminal are encrypted by a relay discovery key set.

62. The apparatus for sending a relay discovery message according to claim 60 or 61, wherein: The first relay discovery response message includes an identifier of the relay discovery security solution.

63. The apparatus for sending a relay discovery message according to claim 55 or 56, wherein: The device also includes: The second receiving unit is used to receive the direct discovery key set and the relay discovery key set sent by the key management function.

64. A device for sending a relay discovery message, comprising: A third receiving unit is configured to receive a first relay discovery request message sent by a discoverer terminal; wherein the direct discovery data set of the first relay discovery request message includes an identifier of the discoverer terminal and an identifier of a discoverer terminal; A second generating unit, configured to generate a second relay discovery request message according to the first relay discovery request message; the second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; the first relay discovery data set includes an identifier of the relay terminal; The second sending unit is used to send the second relay discovery request message.

65. The apparatus for sending a relay discovery message according to claim 64, wherein: The generating of the second relay discovery request message includes one or more of the following: Encrypting the identifier of the relay terminal using a relay discovery key set; A message integrity protection code MIC of the second relay discovery request message is generated using the relay discovery key set.

66. The apparatus for sending a relay discovery message according to claim 64 or 65, wherein: The generating a second relay discovery request message according to the first relay discovery request message includes: generating the second relay discovery request message according to the relay discovery security scheme indicated in the first relay discovery request message; The relay discovery security solution includes one or more of the following: protecting the relay discovery message using a direct discovery key set and / or a relay discovery key set, or not protecting the relay discovery message using a direct discovery key set and a relay discovery key set; Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection; Enable integrity protection of direct discovery data sets and / or integrity protection of relay discovery messages, or disable integrity protection of direct discovery data sets and integrity protection of relay discovery messages.

67. The apparatus for sending a relay discovery message according to claim 66, wherein: The second relay discovery request message includes an identifier of the relay discovery security solution.

68. The apparatus for sending a relay discovery message according to claim 67, wherein: The first relay discovery data set includes an identifier of the relay discovery security solution.

69. The apparatus for sending a relay discovery message according to claim 64, wherein: The third receiving unit is further used to: receive a second relay discovery response message sent by the discoverer terminal; wherein the relay discovery data set of the second relay discovery response message includes the identifier of the discoverer terminal and the identifier of the discoverer terminal; The second generating unit is further used to: generate a first relay discovery response message according to the second relay discovery response message; the first relay discovery response message includes the direct discovery data set in the second relay discovery response message and the second relay discovery data set generated by the relay terminal; the second relay discovery data set includes the identifier of the relay terminal and the identifier of the discoverer terminal; The second sending unit is further used to: send the first relay discovery response message to the discoverer terminal.

70. The apparatus for sending a relay discovery message according to claim 69, wherein: In the second relay discovery response message, the identifier of the discoverer terminal and the identifier of the discoverer terminal are encrypted by the relay discovery key set.

71. The apparatus for sending a relay discovery message according to claim 69 or 70, wherein: The second relay discovery response message includes an identifier of the relay discovery security solution.

72. The apparatus for sending a relay discovery message according to claim 69, wherein: The generating of the first relay discovery response message includes one or more of the following: Encrypting the identifier of the relay terminal and the identifier of the discoverer terminal using a relay discovery key set; The MIC of the first relay discovery response message is generated using the relay discovery key set.

73. The apparatus for sending a relay discovery message according to claim 69 or 72, wherein: The first relay discovery response message includes an identifier of the relay discovery security solution.

74. The apparatus for sending a relay discovery message according to claim 73, wherein: The second relay discovery data set includes an identifier of the relay discovery security solution.

75. The apparatus for sending a relay discovery message according to claim 64 or 65, wherein: The third receiving unit is further used for: Receive the relay discovery key set sent by the key management function.

76. A receiving device for a relay discovery message, comprising: A fourth receiving unit, configured to receive a second relay discovery request message sent by the relay terminal; The second relay discovery request message includes the direct discovery data set in the first relay discovery request message and the first relay discovery data set generated by the relay terminal; wherein the direct discovery data set includes an identifier of the discoverer terminal and an identifier of the discoverer terminal, and the first relay discovery data set includes an identifier of the relay terminal; A third generating unit is configured to generate a second relay discovery response message according to the second relay discovery request message; wherein the relay discovery data set of the second relay discovery response message includes the identifier of the discoverer terminal and the identifier of the terminal to be discovered; The third sending unit is used to send the second relay discovery response message to the relay terminal.

77. The apparatus for receiving a relay discovery message according to claim 76, wherein: The generating of the second relay discovery response message includes one or more of the following: Encrypting the identifier of the discoverer terminal and the identifier of the discoverer terminal using a relay discovery key set; Generate a message integrity protection code MIC of the direct discovery data set in the second relay discovery response message using the direct discovery key set; The MIC of the second relay discovery response message is generated using the relay discovery key set.

78. The apparatus for receiving a relay discovery message according to claim 76 or 77, wherein: The generating, according to the second relay discovery request message, a second relay discovery response message comprises: generating the second relay discovery response message according to the relay discovery security scheme indicated in the second relay discovery request message; The relay discovery security solution includes one or more of the following: protecting the relay discovery message using a direct discovery key set and / or a relay discovery key set, or not protecting the relay discovery message using a direct discovery key set and a relay discovery key set; Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection; Enable integrity protection of direct discovery data sets and / or integrity protection of relay discovery messages, or disable integrity protection of direct discovery data sets and integrity protection of relay discovery messages.

79. The apparatus for receiving a relay discovery message according to claim 78, wherein: The second relay discovery response message includes an identifier of the relay discovery security solution.

80. The apparatus for receiving a relay discovery message according to claim 79, wherein: The relay discovery data set of the second relay discovery response message includes an identifier of the relay discovery security solution.

81. The apparatus for receiving a relay discovery message according to claim 76 or 77, wherein: The fourth receiving unit is further used for: Receive the direct discovery key set and relay discovery key set sent by the key management function.

82. A computer-readable storage medium storing a computer program, wherein the computer program is used to cause a computer to execute the method according to any one of claims 1 to 9.

83. A computer-readable storage medium storing a computer program, wherein the computer program is used to cause a computer to execute the method according to any one of claims 10 to 21.

84. A computer-readable storage medium storing a computer program, wherein the computer program is used to cause a computer to execute the method according to any one of claims 22 to 27.

Citation Information

Patent Citations

  • Terminal discovery method and device

    CN111988772A

  • Communication method and device, and storage medium

    CN113923795A

  • Communication method, device and system

    CN115134781A

  • Method and apparatus for providing auxiliary information

    WO2022001969A1

  • Relay terminal and communication method

    WO2023008519A1