Relay discovery message sending method, receiving method, terminal and device

By using the direct discovery key set and the relay discovery key set in 5G ProSe mode B to encrypt and complete the relay discovery request message and response message, the specificity of terminal information management during the relay discovery process is solved. Security issues have achieved effective relay discovery and information security.

CN118945638APending Publication Date: 2024-11-12DATANG MOBILE COMM EQUIP CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310532369.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-11
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The prior art has failed to effectively realize the specific implementation and security management of terminal information during the 5G ProSe mode B relay discovery process.

Method used

Generate and send relay discovery request messages by including the identity of the discoverer terminal and the discoverer terminal in the relay discovery request message and encrypt and integrity protection using the direct discovery key set and the relay discovery key set for encryption and integrity protection. In response to the message, the terminal information is specifically defined in the way of providing the terminal information during the relay discovery process, and the terminal information is implemented securely.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945638A_ABST
    Figure CN118945638A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a relay discovery message sending method, a relay discovery message receiving method, a terminal and a device. The method comprises the following steps: a discoverer terminal generates a first relay discovery request message; wherein the direct discovery data set of the first relay discovery request message comprises the identifier of the discoverer terminal and the identifier of the discoverer terminal; and sending the first relay discovery request message. The identifier of the discoverer terminal and the identifier of the discoverer terminal are included in the direct discovery data set of the first relay discovery request message to be sent, so that the mode of providing the terminal information to the relay terminal in the relay discovery process is specifically defined, and the relay discovery process can be specifically implemented; and the security management of the terminal information in the relay discovery process is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of wireless communication technology, and in particular to a method for sending, a method for receiving, a terminal and a device for relaying discovery messages. Background Art

[0002] The 5th generation mobile communication (5G) proximity services (ProSe) will support terminal (also known as user equipment, User Equipment, UE) to terminal relay (U2U Relay) communication scenarios, that is, the source UE (Source UE) establishes a communication connection with the target UE (TargetUE) through the relay UE (Relay UE). U2U relay communication first involves the end UE (source UE, target UE) discovering each other through the relay UE, and then establishing a communication connection based on this.

[0003] 5G ProSe supports two discovery modes: Model A and Model B. For Model B, the source UE can be the discoverer UE in the discovery process, and the target UE can be the discoveree UE in the discovery process. Although the U2U Model B relay discovery message process and its main data content have been defined, how to implement this discovery process is a technical problem that needs to be solved. Summary of the invention

[0004] In order to solve the problems existing in the prior art, the embodiments of the present application provide a method for sending, a method for receiving, a terminal and a device for relaying discovery messages.

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

[0006] 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;

[0007] Send the first relay discovery request message.

[0008] Optionally, generating the first relay discovery request message includes one or more of the following:

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

[0010] 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;

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

[0012] Optionally, generating a first relay discovery request message includes:

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

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

[0015] 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;

[0016] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0018] Optionally, the first relay discovery request message includes an identifier of the relay discovery security scheme.

[0019] Optionally, the relay discovery data set of the first relay discovery request message includes an identifier of the relay discovery security scheme.

[0020] Optionally, the method further comprises:

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

[0022] Optionally, 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.

[0023] Optionally, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0024] Optionally, the method further comprises:

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

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

[0027] 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;

[0028] 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;

[0029] Send the second relay discovery request message.

[0030] Optionally, generating a second relay discovery request message includes one or more of the following:

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

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

[0033] Optionally, the generating a second relay discovery request message according to the first relay discovery request message includes:

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

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

[0036] 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;

[0037] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0039] Optionally, the second relay discovery request message includes an identifier of the relay discovery security scheme.

[0040] Optionally, the first relay discovery data set includes an identifier of the relay discovery security scheme.

[0041] Optionally, the method further comprises:

[0042] 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;

[0043] 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;

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

[0045] Optionally, 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.

[0046] Optionally, the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0047] Optionally, generating the first relay discovery response message includes one or more of the following:

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

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

[0050] Optionally, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0051] Optionally, the second relay discovery data set includes an identifier of the relay discovery security scheme.

[0052] Optionally, the method further comprises:

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

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

[0055] 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;

[0056] 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;

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

[0058] Optionally, the generating a second relay discovery response message includes one or more of the following:

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

[0060] 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;

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

