Direct communication method, device and terminal
By using discovery indication information and key protection of direct communication request messages during the relay connection establishment process, the problem of discovery between the relay UE and the target UE is solved, and flexible discovery functions and security are achieved.
Patent Information
- Application Number
- CN202310531305.4
- 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
The prior art cannot realize the discovery of the relay UE and the discovery of the target UE during the relay connection establishment process.
By generating and sending a direct communication request message (DCR message), which contains discovery indication information, is used to indicate whether the message includes direct discovery data and relay discovery data, and to use the key set to secure the message, ensuring the relay UE and Discovery and connection of the target UE.
The discovery of the relay UE and the target UE during the direct communication establishment process is realized, and flexible discovery function application methods and scenarios are provided, ensuring the security of the U2U UE outside the network coverage range.
Smart Images

Figure CN118945893A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a direct communication method, device and terminal. Background Art
[0002] The prior art defines the integration of Proximity based Services (ProSe) discovery into the PC5 unicast link establishment process in the User Equipment (UE) to Terminal (UE-to-UE, also known as U2U) relay scenario. The basic principle is to directly use the PC5 direct communication technology defined in the 3GPP Vehicle-to-Everything (V2X) to establish a relay connection from the source UE to the target UE via the relay UE. However, according to the prior art, it is not possible to determine how to achieve the discovery of the relay UE and the target UE during the relay connection establishment process. Summary of the invention
[0003] The purpose of the present application is to provide a direct communication method, device and terminal to solve the problem of realizing the discovery of relay UE and target UE during the process of establishing a relay connection.
[0004] An embodiment of the present application provides a direct communication method, including:
[0005] The first terminal generates a first direct communication request (Direct Communication Request, DCR) message;
[0006] The first terminal sends a first DCR message to the relay terminal;
[0007] The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate whether the first DCR message includes discovery data or does not include discovery data.
[0008] Optionally, the first DCR message includes discovery data, including one of the following:
[0009] The first DCR message includes direct discovery data;
[0010] The first DCR message includes first relay discovery data;
[0011] The first DCR message includes direct discovery data and first relay discovery data.
[0012] Optionally, the method further includes:
[0013] A first key set and a second key set are obtained, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
[0014] Optionally, after generating the first DCR message, the method further includes the following:
[0015] When the first discovery indication information indicates that the first DCR message includes direct discovery data, using the first key set to securely protect the first DCR message;
[0016] When the first discovery indication information indicates that the first DCR message includes first relay discovery data, using the second key set to perform security protection on the first DCR message;
[0017] When the first discovery indication information indicates that the first DCR message includes direct discovery data and first relay discovery data, the first DCR message is securely protected using the first key set and the second key set, respectively.
[0018] Optionally, the directly discovered data includes at least one of the following:
[0019] a first proximity service query code associated with the first key set;
[0020] first security information used to establish a security association between the first terminal and the second terminal;
[0021] First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal;
[0022] A first message integrity protection code (MIC) is generated using the first key set.
[0023] Optionally, the first relay discovery data includes at least one of the following:
[0024] a second proximity service query code associated with a second key set;
[0025] second security information used to establish a security association between the first terminal and the relay terminal;
[0026] Second auxiliary information used to establish a PC5 connection between the first terminal and the relay terminal;
[0027] A second MIC generated using the second key set.
[0028] Optionally, using the first key set to securely protect the first DCR message includes at least one of the following:
[0029] Generate a first MIC using the integrity protection key in the first key set, where the first MIC is used to perform integrity protection on a first portion of information in the first DCR message, where the first portion of information includes part or all of data sent by the first terminal to the second terminal, where the part or all of the data includes the direct discovery data;
[0030] The second part of information in the first DCR message is confidentially protected by using the confidentiality protection key in the first key set, where the second part of information includes private data sent by the first terminal to the second terminal, and the private data includes private data in the direct discovery data.
[0031] Optionally, using the second key set to securely protect the first DCR message includes at least one of the following:
[0032] Generate a second MIC using the integrity protection key in the second key set, where the second MIC is used to perform integrity protection on the third part of information in the first DCR message, where the third part of information includes all data sent by the first terminal to the relay terminal, where the all data includes the first relay discovery data;
[0033] The confidentiality protection key in the second key set is used to protect the confidentiality of the fourth part of information in the first DCR message, where the fourth part of information includes: data that the relay terminal is allowed to directly forward to the second terminal, and privacy data allowed to be shared among the first terminal, the relay terminal and the second terminal, and the privacy data includes the privacy data in the first relay discovery data.
[0034] An embodiment of the present application provides a direct communication method, including:
[0035] The relay terminal receives a first DCR message sent by the first terminal;
[0036] The relay terminal generates a second DCR message according to the first DCR message;
[0037] The relay terminal sends the second DCR message to the second terminal;
[0038] The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate that the first DCR message includes discovery data or does not include discovery data;
[0039] The second DCR message includes second discovery indication information, where the second discovery indication information is used to indicate that the second DCR message includes discovery data or does not include discovery data.
[0040] Optionally, the first DCR message includes discovery data, including one of the following:
[0041] The first DCR message includes direct discovery data;
[0042] The first DCR message includes first relay discovery data;
[0043] The first DCR message includes direct discovery data and first relay discovery data.
[0044] Optionally, the second DCR message includes discovery data, including one of the following:
[0045] The second DCR message includes direct discovery data;
[0046] The second DCR message includes second relay discovery data;
[0047] The second DCR message includes direct discovery data and second relay discovery data.
[0048] Optionally, the directly discovered data includes at least one of the following:
[0049] a first proximity service query code associated with the first key set;
[0050] first security information used to establish a security association between the first terminal and the second terminal;
[0051] First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal;
[0052] A first MIC is generated using the first key set.
[0053] Optionally, the method further includes:
[0054] A second key set is obtained, where the second key set is used for security protection of relay discovery data.
[0055] Optionally, after receiving the first DCR message sent by the first terminal, the method further includes:
[0056] If the first discovery indication information indicates that the first DCR message includes first relay discovery data, security verification is performed on the first relay discovery data according to the second key.
[0057] Optionally, after generating the second DCR message according to the first DCR message, the method further includes:
[0058] When the second discovery indication information indicates that the second DCR message includes second relay discovery data, the second key set is used to perform security protection on the second DCR message.
[0059] Optionally, the second relay discovery data includes at least one of the following:
[0060] a third proximity service query code associated with the second key set;
[0061] third security information used to establish a security association between the relay terminal and the second terminal;
[0062] third auxiliary information used to establish a PC5 connection between the relay terminal and the second terminal;
[0063] A third MIC generated using the second key set.
[0064] Optionally, using the second key set to securely protect the second DCR message includes at least one of the following:
[0065] Generate a third MIC using the integrity protection key in the second key set, where the third MIC is used to perform integrity protection on the fifth part of information in the second DCR message, where the fifth part of information includes all data sent by the relay terminal to the second terminal, where the all data includes the second relay discovery data;
[0066] The confidentiality protection key in the second key set is used to protect the confidentiality of the sixth part of information in the second DCR message, where the sixth part of information includes: data that the relay terminal is allowed to directly forward to the second terminal, and privacy data allowed to be shared among the first terminal, the relay terminal and the second terminal, and the privacy data includes the privacy data in the second relay discovery data.
[0067] An embodiment of the present application also provides a direct communication method, including:
[0068] The second terminal receives a second DCR message sent by the relay terminal;
[0069] The second DCR message includes second discovery indication information, and the second discovery indication information is used to indicate whether the second DCR message includes discovery data or does not include discovery data.
[0070] Optionally, the second DCR message includes discovery data, including one of the following:
[0071] The second DCR message includes direct discovery data;
[0072] The second DCR message includes second relay discovery data;
[0073] The second DCR message includes direct discovery data and second relay discovery data.
[0074] Optionally, the method further includes:
[0075] A first key set and a second key set are obtained, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
[0076] Optionally, the directly discovered data includes at least one of the following:
[0077] a first proximity service query code associated with the first key set;
[0078] first security information used to establish a security association between the first terminal and the second terminal;
[0079] First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal;
[0080] A first MIC is generated using the first key set.
[0081] Optionally, the second relay discovery data includes at least one of the following:
[0082] a third proximity service query code associated with the second key set;
[0083] third security information used to establish a security association between the relay terminal and the second terminal;
[0084] third auxiliary information used to establish a PC5 connection between the relay terminal and the second terminal;
[0085] A third MIC generated using the second key set.
[0086] Optionally, after receiving the second DCR message sent by the relay terminal, the method further includes at least one of the following:
[0087] If the second discovery indication information indicates that the second DCR message includes second relay discovery data, performing security verification on the second relay discovery data according to the second key;
[0088] If the second discovery indication information indicates that the second DCR message includes direct discovery data, security verification is performed on the direct discovery data according to the first key.
[0089] An embodiment of the present application provides a terminal, including: a memory, a transceiver, and a processor:
[0090] A memory for storing a computer program; a transceiver for receiving and sending data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations:
[0091] Generate a first direct communication request DCR message;
[0092] Sending a first DCR message to the relay terminal;
[0093] The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate whether the first DCR message includes discovery data or does not include discovery data.
[0094] Optionally, the first DCR message includes discovery data, including one of the following:
[0095] The first DCR message includes direct discovery data;
[0096] The first DCR message includes first relay discovery data;
[0097] The first DCR message includes direct discovery data and first relay discovery data.
[0098] Optionally, the processor is configured to read the computer program in the memory and perform the following operations:
[0099] A first key set and a second key set are obtained, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
[0100] Optionally, the processor is configured to read the computer program in the memory and perform one of the following operations:
[0101] When the first discovery indication information indicates that the first DCR message includes direct discovery data, using the first key set to securely protect the first DCR message;
[0102] When the first discovery indication information indicates that the first DCR message includes first relay discovery data, using the second key set to perform security protection on the first DCR message;
[0103] When the first discovery indication information indicates that the first DCR message includes direct discovery data and first relay discovery data, the first DCR message is securely protected using the first key set and the second key set, respectively.
[0104] Optionally, the directly discovered data includes at least one of the following:
[0105] a first proximity service query code associated with the first key set;
[0106] first security information used to establish a security association between the first terminal and the second terminal;
[0107] First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal;
[0108] A first message integrity protection code MIC is generated using the first key set.
[0109] Optionally, the first relay discovery data includes at least one of the following:
[0110] a second proximity service query code associated with a second key set;
[0111] second security information used to establish a security association between the first terminal and the relay terminal;
[0112] Second auxiliary information used to establish a PC5 connection between the first terminal and the relay terminal;
[0113] A second MIC generated using the second key set.
[0114] Optionally, the processor is configured to read the computer program in the memory and perform at least one of the following operations:
[0115] Generate a first MIC using the integrity protection key in the first key set, where the first MIC is used to perform integrity protection on a first portion of information in the first DCR message, where the first portion of information includes part or all of data sent by the first terminal to the second terminal, where the part or all of the data includes the direct discovery data;
[0116] The second part of information in the first DCR message is confidentially protected by using the confidentiality protection key in the first key set, where the second part of information includes private data sent by the first terminal to the second terminal, and the private data includes private data in the direct discovery data.
[0117] Optionally, the processor is configured to read the computer program in the memory and perform at least one of the following operations:
[0118] Generate a second MIC using the integrity protection key in the second key set, where the second MIC is used to perform integrity protection on the third part of information in the first DCR message, where the third part of information includes all data sent by the first terminal to the relay terminal, where the all data includes the first relay discovery data;
[0119] The fourth part of information in the first DCR message is protected for confidentiality using the confidentiality protection key in the second key set, where the fourth part of information includes: data that the relay terminal is allowed to directly forward to the second terminal, and privacy data that is allowed to be shared among the first terminal, the relay terminal, and the second terminal, where the privacy data includes the privacy data in the first relay discovery data.
[0120] An embodiment of the present application provides a terminal, including: a memory, a transceiver, and a processor:
[0121] A memory for storing a computer program; a transceiver for receiving and sending data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations:
[0122] Receiving a first DCR message sent by a first terminal;
[0123] generating a second DCR message according to the first DCR message;
[0124] Sending the second DCR message to the second terminal;
[0125] The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate that the first DCR message includes discovery data or does not include discovery data;
[0126] The second DCR message includes second discovery indication information, where the second discovery indication information is used to indicate that the second DCR message includes discovery data or does not include discovery data.
[0127] Optionally, the first DCR message includes discovery data, including one of the following:
[0128] The first DCR message includes direct discovery data;
[0129] The first DCR message includes first relay discovery data;
[0130] The first DCR message includes direct discovery data and first relay discovery data.
[0131] Optionally, the second DCR message includes discovery data, including one of the following:
[0132] The second DCR message includes direct discovery data;
[0133] The second DCR message includes second relay discovery data;
[0134] The second DCR message includes direct discovery data and second relay discovery data.
[0135] Optionally, the directly discovered data includes at least one of the following:
[0136] a first proximity service query code associated with the first key set;
[0137] first security information used to establish a security association between the first terminal and the second terminal;
[0138] First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal;
[0139] A first MIC is generated using the first key set.
[0140] Optionally, the processor is configured to read the computer program in the memory and perform the following operations:
[0141] A second key set is obtained, where the second key set is used for security protection of relay discovery data.
[0142] Optionally, the processor is configured to read the computer program in the memory and perform the following operations:
[0143] If the first discovery indication information indicates that the first DCR message includes first relay discovery data, security verification is performed on the first relay discovery data according to the second key.
[0144] Optionally, the processor is configured to read the computer program in the memory and perform the following operations:
[0145] When the second discovery indication information indicates that the second DCR message includes second relay discovery data, the second key set is used to perform security protection on the second DCR message.
[0146] Optionally, the second relay discovery data includes at least one of the following:
[0147] a third proximity service query code associated with the second key set;
[0148] third security information used to establish a security association between the relay terminal and the second terminal;
[0149] third auxiliary information used to establish a PC5 connection between the relay terminal and the second terminal;
[0150] A third MIC generated using the second key set.
[0151] Optionally, the processor is configured to read the computer program in the memory and perform at least one of the following operations:
[0152] Generate a third MIC using the integrity protection key in the second key set, where the third MIC is used to perform integrity protection on the fifth part of information in the second DCR message, where the fifth part of information includes all data sent by the relay terminal to the second terminal, where the all data includes the second relay discovery data;
[0153] The confidentiality protection key in the second key set is used to protect the confidentiality of the sixth part of information in the second DCR message, where the sixth part of information includes: data that the relay terminal is allowed to directly forward to the second terminal, and privacy data allowed to be shared among the first terminal, the relay terminal and the second terminal, and the privacy data includes the privacy data in the second relay discovery data.
[0154] An embodiment of the present application provides a terminal, including: a memory, a transceiver, and a processor:
[0155] A memory for storing a computer program; a transceiver for receiving and sending data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations:
[0156] receiving a second DCR message sent by the relay terminal;
[0157] The second DCR message includes second discovery indication information, and the second discovery indication information is used to indicate whether the second DCR message includes discovery data or does not include discovery data.
[0158] Optionally, the second DCR message includes discovery data, including one of the following:
[0159] The second DCR message includes direct discovery data;
[0160] The second DCR message includes second relay discovery data;
[0161] The second DCR message includes direct discovery data and second relay discovery data.
[0162] Optionally, the processor is configured to read the computer program in the memory and perform the following operations:
[0163] A first key set and a second key set are obtained, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
[0164] Optionally, the directly discovered data includes at least one of the following:
[0165] a first proximity service query code associated with the first key set;
[0166] first security information used to establish a security association between the first terminal and the second terminal;
[0167] First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal;
[0168] A first MIC is generated using the first key set.
[0169] Optionally, the second relay discovery data includes at least one of the following:
[0170] a third proximity service query code associated with the second key set;
[0171] third security information used to establish a security association between the relay terminal and the second terminal;
[0172] third auxiliary information used to establish a PC5 connection between the relay terminal and the second terminal;
[0173] A third MIC generated using the second key set.
[0174] Optionally, the processor is configured to read the computer program in the memory and perform at least one of the following operations:
[0175] If the second discovery indication information indicates that the second DCR message includes second relay discovery data, performing security verification on the second relay discovery data according to the second key;
[0176] If the second discovery indication information indicates that the second DCR message includes direct discovery data, security verification is performed on the direct discovery data according to the first key.
[0177] An embodiment of the present application provides a direct communication device, applied to a first terminal, including:
[0178] A first information generating unit, configured to generate a first direct communication request DCR message;
[0179] A first sending unit, configured to send a first DCR message to the relay terminal;
[0180] The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate whether the first DCR message includes discovery data or does not include discovery data.
[0181] An embodiment of the present application provides a direct communication device, applied to a relay terminal, including:
[0182] A first receiving unit, configured to receive a first DCR message sent by a first terminal;
[0183] A second information generating unit, configured to generate a second DCR message according to the first DCR message;
[0184] A second sending unit, configured to send the second DCR message to the second terminal;
[0185] The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate that the first DCR message includes discovery data or does not include discovery data;
[0186] The second DCR message includes second discovery indication information, where the second discovery indication information is used to indicate that the second DCR message includes discovery data or does not include discovery data.
[0187] An embodiment of the present application provides a direct communication device, applied to a second terminal, including:
[0188] A second receiving unit, configured to receive a second DCR message sent by the relay terminal;
[0189] The second DCR message includes second discovery indication information, and the second discovery indication information is used to indicate whether the second DCR message includes discovery data or does not include discovery data.
[0190] An embodiment of the present application provides a processor-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned direct communication method are implemented.
[0191] The beneficial effects of the above technical solution of the present application are:
[0192] In an embodiment of the present application, the first DCR message generated by the first terminal includes first discovery indication information, and the first discovery indication information can indicate whether the first DCR message includes discovery data. By integrating the discovery process of neighboring communication into the unicast link establishment process in the relay scenario of U2U, the relay UE discovery and target UE discovery in the direct communication establishment process are realized. By adding discovery indication information to indicate whether the DCR message contains discovery data, maximum flexibility can be provided for different application modes and scenarios of the discovery function. BRIEF DESCRIPTION OF THE DRAWINGS
[0193] Figure 1 A schematic diagram showing a flow chart of a direct communication method according to an embodiment of the present application;
[0194] Figure 2 A second flowchart of the direct communication method according to an embodiment of the present application is shown;
[0195] Figure 3 A schematic diagram showing the structure of a first DCR message according to an embodiment of the present application;
[0196] Figure 4 A schematic diagram showing the structure of a second DCR message according to an embodiment of the present application;
[0197] Figure 5 A third flowchart of the direct communication method according to an embodiment of the present application is shown;
[0198] Figure 6 A fourth flowchart of the direct communication method according to an embodiment of the present application is shown;
[0199] Figure 7 A schematic diagram showing a structure of a direct communication device according to an embodiment of the present application;
[0200] Figure 8 A second structural diagram showing a direct communication device according to an embodiment of the present application;
[0201] Fig. 9 A third structural diagram showing a direct communication device according to an embodiment of the present application;
[0202] Fig.10 One of the schematic diagrams showing the structure of the terminal according to the embodiment of the present application;
[0203] Fig.11 A second schematic diagram showing the structure of a terminal according to an embodiment of the present application;
[0204] Fig.12 The third structural diagram of the terminal according to the embodiment of the present application. DETAILED DESCRIPTION
[0205] In order to make the technical problems, technical solutions and advantages to be solved by the application clearer, the following will be described in detail in conjunction with the accompanying drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided only to help fully understand the embodiments of the application. Therefore, it should be clear to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the application. In addition, for clarity and brevity, the description of known functions and structures has been omitted.
[0206] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0207] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0208] 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.
[0209] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.
[0210] 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.
[0211] The embodiments of the present application provide a direct communication method, device and terminal to solve the problem of realizing the discovery of relay UE and target UE during the process of establishing a relay connection.
[0212] Among them, the method and the device are based on the same application concept. Since the method and the device solve the problem in a similar principle, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.
[0213] like Figure 1 As shown, an embodiment of the present application provides a direct communication method, which is applied to a first terminal, and the method specifically includes the following steps:
[0214] Step 101: A first terminal generates a first direct communication request DCR message;
[0215] Step 102: The first terminal sends a first DCR message to the relay terminal;
[0216] The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate whether the first DCR message includes discovery data or does not include discovery data.
[0217] In this embodiment, the first terminal may be a source UE (Source UE), i.e., the initiator of direct communication, and the source UE expects to find a target UE (Target UE) and establish a communication link with it. The first terminal discovers the target UE through a relay terminal and establishes a communication connection with the target UE through the relay terminal. The target UE is referred to as a second terminal in this embodiment of the application.
[0218] The first terminal generates a first DCR message, and the first DCR message is a direct communication request message that the first terminal needs to send to the relay terminal. A discovery indication field is set in the first DCR message, and the discovery indication field includes first discovery indication information. The first discovery indication information may indicate whether the first DCR message includes discovery data. Optionally, the discovery data may include direct discovery data and / or relay discovery data. Direct discovery data is discovery data sent by the first terminal to the second terminal, and relay discovery data may be discovery data sent by the first terminal to the relay terminal.
[0219] In an embodiment of the present application, the first DCR message generated by the first terminal includes first discovery indication information, and the first discovery indication information can indicate whether the first DCR message includes discovery data. By integrating the discovery process of neighboring communication into the unicast link establishment process in the relay scenario of U2U, the relay UE discovery and target UE discovery in the direct communication establishment process are realized. By adding discovery indication information to indicate whether the DCR message contains discovery data, maximum flexibility can be provided for different application modes and scenarios of the discovery function.
[0220] Optionally, the first DCR message includes discovery data, including one of the following:
[0221] The first DCR message includes direct discovery data;
[0222] The first DCR message includes first relay discovery data;
[0223] The first DCR message includes direct discovery data and first relay discovery data.
[0224] In this embodiment, the first discovery indication information in the first DCR message can be used to indicate that the first DCR message does not include discovery data, or indicates that the first DCR message includes direct discovery data, or indicates that the first DCR message includes first relay discovery data, or indicates that the first DCR message includes direct discovery data and first relay discovery data. Optionally, the discovery data can be constructed using a discovery security mechanism defined by 3GPP, or can be constructed using a custom discovery security mechanism.
[0225] As an optional embodiment, the method further includes:
[0226] A first key set and a second key set are obtained, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
[0227] In this embodiment, the key management function may provide the protection key of the direct discovery data and other related usage parameters and the protection key of the relay discovery data (i.e., the first key set) and other related usage parameters to the first terminal and the second terminal. The key management function may also provide the protection key of the relay discovery data (i.e., the second key set) and related usage parameters to the relay terminal. The related usage parameters are, for example, query codes, counters, etc. Before sending the first DCR message, the first terminal may use the first key set to perform security protection on the first DCR message, and / or use the second key set to perform security protection on the first DCR message.
[0228] Specifically, the first key set (Key Set 1) is a key set for protecting direct discovery data between the source UE (i.e., the first terminal) and the target UE (i.e., the second terminal). The first key set includes a key for providing confidentiality protection, a key for integrity protection, and an information scrambling key. In an embodiment of the present application, a symmetric key technology is used, so the key value of the message sender is the same as the key value of the message receiver.
[0229] The second key set (Key Set2) is a key set for protecting relay discovery data between the source UE (i.e., the first terminal), the target UE (i.e., the second terminal), and the relay UE (Relay UE). The second key set includes keys for providing confidentiality protection, keys for integrity protection, and information scrambling keys. The key value of the message sender is the same as the key value of the message receiver.
[0230] ProSe supports three message protection modes: confidentiality protection (implemented through data encryption), integrity protection (used to ensure that data has not been tampered with), and scrambling protection (used to ensure that all messages sent are unique). The specific message protection mode used can be one or a combination of the above three protection modes.
[0231] Optionally, the directly discovered data includes at least one of the following:
[0232] (1) A first proximity service query code (ProSe Query Code 1) associated with a first key set; the first proximity service query code is a ProSe query code used for a direct discovery procedure between the first terminal and the second terminal.
[0233] (2) First security information used to establish a security association between the first terminal and the second terminal; the first security information includes parameters used when the first terminal and the second terminal establish a security association, such as: a key identifier of a key used when establishing a security association, a public key certificate of the first terminal, a security token of the first terminal, a random number, etc., which are not limited here.
[0234] (3) First auxiliary information for establishing a PC5 connection between the first terminal and the second terminal; the first auxiliary information may be used to carry parameters not defined in the DCR for establishing a PC5 connection communication between the first terminal and the second terminal, for example, application identifiers or other parameters of the first terminal and the second terminal when establishing a PC5 connection, which are not limited here.
[0235] (4) A first message integrity protection code MIC generated by the first key set is used to protect the integrity of the message and prevent tampering during the communication process.
[0236] Optionally, the direct discovery data may also include: the least significant bit (Least Significant Bit, LSB), which can be called the bit number 1 (UTC-based Counter LSB1) based on the coordinated universal time (Universal Time Coordinated, UTC) counter starting from the low bit, and the bit number is the time parameter associated with the first key set.
[0237] As an optional embodiment, the first relay discovery data includes at least one of the following:
[0238] (A) A second proximity service query code (ProSe Query Code 2) associated with a second key set; the second proximity service query code is a ProSe query code used in a relay discovery process between the first terminal, the second terminal, and the relay terminal.
[0239] (B) Second security information used to establish a security association between the first terminal and the relay terminal; the second security information includes parameters used when the first terminal and the relay terminal establish a security association, such as: a key identifier of a key used when establishing a security association, a public key certificate of the first terminal, a security token of the first terminal, a random number, etc.
[0240] (C) Second auxiliary information used to establish a PC5 connection between the first terminal and the relay terminal; the second auxiliary information can be used to carry parameters not defined in the DCR for the first terminal and the relay terminal to establish a PC5 connection communication, for example: application identifiers or other parameters of the first terminal and the relay terminal when establishing a PC5 connection, which are not limited here.
[0241] (D) The second MIC generated by the second key set is used to protect the integrity of the message and prevent tampering during the communication process.
[0242] Optionally, the first relay discovery data may further include: UTC-based Counter LSB2, the number of bits of the UTC-based counter starting from the low bit: a time parameter associated with the second key set.
[0243] In this embodiment, the first proximity service query code and the second proximity service query code are related to the ProSe application and the ProSe user. A portion of the proximity service query code is used by the receiving UE to monitor the identification information of the message sent by the sending UE, and this portion of the content is not encrypted; another portion of the content may be related to privacy and needs to be encrypted. The key for protecting the direct discovery data is associated with the ProSe query code.
[0244] The number of bits of the UTC-based counter starting from the low order (UTC-based Counter LSB): This is a time parameter associated with the key set for protecting discovery data. It is used to allow the clock of the sender UE and the clock of the receiver UE to have a certain amount of asynchronous space, but must be within the specified range of this value to avoid possible replay attacks.
[0245] As an optional embodiment, after generating the first DCR message, the method further includes the following item:
[0246] When the first discovery indication information indicates that the first DCR message includes direct discovery data, using the first key set to securely protect the first DCR message;
[0247] When the first discovery indication information indicates that the first DCR message includes first relay discovery data, using the second key set to perform security protection on the first DCR message;
[0248] When the first discovery indication information indicates that the first DCR message includes direct discovery data and first relay discovery data, the first DCR message is securely protected using the first key set and the second key set, respectively.
[0249] In this embodiment, the first terminal generates a first DCR message and provides security protection for the first DCR message. Specifically, if the first discovery indication information indicates that the first DCR message includes direct discovery data, the first key set can be used to perform security protection on the first DCR message; if the first discovery indication information indicates that the first DCR message includes first relay discovery data, the second key set can be used to perform security protection on the first DCR message. If the first discovery indication information indicates that the first DCR message includes direct discovery data and first relay discovery data, the first terminal can use the first key set and the second key set to perform security protection on the first DCR message, respectively.
[0250] Optionally, using the first key set to securely protect the first DCR message includes at least one of the following:
[0251] 1) Generate a first MIC using the integrity protection key in the first key set, where the first MIC is used to perform integrity protection on a first portion of information in the first DCR message, where the first portion of information includes part or all of data sent by the first terminal to the second terminal, where the part or all of the data includes the direct discovery data.
[0252] 2) Using the confidentiality protection key in the first key set to perform confidentiality protection on the second part of information in the first DCR message, the second part of information includes private data sent by the first terminal to the second terminal, and the private data includes private data in the direct discovery data.
[0253] In this embodiment, the first key set includes an integrity protection key and a confidentiality protection key, wherein the integrity protection key is used to calculate MIC1 (i.e., the first MIC). The calculation object of MIC1 is composed of all or part of the data that the first terminal wants to send to the second terminal. The protection scope of MIC1 may include: RSC, the identification (IdentityDocument, ID) of the first terminal, the ID of the second terminal, the first proximity service query code, Counter LSB1, and other data to be sent to the second terminal, such as: various parameters for DCR that the first terminal needs to send to the second terminal. The protection scope of the first MIC includes direct discovery data, thereby realizing integrity protection of direct discovery data in the U2U scenario.
[0254] The confidentiality protection key in the first key set can be used to protect the confidentiality of privacy-related data that the first terminal only sends to the second terminal, such as the privacy-related content in the first proximity service query code and various parameters for DCR that need to be sent to the second terminal. The privacy-related content includes privacy data in the direct discovery data, so as to achieve confidentiality protection of the direct discovery data. By protecting the discovery data, the security of the U2U UE can be guaranteed when it is out of network coverage.
[0255] Optionally, using the second key set to securely protect the first DCR message includes at least one of the following:
[0256] 1) generating a second MIC using the integrity protection key in the second key set, where the second MIC is used to perform integrity protection on the third part of information in the first DCR message, where the third part of information includes all data sent by the first terminal to the relay terminal, where the all data includes the first relay discovery data;
[0257] 2) Using the confidentiality protection key in the second key set to protect the confidentiality of the fourth part of information in the first DCR message, the fourth part of information includes: data allowed to be directly forwarded by the relay terminal to the second terminal, and privacy data allowed to be shared among the first terminal, the relay terminal and the second terminal, and the privacy data includes the privacy data in the first relay discovery data.
[0258] In this embodiment, the second key set includes an integrity protection key and a confidentiality protection key, wherein the integrity protection key is used to calculate MIC2 (i.e., the second MIC). The calculation object of MIC2 is composed of all data that the first terminal needs to send to the relay terminal, including the first relay discovery data, so as to realize the integrity protection of the relay discovery data in the U2U scenario.
[0259] The confidentiality protection key in the second key set can be used to protect the confidentiality of the data in the first DCR message that can be directly forwarded to the second terminal, and the sensitive data that needs to be shared between the first terminal, the second terminal and the relay terminal, such as the ID of the first terminal, the ID of the second terminal, the ID of the relay terminal, and the privacy-related content that constitutes the second proximity service query code. The privacy-related content includes the privacy data in the first relay discovery data, so as to realize the confidentiality protection of the relay discovery data. By performing security protection on the discovery data, the security of the U2U UE can be guaranteed when it is out of network coverage.
[0260] The first terminal sends the first DCR message with security protection to the relay terminal. After receiving the first DCR message, the relay terminal can generate a second DCR message according to the information content therein, and the second DCR message includes second discovery indication information, and the second discovery indication information is used to indicate that the second DCR message includes discovery data or does not include discovery data. The relay terminal sends the second DCR message to the second terminal, so that the second terminal performs subsequent processing according to the second DCR message, such as establishing a communication connection with the relay terminal and the first terminal.
[0261] The following is a description of the basic process of the method for integrating the neighboring communication discovery process into the PC5 unicast link establishment process in the embodiment of the present application. Figure 2 As shown, including:
[0262] Step 21, the key management function provides the direct discovery data protection key (i.e., the first key set) and related usage parameters and the relay discovery data protection key (i.e., the second key set) and related usage parameters to the source UE (i.e., the first terminal) and the target UE (i.e., the second terminal).
[0263] The key management function may also provide the relay discovery data protection key (i.e., the second key set) and related usage parameters to the relay UE. The source UE is the first terminal, the target UE is the second terminal, and the source UE establishes a communication connection with the target UE through the relay UE.
[0264] Step 22: The source UE generates a direct communication request message 1 and provides security protection for it.
[0265] Step 23: The source UE sends a direct communication request message 1.
[0266] Step 24: The relay UE receives and verifies the direct communication request message 1 sent by the source UE, and then generates a direct communication request message 2 based on the content of the message and provides security protection for it.
[0267] Step 25: The relay UE sends a direct communication request message 2.
[0268] Step 26: The target UE receives and verifies the direct communication request message 2 sent by the relay UE, and the target UE performs other subsequent processing procedures.
[0269] Among them, Figure 3 As shown, the direct communication request message 1 may include one or more of the following information:
[0270] 1) Source UE ID;
[0271] 2) Target UE ID;
[0272] 3) Relay UE ID;
[0273] 4) Relay Indication;
[0274] 5) Relay Service Code (RSC);
[0275] 6) UE PC5 DCR parameters (Parameters for Direct DCR): Parameters used for Source UE to establish a PC5 direct communication connection with Target UE.
[0276] 7) Parameters for Relaying DCR: Parameters used for Source UE / Target UE to establish a PC5 direct communication connection with Relay UE.
[0277] 8) Discovery indication information, which is first discovery indication information and is used to indicate whether the direct communication request message 1 includes discovery data, and the discovery data may be direct discovery data (Direct Discovery Data) and / or first relay discovery data (Relay Discovery Data 1).
[0278] Optionally, the direct discovery data may include one or more of the following fields:
[0279] ProSe Query Code 1: ProSe query code used for the direct discovery procedure between Source UE and Target UE.
[0280] The number of bits of the UTC-based counter starting from the low order 1 (UTC-based Counter LSB1): is the time parameter associated with the first key set (Key Set1).
[0281] Message Integrity Protection Code 1 (MIC1): MIC generated using Key Set 1;
[0282] First security information used to establish a security association between the Source UE and the Target UE, for example, a key identifier of a key used when establishing a security association, a public key certificate of the Source UE, a security token of the Source UE, a random number, etc.;
[0283] The first auxiliary information used to establish a PC5 connection between the Source UE and the Target UE; for example, the application layer identifiers or other parameters of the Source UE and the Target UE when establishing the PC5 connection.
[0284] Optionally, the first relay discovery data may include one or more of the following fields:
[0285] ProSe Query Code 2: ProSe query code used in the relay discovery process between Source UE, Target UE and Relay UE;
[0286] UTC-based Counter LSB2: time parameter associated with the second key set (Key Set2);
[0287] Message Integrity Code 2 (MIC2): MIC generated using Key Set 2;
[0288] Second security information used to establish a security association between the Source UE and the Relay UE; for example, a key identifier of a key used when establishing a security association, a public key certificate of the Source UE, a security token of the Source UE, a random number, etc.;
[0289] The second auxiliary information is used to establish a PC5 connection between the Source UE and the Relay UE; for example, the application layer identifiers or other parameters of the Source UE and the Relay UE when establishing the PC5 connection.
[0290] In this embodiment, the operation of the Source UE generating the direct communication request message 1 includes:
[0291] (a) When the Discovery Indication indicates that the DCR contains Direct Discovery Data, perform the following operations:
[0292] Construct Direct Discovery Data, which includes: Query code1; Counter LSB1; MIC1; first security information; and first auxiliary information.
[0293] The integrity protection key in Key Set1 is used to calculate MIC1. The calculation object of MIC1 consists of all or part of the data that the Source UE wants to send to the Target UE. The protection scope of MIC1 may include: RSC, Source UE ID, Target UE ID, Query Code1, Counter LSB1 and other data to be sent to the Target UE, such as various parameters for DCR that need to be sent to the Target UE.
[0294] The confidentiality protection key in Key Set 1 can be used to protect the confidentiality of privacy-related data sent only to the Target UE, such as the privacy-related content in Query Code 1 and various parameters for DCR that need to be sent to the Target UE.
[0295] (b) When the Discovery Indication indicates that the DCR contains Relay Discovery Data, the following operations are performed: Construct Relay Discovery Data, which includes: Query code 2; Counter LSB2; MIC2; second security information; and second auxiliary information.
[0296] The integrity protection key in Key Set2 is used to calculate MIC2. The calculation object of MIC2 consists of all the data that the Source UE wants to send to the Relay UE.
[0297] The confidentiality protection key in Key Set2 can be used to protect the confidentiality of the data in the direct communication request message 1 that can be directly forwarded to the Target UE, as well as those sensitive data that need to be shared between the Source UE, Target UE and Relay UE, such as Source UE ID, Target UE ID, Relay UEID, and privacy-related content in Query Code2.
[0298] Optionally, after receiving the direct communication request message 1, the Relay UE performs security verification on the message, where the security verification specifically includes:
[0299] If the Discovery Indication information indicates that the request message 1 contains relay discovery data (first relay discovery data), the Relay UE uses the unencrypted part in the Query code 2 to determine whether it is the target message, and uses the Counter LSB2 to determine whether the Key Set 2 is expired. The encrypted data in the message is decrypted using the decryption key in the Key Set 2, and the integrity protection key in the Key Set 2 is used to perform integrity protection verification on the direct communication request message 1, thereby obtaining the plain text of the direct communication request message 1.
[0300] As an optional embodiment, Figure 4 As shown, the direct communication request message 2 may include one or more of the following information:
[0301] 1) Source UE ID;
[0302] 2) Target UE ID;
[0303] 3) Relay UE ID;
[0304] 4) Relay Indication;
[0305] 5) Relay Service Code (RSC);
[0306] 6) UE PC5 DCR parameters (Parameters for Direct DCR): Parameters used for Source UE to establish a PC5 direct communication connection with Target UE.
[0307] 7) Parameters for Relaying DCR: Parameters used for Source UE / Target UE to establish a PC5 direct communication connection with Relay UE.
[0308] 8) Discovery indication information, which is second discovery indication information and is used to indicate whether the direct communication request message 2 includes discovery data, and the discovery data may be direct discovery data (Direct Discovery Data) and / or second relay discovery data (Relay Discovery Data2).
[0309] The fields included in the direct discovery data are not described in detail here. The second relay discovery data may include one or more of the following fields:
[0310] ProSe Query Code 3: ProSe query code used in the relay discovery process between Source UE, Target UE and Relay UE;
[0311] UTC-based Counter LSB3: time parameter associated with the second key set;
[0312] Message Integrity Protection Code 3 (MIC3): MIC generated using Key Set 2;
[0313] Third security information used to establish a security association between the Relay UE and the Target UE;
[0314] The third auxiliary information used to establish a PC5 connection between the Relay UE and the Target UE; for example, the application layer identifier or other parameters of the Relay UE and the Target UE when establishing the PC5 connection.
[0315] In this embodiment, the data structure of the direct communication request message 2 is similar to the data structure of the direct communication request message 1, the difference is that the direct communication request message 2 contains the Relay UE ID, and new relay discovery data (i.e., the second relay discovery data) and other DCR parameters that need to be adjusted need to be regenerated.
[0316] After the Relay UE constructs the direct communication request message 2, it uses Key Set 2 to protect it. The specific operation is similar to the Source UE using Key Set 2 to protect the direct communication request message 1. The protection of the Relay UE ID is the same as that of the Source UE ID and the Target UE ID.
[0317] Optionally, after receiving the direct communication request message 2, the Target UE performs security verification on the direct communication request message 2, and the verification operation may include:
[0318] If the Discovery Indication information indicates that the request message 2 contains relay discovery data (second terminal discovery data), the unencrypted part in Query code 3 is used to determine whether it is a target message, and CounterLSB3 is used to determine whether Key Set 2 has expired. The encrypted data in the message is decrypted using the decryption key in Key Set 2, and the integrity protection key in Key Set 2 is used to perform integrity protection verification on the direct communication request message 2.
[0319] If the Discovery Indication information indicates that the request message 2 contains direct discovery data, the unencrypted part in the Query code 1 is used to determine whether it is the target message, and the Counter LSB 1 is used to determine whether the Key Set 2 is expired. The encrypted data in the message is decrypted using the decryption key in the Key Set 1, and the integrity protection key in the Key Set 1 is used to perform integrity protection verification on the direct communication data, thereby obtaining the plain text of the relevant data.
[0320] This embodiment defines a method that can flexibly control the manner in which the discovery function is implemented, and introduces discovery indication information in the DCR. Based on the discovery indication information, the DCR can adopt different message structures based on actual needs to implement various security levels and discovery methods to meet the needs of different application scenarios. By performing security protection on the discovery data, the security of the U2U UE can be guaranteed when it is out of network coverage.
[0321] In an embodiment of the present application, the first DCR message generated by the first terminal includes first discovery indication information, and the first discovery indication information can indicate whether the first DCR message includes discovery data. By integrating the discovery process of neighboring communication into the unicast link establishment process in the relay scenario of U2U, the relay UE discovery and target UE discovery in the direct communication establishment process are realized. By adding discovery indication information to indicate whether the DCR message contains discovery data, maximum flexibility can be provided for different application modes and scenarios of the discovery function.
[0322] like Figure 5 As shown, the embodiment of the present application also provides a direct communication method, which is applied to a relay terminal, including:
[0323] Step 501: The relay terminal receives a first DCR message sent by the first terminal;
[0324] Step 502: The relay terminal generates a second DCR message according to the first DCR message;
[0325] Step 503: The relay terminal sends the second DCR message to the second terminal;
[0326] The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate that the first DCR message includes discovery data or does not include discovery data;
[0327] The second DCR message includes second discovery indication information, where the second discovery indication information is used to indicate that the second DCR message includes discovery data or does not include discovery data.
[0328] In this embodiment, the first terminal generates a first DCR message, and the first DCR message is a direct communication request message that the first terminal needs to send to the relay terminal. A discovery indication field is set in the first DCR message, and the discovery indication field includes first discovery indication information. The first discovery indication information can indicate whether the first DCR message includes discovery data. Optionally, the discovery data indicated by the first discovery indication information may include direct discovery data and / or first relay discovery data. The direct discovery data is the discovery data sent by the first terminal to the second terminal, and the first relay discovery data may be the discovery data sent by the first terminal to the relay terminal.
[0329] After receiving the first DCR message, the relay terminal generates a second DCR message according to the message content, and the second DCR message is a direct communication request message that the relay terminal needs to send to the second terminal. A discovery indication field is set in the second DCR message, and the discovery indication field includes second discovery indication information. The second discovery indication information can indicate whether the second DCR message includes discovery data. Optionally, the discovery data indicated by the second discovery indication information may include direct discovery data and / or second relay discovery data. After receiving the second DCR message, the second terminal can perform subsequent communication processes according to the message content.
[0330] In an embodiment of the present application, the first DCR message generated by the first terminal includes first discovery indication information, and the first discovery indication information can indicate whether the first DCR message includes discovery data. The relay terminal can generate a second DCR message based on the content of the first DCR message, and send the second DCR message to the second terminal. The second DCR message includes second discovery indication information, and the second discovery indication information can indicate whether the second DCR message includes discovery data. By integrating the discovery process of neighboring communication into the unicast link establishment process under the relay scenario of U2U, the relay UE discovery and target UE discovery in the direct communication establishment process are realized. By adding discovery indication information to indicate whether the DCR message contains discovery data, maximum flexibility can be provided for different application modes and scenarios of the discovery function.
[0331] Optionally, the first DCR message includes discovery data, including one of the following:
[0332] The first DCR message includes direct discovery data;
[0333] The first DCR message includes first relay discovery data;
[0334] The first DCR message includes direct discovery data and first relay discovery data.
[0335] In this embodiment, the first discovery indication information in the first DCR message can be used to indicate that the first DCR message does not include discovery data, or indicates that the first DCR message includes direct discovery data, or indicates that the first DCR message includes first relay discovery data, or indicates that the first DCR message includes direct discovery data and first relay discovery data. Optionally, the discovery data can be constructed using a discovery security mechanism defined by 3GPP, or can be constructed using a custom discovery security mechanism.
[0336] Optionally, the second DCR message includes discovery data, including one of the following:
[0337] The second DCR message includes direct discovery data;
[0338] The second DCR message includes second relay discovery data;
[0339] The second DCR message includes direct discovery data and second relay discovery data.
[0340] In this embodiment, the second discovery indication information in the second DCR message can be used to indicate that the second DCR message does not include discovery data, or indicates that the second DCR message includes direct discovery data, or indicates that the second DCR message includes second relay discovery data, or indicates that the second DCR message includes direct discovery data and second relay discovery data. Optionally, the discovery data can be constructed using a discovery security mechanism defined by 3GPP, or can be constructed using a custom discovery security mechanism.
[0341] As an optional embodiment, the directly discovered data includes at least one of the following:
[0342] (1) A first proximity service query code associated with a first key set; the first proximity service query code is a ProSe query code used for a direct discovery procedure between the first terminal and the second terminal.
[0343] (2) First security information used to establish a security association between the first terminal and the second terminal; the first security information includes parameters used when the first terminal and the second terminal establish a security association, such as: a key identifier of a key used when establishing a security association, a public key certificate of the first terminal, a security token of the first terminal, a random number, etc., which are not limited here.
[0344] (3) First auxiliary information for establishing a PC5 connection between the first terminal and the second terminal; the first auxiliary information may be used to carry parameters not defined in the DCR for establishing a PC5 connection communication between the first terminal and the second terminal, for example, application identifiers or other parameters of the first terminal and the second terminal when establishing a PC5 connection, which are not limited here.
[0345] (4) A first MIC generated by using the first key set is used to protect the integrity of the message and prevent tampering during the communication process.
[0346] Optionally, the direct discovery data may further include: a UTC-based counter LSB1 bit number, which is a time parameter associated with the first key set.
[0347] As an optional embodiment, the first relay discovery data includes at least one of the following:
[0348] (A) A second proximity service query code (ProSe Query Code 2) associated with a second key set; the second proximity service query code is a ProSe query code used in a relay discovery process between the first terminal, the second terminal, and the relay terminal.
[0349] (B) Second security information used to establish a security association between the first terminal and the relay terminal; the second security information includes parameters used when the first terminal and the relay terminal establish a security association, such as: a key identifier of a key used when establishing a security association, a public key certificate of the first terminal, a security token of the first terminal, a random number, etc.
[0350] (C) Second auxiliary information used to establish a PC5 connection between the first terminal and the relay terminal; the second auxiliary information can be used to carry parameters not defined in the DCR for the first terminal and the relay terminal to establish a PC5 connection communication, for example: application identifiers or other parameters of the first terminal and the relay terminal when establishing a PC5 connection, which are not limited here.
[0351] (D) The second MIC generated by the second key set is used to protect the integrity of the message and prevent tampering during the communication process.
[0352] Optionally, the first relay discovery data may further include: UTC-based Counter LSB2, the number of bits of the UTC-based counter starting from the low bit: a time parameter associated with the second key set.
[0353] As an optional embodiment, the method further includes: acquiring a second key set, where the second key set is used for security protection of relay discovery data.
[0354] In this embodiment, the key management function may provide the relay terminal with the protection key (i.e., the second key set) of the relay discovery data and related usage parameters. The related usage parameters are, for example, a query code, a counter, etc. The relay terminal may use the second key set to perform security protection on the second DCR message before sending the second DCR message.
[0355] Optionally, after receiving the first DCR message sent by the first terminal, the method further includes:
[0356] If the first discovery indication information indicates that the first DCR message includes first relay discovery data, security verification is performed on the first relay discovery data according to the second key.
[0357] In this embodiment, in order to ensure the security of data during transmission, after the relay terminal receives the first DCR message, if the first discovery indication information in the first DCR message indicates that the first DCR message includes the first relay discovery data, the relay terminal can perform security verification on the first relay discovery data according to the second key set. For example: if the Discovery Indication information indicates that the first DCR message contains the first relay discovery data, the Relay UE uses the unencrypted part in the Query code2 to determine whether it is the target message, and uses the Counter LSB2 to determine whether the Key Set2 is expired. The encrypted data in the message is decrypted using the decryption key in Key Set2, and the integrity protection key in Key Set2 is used to perform integrity protection verification on the first DCR message, thereby obtaining the plaintext of the first DCR message.
[0358] Optionally, the second relay discovery data includes at least one of the following:
[0359] (1) A third proximity service query code (ProSe Query Code 3) associated with the second key set; the third proximity service query code is a ProSe query code used in a relay discovery process between the first terminal, the second terminal, and the relay terminal.
[0360] (2) third security information used to establish a security association between the relay terminal and the second terminal; the third security information includes parameters used when the relay terminal and the second terminal establish a security association, for example: a key identifier of a key used when establishing a security association, a public key certificate of the relay terminal, a security token of the relay terminal, a random number, etc.
[0361] (3) Third auxiliary information for establishing a PC5 connection between the relay terminal and the second terminal; the third auxiliary information may be used to carry parameters not defined in the DCR for establishing a PC5 connection communication between the relay terminal and the second terminal, for example, application identifiers or other parameters of the relay terminal and the second terminal when establishing a PC5 connection, which are not limited here.
[0362] (4) The third MIC generated by the second key set is used to protect the integrity of the message and prevent tampering during the communication process.
[0363] Optionally, the second relay discovery data may further include: UTC-based Counter LSB3, which is the number of bits of the UTC-based counter starting from the low bit: a time parameter associated with the second key set.
[0364] In this embodiment, the third proximity service query code is related to the ProSe application and the ProSe user. A portion of the proximity service query code is used by the receiving UE to monitor the identification information of the message sent by the sending UE, and this portion of the content is not encrypted; another portion of the content may be related to privacy and needs to be encrypted. The key for protecting the direct discovery data is associated with the ProSe query code.
[0365] The number of bits of the UTC-based counter starting from the low order: a time parameter associated with the key set for protecting discovery data. This is used to allow the clock of the sender UE and the clock of the receiver UE to have a certain amount of desynchronization space, but must be within the specified range of this value to avoid possible replay attacks.
[0366] Optionally, after generating the second DCR message according to the first DCR message, the method further includes: when the second discovery indication information indicates that the second DCR message includes second relay discovery data, using the second key set to securely protect the second DCR message.
[0367] In this embodiment, the relay terminal generates a second DCR message and provides security protection for the second DCR message. If the second discovery indication information indicates that the second DCR message includes second relay discovery data, the second key set may be used to provide security protection for the second DCR message.
[0368] Optionally, using the second key set to securely protect the second DCR message includes at least one of the following:
[0369] Generate a third MIC using the integrity protection key in the second key set, where the third MIC is used to perform integrity protection on the fifth part of information in the second DCR message, where the fifth part of information includes all data sent by the relay terminal to the second terminal, where the all data includes the second relay discovery data;
[0370] The confidentiality protection key in the second key set is used to protect the confidentiality of the sixth part of information in the second DCR message, where the sixth part of information includes: data that the relay terminal is allowed to directly forward to the second terminal, and privacy data allowed to be shared among the first terminal, the relay terminal and the second terminal, and the privacy data includes the privacy data in the second relay discovery data.
[0371] In this embodiment, the data structure of the second DCR message is similar to that of the first DCR message, except that the second DCR message includes the Relay UE ID, and new relay discovery data (ie, the second relay discovery data) and other DCR parameters that need to be adjusted need to be regenerated.
[0372] The second key set includes an integrity protection key and a confidentiality protection key, wherein the integrity protection key is used to calculate MIC3 (i.e., the third MIC). The calculation object of MIC3 is composed of all data that the relay terminal needs to send to the second terminal, including the second relay discovery data, so as to realize the integrity protection of the relay discovery data in the U2U scenario.
[0373] The confidentiality protection key in the second key set can be used to protect the confidentiality of sensitive data that needs to be shared between the first terminal, the second terminal and the relay terminal, such as the ID of the first terminal, the ID of the second terminal, the ID of the relay terminal, and the privacy-related content that constitutes the third proximity service query code. The privacy-related content includes the privacy data in the second relay discovery data, so as to realize the confidentiality protection of the relay discovery data. By performing security protection on the discovery data, the security of the U2U UE can be guaranteed when it is out of network coverage.
[0374] The relay terminal sends the second DCR message with security protection to the second terminal. After the second terminal receives the second DCR message, if the second discovery indication information indicates that the second DCR message includes the second relay discovery data, the second terminal can perform security verification on the second relay discovery data. If the second discovery indication information indicates that the second DCR message includes the direct discovery data, the second terminal can perform security verification on the direct discovery data.
[0375] For example: if the Discovery Indication information indicates that the second DCR message contains the second relay discovery data, the unencrypted part in Query code3 is used to determine whether it is the target message, and Counter LSB3 is used to determine whether KeySet2 is expired. The encrypted data in the message is decrypted using the decryption key in Key Set2, and the integrity protection key in Key Set2 is used to perform integrity protection verification on the second DCR message.
[0376] If the Discovery Indication information indicates that the second DCR message contains direct discovery data, the unencrypted part in Query code1 is used to determine whether it is a target message, and Counter LSB1 is used to determine whether Key Set1 is expired. The encrypted data in the message is decrypted using the decryption key in Key Set1, and the integrity protection key in Key Set1 is used to perform integrity protection verification on the direct communication data, thereby obtaining the plain text of the relevant data.
[0377] After the second terminal performs security verification on the data included in the second DCR message, the second terminal may execute subsequent communication processes, such as establishing a communication connection between the first terminal, the relay terminal, and the second terminal and executing information transmission.
[0378] The basic flow of the method of integrating the neighboring communication discovery process into the PC5 unicast link establishment process in the embodiment of the present application is as follows: Figure 2 As shown, no further elaboration is given here.
[0379] The structure of the direct communication request message 2 (i.e., the second DCR message) is as follows: Figure 4 As shown, it may include one or more of the following information:
[0380] 1) Source UE ID;
[0381] 2) Target UE ID;
[0382] 3) Relay UE ID;
[0383] 4) Relay Indication;
[0384] 5) Relay Service Code (RSC);
[0385] 6) UE PC5 DCR parameters (Parameters for Direct DCR): Parameters used for Source UE to establish a PC5 direct communication connection with Target UE.
[0386] 7) Parameters for Relaying DCR: Parameters used for Source UE / Target UE to establish a PC5 direct communication connection with Relay UE.
[0387] 8) Discovery indication information, which is second discovery indication information and is used to indicate whether the direct communication request message 2 includes discovery data, and the discovery data may be direct discovery data (Direct Discovery Data) and / or second relay discovery data (Relay Discovery Data2).
[0388] The fields included in the direct discovery data are not described in detail here. The second relay discovery data may include one or more of the following fields:
[0389] ProSe query code 3: ProSe query code used for relay discovery process between Source UE, Target UE and Relay UE;
[0390] The number of bits of the UTC-based counter starting from the low order 3: the time parameter associated with the second key set;
[0391] Message Integrity Protection Code 3 (MIC3): MIC generated using Key Set 2;
[0392] Third security information used to establish a security association between the Relay UE and the Target UE;
[0393] The third auxiliary information used to establish a PC5 connection between the Relay UE and the Target UE; for example, the application layer identifier or other parameters of the Relay UE and the Target UE when establishing the PC5 connection.
[0394] In an embodiment of the present application, the relay terminal can generate a second DCR message based on the content of the first DCR message, and send the second DCR message to the second terminal, wherein the second DCR message includes second discovery indication information, and the second discovery indication information can indicate whether the second DCR message includes discovery data. By integrating the discovery process of neighboring communication into the unicast link establishment process in the relay scenario of U2U, the relay UE discovery and the target UE discovery in the direct communication establishment process are realized. By adding discovery indication information to indicate whether the DCR message contains discovery data, maximum flexibility can be provided for different application modes and scenarios of the discovery function.
[0395] like Figure 6 As shown, the embodiment of the present application also provides a direct communication method, which is applied to a second terminal, including:
[0396] Step 601: The second terminal receives a second DCR message sent by the relay terminal;
[0397] The second DCR message includes second discovery indication information, and the second discovery indication information is used to indicate whether the second DCR message includes discovery data or does not include discovery data.
[0398] In this embodiment, the second terminal is a target terminal that needs to establish direct communication with the first terminal. The first terminal generates a first DCR message, and the first DCR message is a direct communication request message that the first terminal needs to send to the relay terminal. The relay terminal generates a second DCR message according to the content of the first DCR message, and the second DCR message is a direct communication request message that the relay terminal needs to send to the second terminal. A discovery indication field is set in the second DCR message, and the discovery indication field includes second discovery indication information. The second discovery indication information can indicate whether the second DCR message includes discovery data. Optionally, the discovery data indicated by the second discovery indication information may include direct discovery data and / or second relay discovery data. After receiving the second DCR message, the second terminal can perform subsequent communication processes according to the message content.
[0399] Optionally, the second DCR message includes discovery data, including one of the following:
[0400] The second DCR message includes direct discovery data;
[0401] The second DCR message includes second relay discovery data;
[0402] The second DCR message includes direct discovery data and second relay discovery data.
[0403] In this embodiment, the second discovery indication information in the second DCR message can be used to indicate that the second DCR message does not include discovery data, or indicates that the second DCR message includes direct discovery data, or indicates that the second DCR message includes second relay discovery data, or indicates that the second DCR message includes direct discovery data and second relay discovery data. Optionally, the discovery data can be constructed using a discovery security mechanism defined by 3GPP, or can be constructed using a custom discovery security mechanism.
[0404] As an optional embodiment, the method further includes:
[0405] A first key set and a second key set are obtained, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
[0406] In this embodiment, the key management function may provide the protection key of the direct discovery data and other related usage parameters and the protection key of the relay discovery data (i.e., the first key set) and other related usage parameters to the first terminal and the second terminal. The related usage parameters are, for example, a query code, a counter, etc. The relay terminal may use the second key set to perform security protection on the second DCR message before sending the second DCR message.
[0407] Optionally, the directly discovered data includes at least one of the following:
[0408] a first proximity service query code (ProSe Query Code1) associated with the first key set; the first proximity service query code is a ProSe query code used for a direct discovery procedure between the first terminal and the second terminal;
[0409] First security information used to establish a security association between the first terminal and the second terminal; the first security information includes parameters used when the first terminal and the second terminal establish a security association, such as: a key identifier of a key used when establishing a security association, a public key certificate of the first terminal, a security token of the first terminal, a random number, etc., which are not limited here.
[0410] The first auxiliary information used to establish a PC5 connection between the first terminal and the second terminal; the first auxiliary information can be used to carry parameters not defined in the DCR for the first terminal and the second terminal to establish a PC5 connection communication, for example: application identifiers or other parameters of the first terminal and the second terminal when establishing a PC5 connection, which are not limited here.
[0411] The first MIC generated by using the first key set is used to protect the integrity of the message and prevent tampering during the communication process.
[0412] Optionally, the direct discovery data may further include: a UTC-based counter LSB1 bit number, which is a time parameter associated with the first key set.
[0413] Optionally, the second relay discovery data includes at least one of the following:
[0414] (1) a third proximity service query code (ProSe Query Code 3) associated with the second key set; the third proximity service query code is a ProSe query code used for a relay discovery process between the first terminal, the second terminal, and the relay terminal;
[0415] (2) third security information used to establish a security association between the relay terminal and the second terminal; the third security information includes parameters used when the relay terminal and the second terminal establish a security association, such as: a key identifier of a key used when establishing a security association, a public key certificate of the relay terminal, a security token of the relay terminal, a random number, etc.
[0416] (3) third auxiliary information for establishing a PC5 connection between the relay terminal and the second terminal; the third auxiliary information may be used to carry parameters not defined in the DCR for establishing a PC5 connection communication between the relay terminal and the second terminal, such as application identifiers or other parameters of the relay terminal and the second terminal when establishing a PC5 connection, which are not limited here;
[0417] (4) The third MIC generated by the second key set is used to protect the integrity of the message and prevent tampering during the communication process.
[0418] Optionally, the second relay discovery data may further include: UTC-based Counter LSB3, which is the number of bits of the UTC-based counter starting from the low bit: a time parameter associated with the second key set.
[0419] As an optional embodiment, after receiving the second DCR message sent by the relay terminal, the method further includes at least one of the following:
[0420] If the second discovery indication information indicates that the second DCR message includes second relay discovery data, performing security verification on the second relay discovery data according to the second key;
[0421] If the second discovery indication information indicates that the second DCR message includes direct discovery data, security verification is performed on the direct discovery data according to the first key.
[0422] In this embodiment, after receiving the second DCR message, the second terminal can perform security verification on the discovery data therein, for example: if the Discovery Indication information indicates that the second DCR message contains the second relay discovery data, the unencrypted part in Query code3 is used to determine whether it is a target message, and Counter LSB3 is used to determine whether Key Set2 is expired. The encrypted data in the message is decrypted using the decryption key in Key Set2, and the integrity protection key in Key Set2 is used to perform integrity protection verification on the second DCR message.
[0423] If the Discovery Indication information indicates that the second DCR message contains direct discovery data, the unencrypted part in Query code1 is used to determine whether it is a target message, and Counter LSB1 is used to determine whether Key Set1 is expired. The encrypted data in the message is decrypted using the decryption key in Key Set1, and the integrity protection key in Key Set1 is used to perform integrity protection verification on the direct communication data, thereby obtaining the plain text of the relevant data.
[0424] In an embodiment of the present application, the relay terminal can generate a second DCR message based on the content of the first DCR message, and send the second DCR message to the second terminal, the second DCR message includes second discovery indication information, the second discovery indication information can indicate whether the second DCR message includes discovery data, and the second terminal performs a subsequent communication process according to the second DCR message. By integrating the discovery process of neighboring communication into the unicast link establishment process in the relay scenario of U2U, the relay UE discovery and target UE discovery in the direct communication establishment process are realized. By adding discovery indication information to indicate whether the DCR message contains discovery data, maximum flexibility can be provided for different application modes and scenarios of the discovery function.
[0425] The above embodiments introduce the direct communication method of the present application. The following embodiments will further illustrate the corresponding device in conjunction with the accompanying drawings.
[0426] Specifically, Figure 7 As shown, the embodiment of the present application provides a direct communication device 700, which is applied to a first terminal, including:
[0427] The first information generating unit 710 is configured to generate a first direct communication request DCR message;
[0428] A first sending unit 720, configured to send a first DCR message to the relay terminal;
[0429] The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate whether the first DCR message includes discovery data or does not include discovery data.
[0430] Optionally, the first DCR message includes discovery data, including one of the following:
[0431] The first DCR message includes direct discovery data;
[0432] The first DCR message includes first relay discovery data;
[0433] The first DCR message includes direct discovery data and first relay discovery data.
[0434] Optionally, the device further comprises:
[0435] The first acquisition unit is used to acquire a first key set and a second key set, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
[0436] Optionally, the device further includes a first security protection unit, and the first security protection unit is configured to perform one of the following:
[0437] When the first discovery indication information indicates that the first DCR message includes direct discovery data, using the first key set to securely protect the first DCR message;
[0438] When the first discovery indication information indicates that the first DCR message includes first relay discovery data, using the second key set to perform security protection on the first DCR message;
[0439] When the first discovery indication information indicates that the first DCR message includes direct discovery data and first relay discovery data, the first DCR message is securely protected using the first key set and the second key set, respectively.
[0440] Optionally, the directly discovered data includes at least one of the following:
[0441] a first proximity service query code associated with the first key set;
[0442] first security information used to establish a security association between the first terminal and the second terminal;
[0443] First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal;
[0444] A first message integrity protection code MIC is generated using the first key set.
[0445] Optionally, the first relay discovery data includes at least one of the following:
[0446] a second proximity service query code associated with a second key set;
[0447] second security information used to establish a security association between the first terminal and the relay terminal;
[0448] Second auxiliary information used to establish a PC5 connection between the first terminal and the relay terminal;
[0449] A second MIC generated using the second key set.
[0450] Optionally, the first security protection unit is used to perform at least one of the following:
[0451] Generate a first MIC using the integrity protection key in the first key set, where the first MIC is used to perform integrity protection on a first portion of information in the first DCR message, where the first portion of information includes part or all of data sent by the first terminal to the second terminal, where the part or all of the data includes the direct discovery data;
[0452] The second part of information in the first DCR message is confidentially protected by using the confidentiality protection key in the first key set, where the second part of information includes private data sent by the first terminal to the second terminal, and the private data includes private data in the direct discovery data.
[0453] Optionally, the first security protection unit is used to perform at least one of the following:
[0454] Generate a second MIC using the integrity protection key in the second key set, where the second MIC is used to perform integrity protection on the third part of information in the first DCR message, where the third part of information includes all data sent by the first terminal to the relay terminal, where the all data includes the first relay discovery data;
[0455] The fourth part of information in the first DCR message is protected for confidentiality using the confidentiality protection key in the second key set, where the fourth part of information includes: data that the relay terminal is allowed to directly forward to the second terminal, and privacy data that is allowed to be shared among the first terminal, the relay terminal, and the second terminal, where the privacy data includes the privacy data in the first relay discovery data.
[0456] 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 by the above-mentioned method embodiment applied to the first terminal, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0457] Specifically, Figure 8 As shown, the embodiment of the present application provides a direct communication device 800, which is applied to a relay terminal, including:
[0458] The first receiving unit 810 is configured to receive a first DCR message sent by a first terminal;
[0459] A second information generating unit 820, configured to generate a second DCR message according to the first DCR message;
[0460] A second sending unit 830 is configured to send the second DCR message to the second terminal;
[0461] The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate that the first DCR message includes discovery data or does not include discovery data;
[0462] The second DCR message includes second discovery indication information, where the second discovery indication information is used to indicate that the second DCR message includes discovery data or does not include discovery data.
[0463] Optionally, the first DCR message includes discovery data, including one of the following:
[0464] The first DCR message includes direct discovery data;
[0465] The first DCR message includes first relay discovery data;
[0466] The first DCR message includes direct discovery data and first relay discovery data.
[0467] Optionally, the second DCR message includes discovery data, including one of the following:
[0468] The second DCR message includes direct discovery data;
[0469] The second DCR message includes second relay discovery data;
[0470] The second DCR message includes direct discovery data and second relay discovery data.
[0471] Optionally, the directly discovered data includes at least one of the following:
[0472] a first proximity service query code associated with the first key set;
[0473] first security information used to establish a security association between the first terminal and the second terminal;
[0474] First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal;
[0475] A first MIC is generated using the first key set.
[0476] Optionally, the device further comprises:
[0477] The second acquisition unit is used to acquire a second key set, where the second key set is used for security protection of relay discovery data.
[0478] Optionally, the device further comprises:
[0479] The first verification unit is configured to perform security verification on the first relay discovery data according to the second key if the first discovery indication information indicates that the first DCR message includes first relay discovery data.
[0480] Optionally, the device further comprises:
[0481] The second security protection unit is used to use the second key set to perform security protection on the second DCR message when the second discovery indication information indicates that the second DCR message includes second relay discovery data.
[0482] Optionally, the second relay discovery data includes at least one of the following:
[0483] a third proximity service query code associated with the second key set;
[0484] third security information used to establish a security association between the relay terminal and the second terminal;
[0485] third auxiliary information used to establish a PC5 connection between the relay terminal and the second terminal;
[0486] A third MIC generated using the second key set.
[0487] Optionally, the second security protection unit is used to perform at least one of the following:
[0488] Generate a third MIC using the integrity protection key in the second key set, where the third MIC is used to perform integrity protection on the fifth part of information in the second DCR message, where the fifth part of information includes all data sent by the relay terminal to the second terminal, where the all data includes the second relay discovery data;
[0489] The confidentiality protection key in the second key set is used to protect the confidentiality of the sixth part of information in the second DCR message, where the sixth part of information includes: data that the relay terminal is allowed to directly forward to the second terminal, and privacy data allowed to be shared among the first terminal, the relay terminal and the second terminal, and the privacy data includes the privacy data in the second relay discovery data.
[0490] 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 applied to the relay terminal, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0491] Specifically, Fig. 9 As shown, the embodiment of the present application provides a direct communication device 900, which is applied to a second terminal, including:
[0492] The second receiving unit 910 is configured to receive a second DCR message sent by the relay terminal;
[0493] The second DCR message includes second discovery indication information, and the second discovery indication information is used to indicate whether the second DCR message includes discovery data or does not include discovery data.
[0494] Optionally, the second DCR message includes discovery data, including one of the following:
[0495] The second DCR message includes direct discovery data;
[0496] The second DCR message includes second relay discovery data;
[0497] The second DCR message includes direct discovery data and second relay discovery data.
[0498] Optionally, the device further comprises:
[0499] The third acquisition unit is used to acquire a first key set and a second key set, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
[0500] Optionally, the directly discovered data includes at least one of the following:
[0501] a first proximity service query code associated with the first key set;
[0502] first security information used to establish a security association between the first terminal and the second terminal;
[0503] First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal;
[0504] A first MIC is generated using the first key set.
[0505] Optionally, the second relay discovery data includes at least one of the following:
[0506] a third proximity service query code associated with the second key set;
[0507] third security information used to establish a security association between the relay terminal and the second terminal;
[0508] third auxiliary information used to establish a PC5 connection between the relay terminal and the second terminal;
[0509] A third MIC generated using the second key set.
[0510] Optionally, the device further includes a second verification unit, and the second verification unit is used to perform at least one of the following:
[0511] If the second discovery indication information indicates that the second DCR message includes second relay discovery data, performing security verification on the second relay discovery data according to the second key;
[0512] If the second discovery indication information indicates that the second DCR message includes direct discovery data, security verification is performed on the direct discovery data according to the first key.
[0513] 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 applied to the second terminal, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0514] 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.
[0515] 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.
[0516] like Fig.10As shown, an embodiment of the present application further provides a terminal, which may be a first terminal, including: a memory 1020, a transceiver 1000, and a processor 1010; wherein the memory 1020 is used to store a computer program; the transceiver 1000 is used to receive and send data under the control of the processor 1010; the processor 1010 is used to read the computer program in the memory and perform the following operations:
[0517] Generate a first direct communication request DCR message;
[0518] Sending a first DCR message to the relay terminal;
[0519] The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate whether the first DCR message includes discovery data or does not include discovery data.
[0520] Optionally, the first DCR message includes discovery data, including one of the following:
[0521] The first DCR message includes direct discovery data;
[0522] The first DCR message includes first relay discovery data;
[0523] The first DCR message includes direct discovery data and first relay discovery data.
[0524] Optionally, the processor is configured to read the computer program in the memory and perform the following operations:
[0525] A first key set and a second key set are obtained, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
[0526] Optionally, the processor is configured to read the computer program in the memory and perform one of the following operations:
[0527] When the first discovery indication information indicates that the first DCR message includes direct discovery data, using the first key set to securely protect the first DCR message;
[0528] When the first discovery indication information indicates that the first DCR message includes first relay discovery data, using the second key set to perform security protection on the first DCR message;
[0529] When the first discovery indication information indicates that the first DCR message includes direct discovery data and first relay discovery data, the first DCR message is securely protected using the first key set and the second key set, respectively.
[0530] Optionally, the directly discovered data includes at least one of the following:
[0531] a first proximity service query code associated with the first key set;
[0532] first security information used to establish a security association between the first terminal and the second terminal;
[0533] First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal;
[0534] A first message integrity protection code MIC is generated using the first key set.
[0535] Optionally, the first relay discovery data includes at least one of the following:
[0536] a second proximity service query code associated with a second key set;
[0537] second security information used to establish a security association between the first terminal and the relay terminal;
[0538] Second auxiliary information used to establish a PC5 connection between the first terminal and the relay terminal;
[0539] A second MIC generated using the second key set.
[0540] Optionally, the processor is configured to read the computer program in the memory and perform at least one of the following operations:
[0541] Generate a first MIC using the integrity protection key in the first key set, where the first MIC is used to perform integrity protection on a first portion of information in the first DCR message, where the first portion of information includes part or all of data sent by the first terminal to the second terminal, where the part or all of the data includes the direct discovery data;
[0542] The second part of information in the first DCR message is confidentially protected by using the confidentiality protection key in the first key set, where the second part of information includes private data sent by the first terminal to the second terminal, and the private data includes private data in the direct discovery data.
[0543] Optionally, the processor is configured to read the computer program in the memory and perform at least one of the following operations:
[0544] Generate a second MIC using the integrity protection key in the second key set, where the second MIC is used to perform integrity protection on the third part of information in the first DCR message, where the third part of information includes all data sent by the first terminal to the relay terminal, where the all data includes the first relay discovery data;
[0545] The fourth part of information in the first DCR message is protected for confidentiality using the confidentiality protection key in the second key set, where the fourth part of information includes: data that the relay terminal is allowed to directly forward to the second terminal, and privacy data that is allowed to be shared among the first terminal, the relay terminal, and the second terminal, where the privacy data includes the privacy data in the first relay discovery data.
[0546] 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 1010 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 herein. The bus interface provides an interface. The transceiver 1000 may be a plurality of components, namely, a transmitter and a transceiver, providing a unit for communicating with various other devices on a transmission medium. 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.
[0547] The processor 1010 is responsible for managing the bus architecture and general processing, and the memory 1020 can store data used by the processor 1010 when performing operations.
[0548] Optionally, the processor 1010 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), and the processor may also adopt a multi-core architecture.
[0549] The processor calls the computer program stored in the memory to execute any of the methods provided in the embodiments of the present application according to the obtained executable instructions. The processor and the memory can also be arranged physically separately.
[0550] It should be noted here that the above-mentioned terminal provided in the embodiment of the present application can implement all the method steps implemented by the above-mentioned method embodiment applied to the first terminal, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0551] like Fig.11 As shown, an embodiment of the present application further provides a terminal, which may be a relay terminal, including: a memory 1120, a transceiver 1100, and a processor 1110; wherein the memory 1120 is used to store a computer program; the transceiver 1100 is used to receive and send data under the control of the processor 1110; the processor 1110 is used to read the computer program in the memory and perform the following operations:
[0552] Receiving a first DCR message sent by a first terminal;
[0553] generating a second DCR message according to the first DCR message;
[0554] Sending the second DCR message to the second terminal;
[0555] The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate that the first DCR message includes discovery data or does not include discovery data;
[0556] The second DCR message includes second discovery indication information, where the second discovery indication information is used to indicate that the second DCR message includes discovery data or does not include discovery data.
[0557] Optionally, the first DCR message includes discovery data, including one of the following:
[0558] The first DCR message includes direct discovery data;
[0559] The first DCR message includes first relay discovery data;
[0560] The first DCR message includes direct discovery data and first relay discovery data.
[0561] Optionally, the second DCR message includes discovery data, including one of the following:
[0562] The second DCR message includes direct discovery data;
[0563] The second DCR message includes second relay discovery data;
[0564] The second DCR message includes direct discovery data and second relay discovery data.
[0565] Optionally, the directly discovered data includes at least one of the following:
[0566] a first proximity service query code associated with the first key set;
[0567] first security information used to establish a security association between the first terminal and the second terminal;
[0568] First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal;
[0569] A first MIC is generated using the first key set.
[0570] Optionally, the processor is configured to read the computer program in the memory and perform the following operations:
[0571] A second key set is obtained, where the second key set is used for security protection of relay discovery data.
[0572] Optionally, the processor is configured to read the computer program in the memory and perform the following operations:
[0573] If the first discovery indication information indicates that the first DCR message includes first relay discovery data, security verification is performed on the first relay discovery data according to the second key.
[0574] Optionally, the processor is configured to read the computer program in the memory and perform the following operations:
[0575] When the second discovery indication information indicates that the second DCR message includes second relay discovery data, the second key set is used to perform security protection on the second DCR message.
[0576] Optionally, the second relay discovery data includes at least one of the following:
[0577] a third proximity service query code associated with the second key set;
[0578] third security information used to establish a security association between the relay terminal and the second terminal;
[0579] third auxiliary information used to establish a PC5 connection between the relay terminal and the second terminal;
[0580] A third MIC generated using the second key set.
[0581] Optionally, the processor is configured to read the computer program in the memory and perform at least one of the following operations:
[0582] Generate a third MIC using the integrity protection key in the second key set, where the third MIC is used to perform integrity protection on the fifth part of information in the second DCR message, where the fifth part of information includes all data sent by the relay terminal to the second terminal, where the all data includes the second relay discovery data;
[0583] The confidentiality protection key in the second key set is used to protect the confidentiality of the sixth part of information in the second DCR message, where the sixth part of information includes: data that the relay terminal is allowed to directly forward to the second terminal, and privacy data allowed to be shared among the first terminal, the relay terminal and the second terminal, and the privacy data includes the privacy data in the second relay discovery data.
[0584] Among them, Fig.11 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 1110 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 herein. The bus interface provides an interface. The transceiver 1100 may be a plurality of components, namely, a transmitter and a transceiver, providing a unit for communicating with various other devices on a transmission medium. 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.
[0585] The processor 1110 is responsible for managing the bus architecture and general processing, and the memory 1120 can store data used by the processor 1110 when performing operations.
[0586] Optionally, the processor 1110 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), and the processor may also adopt a multi-core architecture.
[0587] The processor calls the computer program stored in the memory to execute any of the methods provided in the embodiments of the present application according to the obtained executable instructions. The processor and the memory can also be arranged physically separately.
[0588] It should be noted here that the above-mentioned terminal provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned method embodiment applied to the relay terminal, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0589] like Fig.12 As shown, an embodiment of the present application further provides a terminal, which may be a second terminal, including: a memory 1220, a transceiver 1200, and a processor 1210; wherein the memory 1220 is used to store a computer program; the transceiver 1200 is used to receive and send data under the control of the processor 1210; the processor 1210 is used to read the computer program in the memory and perform the following operations:
[0590] receiving a second DCR message sent by the relay terminal;
[0591] The second DCR message includes second discovery indication information, and the second discovery indication information is used to indicate whether the second DCR message includes discovery data or does not include discovery data.
[0592] Optionally, the second DCR message includes discovery data, including one of the following:
[0593] The second DCR message includes direct discovery data;
[0594] The second DCR message includes second relay discovery data;
[0595] The second DCR message includes direct discovery data and second relay discovery data.
[0596] Optionally, the processor is configured to read the computer program in the memory and perform the following operations:
[0597] A first key set and a second key set are obtained, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
[0598] Optionally, the directly discovered data includes at least one of the following:
[0599] a first proximity service query code associated with the first key set;
[0600] first security information used to establish a security association between the first terminal and the second terminal;
[0601] First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal;
[0602] A first MIC is generated using the first key set.
[0603] Optionally, the second relay discovery data includes at least one of the following:
[0604] a third proximity service query code associated with the second key set;
[0605] third security information used to establish a security association between the relay terminal and the second terminal;
[0606] third auxiliary information used to establish a PC5 connection between the relay terminal and the second terminal;
[0607] A third MIC generated using the second key set.
[0608] Optionally, the processor is configured to read the computer program in the memory and perform at least one of the following operations:
[0609] If the second discovery indication information indicates that the second DCR message includes second relay discovery data, performing security verification on the second relay discovery data according to the second key;
[0610] If the second discovery indication information indicates that the second DCR message includes direct discovery data, security verification is performed on the direct discovery data according to the first key.
[0611] Among them, Fig.12 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 1210 and various circuits of memory represented by memory 1220 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 herein. The bus interface provides an interface. The transceiver 1200 may be a plurality of components, namely, a transmitter and a transceiver, providing a unit for communicating with various other devices on a transmission medium. For different user devices, the user interface 1230 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.
[0612] The processor 1210 is responsible for managing the bus architecture and general processing, and the memory 1220 can store data used by the processor 1210 when performing operations.
[0613] Optionally, the processor 1210 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), and the processor may also adopt a multi-core architecture.
[0614] The processor calls the computer program stored in the memory to execute any of the methods provided in the embodiments of the present application according to the obtained executable instructions. The processor and the memory can also be arranged physically separately.
[0615] It should be noted here that the above-mentioned terminal provided in the embodiment of the present application can implement all the method steps implemented by the above-mentioned method embodiment applied to the second terminal, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0616] In addition, the specific embodiment of the present application also provides a processor-readable storage medium, on which a computer program is stored, wherein the program, when executed by the processor, implements the steps of the direct communication method described above, and can achieve the same technical effect, and in order to avoid repetition, it is not repeated here. The readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid state drive (SSD)), etc.
[0617] It should be noted that 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 radio (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.
[0618] The terminal device 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 device may also be different. For example, in a 5G system, the terminal device 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 in the embodiments of the present application.
[0619] The network device involved in the embodiment of the present application may be a base station, which may include multiple cells providing services for the terminal. Depending on the specific application scenario, the base station may also be called an access point, or may be a device in the access network that communicates with the wireless terminal device through one or more sectors on the air interface, or other names. The network device may be used to interchange received air frames with Internet Protocol (IP) packets, and serve as a router between the wireless terminal device and the rest of the access network, wherein the rest of the access network may include an Internet Protocol (IP) communication network. The network device may also coordinate the attribute management of the air interface. For example, the network device involved in the embodiments of the present application may be a network device (Base Transceiver Station, BTS) in the Global System for Mobile communications (Global System for Mobile communications, GSM) or Code Division Multiple Access (Code Division Multiple Access, CDMA), or a network device (NodeB) in Wide-band Code Division Multiple Access (WCDMA), or an evolutionary network device (evolutional Node B, eNB or e-NodeB) in the long term evolution (long term evolution, LTE) system, a 5G base station (gNB) in the 5G network architecture (next generation system), or a home evolved Node B (Home evolved Node B, HeNB), a relay node, a home base station (femto), a pico base station (pico), etc., which is not limited in the embodiments of the present application. In some network structures, the network device may include a centralized unit (CU) node and a distributed unit (DU) node, and the centralized unit and the distributed unit may also be arranged geographically separately.
[0620] Network devices and terminal devices can each use one or more antennas for multiple-input multiple-output (MIMO) transmission. MIMO transmission can be single-user MIMO (SU-MIMO) or multi-user MIMO (MU-MIMO). Depending on the form and number of antenna combinations, MIMO transmission can be 2D-MIMO, 3D-MIMO, FD-MIMO or massive-MIMO, or it can be diversity transmission, precoded transmission or beamforming transmission, etc.
[0621] 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.
[0622] The present application is described with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, and the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer executable instructions. These computer executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing a process or multiple processes in the flowchart and / or a box or multiple boxes in the block diagram.
[0623] These processor-executable instructions may also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0624] 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 performed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0625] 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 direct communication method, It is characterized in that include: The first terminal generates a first direct communication request DCR message; The first terminal sends a first DCR message to the relay terminal; The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate whether the first DCR message includes discovery data or does not include discovery data.
2. The method according to claim 1, It is characterized in that The first DCR message includes discovery data, including one of the following: The first DCR message includes direct discovery data; The first DCR message includes first relay discovery data; The first DCR message includes direct discovery data and first relay discovery data.
3. The method according to claim 1, It is characterized in that The method further comprises: A first key set and a second key set are obtained, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
4. The method according to claim 3, It is characterized in that After generating the first DCR message, the method further includes one of the following: When the first discovery indication information indicates that the first DCR message includes direct discovery data, using the first key set to securely protect the first DCR message; When the first discovery indication information indicates that the first DCR message includes first relay discovery data, using the second key set to perform security protection on the first DCR message; When the first discovery indication information indicates that the first DCR message includes direct discovery data and first relay discovery data, the first DCR message is securely protected using the first key set and the second key set, respectively.
5. The method according to claim 2 or 3, It is characterized in that The directly discovered data includes at least one of the following: a first proximity service query code associated with the first key set; first security information used to establish a security association between the first terminal and the second terminal; First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal; A first message integrity protection code MIC is generated using the first key set.
6. The method according to claim 2 or 3, It is characterized in that The first relay discovery data includes at least one of the following: a second proximity service query code associated with a second key set; second security information used to establish a security association between the first terminal and the relay terminal; Second auxiliary information used to establish a PC5 connection between the first terminal and the relay terminal; A second MIC generated using the second key set.
7. The method according to claim 4, It is characterized in that Using the first key set to securely protect the first DCR message includes at least one of the following: Generate a first MIC using the integrity protection key in the first key set, where the first MIC is used to perform integrity protection on a first portion of information in the first DCR message, where the first portion of information includes part or all of data sent by the first terminal to the second terminal, where the part or all of the data includes the direct discovery data; The second part of information in the first DCR message is confidentially protected by using the confidentiality protection key in the first key set, where the second part of information includes private data sent by the first terminal to the second terminal, and the private data includes private data in the direct discovery data.
8. The method according to claim 4, It is characterized in that Using the second key set to securely protect the first DCR message includes at least one of the following: Generate a second MIC using the integrity protection key in the second key set, where the second MIC is used to perform integrity protection on the third part of information in the first DCR message, where the third part of information includes all data sent by the first terminal to the relay terminal, where the all data includes the first relay discovery data; The fourth part of information in the first DCR message is protected for confidentiality using the confidentiality protection key in the second key set, where the fourth part of information includes: data that the relay terminal is allowed to directly forward to the second terminal, and privacy data that is allowed to be shared among the first terminal, the relay terminal, and the second terminal, where the privacy data includes the privacy data in the first relay discovery data.
9. A direct communication method, It is characterized in that include: The relay terminal receives a first DCR message sent by the first terminal; The relay terminal generates a second DCR message according to the first DCR message; The relay terminal sends the second DCR message to the second terminal; The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate that the first DCR message includes discovery data or does not include discovery data; The second DCR message includes second discovery indication information, where the second discovery indication information is used to indicate that the second DCR message includes discovery data or does not include discovery data.
10. The method according to claim 9, It is characterized in that The first DCR message includes discovery data, including one of the following: The first DCR message includes direct discovery data; The first DCR message includes first relay discovery data; The first DCR message includes direct discovery data and first relay discovery data.
11. The method according to claim 9, It is characterized in that The second DCR message includes discovery data, including one of the following: The second DCR message includes direct discovery data; The second DCR message includes second relay discovery data; The second DCR message includes direct discovery data and second relay discovery data.
12. The method according to claim 10 or 11, It is characterized in that The directly discovered data includes at least one of the following: a first proximity service query code associated with the first key set; first security information used to establish a security association between the first terminal and the second terminal; First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal; A first MIC is generated using the first key set.
13. The method according to claim 9, It is characterized in that The method further comprises: A second key set is obtained, where the second key set is used for security protection of relay discovery data.
14. The method according to claim 13, It is characterized in that After receiving the first DCR message sent by the first terminal, the method further includes: If the first discovery indication information indicates that the first DCR message includes first relay discovery data, security verification is performed on the first relay discovery data according to the second key.
15. The method according to claim 13, It is characterized in that After generating the second DCR message according to the first DCR message, the method further includes: When the second discovery indication information indicates that the second DCR message includes second relay discovery data, the second key set is used to perform security protection on the second DCR message.
16. The method according to claim 11 or 13, It is characterized in that The second relay discovery data includes at least one of the following: a third proximity service query code associated with the second key set; third security information used to establish a security association between the relay terminal and the second terminal; third auxiliary information used to establish a PC5 connection between the relay terminal and the second terminal; A third MIC generated using the second key set.
17. The method according to claim 15, It is characterized in that Using the second key set to securely protect the second DCR message includes at least one of the following: Generate a third MIC using the integrity protection key in the second key set, where the third MIC is used to perform integrity protection on the fifth part of information in the second DCR message, where the fifth part of information includes all data sent by the relay terminal to the second terminal, where the all data includes the second relay discovery data; The confidentiality protection key in the second key set is used to protect the confidentiality of the sixth part of information in the second DCR message, where the sixth part of information includes: data that the relay terminal is allowed to directly forward to the second terminal, and privacy data allowed to be shared among the first terminal, the relay terminal and the second terminal, and the privacy data includes the privacy data in the second relay discovery data.
18. A direct communication method, It is characterized in that include: The second terminal receives a second DCR message sent by the relay terminal; The second DCR message includes second discovery indication information, and the second discovery indication information is used to indicate whether the second DCR message includes discovery data or does not include discovery data.
19. The method according to claim 18, It is characterized in that The second DCR message includes discovery data, including one of the following: The second DCR message includes direct discovery data; The second DCR message includes second relay discovery data; The second DCR message includes direct discovery data and second relay discovery data.
20. The method according to claim 18, It is characterized in that The method further comprises: A first key set and a second key set are obtained, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
21. The method according to claim 19 or 20, It is characterized in that The directly discovered data includes at least one of the following: a first proximity service query code associated with the first key set; first security information used to establish a security association between the first terminal and the second terminal; First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal; A first MIC is generated using the first key set.
22. The method according to claim 19 or 20, It is characterized in that The second relay discovery data includes at least one of the following: a third proximity service query code associated with the second key set; third security information used to establish a security association between the relay terminal and the second terminal; third auxiliary information used to establish a PC5 connection between the relay terminal and the second terminal; A third MIC generated using the second key set.
23. The method according to claim 20, It is characterized in that After receiving the second DCR message sent by the relay terminal, the method further includes at least one of the following: If the second discovery indication information indicates that the second DCR message includes second relay discovery data, performing security verification on the second relay discovery data according to the second key; If the second discovery indication information indicates that the second DCR message includes direct discovery data, security verification is performed on the direct discovery data according to the first key.
24. A terminal, It is characterized in that include: Memory, transceiver, processor: Memory for storing computer programs; a transceiver for receiving and sending data under the control of the processor; A processor is configured to read the computer program in the memory and perform the following operations: Generate a first direct communication request DCR message; Sending a first DCR message to the relay terminal; The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate whether the first DCR message includes discovery data or does not include discovery data.
25. The terminal according to claim 24, It is characterized in that The first DCR message includes discovery data, including one of the following: The first DCR message includes direct discovery data; The first DCR message includes first relay discovery data; The first DCR message includes direct discovery data and first relay discovery data.
26. The terminal according to claim 24, It is characterized in that The processor is configured to read the computer program in the memory and perform the following operations: A first key set and a second key set are obtained, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
27. The terminal according to claim 26, It is characterized in that The processor is configured to read the computer program in the memory and perform one of the following operations: When the first discovery indication information indicates that the first DCR message includes direct discovery data, using the first key set to securely protect the first DCR message; When the first discovery indication information indicates that the first DCR message includes first relay discovery data, using the second key set to perform security protection on the first DCR message; When the first discovery indication information indicates that the first DCR message includes direct discovery data and first relay discovery data, the first DCR message is securely protected using the first key set and the second key set, respectively.
28. The terminal according to claim 25 or 26, It is characterized in that The directly discovered data includes at least one of the following: a first proximity service query code associated with the first key set; first security information used to establish a security association between the first terminal and the second terminal; First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal; A first message integrity protection code MIC is generated using the first key set.
29. The terminal according to claim 25 or 26, It is characterized in that The first relay discovery data includes at least one of the following: a second proximity service query code associated with a second key set; second security information used to establish a security association between the first terminal and the relay terminal; Second auxiliary information used to establish a PC5 connection between the first terminal and the relay terminal; A second MIC generated using the second key set.
30. The terminal according to claim 27, It is characterized in that The processor is configured to read the computer program in the memory and perform at least one of the following operations: Generate a first MIC using the integrity protection key in the first key set, where the first MIC is used to perform integrity protection on a first portion of information in the first DCR message, where the first portion of information includes part or all of data sent by the first terminal to the second terminal, where the part or all of the data includes the direct discovery data; The second part of information in the first DCR message is confidentially protected by using the confidentiality protection key in the first key set, where the second part of information includes private data sent by the first terminal to the second terminal, and the private data includes private data in the direct discovery data.
31. The terminal according to claim 27, It is characterized in that The processor is configured to read the computer program in the memory and perform at least one of the following operations: Generate a second MIC using the integrity protection key in the second key set, where the second MIC is used to perform integrity protection on the third part of information in the first DCR message, where the third part of information includes all data sent by the first terminal to the relay terminal, where the all data includes the first relay discovery data; The fourth part of information in the first DCR message is protected for confidentiality using the confidentiality protection key in the second key set, where the fourth part of information includes: data that the relay terminal is allowed to directly forward to the second terminal, and privacy data that is allowed to be shared among the first terminal, the relay terminal, and the second terminal, where the privacy data includes the privacy data in the first relay discovery data.
32. A terminal, It is characterized in that include: Memory, transceiver, processor: Memory for storing computer programs; a transceiver for receiving and sending data under the control of the processor; A processor is configured to read the computer program in the memory and perform the following operations: Receiving a first DCR message sent by a first terminal; generating a second DCR message according to the first DCR message; Sending the second DCR message to the second terminal; The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate that the first DCR message includes discovery data or does not include discovery data; The second DCR message includes second discovery indication information, where the second discovery indication information is used to indicate that the second DCR message includes discovery data or does not include discovery data.
33. The terminal according to claim 32, It is characterized in that The first DCR message includes discovery data, including one of the following: The first DCR message includes direct discovery data; The first DCR message includes first relay discovery data; The first DCR message includes direct discovery data and first relay discovery data.
34. The terminal according to claim 32, It is characterized in that The second DCR message includes discovery data, including one of the following: The second DCR message includes direct discovery data; The second DCR message includes second relay discovery data; The second DCR message includes direct discovery data and second relay discovery data.
35. The terminal according to claim 33 or 34, It is characterized in that The directly discovered data includes at least one of the following: a first proximity service query code associated with the first key set; first security information used to establish a security association between the first terminal and the second terminal; First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal; A first MIC is generated using the first key set.
36. The terminal according to claim 32, It is characterized in that The processor is configured to read the computer program in the memory and perform the following operations: A second key set is obtained, where the second key set is used for security protection of relay discovery data.
37. The terminal according to claim 36, It is characterized in that The processor is configured to read the computer program in the memory and perform the following operations: If the first discovery indication information indicates that the first DCR message includes first relay discovery data, security verification is performed on the first relay discovery data according to the second key.
38. The terminal according to claim 36, It is characterized in that The processor is configured to read the computer program in the memory and perform the following operations: When the second discovery indication information indicates that the second DCR message includes second relay discovery data, the second key set is used to perform security protection on the second DCR message.
39. The terminal according to claim 34 or 36, It is characterized in that The second relay discovery data includes at least one of the following: a third proximity service query code associated with the second key set; third security information used to establish a security association between the relay terminal and the second terminal; third auxiliary information used to establish a PC5 connection between the relay terminal and the second terminal; A third MIC generated using the second key set.
40. The terminal according to claim 38, It is characterized in that The processor is configured to read the computer program in the memory and perform at least one of the following operations: Generate a third MIC using the integrity protection key in the second key set, where the third MIC is used to perform integrity protection on the fifth part of information in the second DCR message, where the fifth part of information includes all data sent by the relay terminal to the second terminal, where the all data includes the second relay discovery data; The confidentiality protection key in the second key set is used to protect the confidentiality of the sixth part of information in the second DCR message, where the sixth part of information includes: data that the relay terminal is allowed to directly forward to the second terminal, and privacy data allowed to be shared among the first terminal, the relay terminal and the second terminal, and the privacy data includes the privacy data in the second relay discovery data.
41. A terminal, It is characterized in that include: Memory, transceiver, processor: Memory for storing computer programs; a transceiver for receiving and sending data under the control of the processor; A processor is configured to read the computer program in the memory and perform the following operations: receiving a second DCR message sent by the relay terminal; The second DCR message includes second discovery indication information, and the second discovery indication information is used to indicate whether the second DCR message includes discovery data or does not include discovery data.
42. The terminal according to claim 41, It is characterized in that The second DCR message includes discovery data, including one of the following: The second DCR message includes direct discovery data; The second DCR message includes second relay discovery data; The second DCR message includes direct discovery data and second relay discovery data.
43. The terminal according to claim 41, It is characterized in that The processor is configured to read the computer program in the memory and perform the following operations: A first key set and a second key set are obtained, wherein the first key set is used for security protection of direct discovery data, and the second key set is used for security protection of relay discovery data.
44. The terminal according to claim 42 or 43, It is characterized in that The directly discovered data includes at least one of the following: a first proximity service query code associated with the first key set; first security information used to establish a security association between the first terminal and the second terminal; First auxiliary information used to establish a PC5 connection between the first terminal and the second terminal; A first MIC is generated using the first key set.
45. The terminal according to claim 42 or 43, It is characterized in that The second relay discovery data includes at least one of the following: a third proximity service query code associated with the second key set; third security information used to establish a security association between the relay terminal and the second terminal; third auxiliary information used to establish a PC5 connection between the relay terminal and the second terminal; A third MIC generated using the second key set.
46. The terminal according to claim 43, It is characterized in that The processor is configured to read the computer program in the memory and perform at least one of the following operations: If the second discovery indication information indicates that the second DCR message includes second relay discovery data, performing security verification on the second relay discovery data according to the second key; If the second discovery indication information indicates that the second DCR message includes direct discovery data, security verification is performed on the direct discovery data according to the first key.
47. A direct communication device, It is characterized in that include: A first information generating unit, configured to generate a first direct communication request DCR message; A first sending unit, configured to send a first DCR message to the relay terminal; The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate whether the first DCR message includes discovery data or does not include discovery data.
48. A direct communication device, It is characterized in that include: A first receiving unit, configured to receive a first DCR message sent by a first terminal; A second information generating unit, configured to generate a second DCR message according to the first DCR message; A second sending unit, configured to send the second DCR message to the second terminal; The first DCR message includes first discovery indication information, and the first discovery indication information is used to indicate that the first DCR message includes discovery data or does not include discovery data; The second DCR message includes second discovery indication information, where the second discovery indication information is used to indicate that the second DCR message includes discovery data or does not include discovery data.
49. A direct communication device, It is characterized in that include: A second receiving unit, configured to receive a second DCR message sent by the relay terminal; The second DCR message includes second discovery indication information, and the second discovery indication information is used to indicate whether the second DCR message includes discovery data or does not include discovery data.
50. A processor-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, it implements the steps of the direct communication method as claimed in any one of claims 1 to 8, or implements the steps of the direct communication method as claimed in any one of claims 9 to 17, or implements the steps of the direct communication method as claimed in any one of claims 18 to 23.