[0062] Optionally, the generating a second relay discovery response message according to the second relay discovery request message includes:

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

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

[0065] 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;

[0066] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0068] Optionally, the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0069] Optionally, the relay discovery data set of the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0070] Optionally, the method further comprises:

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

[0072] In a fourth aspect, an embodiment of the present application further provides a discoverer terminal, including a memory, a transceiver, and a processor;

[0073] 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:

[0074] 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;

[0075] Send the first relay discovery request message.

[0076] Optionally, generating the first relay discovery request message includes one or more of the following:

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

[0078] 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;

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

[0080] Optionally, generating a first relay discovery request message includes:

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

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

[0083] 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;

[0084] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0086] Optionally, the first relay discovery request message includes an identifier of the relay discovery security scheme.

[0087] Optionally, the relay discovery data set of the first relay discovery request message includes an identifier of the relay discovery security scheme.

[0088] Optionally, the operation further includes:

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

[0090] Optionally, 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.

[0091] Optionally, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0092] Optionally, the operation further includes:

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

[0094] In a fifth aspect, an embodiment of the present application further provides a relay terminal, including a memory, a transceiver, and a processor;

[0095] 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:

[0096] 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;

[0097] 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;

[0098] Send the second relay discovery request message.

[0099] Optionally, generating a second relay discovery request message includes one or more of the following:

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

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

[0102] Optionally, the generating a second relay discovery request message according to the first relay discovery request message includes:

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

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

[0105] 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;

[0106] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0108] Optionally, the second relay discovery request message includes an identifier of the relay discovery security scheme.

[0109] Optionally, the first relay discovery data set includes an identifier of the relay discovery security scheme.

[0110] Optionally, the operation further includes:

[0111] 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;

[0112] 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;

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

[0114] Optionally, 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.

[0115] Optionally, the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0116] Optionally, generating the first relay discovery response message includes one or more of the following:

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

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

[0119] Optionally, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0120] Optionally, the second relay discovery data set includes an identifier of the relay discovery security scheme.

[0121] Optionally, the operation further includes:

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

[0123] In a sixth aspect, an embodiment of the present application further provides a discoverer terminal, including a memory, a transceiver, and a processor;

[0124] 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:

[0125] 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;

[0126] 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;

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

[0128] Optionally, the generating a second relay discovery response message includes one or more of the following:

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

[0130] 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;

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

[0132] Optionally, the generating a second relay discovery response message according to the second relay discovery request message includes:

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

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

[0135] 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;

[0136] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0138] Optionally, the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0139] Optionally, the relay discovery data set of the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0140] Optionally, the operation further includes:

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

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

[0143] 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;

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

[0145] Optionally, generating the first relay discovery request message includes one or more of the following:

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

[0147] 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;

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

[0149] Optionally, generating a first relay discovery request message includes:

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

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

[0152] 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;

[0153] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0155] Optionally, the first relay discovery request message includes an identifier of the relay discovery security scheme.

[0156] Optionally, the relay discovery data set of the first relay discovery request message includes an identifier of the relay discovery security scheme.

[0157] Optionally, the device further comprises:

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

[0159] Optionally, 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.

[0160] Optionally, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0161] Optionally, the device further comprises:

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

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

[0164] 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;

[0165] 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;

[0166] The second sending unit is used to send the second relay discovery request message.

[0167] Optionally, generating a second relay discovery request message includes one or more of the following:

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

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

[0170] Optionally, the generating a second relay discovery request message according to the first relay discovery request message includes:

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

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

[0173] 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;

[0174] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0176] Optionally, the second relay discovery request message includes an identifier of the relay discovery security scheme.

[0177] Optionally, the first relay discovery data set includes an identifier of the relay discovery security scheme.

[0178] Optionally, 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;

[0179] 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;

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

[0181] Optionally, 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.

[0182] Optionally, the second relay discovery response message includes an identifier of a relay discovery security scheme.

[0183] Optionally, generating the first relay discovery response message includes one or more of the following:

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

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

[0186] Optionally, the first relay discovery response message includes an identifier of a relay discovery security scheme.

[0187] Optionally, the second relay discovery data set includes an identifier of the relay discovery security scheme.

[0188] Optionally, the third receiving unit is further used to:

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

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

[0191] A fourth receiving unit, configured to 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 a discoverer terminal, and the first relay discovery data set includes an identifier of the relay terminal;

[0192] 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;

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

[0194] Optionally, the generating a second relay discovery response message includes one or more of the following:

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

[0196] 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;

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

[0198] Optionally, the generating a second relay discovery response message according to the second relay discovery request message includes:

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

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

[0201] 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;

[0202] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0204] Optionally, the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0205] Optionally, the relay discovery data set of the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0206] Optionally, the fourth receiving unit is further used to:

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

[0208] In the tenth aspect, an embodiment of the present application 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.

[0209] In the eleventh aspect, an embodiment of the present application 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 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.

[0210] In the twelfth aspect, an embodiment of the present application 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.

[0211] In the thirteenth aspect, an embodiment of the present application 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 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] The relay discovery message sending method, receiving method, terminal and device provided in the embodiments of the present application, 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 manner 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 the terminal information during the relay discovery process. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0214] Figure 1 One of the flow charts of the method for sending a relay discovery message provided in an embodiment of the present application;

[0215] Figure 2 An example diagram of a first relay discovery request message provided in an embodiment of the present application;

[0216] Figure 3 An example diagram of a first relay discovery response message provided in an embodiment of the present application;

[0217] Figure 4 A second flow chart of a method for sending a relay discovery message provided in an embodiment of the present application;

[0218] Figure 5 An example diagram of a second relay discovery request message provided in an embodiment of the present application;

[0219] Figure 6 An example diagram of a second relay discovery response message provided in an embodiment of the present application;

[0220] Figure 7 A schematic diagram of a process for receiving a relay discovery message provided in an embodiment of the present application;

[0221] Figure 8 A schematic diagram of the basic process of relay discovery mode B provided in an embodiment of the present application;

[0222] Fig. 9 A schematic diagram of the structure of a discoverer terminal provided in an embodiment of the present application;

[0223] Fig.10 A schematic diagram of the structure of a relay terminal provided in an embodiment of the present application;

[0224] Fig.11 A schematic diagram of the structure of a discoverer terminal provided in an embodiment of the present application;

[0225] Fig.12 One of the structural schematic diagrams of the device for sending a relay discovery message provided in an embodiment of the present application;

[0226] Fig.13 A second structural diagram of a device for sending a relay discovery message provided in an embodiment of the present application;

[0227] Fig.14 A schematic diagram of the structure of a receiving device for relaying discovery messages provided in an embodiment of the present application. DETAILED DESCRIPTION

[0228] In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

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

[0230] In the embodiments of the present application, the terms "first", "second", etc. are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.

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

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

[0233] 1. 5G ProSe discovery mode.

[0234] 5G ProSe supports two discovery modes:

[0235] Model A: The announcing UE sends an announcement message to announce its existence, and the monitoring UE does not need to reply after receiving the announcement message. The monitoring UE can establish a communication connection with the announcing UE as needed.

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

[0237] 5G ProSe will support UE-to-UE relay (U2U Relay) communication scenarios, that is, the source UE (Source UE) establishes a communication connection with the target UE (Target UE) through the relay UE (Relay UE). U2U relay communication first involves the end UE (source UE, target UE) discovering each other through the relay UE, and then establishing a communication connection based on this. In the relay communication scenario, the source UE can be the Monitoring UE or Discoverer UE in the discovery process, and the target UE can be the Announcing UE or Discoveree UE in the discovery process.

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

[0239] 2. Explanation of relevant terms.

[0240] Discoverer UE: The source UE in the ProSe Model B discovery process, which broadcasts a message to discover the Discoveree UE. After discovering the Discoveree UE, it will initiate communication with the Discoveree UE.

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

[0242] 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 corresponding processing and sends it to the UE that receives the message.

[0243] End UE: UE for which the relay UE can provide relay services, namely the Discoverer UE and Discoveree UE in Model B.

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

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

[0246] ProSe Query Code: A code included in the ProSe Model B discovery request message, which is related to the ProSe application and the ProSe user. Part of it is used by the receiving UE to monitor the identification information of the message sent by the sending UE, and this part is not encrypted; the other part may be related to privacy and needs to be encrypted. The key that protects the direct discovery data set is associated with the ProSe query code.

[0247] ProSe Response Code: A code included in the ProSe Model B discovery response message as a response code to the ProSe query code. The 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.

[0248] The number of bits of the counter based on the coordinated universal time (UTC) (UTC-based Counter LSB): This is the time parameter associated with the key set used to protect the discovery message. It is used to allow the sender's clock and the receiver's clock to have a certain degree of desynchronization space, but must be within the specified range of this value to avoid possible replay attacks.

[0249] Figure 1 One of the flow diagrams of the method for sending a relay discovery message provided in an embodiment of the present application, the method can be applied to a discoverer terminal, such as Figure 1 As shown, the method comprises the following steps:

[0250] 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 discoveree terminal.

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

[0252] Specifically, the embodiment of the present application provides 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.

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

[0254] Optionally, the identifier of the Discoverer UE may be a layer 2 identifier (Layer-2 ID) of the Discoverer UE or other identification information.

[0255] Optionally, the identifier of the Discoveree UE may be a layer 2 identifier (Layer-2 ID) of the Discoveree UE or other identification information.

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

[0257] The method for sending a relay discovery message provided in an embodiment of the present application 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 the terminal information during the relay discovery process.

[0258] Optionally, generating a first relay discovery request message includes one or more of the following:

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

[0260] 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;

[0261] A MIC for the first relay discovery request message is generated using the relay discovery key set.

[0262] 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 identifier of the Discoverer UE and the identifier of the Discoveree UE are encrypted using the direct discovery key set, the direct discovery key set is used to perform integrity protection on the direct discovery data set in the first relay discovery request message, the relay discovery key set is used to perform integrity protection on the first relay discovery request message, and so on.

[0263] The direct discovery key set refers to the key set between the Discoverer UE and the Discoveree UE that protects the direct discovery data set. The direct discovery key set includes keys for providing confidentiality protection, keys for integrity protection, and information scrambling keys. The protection technology solution can use symmetric key technology, and the key value of the message sender and the key value of the message receiver are the same.

[0264] The relay discovery key set refers to the key set for protecting the relay discovery message between the Discoverer UE, Discoveree UE and Relay UE. The relay discovery key set includes keys for providing confidentiality protection, keys for integrity protection and information scrambling keys. The protection technology solution can adopt symmetric key technology, and the key value of the message sender and the key value of the message receiver are the same.

[0265] Optionally, the method further comprises:

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

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

[0268] Optionally, generating a first relay discovery request message includes:

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

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

[0271] 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;

[0272] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0274] Specifically, the relay discovery security solution may be provided to the DiscovererUE by a key management function or other device, or may be pre-configured in the Discoverer UE, and this application does not make any specific limitation on this.

[0275] Relay discovery security schemes can include one or a combination of the following:

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

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

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

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

[0280] Among them, enabling 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 enabling integrity protection of the relay discovery message may include using the relay discovery key set to perform integrity protection on the relay discovery message.

[0281] In the U2U relay discovery process, different application scenarios have different requirements for the security protection strength of the relay discovery message. For example, the computing power and energy capacity of the Internet of Things (IoT) device may be limited, and only basic security capabilities may be required, or no security capabilities may be used. This means that the system needs to be able to flexibly control the message protection security mechanism adopted.

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

[0283] 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. Thus, the adopted security mechanism can be flexibly controlled based on application requirements.

[0284] Optionally, the first relay discovery request message may include an identifier of the 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 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 the subsequently generated messages based on the scheme.

[0285] Optionally, the identifier of the relay discovery security solution may be included in the relay discovery data set of the first relay discovery request message, so as to be acquired by the Relay UE.

[0286] Figure 2 The example diagram of the first relay discovery request message provided in the embodiment of the present application should be understood that the diagram is only 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 application. Figure 2As shown, the first relay discovery request message includes the 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 consisting of the relay discovery data set and the direct discovery data set is integrity protected by the relay discovery key set.

[0287] Figure 2 In the figure, the number of bits 2 counted from the low bit of the UTC-based counter is the time parameter associated with the relay discovery key set, the number of bits 1 counted from the low bit of the UTC-based counter 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, and query code 1 is the ProSe query code used for the direct discovery process between the Discoverer UE and the Discoveree UE. The meanings of the relevant concepts involved in other subsequent figures remain consistent throughout the text and will not be repeated.

[0288] Optionally, the method further comprises:

[0289] 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 a discoverer terminal.

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

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

[0292] Optionally, the identifier of the Relay UE may be a layer 2 identifier (Layer-2ID) of the Relay UE or other identification information.

[0293] Optionally, 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.

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

[0295] Optionally, the first relay discovery response message includes an identifier of the relay discovery security scheme.

[0296] Specifically, when generating the first relay discovery response message, the Relay UE can perform corresponding security processing such as encryption and integrity protection 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.

[0297] Figure 3 The example diagram of the first relay discovery response message provided in the embodiment of the present application should be understood that the diagram is only 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 application. Figure 3 As shown, the first relay discovery response message includes the 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.

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

[0299] Figure 4 The second flow chart of the method for sending a relay discovery message provided in the embodiment of the present application is applicable to a relay terminal, such as Figure 4 As shown, the method comprises the following steps:

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

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

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

[0303] 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), 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.

[0304] 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 identifier (Relay UE ID) is included in the first relay discovery data set.

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

[0306] The method for sending a relay discovery message provided in an embodiment of the present application 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 specifically implemented, but also facilitates the secure management of terminal information in the relay discovery process.

[0307] Optionally, generating a second relay discovery request message includes one or more of the following:

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

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

[0310] 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 is used to encrypt the identity of the Relay UE, and the relay discovery key set is used to perform integrity protection on the second relay discovery request message, and so on.

[0311] Optionally, the method further comprises:

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

[0313] Specifically, in some embodiments, the key management function may provide the relay discovery key set to the RelayUE so that the Relay UE can use the relay discovery key set to verify and decrypt received relay discovery messages, or protect subsequently sent relay discovery messages.

[0314] Optionally, generating a second relay discovery request message according to the first relay discovery request message includes:

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

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

[0317] 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;

[0318] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0320] Specifically, the Discoverer UE may indicate the relay discovery security scheme through the first relay discovery request message, for example: including an identifier of the relay discovery security scheme in the first relay discovery request message.

[0321] After receiving the first relay discovery request message, the relay UE can perform corresponding security processing when generating the second relay discovery request message according to the relay discovery security scheme indicated in the first relay discovery request message, for example, encrypting the identity of the relay UE using the relay discovery key set, performing integrity protection on the second relay discovery request message using the relay discovery key set, etc. Thus, the security mechanism adopted can be flexibly controlled based on application requirements.

[0322] 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, and performs corresponding security processing on subsequently generated messages (relay forwarding messages or response messages, etc.) based on the scheme.

[0323] Optionally, the second relay discovery request message may include an identifier of a relay discovery security solution.

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

[0325] Optionally, the identifier of the relay discovery security scheme may be included in the first relay discovery data set.

[0326] Figure 5The example diagram of the second relay discovery request message provided in the embodiment of the present application should be understood that the diagram is only 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 application. Figure 5 As shown, the second relay discovery request message includes a relay discovery security scheme identifier (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 consisting 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.

[0327] Optionally, the method further comprises:

[0328] 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 the discoverer terminal;

[0329] 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;

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

[0331] Specifically, after the Relay UE sends the second relay discovery request message, the Discoveree UE receives the second relay discovery request message, and 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, wherein 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.

[0332] After the Relay UE receives the second relay discovery response message, it 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 identifier of the Relay UE and the identifier of the Discoveree UE 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.

[0333] Optionally, 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.

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

[0335] Optionally, the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0336] Specifically, when generating the second relay discovery response message, the Discoveree UE can perform corresponding security processing such as encryption and integrity protection 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.

[0337] Figure 6 The example diagram of the second relay discovery response message provided in the embodiment of the present application should be understood that the diagram is only 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 application. Figure 6 As shown, the second relay discovery response message includes the identifier of the relay discovery security scheme (Security Scheme ID). 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 consisting of the relay discovery data set and the direct discovery data set is integrity protected by the relay discovery key set.

[0338] Optionally, generating a first relay discovery response message includes one or more of the following:

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

[0340] A MIC for the first relay discovery response message is generated using the relay discovery key set.

[0341] 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 are encrypted using the relay discovery key set, and the first relay discovery response message is integrity protected using the relay discovery key set, and so on.

[0342] Optionally, the first relay discovery response message may include an identifier of the relay discovery security solution.

[0343] Specifically, when the Relay UE generates a first relay discovery response message, it can include the identifier (Security Scheme ID) of the relay discovery security scheme it uses 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.

[0344] Optionally, the identifier of the relay discovery security scheme may be included in the second relay discovery data set.

[0345] Figure 7 A flowchart of a method for receiving a relay discovery message provided in an embodiment of the present application is provided. The method can be applied to a discoverer terminal, such as Figure 7 As shown, the method comprises the following steps:

[0346] Step 700, 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.

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

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

[0349] 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), 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.

[0350] 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 identifier (Relay UE ID) is included in the first relay discovery data set.

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

[0352] The method for sending a relay discovery message provided in an embodiment of the present application includes the identifier of the Discoverer UE and the identifier of the Discoveree UE in a relay discovery data set of a second relay discovery response message and sends it to the RelayUE. This not only specifically defines the method for providing terminal information 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.

[0353] Optionally, generating a second relay discovery response message includes one or more of the following:

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

[0355] 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;

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

[0357] 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 identifier of the Discoverer UE and the identifier of the Discoveree UE are encrypted using the relay discovery key set, the direct discovery key set is used to perform integrity protection on the direct discovery data set in the second relay discovery response message, the relay discovery key set is used to perform integrity protection on the second relay discovery response message, and so on.

[0358] Optionally, the method further comprises:

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

[0360] 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 verify and decrypt the received relay discovery message, or to protect the subsequently sent relay discovery message.

[0361] Optionally, generating a second relay discovery response message according to the second relay discovery request message includes:

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

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

[0364] 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;

[0365] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

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

[0368] After the Discoveree UE receives the second relay discovery request message, it 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: using the relay 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 perform integrity protection on the direct discovery data set in the second relay discovery response message, using the relay discovery key set to perform integrity protection on the second relay discovery response message, etc. Thus, the security mechanism adopted can be flexibly controlled based on application requirements.

[0369] 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, and performs corresponding security processing on subsequently generated messages (relay forwarding messages or response messages, etc.) based on the scheme.

[0370] Optionally, the second relay discovery response message includes an identifier of the relay discovery security scheme.

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

[0372] Optionally, the identifier of the relay discovery security scheme is included in a relay discovery data set of the second relay discovery response message.

[0373] The methods provided in the embodiments of the present application 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.

[0374] The following describes the methods provided in the above embodiments of the present application by using examples of specific application scenarios.

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

[0376] Figure 8 A basic flow chart of relay discovery mode B provided in an embodiment of the present application is as follows: Figure 8 As shown, the main process includes:

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

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

[0379] The key management function can provide the relay discovery security policy used when performing relay discovery to the discoverer UE, the discoveree UE and the 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 Scheme) and their identifiers (Security Scheme ID). Each Security Scheme describes a security policy for relay discovery messages, such as using only 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 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 the subsequently generated messages (relay forwarding messages or response messages) based on the scheme.

[0380] 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 SchemeID 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 specifies 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 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.

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

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

[0383] 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 and the direct discovery data set from the first relay discovery request message, as well as 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 the relay UE privacy security is enabled, the Relay UE ID is 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 second relay discovery request message.

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

[0385] 6. The Discoveree UE receives the second relay discovery request message, uses the Security SchemeID 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.

[0386] 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 SecurityScheme 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 SecurityScheme 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.

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

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

[0389] The Relay UE generates a first relay discovery response message. The first relay discovery response message includes a relay discovery data set generated by the relay UE and a direct discovery data set from the second relay discovery response message, as well as a 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.

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

[0391] 10. The Discoverer UE receives the first relay discovery response message, uses the Security SchemeID 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.

[0392] The methods and devices provided in the various embodiments of the present application 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.

[0393] Fig. 9 A schematic diagram of the structure of the discoverer terminal provided in the embodiment of the present application is as follows: Fig. 9 As shown, 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 arranged physically separately.

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

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

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

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

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

[0399] 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 application 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 an identifier of the discoverer terminal and an identifier of the discoverer terminal; and sending a first relay discovery request message.

[0400] Optionally, generating a first relay discovery request message includes one or more of the following:

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

[0402] 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;

[0403] A MIC for the first relay discovery request message is generated using the relay discovery key set.

[0404] Optionally, generating a first relay discovery request message includes:

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

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

[0407] 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;

[0408] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0410] Optionally, the first relay discovery request message includes an identifier of a relay discovery security scheme.

[0411] Optionally, the relay discovery data set of the first relay discovery request message includes an identifier of the relay discovery security solution.

[0412] Optionally, the method further comprises:

[0413] 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 a discoverer terminal.

[0414] Optionally, 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.

[0415] Optionally, the first relay discovery response message includes an identifier of the relay discovery security scheme.

[0416] Optionally, the method further comprises:

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

[0418] Fig.10A schematic diagram of the structure of a relay terminal provided in an embodiment of the present application, such as Fig.10 As shown, 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 arranged physically separately.

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

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

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

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

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

[0424] The processor 1000 calls the computer program stored in the memory 1020 to execute any of the methods provided in the embodiments of the present application 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 an identifier of the discoverer terminal and an identifier of the discoverer terminal; generating 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; and sending a second relay discovery request message.

[0425] Optionally, generating a second relay discovery request message includes one or more of the following:

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

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

[0428] Optionally, generating a second relay discovery request message according to the first relay discovery request message includes:

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

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

[0431] 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;

[0432] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0434] Optionally, the second relay discovery request message includes an identifier of a relay discovery security scheme.

[0435] Optionally, the first relay discovery data set includes an identifier of a relay discovery security solution.

[0436] Optionally, the method further comprises:

[0437] 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 the discoverer terminal;

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

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

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

[0441] Optionally, the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0442] Optionally, generating a first relay discovery response message includes one or more of the following:

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

[0444] A MIC for the first relay discovery response message is generated using the relay discovery key set.

[0445] Optionally, the first relay discovery response message includes an identifier of the relay discovery security scheme.

[0446] Optionally, the second relay discovery data set includes an identifier of a relay discovery security solution.

[0447] Optionally, the method further comprises:

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

[0449] Fig.11 A schematic diagram of the structure of the discoverer terminal provided in an embodiment of the present application is shown in FIG. Fig.11 As shown, 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 arranged physically separately.

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

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

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

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

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

[0455] The processor 1100 calls the computer program stored in the memory 1120 to execute any of the methods provided in the embodiments of the present application 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.

[0456] Optionally, generating a second relay discovery response message includes one or more of the following:

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

[0458] 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;

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

[0460] Optionally, generating a second relay discovery response message according to the second relay discovery request message includes:

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

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

[0463] 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;

[0464] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0466] Optionally, the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0467] Optionally, the relay discovery data set of the second relay discovery response message includes an identifier of the relay discovery security solution.

[0468] Optionally, the method further comprises:

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

[0470] It should be noted here that the above-mentioned discoverer terminal, relay terminal and discoverer terminal provided in the embodiments of the present application can implement all the method steps implemented in the above-mentioned method embodiments, and can achieve the same technical effects. 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.

[0471] Fig.12 One of the structural diagrams of the device for sending a relay discovery message provided in an embodiment of the present application is as follows Fig.12 As shown, the device comprises:

[0472] 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;

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

[0474] Optionally, generating a first relay discovery request message includes one or more of the following:

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

[0476] 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;

[0477] A MIC for the first relay discovery request message is generated using the relay discovery key set.

[0478] Optionally, generating a first relay discovery request message includes:

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

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

[0481] 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;

[0482] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0484] Optionally, the first relay discovery request message includes an identifier of a relay discovery security scheme.

[0485] Optionally, the relay discovery data set of the first relay discovery request message includes an identifier of the relay discovery security solution.

[0486] Optionally, the device further comprises:

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

[0488] Optionally, 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.

[0489] Optionally, the first relay discovery response message includes an identifier of the relay discovery security scheme.

[0490] Optionally, the device further comprises:

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

[0492] Fig.13 The second structural diagram of the device for sending a relay discovery message provided in the embodiment of the present application is as follows: Fig.13 As shown, the device comprises:

[0493] 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;

[0494] 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;

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

[0496] Optionally, generating a second relay discovery request message includes one or more of the following:

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

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

[0499] Optionally, generating a second relay discovery request message according to the first relay discovery request message includes:

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

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

[0502] 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;

[0503] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0505] Optionally, the second relay discovery request message includes an identifier of a relay discovery security scheme.

[0506] Optionally, the first relay discovery data set includes an identifier of a relay discovery security solution.

[0507] Optionally, 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 an identifier of the discoverer terminal and an identifier of the discoverer terminal;

[0508] 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;

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

[0510] Optionally, 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.

[0511] Optionally, the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0512] Optionally, generating a first relay discovery response message includes one or more of the following:

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

[0514] A MIC for the first relay discovery response message is generated using the relay discovery key set.

[0515] Optionally, the first relay discovery response message includes an identifier of the relay discovery security scheme.

[0516] Optionally, the second relay discovery data set includes an identifier of a relay discovery security solution.

[0517] Optionally, the third receiving unit is further configured to:

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

[0519] Fig.14A structural diagram of a receiving device for a relay discovery message provided in an embodiment of the present application, such as Fig.14 As shown, the device comprises:

[0520] The fourth receiving unit 1400 is used 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;

[0521] 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 discoverer terminal;

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

[0523] Optionally, generating a second relay discovery response message includes one or more of the following:

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

[0525] 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;

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

[0527] Optionally, generating a second relay discovery response message according to the second relay discovery request message includes:

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

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

[0530] 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;

[0531] Enable end terminal privacy protection and / or relay terminal privacy protection, or disable end terminal privacy protection and relay terminal privacy protection;

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

[0533] Optionally, the second relay discovery response message includes an identifier of the relay discovery security scheme.

[0534] Optionally, the relay discovery data set of the second relay discovery response message includes an identifier of the relay discovery security solution.

[0535] Optionally, the fourth receiving unit is further configured to:

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

[0537] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0538] 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 application 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 to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0539] It should be noted here that the above-mentioned device provided in the embodiment of the present application 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.

[0540] On the other hand, an embodiment of the present application 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 a relay discovery message provided in the above embodiments.

[0541] It should be noted here that the computer-readable storage medium provided in the embodiment of the present application 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.

[0542] 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 CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0543] The technical solution provided in the embodiment of the present application 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.

[0544] The terminal involved in the embodiment of the present application may be a device that provides voice and / or data connectivity to a user, a handheld device with a 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 a 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 a "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 language and / or data with a wireless 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, and a user device, but is not limited thereto in the embodiments of the present application.

[0545] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0546] The present application 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 application. 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 generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0547] 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 an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0548] 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, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

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

Claims

1. A method for sending a relay discovery message, characterized in that: Applied to the discoverer terminal, including: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: Applicable to relay terminals, including: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: Applied to the discoverer terminal, including: 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.

23. The method for receiving a relay discovery message according to claim 22, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: Including memory, transceiver, 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: 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, characterized in that: 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, characterized in that: 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, characterized in that: The first relay discovery request message includes an identifier of the relay discovery security solution.

32. The finder terminal according to claim 31, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that: Including memory, transceiver, 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: 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.

38. The relay terminal according to claim 37, characterized in that: 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, characterized in that: 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, characterized in that: The second relay discovery request message includes an identifier of the relay discovery security solution.

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

42. The relay terminal according to claim 37, characterized in that: 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, characterized in that: 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, characterized in that: The second relay discovery response message includes an identifier of the relay discovery security solution.

45. The relay terminal according to claim 42, characterized in that: 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, characterized in that: The first relay discovery response message includes an identifier of the relay discovery security solution.

47. The relay terminal according to claim 46, characterized in that: 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, characterized in that: The operations also include: Receive the relay discovery key set sent by the key management function.

49. A discoverer terminal, characterized in that: Including memory, transceiver, processor; Memory for storing computer programs; a transceiver, configured to transmit and receive data under the control of the processor; and a processor, 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, characterized in that: 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, characterized in that: 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, characterized in that: The second relay discovery response message includes an identifier of the relay discovery security solution.

53. The discoverer terminal according to claim 52, characterized in that: 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, characterized in that: 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, characterized in that: include: 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. A device for sending a relay discovery message, characterized in that: include: 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.

57. A receiving device for relaying discovery message, characterized in that: include: 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.

58. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is used to make a computer execute the method according to any one of claims 1 to 9.

59. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is used to make a computer execute the method according to any one of claims 10 to 21.

60. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is used to make a computer execute the method according to any one of claims 22 to 27.

Citation Information

Cited By

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

    EP4712523A1