Communication method, communication device, and computer-readable storage medium

The communication method addresses the issue of unclear message forwarding in U2U relay networks by using identifier exchanges to determine target terminals, ensuring accurate message delivery.

JP2025525052APending Publication Date: 2025-08-01HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2025504717
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-07-29
Filing Date
2023-07-04
Publication Date
2025-08-01

Smart Images

  • Figure 2025525052000001_ABST
    Figure 2025525052000001_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a communication method, a communication device, and a computer-readable storage medium. The method includes the following. That is, a third terminal device receives a first message from a first terminal device. Here, the first message carries a first identifier, and the first identifier indicates a second terminal device. The third terminal device transmits a second message to the second terminal device based on the first message. According to the method described in the present application, the third terminal device can determine a specific terminal device that needs to forward the currently received message, thereby ensuring normal communication in the U2U relay scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to communication methods, communication devices, and computer-readable storage media.

Background Art

[0002] This application was filed with the China National Intellectual Property Administration on July 29, 2022, and claims priority to Chinese Patent Application No. 202210911092.3, entitled "Communication Method, Communication Device, and Computer-Readable Storage Medium", the entire disclosure of which is incorporated herein by reference.

[0003] To improve sidelink (SL) coverage extension, terminals can communicate with each other via relay terminals. Specifically, when sending a message to a target terminal, the source terminal can first send the message to the relay terminal, and the relay terminal forwards the message to the target terminal. In this way, the method by which the source terminal detects the target terminal or communicates with the target terminal via the relay terminal is called user equipment-to-user equipment relay (U2U Relay) communication.

[0004] During U2U relay communication, when the source terminal sends a message to the target terminal, the layer 2 identifier (layer 2 ID, L2 ID) of the relay terminal is written as the destination address. When the source terminal establishes a unicast communication connection to multiple target terminals via the relay terminal, after the relay terminal receives the message sent by the source terminal, the relay terminal may not recognize the specific target terminal to which the message needs to be forwarded. For example, as shown in FIG. 1, assume that both source terminal 1 and source terminal 2 establish unicast connections to target terminal 1, target terminal 2, and target terminal 3 via the relay terminal. When source terminal 1 sends a message to target terminal 1 via the relay terminal, since the message only carries the L2 ID of the relay terminal, the relay terminal does not recognize which one of target terminal 1, target terminal 2, or target terminal 3 the message needs to be forwarded to. Similarly, when target terminal 1 replies to source terminal 1 with a message, since the message only carries the L2 ID of the relay terminal, the relay terminal does not recognize which one of source terminal 1 or source terminal 2 the message needs to be forwarded to.

Summary of the Invention

[0005] The present application provides a communication method, a communication device, and a computer-readable storage medium for enabling a relay terminal to determine a specific terminal to which a currently received message needs to be forwarded in order to guarantee normal communication in a U2U relay scenario.

[0006] According to a first aspect, the present application provides a communication method applied to a third terminal device. The method includes the following. That is, a step of receiving a first message from a first terminal device, where the first message carries a first identifier, and the first identifier indicates a second terminal device. And a step of sending a second message to the second terminal device based on the first message.

[0007] According to the method described in the first aspect, when the third terminal device receives the first message, the first identifier can be used by the third terminal device to determine that it is necessary to transfer the content in the first message to the second terminal device. Based on this implementation, the relay terminal can determine a specific target terminal to which the received message needs to be transferred in the U2U relay M:N network topology scenario. This contributes to ensuring normal communication in the U2U relay scenario.

[0008] In a possible implementation, both the message type of the first message and the message type of the second message are one of the following types. That is, a direct communication request (DCR) message, a direct communication ( DCA ) message, a security mode indication message, or a security mode completion message.

[0009] In a possible implementation, the method further includes the following. That is, receiving a third message from the first terminal device, where the third message carries the first identifier. And receiving a fourth message from the second terminal device, where the fourth message carries the second identifier, and the second identifier indicates the first terminal device. When the third terminal device receives a message sent by the first terminal device (the second terminal device), the first identifier (the second identifier) assists the third terminal device in determining that it is necessary to transfer the content in the message to a specific terminal device. Based on this implementation, the third terminal device can determine a specific terminal device to which the received message needs to be transferred in the U2U relay M:N network topology scenario. This contributes to ensuring normal communication in the U2U relay scenario.

[0010] In a possible implementation, the message type of the third message and / or the message type of the fourth message is one of the following types. That is, a DCR message, a DCA message, a security mode instruction message, a security mode completion message, a request message, or a response message.

[0011] In a possible implementation, the method further includes the following. That is, a step of transmitting a fifth message to the first terminal device, where the fifth message carries a first identifier and information about the second terminal device, and the fifth message is used to determine the correspondence between the first identifier and the second terminal device. And, a step of transmitting a sixth message to the second terminal device, where the sixth message carries a second identifier and information about the first terminal device, and the sixth message is used to determine the correspondence between the second identifier and the first terminal device. After obtaining the first identifier, the first terminal device may determine the correspondence between the first identifier and the second terminal device based on the information about the second terminal device carried in the fifth message. Thereafter, when it is necessary to communicate with the second terminal device via a third terminal device, the first terminal device includes the first identifier indicating the second terminal device in the message. After obtaining the message transmitted by the first terminal device, the third terminal device may determine that it is necessary to forward the message to the second terminal device based on the first identifier carried in the message. Similarly, after obtaining the second identifier, the second terminal device determines the correspondence between the second identifier and the first terminal device. When communicating with the first terminal device via a third terminal device, the second terminal device includes the second identifier in the message and indicates that the message needs to be transmitted to the first terminal device. In this way, the third terminal device can determine the specific terminal device to which the received message needs to be forwarded in the U2U relay M:N network topology scenario. This contributes to ensuring normal communication in the U2U relay scenario.

[0012] In a possible implementation, the message type of the fifth message and / or the message type of the sixth message is one of the following types. That is, a DCR message, a DCA message, a security mode instruction message, a security mode completion message, a request message, a response message, or an announcement message.

[0013] In a possible implementation, the method further includes the following. That is, a step of sending a seventh message to the first terminal device, where the seventh message carries information about the second terminal device. And a step of sending an eighth message to the second terminal device, where the eighth message carries information about the first terminal device. In this implementation, the seventh message indicates to the second terminal device to establish a unicast communication connection with a third terminal device, and the first terminal device can communicate with the second terminal device via the third terminal device. The same applies to the eighth message, and details will not be described again. Therefore, based on this implementation, when the first terminal device simultaneously establishes unicast communication connections with a plurality of other terminal devices, the first terminal device is unclear as to whether the current third terminal device is a relay terminal device between the first terminal device and any of the terminal devices.

[0014] In a possible implementation, the message type of the seventh message and / or the message type of the eighth message is one of the following types. That is, a DCR message, a DCA message, a security mode instruction message, or a security mode completion message.

[0015] In a possible implementation, the specific implementation of the step of transmitting a second message to a second terminal device based on a first message is as follows. That is, a step of obtaining a second message by replacing a first identifier carried in the first message with a second identifier. And a step of transmitting the second message to the second terminal device. Based on this implementation, when receiving the second message, the second terminal device can determine, based on the second identifier in the second message, that the second message is derived from a first message transmitted by the first terminal device to a third terminal device.

[0016] In a possible implementation, the first message further carries a first identifier, and the second message is the same as the first message. Before receiving the first message from the first terminal device, the method further includes the following. That is, a step of transmitting a ninth message to the first terminal device, where the ninth message carries a second identifier. And a step of transmitting a tenth message to the second terminal device, where the tenth message carries a first identifier. Based on this implementation, before transmitting the first message, the first terminal device determines, based on the ninth message transmitted by the third terminal device, the second identifier assigned to the first terminal device by the second terminal device or the third terminal device, and when transmitting the first message, the first identifier of the first terminal device and the first identifier of the second terminal device can be included in the first message. When receiving the second message, the second terminal device determines, based on the second identifier in the second message, that the second message is derived from a first message transmitted by the first terminal device to a third terminal device, and also, based on the first identifier in the second message, can determine that the second message is to be transmitted to the second terminal device.

[0017] In a possible implementation, the message type of the ninth message and / or the message type of the tenth message is a radio resource control (RRC) message.

[0018] In a possible implementation, the second message carries a first identifier, the second identifier is the same as the first identifier, and the second message is the same as the first message. Based on this implementation, when receiving the second message, the second terminal device can obtain the first identifier within the second message. Since the first identifier is the same as the second identifier, the first identifier indicates that the second message is derived from the first message sent by the first terminal device to the third terminal device, and also indicates that the second message has been sent to the second terminal device.

[0019] In a possible implementation, the first identifier is arranged within the adaptation layer header of the first message.

[0020] In a possible implementation, the first message further carries information about the second terminal device. The specific implementation of the step of receiving the first message from the first terminal device is as follows. That is, through a pre-set sidelink radio link control protocol ( RLC ) channel, the step of receiving the first message from the first terminal device. The specific implementation of the step of sending the second message to the second terminal device based on the first message is as follows. That is, through a pre-set sidelink RLC channel, based on the information about the second terminal device, the step of sending the second message to the second terminal device.

[0021] According to a second aspect, the present application provides a communication method applied to a first terminal device. The method includes the following. That is, the step of sending a first message to a third terminal device, where the first message carries a first identifier, the first identifier indicates a second terminal device, and the first message is used by the third terminal device to send a second message to the second terminal device. For the beneficial effects of the second aspect and the possible implementations of the second aspect, please refer to the description in the first aspect. Details are not described in this specification.

[0022] In a possible implementation, the second message conveys a second identifier and / or a first identifier, and the second identifier indicates the first terminal device.

[0023] In a possible implementation, the message type of the first message and the message type of the second message are both one of the following types. That is, a direct communication request ( DCR ) message, a direct communication commitment ( DCA ) message, a security mode instruction message, or a security mode completion message.

[0024] In a possible implementation, the method further includes the following. That is, the step of sending a third message to a third terminal device, where the third message conveys a first identifier.

[0025] In a possible implementation, the message type of the third message is one of the following message types. That is, a DCR message, a DCA message, a security mode instruction message, a security mode completion message, a request message, or a response message.

[0026] In a possible implementation, the method further includes the following. That is, the step of receiving a fifth message from the third terminal device, where the fifth message conveys a first identifier and information regarding a second terminal device, and the fifth message is used to determine a correspondence between the first identifier and the second terminal device.

[0027] In a possible implementation, the message type of the fifth message is one of the following message types. That is, a DCR message, a DCA message, a security mode instruction message, a security mode completion message, a request message, a response message, or an announcement message.

[0028] In a possible implementation, the method further includes the following steps: receiving a seventh message transmitted by a third terminal device, where the seventh message carries information about the second terminal device.

[0029] In a possible implementation, the message type of the seventh message is one of the following message types: that is, a DCR message, a DCA message, a security mode indication message, or a security mode completion message.

[0030] In a possible implementation, the second message carries a second identifier.

[0031] In a possible implementation, the first message further carries a second identifier, the second message carries a second identifier and a first identifier, and the first message is the same as the second message. Before transmitting the first message to the third terminal device, the method further includes the following steps: receiving a ninth message from the third terminal device, where the ninth message carries a second identifier.

[0032] In a possible implementation, the message type of the ninth message is a radio resource control ( RRC ) message.

[0033] In a possible implementation, the second message carries a second identifier, the second identifier is the same as the first identifier, and the first message is the same as the second message.

[0034] In a possible implementation, the first identifier is arranged within the protocol data unit header of the first message.

[0035] In a possible implementation, the specific implementation of the step of transmitting the first message to the third terminal device is as follows: a pre-configured sidelink radio link control protocol ( RLC )Sending a first message to a third terminal device through a channel.

[0036] According to a third aspect, the present application provides a communication method applied to a second terminal device. The method includes the following. That is, receiving a second message sent by a third terminal device, where the second message is obtained based on a first message of a first terminal device, the first message carries a first identifier, and the first identifier indicates the second terminal device. For the beneficial effects of the third aspect and possible implementations of the third aspect, please refer to the description in the first aspect. Details are not described herein.

[0037] In a possible implementation, the second message carries a second identifier and / or the first identifier, and the second identifier indicates the first terminal device.

[0038] In a possible implementation, the message type of the first message and the message type of the second message are both one of the following types. That is, a direct communication request ( DCR ) message, a direct communication commitment ( DCA ) message, a security mode instruction message, or a security mode completion message.

[0039] In a possible implementation, the method further includes the following. That is, sending a fourth message to the third terminal device, where the fourth message carries the second identifier.

[0040] In a possible implementation, the message type of the fourth message is one of the following types. That is, a DCR message, a DCA message, a security mode instruction message, a security mode completion message, a request message, or a response message.

[0041] In a possible implementation, the method further includes the following. That is, a step of receiving a sixth message from a third terminal device, where the sixth message carries a second identifier and information about the first terminal device, and the sixth message is used to determine the correspondence between the second identifier and the terminal device.

[0042] In a possible implementation, the message type of the sixth message is one of the following types. That is, a DCR message, a DCA message, a security mode indication message, a security mode completion message, a request message, a response message, or an announcement message.

[0043] In a possible implementation, the method further includes the following. That is, a step of receiving an eighth message from a third terminal device, where the eighth message carries information about the first terminal device. And a step of generating a second identifier based on the information about the first terminal device.

[0044] In a possible implementation, the message type of the eighth message is one of the following types. That is, a DCR message, a DCA message, a security mode indication message, or a security mode completion message.

[0045] In a possible implementation, the second message carries the second identifier.

[0046] In a possible implementation, the first message further carries the second identifier, the second message carries the second identifier and the first identifier, and the first message is the same as the second message. Before receiving the second message sent by the third terminal device, the method further includes the following. That is, a step of receiving a tenth message from the third terminal device, where the tenth message carries the first identifier.

[0047] In a possible implementation, the message type of the tenth message is Radio Resource Control ( RRC ) message.

[0048] In a possible implementation, the second message carries a second identifier, the second identifier is the same as the first identifier, and the first message is the same as the second message.

[0049] In a possible implementation, the first identifier is arranged within the protocol data unit header of the first message.

[0050] In a possible implementation, the specific implementation of the step of receiving the second message transmitted by the third terminal device is as follows. That is, receiving the second message transmitted by the third terminal device through a preconfigured sidelink radio link control ( RLC ) channel.

[0051] According to a fourth aspect, the present application provides a communication method applied to a third terminal device. The method includes the following. That is, receiving and relaying a DCR message from a first terminal device, where the DCR message carries information about a second terminal device. Receiving a DCA message from the second terminal device. And transmitting a seventh message to the first terminal device, where the seventh message carries information about the second terminal device, and the seventh message indicates to the first terminal device to establish a unicast connection to the second terminal device via the third terminal device.

[0052] According to the method described in the fourth aspect, when the first terminal device needs to establish a unicast connection with a plurality of other terminal devices, the first terminal device can determine, based on the information about the second terminal device carried in the seventh message from the third terminal device, that the third terminal device is a relay device between the first terminal device and the second terminal device, and can communicate with the second terminal device through the unicast connection between the third terminal device and the second terminal device.

[0053] In a possible implementation, the message type of the seventh message is one of the following types. That is, a DCA message, a security mode completion message, or a radio resource control ( RRC ) message.

[0054] In a possible implementation, the DCR message further carries information about the first terminal device. Based on this implementation, the second terminal device can determine that the DCR message is from the first terminal device, and can also determine that it can establish a unicast connection with the first terminal device through the third terminal device and execute communication.

[0055] In a possible implementation, the method further includes the following. That is, a step of sending an eighth message to the second terminal device, where the eighth message carries information about the first terminal device. Based on this implementation, the second terminal device can determine that the third terminal device is a relay device between the second terminal device and the first terminal device, and can communicate with the first terminal device through the unicast connection between the third terminal device and the first terminal device.

[0056] In a possible implementation, the message type of the eighth message is a security mode indication message or an RRC message.

[0057] According to a fifth aspect, the present application provides a communication method applied to a first terminal device. The method includes the following. That is, a step of transmitting a DCR message, where the DCR message carries information about a second terminal device. And a step of receiving a seventh message from a third terminal device, where the seventh message carries information about the second terminal device, and the seventh message indicates to the first terminal device to establish a unicast connection to the second terminal device via the third terminal device. For the beneficial effects of the fifth aspect and possible implementations of the fifth aspect, refer to the description in the fourth aspect. Details are not described in this specification.

[0058] In a possible implementation, the message type of the seventh message is one of the following types. That is, a DCA message, a security mode completion message, or an RRC message type.

[0059] In a possible implementation, the DCR message further carries information about the first terminal device.

[0060] According to a sixth aspect, the present application provides a communication method applied to a second terminal device. The method includes the following. That is, a step of receiving an eighth message transmitted by a third terminal device, where the eighth message carries information about a first terminal device. For the beneficial effects of the fifth aspect and possible implementations of the fifth aspect, refer to the description in the third aspect. Details are not described in this specification.

[0061] In a possible implementation, the message type of the eighth message is one of a DCR message, a security mode indication message, or an RRC message.

[0062] According to a seventh aspect, the present application provides a communication device. The device may be one of a first terminal device, a second terminal device, or a third terminal device, or may be a device of one of a first terminal device, a second terminal device, or a third terminal device, or may be a device that can be used together with one of a first terminal device, a second terminal device, or a third terminal device. Alternatively, the communication device may be a chip system. The communication device may implement any one of the methods in the first aspect, the second aspect, the third aspect, the fourth aspect, the fifth aspect, or the sixth aspect, and their possible implementations. The functions of the communication device may be implemented by hardware or by executing corresponding software by hardware. The hardware or software includes one or more units or modules corresponding to the functions described above. This unit or module may be software and / or hardware. For the operations and beneficial effects performed by the communication device, reference may be made to the methods in the first aspect, the second aspect, the third aspect, the fourth aspect, the fifth aspect, or the sixth aspect, and the beneficial effects corresponding to their possible implementations. For repetitive parts, no further explanation will be given.

[0063] According to an eighth aspect, the present application provides a communication device. The communication device includes a processor. When the processor calls a computer program in the memory, the methods in the first aspect, the second aspect, the third aspect, the fourth aspect, the fifth aspect, or the sixth aspect, and their possible implementations are implemented.

[0064] According to a ninth aspect, the present application provides a communication device. The communication device includes a processor and a memory. The processor is coupled to the memory, and the processor is configured to implement the methods in the first aspect, the second aspect, the third aspect, the fourth aspect, the fifth aspect, or the sixth aspect, and their possible implementations.

[0065] According to a tenth aspect, the present application provides a communication device. The communication device includes a processor and an interface circuit. The interface circuit is configured to receive a signal from a communication device other than the present communication device and transmit the signal to the processor, or transmit a signal from the processor to a communication device other than the present communication device. The processor is configured to implement the method and its possible implementations in the first aspect, the second aspect, the third aspect, the fourth aspect, the fifth aspect, or the sixth aspect by using a logic circuit or executing code instructions.

[0066] According to an eleventh aspect, the present application provides a computer-readable storage medium. The storage medium stores a computer program or instructions. When the computer program or instructions are executed by the present communication device, the method and its possible implementations in the first aspect, the second aspect, the third aspect, the fourth aspect, the fifth aspect, or the sixth aspect are implemented.

[0067] According to a twelfth aspect, the present application provides a computer program product including instructions. When a computer reads and executes the computer program product, the computer can implement the method and its possible implementations in the first aspect, the second aspect, the third aspect, the fourth aspect, the fifth aspect, or the sixth aspect.

Brief Description of the Drawings

[0068]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Mode for Carrying Out the Invention

[0069] Hereinafter, with reference to the accompanying drawings, specific embodiments of the present application will be described in more detail.

[0070] As used herein, the term "embodiment" means that a particular feature, configuration, or characteristic described in combination with a plurality of embodiments may be included in at least one embodiment of the present application. The phrases shown in various places in this specification do not necessarily mean the same embodiment, nor are they exclusive and independent embodiments from other embodiments, or any arbitrary embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0071] In this application, "at least one (item)" means one or more, "a plurality" means two or more, and "at least two (items)" means two or three or more. The term "and / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can indicate the following three cases. That is, the case where only A exists, the case where only B exists, and the case where both A and B exist. Here, A and B can be singular or plural. The character " / " usually indicates an "or" relationship between related objects. "At least one of the following items (parts)" or a similar expression means any combination in these items, including any combination consisting of a single item (part) or multiple items (parts). For example, at least one of a, b, or c can indicate a, b, c, a and b, a and c, b and c, or a, b, and c. Here, a, b, and c can be singular or plural.

[0072] To better understand the embodiments of this application, first, the related concepts in the embodiments of this application are described below.

[0073] I. Sidelink Communication

[0074] In a wireless communication system, a user equipment (UE) can communicate directly with other UEs without using network equipment, and the link between UEs is called a sidelink. The interface between UEs is called a PC5 interface. A typical application scenario of sidelink communication is vehicle-to-everything (V2X) communication. In vehicle-to-everything communication, each vehicle is a UE, and data transmission can be directly performed between UEs through the sidelink without using the network. In this way, communication delay can be effectively reduced.

[0075] II. User Equipment-to-User Equipment Relay (U2U Relay) Communication

[0076] The method in which the source terminal executes detection of the target terminal via a Relay terminal or executes communication with the target terminal is called UE-to-UE relay communication. For the source terminal and the target terminal via the relay terminal, side link coverage extension (for example, when the coverage signal between the source terminal and the target terminal is weak or when the source terminal and the target terminal are out of coverage), or capacity (for example, when the relay terminal is a device with strong capabilities) may be improved. In the layer 2-based relay communication mode, user plane data is relayed and transferred under the Packet Data Convergence Protocol (PDCP) layer on the relay terminal side. In this case, the user plane protocol stack is shown in Figure 2. In the protocol architecture, an adaptation layer is added between the Radio Link Control (RLC) protocol layer and the PDCP layer. The main function of the adaptation layer is bearer multiplexing and demultiplexing. Specifically, the adaptation layer supports multiplexing various bearers into one bearer or splitting one bearer into various bearers, and is used to distinguish various terminals.

[0077] III. Detection of Relay Terminal

[0078] When the source terminal needs to perform data transmission to the target terminal, the target terminal may not be within the coverage of the source terminal. In this case, the source terminal needs to detect and select a relay terminal for connection and perform data transmission to the target terminal via the relay terminal. Two relay terminal detection methods are defined in the protocol.

[0079] Model A: The relay terminal broadcasts an Announcement message to the surrounding terminals. Here, the Announcement message mainly notifies the surrounding terminals of the position of the relay terminal, so that the surrounding terminals can detect the relay terminal.

[0080] Model B: The source terminal broadcasts a Solicitation message to the surrounding terminals. If there is a surrounding relay terminal that meets the requirements of the source terminal, that relay terminal will send a Response message back to the source terminal.

[0081] IV. Unicast Connection Establishment for U2U Relay

[0082] When the source terminal establishes a unicast connection to the target terminal via a relay terminal, the following three implementations may be included.

[0083] 1. Detection and Selection of an Inter-UE Repeater Integrated into Unicast Connection Establishment

[0084] Figure 3 is a schematic flowchart showing the detection and selection of an inter-UE repeater integrated into unicast connection establishment.

[0085] 301: The source terminal broadcasts a Direct Communication Request (DCR) message. In response, the relay terminal receives the DCR message sent by the source terminal.

[0086] The DCR message carries information about the target terminal. For example, the information can be the application layer identifier (APP ID) of the target terminal. The DCR message mainly requests the detection of the target terminal and indicates that the source terminal requests the establishment of a unicast connection to the relay terminal that detected the target terminal.

[0087] 302: The relay terminal broadcasts the DCR message. In response, the target terminal receives the DCR message from the relay terminal.

[0088] After receiving the DCR message sent by the source terminal, the relay terminal functions as a repeater, determines to assist the source terminal in forwarding the DCR message, assigns an L2 address, uses that L2 address as the source L2 address of the DCR message, and sends the DCR message in broadcast mode. The DCR message mainly requests the detection of the target terminal.

[0089] 303: The target terminal establishes a secure connection to the relay terminal (Security Establishment).

[0090] The specific procedure for the target terminal to establish a security connection to the relay terminal (security establishment) may be as follows.

[0091] Step 1: The target terminal sends a security mode command message to the relay terminal.

[0092] The security mode indication message indicates that the target terminal requests to establish a security connection to the relay terminal.

[0093] Step 2: After receiving the security mode indication message, the relay terminal sends a security mode complete message to the target terminal.

[0094] The security mode complete message indicates that the establishment of the security connection between the target terminal and the relay terminal is complete.

[0095] 304: The target terminal sends a Direct Communication Accept (DCA) message to the relay terminal. In response, the relay terminal receives the DCA message from the target terminal.

[0096] After receiving the DCR message from the relay terminal, the target terminal may determine that the DCR message is addressed to the target terminal based on the information about the target terminal carried in the DCR message. Therefore, the target terminal replies to the relay terminal with the DCA message. When the target terminal receives DCR messages from multiple relay terminals, it should be noted that the target terminal selects the optimal relay terminal and replies with the DCA message. Also, the DCA message indicates that the unicast connection establishment between the target terminal and the relay terminal is completed.

[0097] If there was a unicast connection between the target terminal and the relay terminal previously, it may not be necessary to execute steps 302 to 304.

[0098] 305: The source terminal establishes a security connection with the relay terminal.

[0099] The security establishment method between the source terminal and the relay terminal is the same as that in step 303. The specific procedure may be as follows.

[0100] Step 1: The relay terminal sends a security mode indication message to the source terminal.

[0101] The security mode indication message indicates that the relay terminal requests the source terminal to establish a security connection.

[0102] Step 2: After receiving the security mode indication message, the source terminal sends a security mode completion message to the relay terminal.

[0103] The security mode completion message indicates that the establishment of the security connection between the source terminal and the relay terminal is complete.

[0104] 306: The relay terminal sends a DCA message to the source terminal. In response, the relay terminal receives the DCA message from the source terminal. Here, the DCA message indicates that the establishment of the unicast connection link between the source terminal and the relay terminal is complete. If there was a unicast connection link between the source terminal and the relay terminal previously, it may not be necessary to execute steps 305 and 306. The DCA message indicates that the establishment of the unicast connection link between the source terminal and the relay terminal is complete.

[0105] 307: The source terminal sends a DCR message to the target terminal via the relay terminal.

[0106] The DCR message indicates that the source terminal is requesting the establishment of a unicast connection between terminals to the target terminal.

[0107] 308: The target terminal sends a security mode instruction message to the source terminal via the relay terminal.

[0108] The security mode instruction message indicates that the target terminal needs to establish a security connection to the source terminal.

[0109] 309: The source terminal sends a security mode completion message to the target terminal via the relay terminal.

[0110] The security mode completion message indicates that the establishment of the security connection between the source terminal and the target terminal is complete.

[0111] 310: The target terminal sends a DCA message to the source terminal via the relay terminal.

[0112] The DCA message indicates that the establishment of the unicast connection link between the source terminal and the target terminal is completed.

[0113] Steps 307 to 310 are the process in which the source terminal establishes a unicast connection between terminals to the target terminal.

[0114] 2. Detection and Selection of the Relay between UEs Integrated into the Direct Detection of Model B

[0115] Figure 4 is a schematic flowchart showing the detection and selection of the relay between UEs integrated into the direct detection of Model B.

[0116] 401: The source terminal broadcasts a request message. In response, the relay terminal receives the request message sent by the source terminal.

[0117] The request message mainly requests the detection of the target terminal. The request message carries information about the source terminal and information about the target terminal. Optionally, the information about the source terminal can be the APP ID of the source terminal, and the information about the target terminal can be the APP ID of the target terminal.

[0118] 402: The relay terminal broadcasts the request message. In response, the target terminal receives the broadcast request message from the relay terminal.

[0119] After receiving the request message sent by the source terminal, the relay terminal decides to function as a repeater and assist in broadcasting the request message. The broadcast request message includes information about the source terminal, information about the relay terminal, and information about the target terminal. The relay terminal assigns an L2 address to the relay terminal and uses that L2 address as the source L2 address of the broadcast request message.

[0120] 403: The target terminal sends a response message to the relay terminal.

[0121] After receiving the request message, the target terminal determines that the information about the target terminal carried in the request message matches the target terminal, returns a response message to the relay terminal, and uses the source L2 address of the relay terminal as the destination L2 address of the response message.

[0122] 404: The relay terminal sends the response message to the source terminal.

[0123] The response message includes information about the source terminal, information about the relay terminal, and information about the target terminal. The source terminal can receive response messages sent by multiple relay terminals. In this case, the source terminal selects one relay terminal from the multiple relay terminals that send the response message as the repeater between the source terminal and the target terminal based on parameters such as link quality.

[0124] 405: The relay terminal establishes a unicast connection to the target terminal.

[0125] The procedure for terminal 1 to establish a unicast connection to terminal 2 is as follows. Step 1: Terminal 1 sends a DCR message to terminal 2. Step 2: Terminal 2 sends a security mode indication message to terminal 1. Step 3: The terminal 1 sends a security mode completion message to the terminal 2. Step 4: The terminal 2 sends a DCA message to the terminal 1.

[0126] The procedure for the relay terminal to establish a unicast connection to the target terminal is the same as the above-described procedure for the terminal 1 to establish a unicast connection to the terminal 2. It should be noted that if a unicast connection link has been established between the relay terminal and the target terminal previously, it may not be necessary to execute step 405.

[0127] 406: The source terminal establishes a unicast connection to the relay terminal.

[0128] The method for the source terminal to establish a unicast connection to the relay terminal is the same as the procedure described in step 405 for the terminal 1 to establish a unicast connection to the terminal 2. Details are not described in this embodiment of the present application. It should be noted that if a unicast connection link has been established between the source terminal and the relay terminal previously, it may not be necessary to execute step 406.

[0129] 407: The source terminal sends a DCR message to the target terminal via the relay terminal.

[0130] 408: The target terminal sends a security mode instruction message to the source terminal via the relay terminal.

[0131] 409: The source terminal sends a security mode completion message to the target terminal via the relay terminal.

[0132] 410: The target terminal sends a DCA message to the source terminal via the relay terminal.

[0133] Steps 407 to 410 are the process for the source terminal to establish a unicast connection between terminals with respect to the target terminal. The specific implementation of steps 407 to 410 is the same as that of steps 307 to 310. Details are not described in the present embodiment of this application.

[0134] 3. Model A-based unicast connection establishment in the UE-to-UE relay

[0135] FIG. 5 is a schematic flowchart showing model A-based unicast connection establishment in the UE-to-UE relay.

[0136] 501: The relay terminal executes a Group Member Discovery step.

[0137] The Group Member Discovery step can be implemented by using model A or model B described in the above-described detection method of the relay terminal. Specifically, the relay terminal broadcasts an announcement message to surrounding terminals to enable the surrounding terminals to detect the relay terminal and may receive a response from the surrounding terminals. Alternatively, another terminal may broadcast a request message, and the relay terminal receives the request message broadcast by the terminal. Alternatively, the relay terminal may receive an announcement message broadcast by a surrounding terminal. Alternatively, the relay terminal may broadcast a request message to surrounding terminals and may receive a reply from the surrounding terminals. The relay terminal determines a terminal that can communicate with the relay terminal based on the terminal having a unicast connection to the relay terminal and the Group Member Discovery step, and generates a terminal information list. Here, the target terminal is a terminal in the terminal information list.

[0138] 502: The relay terminal periodically broadcasts an announcement message. In response, the source terminal receives the announcement message from the relay terminal. The announcement message includes information about the relay terminal, a list of terminal information, and the like. The target terminal information list includes the plurality of terminals determined in step 501, and these terminals can communicate with the relay terminal.

[0139] 503: The source terminal establishes a unicast connection to the relay terminal.

[0140] The source terminal may receive announcement messages from multiple relay terminals. Here, the announcement message assumes that the source terminal can communicate, and includes target terminals that can select one relay terminal from multiple relay terminals. Before performing communication between terminals, the source terminal and the target terminal need to establish a unicast connection link to the relay terminal respectively.

[0141] The method by which the source terminal establishes a unicast connection to the relay terminal is the same as the procedure described in step 305 in which terminal 1 establishes a unicast connection to terminal 2. Details are not described in this embodiment of the present application. It should be noted that it may not be necessary to execute step 503 if a unicast connection link has been established between the source terminal and the relay terminal previously.

[0142] 504: The relay terminal establishes a unicast connection to the target terminal.

[0143] The method by which the relay terminal establishes a unicast connection to the target terminal is the same as the procedure described in step 305 in which terminal 1 establishes a unicast connection to terminal 2. Details are not described in this embodiment of the present application. It should be noted that it may not be necessary to execute step 504 if a unicast connection link has been established between the relay terminal and the target terminal previously.

[0144] 505: The source terminal transmits a DCR message to the target terminal via the relay terminal.

[0145] 506: The target terminal transmits a security mode instruction message to the source terminal via the relay terminal.

[0146] 507: The source terminal transmits a security mode completion message to the target terminal via the relay terminal.

[0147] 508: The target terminal transmits a DCA message to the source terminal via the relay terminal.

[0148] Steps 505 to 508 are the process for the source terminal to establish a unicast connection between terminals to the target terminal, and the specific implementation of steps 505 to 508 is the same as that of steps 307 to 310. Details are not described in the present embodiment of this application.

[0149] The system architecture in the embodiments of this application will be described below.

[0150] The method provided in this application can be applied to various communication systems, such as the internet of things (IoT) system, narrowband internet of things (NB-IoT) system, long term evolution (LTE) system, 5th generation (5G) communication system, hybrid architecture of LTE and 5G, 5G new radio (NR) system, and new communication systems emerging in the future development of communication.

[0151] FIG. 6 is a diagram showing a communication system according to an embodiment of the present application. The solution in the present application is applicable to a communication system. The communication system includes at least one first terminal device, at least one second terminal device, and at least one third terminal device. In FIG. 6, an example in which the communication system includes one first terminal device, one second terminal device, and one third terminal device is used. The first terminal device can communicate with the third terminal device through a sidelink, and the second terminal device can also communicate with the third terminal device through a sidelink. The third terminal device can be used as a repeater between the first terminal device and the second terminal device. The first terminal device transmits information to the third terminal device, whereby the third terminal device transfers the information to the second terminal device to implement communication between the first terminal device and the second terminal device. The same applies to the second terminal device. The communication system may further include other terminal devices. Each of the other terminal devices can communicate with the first terminal device, the second terminal device, or the third terminal device through a sidelink. The number of terminal devices in the communication system is not limited in the present embodiment of the present application. The first terminal device, the second terminal device, and the third terminal device may all be in a Radio Resource Control (RRC) connected state, an RRC idle state, an RRC inactive state, or an out of coverage (OOC) state. The states of the first terminal device, the second terminal device, and the third terminal device are not limited in the present embodiment of the present application.

[0152] The terminal device in the embodiments of the present application, sometimes abbreviated as a terminal, is an entity configured to receive or transmit signals on the user side. The terminal device can be a device that provides voice connectivity and / or data connectivity to the user, for example, a handheld device or an in-vehicle device with a wireless connection function. Alternatively, the terminal device may be another processing device connected to a wireless modem. The terminal device can communicate with a radio access network (RAN). The terminal device may also be referred to as a wireless terminal, subscriber unit, subscriber station, mobile station, mobile console, remote station, access point, remote terminal, access terminal, user terminal, user agent, user device, or UE. The terminal device can be a mobile terminal, for example, a mobile phone (also called a "cellular" phone), or a computer with a mobile terminal. For example, the terminal device can be a portable device, a pocket-sized device, a handheld device, a device built into a computer, or an in-vehicle mobile device, and these devices exchange voice and / or data with the wireless access network. For example, alternatively, the terminal device may be a device such as a personal communications service (PCS) phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, or a personal digital assistant (PDA).Typical terminal devices include, for example, mobile phones, tablet computers, notebook computers, palmtop computers, mobile internet devices (MIDs), or wearable devices such as smartwatches, smart bands, or pedometers. However, the embodiments of this application are not limited thereto.

[0153] Based on the above description of U2U relay communication, in order for the relay terminal to be able to receive and forward messages, when the source terminal sends its message to the target terminal, the layer 2 identifier (L2 ID) of the relay terminal is written as the destination address. U2U relay communication further includes an M:N network topology scenario. The network topology scenario includes a plurality of source terminals, a plurality of target terminals, and one relay terminal. Communication between the plurality of source terminals and the plurality of target terminals needs to be executed via the relay terminal. In the U2U relay M:N network topology scenario, when the source terminal establishes a unicast communication connection to a plurality of target terminals via the relay terminal, after the relay terminal receives the message sent by the source terminal, the relay terminal may not recognize the specific target terminal to which the message needs to be forwarded.

[0154] To enable a relay terminal to determine a specific UE that needs to forward the currently received message and to ensure normal communication in a U2U relay scenario, this application provides a communication method. Refer to FIG. 7. FIG. 7 is a schematic flowchart showing a communication method according to an embodiment of this application. As shown in FIG. 7, this communication method includes the following steps 701 and 702. The method shown in FIG. 7 may be executed by a first terminal device, a second terminal device, and a third terminal device, or may be executed by a chip in the first terminal device, a chip in the second terminal device, or a chip in the third terminal device. In FIG. 2, an example in which this method is executed by a first terminal device, a second terminal device, and a third terminal device is used for illustration. The execution entity of this communication method is not limited in this embodiment of this application.

[0155] 701: The first terminal device sends a first message to the third terminal device. Accordingly, the third terminal device receives the first message from the first terminal device. The first message carries a first identifier, and the first identifier indicates the second terminal device.

[0156] In this embodiment of this application, a unicast connection is established between the first terminal device and the third terminal device, and a unicast connection is also established between the second terminal device and the third terminal device. The third terminal device is a relay device between the first terminal device and the second terminal device. Corresponding to the above description of U2U relay communication, the first terminal device may be a source terminal, the second terminal device may be a target terminal, and the third terminal device may be a relay terminal between the source terminal and the target terminal. Alternatively, the first terminal device may be a target terminal, and the second terminal device may be a source terminal. This is not limited in this embodiment of this application. The first terminal device and the second terminal device can communicate with each other via the third terminal device.

[0157] The first terminal device transmits a first message to the third terminal device, whereby the third terminal device can transfer the content in the first message to the second terminal device to implement mutual communication between the first terminal device and the second terminal device. The first message further carries a first identifier, and the first identifier indicates the second terminal device. After receiving the first message, the third terminal device can obtain the first identifier in the first message and determine that the first terminal device intends to transfer the content in the first message to the second terminal device via the third terminal device. Therefore, the first identifier can be used by the third terminal device to determine that it is necessary to transfer the content in the first message to the second terminal device when the third terminal device receives the first message. Based on this implementation, the relay terminal can determine a specific terminal device to which a received message needs to be transferred in a U2U relay M:N network topology scenario. This contributes to ensuring normal communication in the U2U relay scenario.

[0158] Optionally, the first identifier may be the L2 ID of the second terminal device, or alternatively, the first identifier may be the local ID of the second terminal device. Further, optionally, the first identifier is arranged within the adaptation layer header of the first message. It should be noted that the first identifier may alternatively be another identifier and may similarly be arranged within the packet header in another layer. This is not limited in the present embodiment of this application.

[0159] In a possible implementation, the first message may be a message transmitted in the process of the first terminal device establishing a unicast connection to the second terminal device. In this case, the first terminal device has established a unicast connection to the third terminal device, and the second terminal device has also established a unicast connection to the third terminal device. Optionally, the message type of the first message may be one of the following message types. That is, a DCR message, a DCA message, a security mode indication message, or a security mode completion message.

[0160] Corresponding to the above three implementations of unicast connection establishment in U2U relay, it is as follows.

[0161] In the first implementation, specifically, when using the detection and selection of an inter-UE repeater integrated into unicast connection establishment, the first message may be a message transmitted by the source UE or the target terminal via the relay terminal to the target terminal or the source UE in any one of steps 307 to 310. For example, assume that the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. In this case, the first message may be a DCR message transmitted by the source terminal to the relay terminal in step 307.

[0162] In the second implementation, specifically, when using the detection and selection of an inter-UE repeater integrated into the direct detection of model B, the first message may be a message transmitted by the source UE or the target terminal via the relay terminal to the target terminal or the source UE in any one of steps 407 to 410. For example, assume that the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. In this case, the first message may be a DCR message transmitted by the source terminal to the relay terminal in step 407.

[0163] For a third implementation, specifically when using model A-based unicast connection establishment in a UE-to-UE repeater, the first message can be a message sent by the source UE or the target terminal via the relay terminal to the target terminal or the source UE in any one of steps 505 to 508. For example, assume that the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. In this case, the first message can be a DCR message sent by the source terminal to the relay terminal in step 505.

[0164] In another possible implementation, after the first terminal device establishes a unicast connection to the second terminal device, the first message can be a message sent by the first terminal device to the second terminal device via the third terminal device. In this case, the first message can belong to any message type, for example, a PC5-RRC message or a PC5 Signaling (PC5-S) message. This is not limited in the present embodiment of this application.

[0165] In order for the third terminal device to enable the determination that the first identifier in the first message indicates the second terminal device, before step 701, the third terminal device needs to establish a correspondence between the first identifier and the second terminal device. Specifically, there are two implementations.

[0166] Method 1: The first identifier is assigned by the first terminal device to the second terminal device. Correspondingly, the second terminal device also assigns a second identifier to the first terminal device, and the second identifier indicates the first terminal device.

[0167] Specifically, the first terminal device sends a third message to the third terminal device. In response, the third terminal device receives the third message from the first terminal device. Here, the third message carries a first identifier. The second terminal device sends a fourth message to the third terminal device. In response, the third terminal device receives the fourth message from the second terminal device. Here, the fourth message carries a second identifier, and the second identifier indicates the first terminal device. The first identifier (second identifier) assists the third terminal device in determining that when receiving a message sent by the first terminal device (second terminal device), it is necessary to transfer the content in the message to a specific terminal device. Based on this implementation, the third terminal device can determine a specific terminal device to which a received message needs to be transferred in a U2U relay M:N network topology scenario. This contributes to ensuring normal communication in the U2U relay scenario.

[0168] Similar to the first identifier, optionally, the second identifier described above may be the L2 ID of the first terminal device, or the second identifier may be the local ID of the first terminal device. Further, optionally, the second identifier is arranged within the adaptation layer header of the fourth message. It should be noted that the second identifier may alternatively be another identifier and may similarly be arranged within the packet header of another layer. This is not limited in the present embodiment of this application. The same applies to the first identifier and the second identifier described hereinafter, and details will not be described again.

[0169] Optionally, the message type of the third message and / or the message type of the fourth message is one of the following types. That is, a DCR message, a DCA message, a security mode indication message, a security mode completion message, a request message, or a response message.

[0170] Corresponding to the above three implementations of unicast connection establishment in U2U relay, it is as follows.

[0171] In the first implementation, specifically, when using the detection and selection of the UE - to - UE relay integrated into the unicast connection establishment, the third message and / or the fourth message can be one or more messages sent by the source terminal or the target terminal to the relay terminal in step 301, step 303, step 304, or step 305. Specifically, the message type of the third message and / or the message type of the fourth message is one of the following types. That is, a DCR message, a DCA message, a security mode indication message, and a security mode completion message. In this case, the third message and the fourth message are not messages of the same type. For example, assume that the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. In this case, the third message can be a DCR message sent by the source terminal to the relay terminal in step 301. Here, the DCR message carries a first identifier, and the fourth message can be a DCA message sent by the target terminal to the relay terminal in step 304. Here, the DCA message carries a second identifier. Assume that the first identifier is the local ID of the target terminal and the second identifier is the local ID of the source terminal. In this case, after the unicast Connection establishment between the target terminal and the source terminal is completed, assuming that the source terminal (target terminal) sends a message to the target terminal (source terminal) via the relay terminal, it is necessary to carry only the local ID of the target terminal (source terminal) in that message. After receiving that message, the relay terminal can recognize the device to which the message needs to be sent based on the local ID.

[0172] For a second implementation, specifically when using the detection and selection of an inter-UE relay integrated into the direct detection of model B, the third message and / or the fourth message can be one or more messages sent by the source terminal or the target terminal to the relay terminal in step 401, step 403, step 405, or step 406. Specifically, the message type of the third message and / or the message type of the fourth message is one of the following types. That is, a request message, a response message, a DCR message, a DCA message, a security mode indication message, or a security mode completion message. In this case, the third message and the fourth message are not messages of the same type. For example, assume that the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. In this case, the third message can be a request message sent by the source terminal to the relay terminal in step 401. Here, the request message carries a first identifier, and the fourth message can be a response message sent by the target terminal to the relay terminal in step 404. Here, the response Message carries a second identifier. Assume that the first identifier is the L2 ID of the target terminal and the second identifier is the L2 ID of the source terminal. In this case, after the unicast Connection establishment between the target terminal and the source terminal is completed, assuming that the source terminal (target terminal) sends a message to the target terminal (source terminal) via the relay terminal, it is necessary to carry only the L2 ID of the target terminal (source terminal) in that message. After receiving that message, the relay terminal can recognize the device to which the message needs to be sent based on the L2 ID.

[0173] For the third implementation, specifically when using model A-based unicast connection establishment in the UE-to-UE relay, the third message and / or the fourth message can be one or more messages sent by the source terminal or the target terminal to the relay terminal in step 503 or step 504. Specifically, the message type of the third message and / or the message type of the fourth message is one of the following types. That is, a DCR message, a DCA message, a security mode indication message, or a security mode completion message. In this case, the third message and the fourth message are not of the same type. For example, assume that the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. In this case, the third message can be a DCR message sent by the source terminal to the relay terminal in step 503. Here, the DCR message carries a first identifier, and the fourth message can be a DCA message sent by the target terminal to the relay terminal in step 504. Here, the DCA Message carries a second identifier. Assume that the first identifier is the local ID of the target terminal and the second identifier is the local ID of the source terminal. In this case, after the unicast Connection establishment between the target terminal and the source terminal is completed, assuming that the source terminal (target terminal) sends a message to the target terminal (source terminal) via the relay terminal, it is necessary to carry only the local ID of the target terminal (source terminal) in that message. After receiving the message, the relay terminal can recognize the device to which the message needs to be sent based on the local ID.

[0174] Optionally, the third message and / or the fourth message may alternatively belong to one or more message types other than the message types described above. For example, the third message and / or the fourth message may be one or more PC5-RRC messages, or one or more PC5-S messages, or the third message and / or the fourth message may be one or more new types of messages. This is not limited in the present embodiment of the present application.

[0175] For a third implementation, specifically corresponding to model A-based unicast connection establishment in a UE-to-UE repeater, in the above-described implementation of unicast connection establishment in U2U relaying, it is assumed that the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. In this case, the fifth message may be a PC5-RRC message or a PC5-S message transmitted by the source terminal to the relay terminal after step 503, and the sixth message may be a PC5-RRC message or a PC5-S message transmitted by the target terminal to the relay terminal after step 504.

[0176] One of the message types of the third message and the fourth message may be a PC5-RRC message or a PC5-S message, and the message types of the other messages are one of the DCR message, DCA message, security mode indication message, security mode completion message, request message, or response message described above.

[0177] Method 2: The first identifier is assigned by the third terminal device to the second terminal device. Accordingly, the third terminal device also assigns the second identifier to the first terminal device.

[0178] Specifically, the third terminal device transmits a fifth message to the first terminal device. Here, the fifth message carries the first identifier and information regarding the second terminal device. In response, the first terminal device receives the fifth message from the third terminal device. Here, the fifth message is used to determine the correspondence between the first identifier and the second terminal device. The third terminal device transmits a sixth message to the second terminal device. Here, the sixth message carries the second identifier and information regarding the first terminal device. In response, the second terminal device receives the sixth message transmitted by the third terminal device. Here, the sixth message is used to determine the correspondence between the second identifier and the first terminal device. Optionally, the information regarding the first terminal device may be the APP ID of the first terminal device and is arranged within the application layer packet header of the sixth message. Similarly, the information regarding the second terminal device may be the APP ID of the second terminal device and is arranged within the application layer packet header of the fifth message. It should be noted that the information regarding the first terminal device may alternatively be another type of information regarding the first terminal device and is arranged within the packet header of another layer. This is not limited in the present embodiment of the present application. The same applies to the information regarding the second terminal device. Details will not be described again in the present embodiment of the present application. After obtaining the first identifier, the first terminal device may determine the correspondence between the first identifier and the second terminal device based on the information regarding the second terminal device carried in the fifth message. Thereafter, when it is necessary to communicate with the second terminal device via the third terminal device, the first terminal device includes the first identifier indicating the second terminal device in the message. After obtaining the message transmitted by the first terminal device, the third terminal device may determine that it is necessary to forward the message to the second terminal device based on the first identifier carried in the message. Similarly, after obtaining the second identifier, the second terminal device determines the correspondence between the second identifier and the first terminal device.When communicating with the first terminal device via the third terminal device, the second terminal device needs to include a second identifier in the message and indicate that it needs to send the message to the first terminal device. Based on this implementation, the third terminal device can determine a specific terminal device that needs to forward the received message in the U2U relay M:N network topology scenario. This contributes to ensuring normal communication in the U2U relay scenario.

[0179] Optionally, the message type of the fifth message and / or the message type of the sixth message is one of the following types. That is, a DCR message, a DCA message, a security mode instruction message, a security mode completion message, a request message, a response message, or an announcement message.

[0180] Corresponding to the above-described implementation of unicast connection establishment in the U2U relay, it is as follows.

[0181] For the first implementation, specifically when using the detection and selection of an inter-UE repeater integrated into unicast connection establishment, the fifth message and / or the sixth message can be one or more messages sent by the relay terminal to the source terminal or the target terminal in step 302, step 303, step 305, or step 306. Specifically, the message type of the fifth message and / or the message type of the sixth message is one of the following types. That is, a DCR message, a DCA message, a security mode instruction message, and a security mode completion message. In this case, the fifth message and the sixth message are not messages of the same type. For example, assume that the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. In this case, the fifth message can be a DCA message sent by the relay terminal to the source terminal in step 306. Here, the DCA message carries the first identifier and information about the target terminal, and the sixth message can be a DCR message sent by the relay terminal to the target terminal in step 302. Here, the DCR message carries the second identifier and information about the source terminal. Assume that the first identifier is the local ID of the target terminal and the second identifier is the local ID of the source terminal. In this case, after the unicast Connection establishment between the target terminal and the source terminal is completed, assuming that the source terminal (target terminal) sends a message to the target terminal (source terminal) via the relay terminal, it is necessary to carry only the local ID of the target terminal (source terminal) in the message. After receiving the message, the relay terminal can recognize the device to which the message needs to be sent based on the local ID.

[0182] For a second implementation, specifically when using the detection and selection of an inter-UE relay integrated into the direct detection of Model B, the fifth message and / or the sixth message can be one or more messages sent by the relay terminal to the source terminal or the target terminal in step 402, step 404, step 405, or step 406. Specifically, the message type of the fifth message and / or the message type of the sixth message is one of the following types. That is, a request message, a response message, a DCR message, a DCA message, a security mode instruction message, or a security mode completion message. In this case, the fifth message and the sixth message are not messages of the same type. For example, assume that the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. In this case, the fifth message can be a response message sent by the relay terminal to the source terminal in step 404. Here, the response message carries the first identifier and information about the target terminal, and the sixth message can be a request message sent by the relay terminal to the target terminal in step 402. Here, the request Message carries the second identifier and information about the source terminal. Assume that the first identifier is the L2 ID of the target terminal and the second identifier is the L2 ID of the source terminal. In this case, after the unicast Connection establishment between the target terminal and the source terminal is completed, assuming that the source terminal (target terminal) sends a message to the target terminal (source terminal) via the relay terminal, it is necessary to carry only the L2 ID of the target terminal (source terminal) in that message. After receiving that message, the relay terminal can recognize the device to which the message needs to be sent based on the L2 ID.

[0183] Optionally, the fifth message and / or the sixth message may alternatively belong to one or more message types other than the message types described above. For example, the fifth message and / or the sixth message may be one or more PC5-RRC messages, or one or more PC5-S messages, or the fifth message and / or the sixth message may be one or more new types of messages. This is not limited in the present embodiment of this application.

[0184] In a third implementation, specifically, corresponding to the model A-based unicast connection establishment in the UE-to-UE repeater, in the above-described implementation of unicast connection establishment in the U2U repeater, it is assumed that the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. In this case, the fifth message may be a PC5-RRC message or a PC5-S message sent by the relay terminal to the source terminal after step 503, and the sixth message may be a PC5-RRC message or a PC5-S message sent by the relay terminal to the target terminal after step 504.

[0185] One of the message types of the fifth message and the sixth message may be a PC5-RRC message or a PC5-S message, and the message types of the other messages are one of the DCR messages, DCA messages, security mode indication messages, security mode completion messages, request messages, or response messages described above.

[0186] Based on the above two allocation methods in the first identifier, and further optionally, the third terminal device sends a seventh message to the first terminal device. Accordingly, the first terminal device receives the seventh message sent by the third terminal device. Here, the seventh message carries information about the second terminal device. The third terminal device sends an eighth message to the second terminal device. Accordingly, the second terminal device receives the eighth message from the third terminal device. Here, the eighth message carries information about the first terminal device.

[0187] In the above allocation method in the first identifier, assuming that method 1 is used, specifically, it is assumed that the first identifier is assigned by the first terminal device to the second terminal device.

[0188] In this case, before the third terminal device receives the third message from the first terminal device, the third terminal device sends a seventh message to the first terminal device. Here, the seventh message carries information about the second terminal device. Accordingly, before the third terminal device receives the fourth message from the second terminal device, the third terminal device sends an eighth message to the second terminal device. Here, the eighth message carries information about the first terminal device. In this implementation, the seventh message may mainly indicate to the first terminal device to assign the first identifier to the second terminal device, and may indicate to the second terminal device to establish a unicast communication connection with the third terminal device, and the first terminal device can communicate with the second terminal device via the third terminal device. The same applies to the eighth message, and the details will not be described again. Therefore, based on this implementation, when the first terminal device simultaneously establishes unicast communication connections with a plurality of other terminal devices, the first terminal device is unclear as to whether the current third terminal device is a relay terminal device between the first terminal device and any of the terminal devices.

[0189] Optionally, the message type of the seventh message and / or the message type of the eighth message is one of the following types, namely, a DCR message, a DCA message, a security mode instruction message, or a security mode completion message. The seventh message and the eighth message are not messages of the same type.

[0190] Corresponding to the above-mentioned three implementations of unicast connection establishment in the U2U repeater, it is as follows.

[0191] In the first implementation, specifically, when using the detection and selection of the UE - to - UE repeater integrated into the unicast connection establishment, the seventh message and / or the eighth message can be one or more messages sent by the relay terminal to the source terminal or the target terminal in step 302, step 303, step 305, or step 306. Specifically, the message type of the seventh message and / or the message type of the eighth message is one of the following types, namely, a DCR message, a DCA message, a security mode instruction message, and a security mode completion message. In this case, the seventh message and the eighth message are not messages of the same type. For example, assume that the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. In this case, the seventh message can be a DCA message sent by the relay terminal to the source terminal in step 306, and the eighth message can be a DCR message sent by the relay terminal to the target terminal in step 302.

[0192] For a second implementation, specifically when using the detection and selection of an inter-UE relay integrated into the direct detection of model B, the seventh message and / or the eighth message can be one or more messages transmitted by the relay terminal to the source terminal or the target terminal in step 405 or step 406. Specifically, the message type of the seventh message and / or the message type of the eighth message is one of the following types. That is, a DCR message, a DCA message, a security mode indication message, or a security mode completion message. In this case, the seventh message and the eighth message are not messages of the same type. For example, assume that the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. In this case, the seventh message can be a DCA message transmitted by the relay terminal to the source terminal in step 406, and the eighth message can be a DCR message transmitted by the relay terminal to the target terminal in step 405.

[0193] For a third implementation, specifically when using model A-based unicast connection establishment in a UE-to-UE relay, the seventh message and / or the eighth message can be one or more messages sent by the relay terminal to the source terminal or the target terminal in step 503 or step 504. Specifically, the message type of the seventh message and / or the message type of the eighth message is one of the following types. That is, a DCR message, a DCA message, a security mode instruction message, or a security mode completion message. In this case, the seventh message and the eighth message are not messages of the same type. For example, assume that the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. In this case, the seventh message can be a DCA message sent by the relay terminal to the source terminal in step 503, and the eighth message can be a DCR message sent by the relay terminal to the target terminal in step 504.

[0194] Optionally, the seventh message and / or the eighth message can alternatively belong to one or more message types other than the message types described above, for example, one or more PC5-RRC messages, or one or more PC5-S messages, or the seventh message and / or the eighth message can be one or more new types of messages. This is not limited in the present embodiment of this application.

[0195] One of the message types of the seventh message and the eighth message can be a PC5-RRC message, or a PC5-S message, and the message type of the other message is one of the DCR message, DCA message, security mode instruction message, security mode completion message, request message, or response message described above.

[0196] Use Method 2 in the above-described allocation method for the first identifier. Specifically, assume that the first identifier is assigned by the third terminal device to the second terminal device. In this case, after the first terminal device establishes a unicast connection with the third terminal device and before the first terminal device establishes a unicast connection between terminals with the second terminal device, the third terminal device sends a seventh message to the first terminal device. Here, the seventh message carries information about the second terminal device. Accordingly, after the second terminal device establishes a unicast connection with the third terminal device and before the first terminal device establishes a unicast connection between terminals with the second terminal device, the third terminal device sends an eighth message to the second terminal device. Here, the eighth message carries information about the first terminal device. In this implementation, the seventh message indicates to the second terminal device to establish a unicast communication connection with the third terminal device, and the first terminal device can communicate with the second terminal device via the third terminal device. The same applies to the eighth message, and the details will not be described again. Therefore, based on this implementation, when the first terminal device simultaneously establishes unicast communication connections with a plurality of other terminal devices, the first terminal device is unaware of whether the current third terminal device is a relay terminal device between the first terminal device and any of the terminal devices.

[0197] 702: Based on the first message, the third terminal device sends a second message to the second terminal device. Accordingly, the second terminal device receives the second message sent by the third terminal device.

[0198] In this embodiment of the present application, the second message is generated based on the first message and is used to transfer the content in the first message transmitted by the first terminal device to the second terminal device. In other words, the content of the data included in the second message is the same as that included in the first message. Accordingly, the message type of the second message is also the same as that of the first message. For details, refer to the description of the message type of the first message in step 701. Details are not described in this embodiment of the present application.

[0199] When the second terminal device receives the second message, the second message may carry a first identifier and / or a second identifier to enable the second terminal device to determine that the second message is derived from the first message transmitted by some terminal device to the third terminal device. Specifically, the following three implementations are included.

[0200] Method 1: The second message carries a second identifier. In this case, the second identifier is different from the first identifier. The second identifier may be assigned to the first terminal device by the second terminal device or may be assigned to the first terminal device by the third terminal device. The specific implementation in which the third terminal device transmits the second message to the second terminal device based on the first message is as follows. That is, the third terminal device replaces the first identifier carried in the first message with the second identifier to obtain the second message. The third terminal device transmits the second message to the second terminal device. Based on this implementation, when receiving the second message, the second terminal device can determine that the second message is derived from the first message transmitted by the first terminal device to the third terminal device based on the second identifier in the second message.

[0201] Method 2: The second message conveys a first identifier and a second identifier. The first identifier (second identifier) may be assigned to the second terminal device (first terminal device) by the first terminal device (second terminal device), or may be assigned to the second terminal device (first terminal device) by a third terminal device. Accordingly, the first message also conveys a first identifier and a second identifier. In this case, the second message is the same as the first message. Specifically, before the third terminal device receives the first message from the first terminal device, this method further includes the following. That is, a step of transmitting a ninth message to the first terminal device, where the ninth message conveys the second identifier. And a step of transmitting a tenth message to the second terminal device, where the tenth message conveys the first identifier. Based on this implementation, before transmitting the first message, the first terminal device determines, based on the ninth message transmitted by the third terminal device, the second identifier assigned to the first terminal device by the second terminal device or the third terminal device, and when transmitting the first message, the first identifier of the first terminal device and the first identifier of the second terminal device can be included in the first message. When receiving the second message, the second terminal device can determine, based on the second identifier in the second message, that the second message is derived from the first message transmitted by the first terminal device to the third terminal device, and based on the first identifier in the second message, that the second message is to be transmitted to the second terminal device.

[0202] Optionally, the message type of the ninth message and / or the message type of the tenth message may be one or more RRC messages, specifically, one or more PC5-RRC messages, or one or more PC5-S messages, or one or more messages described in the above three implementations of unicast connection establishment in the U2U repeater. The message types of the ninth message and the tenth message are not limited in the present embodiment of the present application.

[0203] Method 3: The second message carries the first identifier, and the first identifier is the same as the second identifier. Accordingly, the first message is the same as the second message. In this case, the first identifier (the second identifier) is assigned by the third terminal device to the second terminal device (the first terminal device). Based on this implementation, when receiving the second message, the second terminal device can obtain the first identifier in the second message. Since the first identifier is the same as the second identifier, it indicates that the first identifier is derived from the first message sent from the first terminal device to the third terminal device by the second message, and also indicates that the second message has been sent to the second terminal device.

[0204] In a possible implementation, the first terminal device sends the first message to the third terminal device through a pre-configured sidelink RLC channel. Accordingly, the third terminal device receives the first message from the first terminal device through the pre-configured sidelink RLC channel. The third terminal device sends the second message to the second terminal device based on the information about the second terminal device through the pre-configured sidelink RLC channel. Accordingly, the second terminal device receives the second message sent by the third terminal device through the pre-configured sidelink RLC channel.

[0205] This implementation can be applied to scenarios where there is no adaptation layer for the Signaling Radio Bearer (SRB) currently used to send the first message. It should be further noted that this implementation can also be applied to scenarios where there is an adaptation layer for the SRB. This is not limited in the embodiments of this application. When the first terminal device sends the first message, the first message carries information about the second terminal device. Optionally, the information about the second terminal device may be the APP ID of the second terminal device. The third terminal device determines that it is necessary to transfer the content in the first message to the second terminal device based on the information about the second terminal device in the first message, and can transfer the first message to the second terminal device regarding the unicast connection link previously established between the third terminal device and the second terminal device. In this implementation, the first message and the second message are the same.

[0206] The pre-configured sidelink RLC channel is a default or specific sidelink RLC channel. SRB0, SRB1, SRB2, and SRB3 between terminals use the default or specific sidelink RLC channel on a hop-by-hop link. Based on this implementation, in a U2U relay M:N network topology scenario, the relay terminal can determine a specific terminal device that needs to forward the received message based on the terminal device information carried in the first message. This contributes to ensuring normal communication in the U2U relay scenario. Optionally, in this implementation, the first message may be one of the messages sent when the first terminal device and the second terminal device establish a unicast connection between terminals. The messages sent when the first terminal device and the second terminal device establish a unicast connection between terminals include DCR messages, security mode indication messages, security mode completion messages, and DCA messages. The DCR message corresponds to SRB0, the security mode indication message corresponds to SRB1, the security mode completion message corresponds to SRB2, and the DCA message corresponds to SRB3.

[0207] Based on the above description of unicast connection establishment in the U2U relay terminal, when the source terminal establishes unicast connection communication with multiple target terminals, multiple relay terminals detect various target terminals. In this case, the source terminal receives DCA messages sent by multiple relay terminals. In this case, the source terminal may not be able to recognize the target terminals detected by a specific relay terminal.

[0208] For example, as shown in FIG. 8, it is assumed that the source terminal establishes unicast connections to target terminal 1, target terminal 2, and target terminal 3. Therefore, source terminal 1 broadcasts a DCR message. Here, the DCR message carries the APP IDs of target terminal 1, target terminal 2, and target terminal 3. Alternatively, source terminal 1 broadcasts three DCR messages, and each DCR message carries information about one target terminal. For example, the first DCR message carries the APP ID of target terminal 1, the second DCR message carries the APP ID of target terminal 2, and the third DCR message carries the APP ID of target terminal 3. The source addresses of the three DCR messages are the same, and all are the L2 address of the source terminal. When receiving the DCR message, relay terminal 1 and relay terminal 2 determine to assist the source terminal in forwarding the DCR message. After relay terminal 1 and relay terminal 2 forward the DCR message, both target terminal 1 and target terminal 2 reply with a DCA message to relay terminal 1 after receiving the DCR message via relay terminal 1. After receiving the DCR message via relay terminal 2, target terminal 3 replies with a DCA message to relay terminal 1. After receiving the DCA messages of target terminal 1 and target terminal 2, relay terminal 1 forwards the DCA messages to the source terminal. After receiving the DCA message of target terminal 2, relay terminal 2 also forwards the DCA message to the source terminal. In this case, the source terminal may receive two DCA messages from relay terminal 1 and a DCA message from relay terminal 2 at the same time. In this case, the source terminal cannot recognize which of relay terminal 1 and relay terminal 2 is a repeater between the source terminal and any of the target terminals without being able to recognize the specific target terminal corresponding to the three DCA messages.

[0209] To enable the source terminal to determine the correspondence between the target terminal and the relay terminal in the process of establishing a unicast connection, this application provides a communication method. Please refer to FIG. 9. FIG. 9 is a schematic flowchart showing another communication method according to an embodiment of this application. As shown in FIG. 9, this communication method includes the following steps 901 to 903. The method shown in FIG. 9 may be executed by the first terminal device, the second terminal device, and the third terminal device, or may be executed by a chip in the first terminal device, a chip in the second terminal device, or a chip in the third terminal device. In FIG. 9, an example in which this method is executed by the first terminal device, the second terminal device, and the third terminal device is used for explanation. The execution entity of this communication method is not limited in this embodiment of this application.

[0210] 901: The third terminal device receives and forwards the DCR message from the first terminal device.

[0211] In this embodiment of this application, the first terminal device is the source terminal, the second terminal device is the target terminal, and the third terminal device is the relay terminal. The DCR message sent by the first terminal device carries information about the second terminal device and, optionally, the APP ID of the second terminal device. The first terminal device broadcasts the DCR message. Here, the DCR message requests to detect the second terminal device. After receiving the DCR message, the third terminal device decides to assist the first terminal device in forwarding the DCR message. Optionally, the third terminal device may broadcast the DCR message to the surroundings.

[0212] 902: After receiving the DCR message sent by the third terminal device, the second terminal device sends a DCA message to the third terminal device. Accordingly, the third terminal device receives the DCR message from the second terminal device.

[0213] In the present embodiment of the present application, after receiving the DCR message, the second terminal device can determine that the DCR message is addressed to the second terminal device by determining the information about the second terminal device in the DCR message, and the second terminal device returns the DCR message to the third terminal device.

[0214] In a possible implementation, the DCR message carries information about the first terminal device. Optionally, the information about the first terminal device is the APP ID of the first terminal device. Based on this implementation, the second terminal device can determine that the DCR message is from the first terminal device, and the second terminal device can also determine that it can establish a unicast connection to the first terminal device via the third terminal device and execute communication.

[0215] 903: The third terminal device sends a seventh message to the first terminal device. Accordingly, the first terminal device receives the seventh message from the third terminal device. Here, the seventh message carries information about the second terminal device.

[0216] In the present embodiment of the present application, the seventh message indicates to the first terminal device to establish a unicast connection to the second terminal device via the third terminal device. According to this method, when the first terminal device needs to establish unicast connections to a plurality of other terminal devices, the first terminal device can determine that the third terminal device is a relay device between the first terminal device and the second terminal device based on the information about the second terminal device carried in the seventh message from the third terminal device, and can communicate with the second terminal device through the unicast connection between the third terminal device and the second terminal device.

[0217] Optionally, the message type of the seventh message is a DCA message or a security mode completion message.

[0218] Corresponding to the above-described three implementations of unicast connection establishment in the U2U relay, it is as follows.

[0219] For the first implementation, specifically, when using the detection and selection of the UE - to - UE relay integrated into the direct detection of model B, the seventh message can be the DCA message sent by the relay terminal to the source terminal in step 306.

[0220] For the second implementation, specifically, when using the detection and selection of the UE - to - UE relay integrated into unicast connection establishment, the seventh message may be the security mode completion message sent by the relay terminal to the source terminal, or may be the DCA message sent by the relay terminal to the source terminal in step 406.

[0221] For the third implementation, specifically, when using the model A - based unicast connection establishment in the UE - to - UE relay, the seventh message may be the security mode completion message sent by the relay terminal to the source terminal, or may be the DCA message sent by the relay terminal to the source terminal in step 503.

[0222] In a possible implementation, the method further includes the following. That is, the third terminal device sends an eighth message to the second terminal device. In response, the second terminal device receives the eighth message sent by the third terminal device. Here, the eighth message carries information about the first terminal device. Based on this implementation, the second terminal device can determine that the third terminal device is a relay device between the second terminal device and the first terminal device, and can communicate with the first terminal device through the unicast connection between the third terminal device and the first terminal device.

[0223] Alternatively, the seventh message may belong to a message type other than the message types described above, such as a PC5-RRC message or a PC5-S message, or the seventh message may be a new type of message. This is not limited in the present embodiment of the present application.

[0224] Optionally, the message type of the eighth message is a security mode indication message.

[0225] Corresponding to the above-described three implementations of unicast connection establishment in U2U relaying, it is as follows.

[0226] In the first implementation, specifically, when using the detection and selection of an inter-UE repeater integrated into unicast connection establishment, the eighth message may be a security mode indication message transmitted by the relay terminal to the target terminal in step 303.

[0227] In the second implementation, specifically, when using the detection and selection of an inter-UE repeater integrated into direct detection of model B, the eighth message may be a security mode indication message transmitted by the relay terminal to the target terminal in step 405.

[0228] In the third implementation, specifically, when using model A-based unicast connection establishment in an inter-UE repeater, the eighth message may be a security mode indication message transmitted by the relay terminal to the target terminal in step 504.

[0229] Alternatively, the eighth message may belong to a message type other than the message types described above, such as a PC5-RRC message or a PC5-S message, or the eighth message may be a new type of message. This is not limited in the present embodiment of the present application.

[0230] In a possible implementation, the seventh message and the eighth message in this specification are the same as the seventh message and the eighth message described in step 701 of FIG. 7, and any implementation corresponding to the seventh message and the eighth message described in FIG. 7 may be implemented. Details are not described in the embodiments of this application.

[0231] FIG. 10 is a diagram showing the structure of a communication device according to an embodiment of this application. This communication device may be a terminal device or a device having the functions of a terminal device (for example, a chip, etc.). Specifically, as shown in FIG. 10, the communication device 100 may include a transmission unit 1001 and a reception unit 1002. This communication device may execute the steps related to the third terminal device in the method embodiment described above.

[0232] In one embodiment, The reception unit 1002 is configured to receive a first message from the first terminal device. Here, the first message carries a first identifier, and the first identifier indicates the second terminal device. The transmission unit 1001 is configured to transmit a second message to the second terminal device based on the first message.

[0233] In a possible implementation, both the message type of the first message and the message type of the second message are one of the following types. That is, a direct communication request ( DCR ) message, a direct communication commitment ( DCA ) message, a security mode instruction message, or a security mode completion message.

[0234] In a possible implementation, the receiving unit 1002 is further configured to receive a third message from the first terminal device. Here, the third message carries a first identifier. The receiving unit 1002 is further configured to receive a fourth message from the second terminal device. Here, the fourth message carries a second identifier, and the second identifier indicates the first terminal device.

[0235] In a possible implementation, the message type of the third message and / or the message type of the fourth message is one of the following types. That is, a DCR message, a DCA message, a security mode indication message, a security mode completion message, a request message, or a response message.

[0236] In a possible implementation, the transmitting unit 1001 is further configured to transmit a fifth message to the first terminal device. Here, the fifth message carries the first identifier and information about the second terminal device, and the fifth message is used to determine the correspondence between the first identifier and the second terminal device. The transmitting unit 1001 is further configured to transmit a sixth message to the second terminal device. Here, the sixth message carries the second identifier and information about the first terminal device, and the sixth message is used to determine the correspondence between the second identifier and the first terminal device.

[0237] In a possible implementation, the message type of the fifth message and / or the message type of the sixth message is one of the following types. That is, a DCR message, a DCA message, a security mode indication message, a security mode completion message, a request message, a response message, or a notification message.

[0238] In a possible implementation, the transmitting unit 1001 is further configured to transmit a seventh message to the first terminal device. Here, the seventh message carries information about the second terminal device. The transmitting unit 1001 is further configured to transmit an eighth message to the second terminal device. Here, the eighth message carries information about the first terminal device.

[0239] In a possible implementation, the message type of the seventh message and / or the message type of the eighth message is one of the following types. That is, a DCR message, a DCA message, a security mode indication message, or a security mode completion message.

[0240] In a possible implementation, when transmitting a second message to the second terminal device based on the first message, the transmitting unit 1001 is specifically configured to perform the following. That is, replace the first identifier carried in the first message with a second identifier to obtain the second message. And transmit the second message to the second terminal device.

[0241] In a possible implementation, the first message further carries a first identifier, and the second message is the same as the first message. Before receiving the first message from the first terminal device, the transmitting unit 1001 is further configured to perform the following. That is, transmit a ninth message to the first terminal device, where the ninth message carries a second identifier. And transmit a tenth message to the second terminal device, where the tenth message carries the first identifier.

[0242] In a possible implementation, the message type of the ninth message and / or the message type of the tenth message is a radio resource control ( RRC ) message.

[0243] In a possible implementation, the second message carries the first identifier, the second identifier is the same as the first identifier, and the second message is the same as the first message.

[0244] In a possible implementation, the first identifier is arranged within the adaptation layer header of the first message.

[0245] In a possible implementation, the first message further carries information about the second terminal device. When receiving the first message from the first terminal device, the receiving unit 1002 is specifically configured to receive the first message from the first terminal device through a pre-set sidelink radio link control protocol RLC channel. The transmitting unit 1001 transmits a second message to the second terminal device based on the first message, and the transmitting unit 1001 is specifically configured to transmit the second message to the second terminal device based on the information about the second terminal device through a pre-set sidelink RLC channel.

[0246] In another embodiment, The receiving unit 1002 is configured to receive a DCR message from the first terminal device. The transmitting unit 1001 is configured to forward the DCR message from the first terminal device. Here, the DCR message carries information about the second terminal device. The receiving unit 1002 is further configured to receive a DCA message from the second terminal device. The transmitting unit 1001 is further configured to transmit a seventh message to the first terminal device. Here, the seventh message carries information about the second terminal device, and the seventh message indicates to the first terminal device to establish a unicast connection to the second terminal device via a third terminal device.

[0247] In a possible implementation, the message type of the seventh message is one of the following types. That is, a DCA message, a security mode completion message, or a radio resource control RRC message.

[0248] In a possible implementation, the DCR message further conveys information about the first terminal device.

[0249] In a possible implementation, the transmitting unit 1001 is further configured to transmit an eighth message to the second terminal device. Here, the eighth message conveys information about the first terminal device.

[0250] In a possible implementation, the message type of the eighth message is a security mode indication message or an RRC message.

[0251] The communication device in FIG. 10 can alternatively perform the relevant steps of the first terminal device in the embodiments of the method described above.

[0252] In one embodiment, the transmitting unit 1001 is configured to transmit a first message to a third terminal device. Here, the first message conveys a first identifier, the first identifier indicates the second terminal device, and the first message is used by the third terminal device to transmit a second message to the second terminal device.

[0253] In a possible implementation, the second message conveys a second identifier and / or the first identifier, and the second identifier indicates the first terminal device.

[0254] In a possible implementation, the message type of the first message and the message type of the second message are both one of the following types. That is, a direct communication request ( DCR ) message, a direct communication commitment ( DCA ) message, a security mode indication message, or a security mode completion message.

[0255] In a possible implementation, the transmitting unit 1001 is further configured to transmit a third message to a third terminal device. Here, the third message carries a first identifier.

[0256] In a possible implementation, the message type of the third message is one of the following message types. That is, a DCR message, a DCA message, a security mode instruction message, a security mode completion message, a request message, or a response message.

[0257] In a possible implementation, the receiving unit 1002 is configured to receive a fifth message from the third terminal device. Here, the fifth message carries the first identifier and information about the second terminal device, and the fifth message is used to determine the correspondence between the first identifier and the second terminal device.

[0258] In a possible implementation, the message type of the fifth message is one of the following message types. That is, a DCR message, a DCA message, a security mode instruction message, a security mode completion message, a request message, a response message, or an announcement message.

[0259] In a possible implementation, the receiving unit 1002 is further configured to receive a seventh message transmitted by the third terminal device. Here, the seventh message carries information about the second terminal device.

[0260] In a possible implementation, the message type of the seventh message is one of the following message types. That is, a DCR message, a DCA message, a security mode instruction message, or a security mode completion message.

[0261] In a possible implementation, the second message carries a second identifier.

[0262] In a possible implementation, the first message further carries a second identifier, the second message carries the second identifier and the first identifier, and the first message is the same as the second message. Before the transmitting unit 1001 transmits the first message to the third terminal device, the receiving unit 1002 is further configured to receive a ninth message from the third terminal device. Here, the ninth message carries the second identifier.

[0263] In a possible implementation, the message type of the ninth message is a radio resource control ( RRC ) message.

[0264] In a possible implementation, the second message carries a second identifier, the second identifier is the same as the first identifier, and the first message is the same as the second message.

[0265] In a possible implementation, the first identifier is arranged within the adaptation layer header of the first message.

[0266] In a possible implementation, when transmitting the first message to the third terminal device, the transmitting unit 1001 is specifically configured to transmit the first message to the third terminal device through a pre-set sidelink radio link control protocol RLC channel.

[0267] In another embodiment, the transmitting unit 1001 is configured to transmit a DCR message. Here, the DCR message carries information about the second terminal device. The receiving unit 1002 is configured to receive a seventh message from the third terminal device. Here, the seventh message carries information about the second terminal device, and the seventh message indicates to the first terminal device to establish a unicast connection to the second terminal device via the third terminal device.

[0268] In a possible implementation, the message type of the seventh message is one of the following types. That is, a DCA message, a security mode completion message, or an RRC message.

[0269] In a possible implementation, the DCR message further carries information about the first terminal device.

[0270] Alternatively, the communication device in FIG. 10 may execute the related steps of the second terminal device in the above-described method embodiments.

[0271] In one embodiment, The receiving unit 1002 is configured to receive a second message transmitted by a third terminal device. Here, the second message is obtained based on the first message of the first terminal device, and the first message carries a first identifier, and the first identifier indicates the second terminal device.

[0272] In a possible implementation, the second message carries a second identifier and / or the first identifier, and the second identifier indicates the first terminal device.

[0273] In a possible implementation, both the message type of the first message and the message type of the second message are one of the following types. That is, a direct communication request ( DCR ) message, a direct communication commitment ( DCA ) message, a security mode indication message, or a security mode completion message.

[0274] In a possible implementation, the transmitting unit 1001 is configured to transmit a fourth message to the third terminal device. Here, the fourth message carries the second identifier.

[0275] In a possible implementation, the message type of the fourth message is one of the following types. That is, a DCR message, a DCA message, a security mode indication message, a security mode completion message, a request message, or a response message.

[0276] In a possible implementation, the receiving unit 1002 is further configured to receive a sixth message from a third terminal device. Here, the sixth message carries a second identifier and information about the first terminal device, and the sixth message is used to determine the correspondence between the second identifier and the first terminal device.

[0277] In a possible implementation, the message type of the sixth message is one of the following types. That is, a DCR message, a DCA message, a security mode indication message, a security mode completion message, a request message, a response message, or an announcement message.

[0278] In a possible implementation, the receiving unit 1002 is further configured to do the following. That is, receive an eighth message from a third terminal device, where the eighth message carries information about the first terminal device, and generate a second identifier based on the information about the first terminal device.

[0279] In a possible implementation, the message type of the eighth message is one of the following types. That is, a DCR message, a DCA message, a security mode indication message, or a security mode completion message.

[0280] In a possible implementation, the second message carries a second identifier.

[0281] In a possible implementation, the first message further conveys a second identifier, the second message conveys the second identifier and the first identifier, and the first message is the same as the second message. Before receiving the second message transmitted by the third terminal device, the receiving unit 1002 is further configured to receive a tenth message from the third terminal device. Here, the tenth message conveys the first identifier.

[0282] In a possible implementation, the message type of the tenth message is radio resource control ( RRC ) message.

[0283] In a possible implementation, the second message conveys a second identifier, the second identifier is the same as the first identifier, and the first message is the same as the second message.

[0284] In a possible implementation, the first identifier is arranged within the adaptation layer header of the first message.

[0285] In a possible implementation, when receiving the second message transmitted by the third terminal device, the receiving unit 1002 is particularly configured to receive the second message transmitted by the third terminal device through a pre-set sidelink radio link control protocol RLC channel.

[0286] In another embodiment, the receiving unit 1002 is configured to receive an eighth message transmitted by the third terminal device. Here, the eighth message conveys information about the first terminal device.

[0287] In a possible implementation, the message type of the eighth message is one of a DCR message, a security mode indication message, or an RRC message.

[0288] FIG. 11 is a diagram showing the configuration of a communication device. The communication device 1100 may be the first terminal device, the second terminal device, or the third terminal device in the embodiments of the above-described method, or may be a chip, a chip system, a processor, or the like that supports the first terminal device, the second terminal device, or the third terminal device when implementing the above-described method. This communication device may be configured to implement the method described in the embodiments of the above-described method. For details, refer to the description in the embodiments of the above-described method.

[0289] The communication device 1100 may include one or more processors 1101. The processor 1101 may be a general-purpose processor, a dedicated processor, or the like. For example, the processor 1101 may be a baseband processor or a central processing unit. The baseband processor may be configured to process communication protocols and communication data. The central processing unit may be configured to control a communication device (such as a base station, a baseband chip, a terminal, a terminal chip, a DU, or a CU, etc.), execute a software program, and process the data of the software program.

[0290] Optionally, the communication device 1100 may include one or more memories 1102. The memory 1102 stores instructions 1104, and those instructions may be executed on the processor 1101, whereby the communication device 1100 executes the method described in the embodiments of the above-described method. Optionally, the memory 1102 may further store data. The processor 1101 and the memory 1102 may be disposed separately or integrated together.

[0291] Optionally, communication device 1100 may further include transceiver 1105 and antenna 1106. Transceiver 1105 may be referred to as a transceiver unit, transceiver, transceiver circuit, or the like, and is configured to implement a transceiver function. Transceiver 1105 may include a receiver and a transmitter. The receiver may be referred to as a receiving machine, receiver circuit, or the like, and is configured to implement a receiving function. The transmitter may be referred to as a transmitter machine, transmitter circuit, or the like, and is configured to implement a transmitting function.

[0292] Communication device 1100 is a first terminal device, a second terminal device, or a third terminal device. Processor 1101 is configured to perform data processing operations of the first terminal device, the second terminal device, or the third terminal device in the embodiments of the methods described above. Transceiver 1105 is configured to perform data transmission operations / data reception operations of the first terminal device, the second terminal device, or the third terminal device in the embodiments of the methods described above.

[0293] In another possible design, processor 1101 may include a transceiver configured to implement a transmitting function and a receiving function. For example, the transceiver may be a transceiver circuit, an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit configured to implement the transmitting function and the receiving function may be separated or integrated together. The transceiver circuit, interface, or interface circuit may be configured to read and write code / data. Alternatively, the transceiver circuit, interface, or interface circuit may be configured to transmit or transfer signals.

[0294] In yet another possible design, optionally, the processor 1101 may store the instruction 1103. When the instruction 1103 is executed on the processor 1101, the communication device 1100 becomes capable of executing the methods described in the embodiments of the methods above. The instruction 1103 may be fixed within the processor 1101. In this case, the processor 1101 may be implemented by hardware.

[0295] In yet another possible design, the communication device 1100 may include circuitry. This circuitry may implement the transmitter function, the receiver function, or the communication function in the embodiments of the methods above. The processor and the transceiver described in the present embodiments of the present application may be integrated circuits (ICs), analog ICs, radio frequency integrated circuits ( RFIC ) , hybrid signal ICs, application-specific integrated circuits (ASICs), printed circuit boards (PCBs), electronic devices, or the like.

[0296] The communication device described in the embodiments above may be a first terminal device, a second terminal device, or a third terminal device. However, the scope of the communication device described in the embodiments of the present application is not limited thereto, and the configuration of the present communication device is not limited by FIG. 11. The present communication device may be an independent device or a part of a large-scale device. For example, the present communication device may be as follows. That is, (1) An independent integrated circuit IC, chip, or chip system or subsystem. (2) A set having one or more ICs. Here, optionally, the IC set may further include a storage component configured to store data and instructions. (3) An ASIC, such as a modem (MSM) or the like. (4) A module that can be embedded within another device. (5) A receiver, a terminal, an intelligent terminal, a cellular phone, a wireless device, a handheld device, a mobile unit, an in-vehicle device, a network device, a cloud device, an artificial intelligence device, or the like. Or, (6) Others.

[0297] In the case where the present communication device may be a chip or a chip system, refer to the figure showing the configuration of the chip shown in FIG. 12. The chip shown in FIG. 12 includes a processor 1201 and an interface 1202. Optionally, the chip may further include a memory 1203. There may be one or more processors 1201, and there may be a plurality of interfaces 1202.

[0298] In one design, when the chip is configured to implement the functions of the third terminal device in the embodiments of the present application, the processor 1201 is configured to execute the data processing operations of the third terminal device in the embodiments of the present application, and the interface 1202 is configured to receive or output signals.

[0299] In one embodiment, the interface 1202 is configured to receive a first message from the first terminal device. Here, the first message carries a first identifier, and the first identifier indicates a second terminal device. The processor 1201 is configured to determine the second terminal device based on the first message. The interface 1202 is further configured to output a second message to the second terminal device.

[0300] The chip may further perform any possible implementation corresponding to the third terminal device in the method embodiment shown in FIG. 7.

[0301] In another embodiment, interface 1202 is configured to receive a DCR message from the first terminal device. Interface 1202 is configured to output a DCR message to the first terminal device. Here, the DCR message carries information about the second terminal device. Interface 1202 is further configured to receive a DCA message from the second terminal device. Interface 1202 is further configured to output a seventh message to the first terminal device. Here, the seventh message carries information about the second terminal device, and the seventh message indicates to the first terminal device to establish a unicast connection to the second terminal device via the third terminal device.

[0302] The chip may further perform any possible implementation corresponding to the third terminal device in the method embodiment shown in FIG. 9.

[0303] In another design, when the chip is configured to implement the functions of the first terminal device in the embodiments of the present application, Processor 1201 is configured to execute the data processing operations of the first terminal device in the method embodiments described above. Interface 1202 is configured to receive or output signals.

[0304] In one embodiment, interface 1202 is configured to output a first message to the third terminal device. Here, the first message carries a first identifier, the first identifier indicates the second terminal device, and the first message is used for the third terminal device to send a second message to the second terminal device.

[0305] The chip may further perform any possible implementation corresponding to the first terminal device in the method embodiment shown in FIG. 7.

[0306] In another embodiment, interface 1202 is configured to output a DCR message. Here, the DCR message conveys information about the second terminal device. Interface 1202 is further configured to receive a seventh message from a third terminal device. Here, the seventh message conveys information about the second terminal device, and the seventh message indicates to the first terminal device to establish a unicast connection to the second terminal device via the third terminal device.

[0307] The chip may further perform any possible implementation corresponding to the first terminal device in the method embodiment shown in FIG. 9.

[0308] In yet another design, when the chip is configured to implement the functions of the second terminal device in the embodiments of the present application, Processor 1201 is configured to execute the data processing operations of the second terminal device in the method embodiment described above. Interface 1202 is configured to receive or output signals.

[0309] In one embodiment, interface 1202 is configured to receive a second message transmitted by a third terminal device. Here, the second message is obtained based on the first message of the first terminal device, and the first message conveys a first identifier, and the first identifier indicates the second terminal device.

[0310] The chip may further perform any possible implementation corresponding to the second terminal device in the method embodiment shown in FIG. 7.

[0311] In another embodiment, interface 1202 is configured to receive an eighth message transmitted by a third terminal device. Here, the eighth message conveys information about the first terminal device.

[0312] The chip may further perform any possible implementation corresponding to the second terminal device in the embodiment of the method shown in FIG. 9.

[0313] In some scenarios, it can be understood that some optional features in the embodiments of the present application can be implemented independently, without depending on another feature, for example, the solution on which the optional feature currently depends, to solve the corresponding technical problem and achieve the corresponding effect. Alternatively, in some scenarios, the optional feature may be combined with another feature based on requirements. Accordingly, the communication device provided in the embodiments of the present application can also implement these features or functions accordingly. Details are not described in this specification.

[0314] It should be understood that the processor in the embodiments of the present application can be an integrated circuit chip and has signal processing capabilities. In the process of implementation, the steps in the embodiments of the method described above can be completed by using the integrated logic circuit of the hardware in the processor or instructions in the form of software. The processor can be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.

[0315] The memory in the embodiments of the present application may be a volatile memory, a non-volatile memory, or may include both a volatile memory and a non-volatile memory. The non-volatile memory can be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), and the volatile memory is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein includes, but is not limited to, these memories and any other suitable type of memory.

[0316] The present application further provides a computer-readable medium configured to store computer software instructions. When those instructions are executed by a communication device, the functions in any one of the embodiments of the above-described method are implemented.

[0317] This application further provides a computer program product configured to store computer software instructions. When those instructions are executed by a communication device, the functions in any one of the above-described method embodiments are implemented.

[0318] All or part of the above-described embodiments may be implemented by software, hardware, firmware, or any combination thereof. When software is used to implement an embodiment, all or part of the embodiment may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the procedures or functions according to the embodiments of this application are generated. The computer may be a general-purpose computer, a dedicated computer, a computer network, or another programmable device. The computer instructions may be stored in a computer-readable storage medium or may be transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, or digital subscriber line (DSL), etc.) or a wireless manner (such as infrared, wireless, or microwave, etc.). The computer-readable storage medium may be a computer or data storage device that integrates one or more usable media, for example, any usable media accessible by a server or data center. The usable media may be a magnetic medium (such as a floppy disk, hard disk, or magnetic tape, etc.), an optical medium (such as a high-density digital video disc (DVD), etc.), a semiconductor medium (such as a solid state disk (SSD), etc.), or the like.

[0319] One embodiment of the present application further provides a computer program product. When the computer program product is executed on a processor, the method steps in the above-described method embodiments are implemented.

[0320] The descriptions of the embodiments provided in the present application may be referred to each other, and the descriptions of the embodiments focus on different aspects. For parts not described in detail in one embodiment, please refer to the relevant descriptions in other embodiments. For the sake of ease and brevity of description, for the functions of the apparatuses and devices provided in the embodiments of the present application, as well as the operations performed by the apparatuses and devices, please refer to the relevant descriptions of the method embodiments of the present application. Also, the method embodiments and the apparatus embodiments may be referred to, combined, or cited with each other.

[0321] Those skilled in the art can further understand that the various illustrative logic blocks and steps listed in the embodiments of the present application can be implemented by electronic hardware, computer software, or a combination thereof. Whether these functions are implemented by hardware or software depends on specific application examples and the overall design constraints of the system. Those skilled in the art may use various methods to implement the functions for specific application examples, but it should not be understood that such implementation exceeds the protection scope of the embodiments of the present application.

[0322] The present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer-readable storage medium is executed by a computer, the functions in any one of the above-described method embodiments are implemented.

[0323] The present application further provides a computer program product. When the computer program product is executed by a computer, the functions in any one of the above-described method embodiments are implemented.

[0324] All or part of the above-described embodiments may be implemented by software, hardware, firmware, or any combination thereof. When software is used to implement the embodiments, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the procedures or functions according to the embodiments of the present application are generated. The computer may be a general-purpose computer, a dedicated computer, a computer network, or another programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, a computer, a server, or a data center to another website, a computer, a server, or a data center in a wired manner (such as coaxial cable, optical fiber, or digital subscriber line (DSL), etc.) or a wireless manner (such as infrared, wireless, or microwave, etc.). The computer-readable storage medium may be a computer or a data storage device that integrates one or more usable media, for example, any usable media accessible by a server or a data center. The usable media may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape, etc.), an optical medium (such as a digital video disc (DVD), etc.), a semiconductor medium (such as a solid state disk (SSD), etc.), or the like.

[0325] Those skilled in the art can understand that various numerical values such as "first" and "second" in the present application are merely distinguished for ease of explanation and are not intended to limit the scope and order of the embodiments of the present application.

[0326] The corresponding relationships shown in the table in this application may be configured or may be predefined. The values of the information in the table are merely examples, and other values may be configured. This is not limited in this application. When a corresponding relationship between information and parameters is configured, not all the corresponding relationships shown in the table need to be configured. For example, in the table in this application, the corresponding relationships shown in some rows may alternatively not be configured. As another example, appropriate deformations and adjustments such as splitting and combining may be performed based on the above-mentioned table. The names of the parameters shown in the title of the above-mentioned table may alternatively be other names that can be understood by the communication device, and the values or expression methods of the parameters may alternatively be other values or expression methods that can be understood by this communication device. During the implementation of the above-mentioned table, another data configuration such as an array, queue, container, stack, linear table, pointer, linked list, tree, graph, structure, class, pile, or hash table may alternatively be used. "Pre-define" in this application may be understood as "define", "define in advance", "store", "pre-store", "pre-negotiate", "preconfigure", "solidify", or "pre-burn".

[0327] Those skilled in the art can recognize that, in combination with the examples described in the embodiments disclosed in this specification, units and algorithm steps can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented by hardware or by software depends on the specific application examples and the design constraints of the technical solutions. Those skilled in the art may use different methods to implement the functions described for each specific application example. However, this implementation should not be regarded as exceeding the scope of this application.

[0328] For the sake of simplicity and ease of explanation, those skilled in the art can clearly understand that for the specific working processes in the systems, devices, and units described above, reference can be made to the corresponding processes in the embodiments of the above-described methods. Details will not be described again in this specification.

Claims

1. A communication method applied to a third terminal device, comprising: receiving, from a first terminal device, a first message, wherein the first message carries a first identifier, and the first identifier indicates a second terminal device; transmitting, based on the first message, a second message to the second terminal device; and a method comprising the above steps.

2. The method according to claim 1, wherein the message type of the first message and the message type of the second message are both one of a direct communication request (DCR) message, a direct communication acceptance (DCA) message, a security mode command message, or a security mode completion message.

3. receiving, from the first terminal device, a third message, wherein the third message carries the first identifier; receiving, from the second terminal device, a fourth message, wherein the fourth message carries a second identifier, and the second identifier indicates the first terminal device; and the method according to claim 1 or 2 further comprising the above steps.

4. The message type of the third message and / or the message type of the fourth message is one of the types of a DCR message, a DCA message, a security mode command message, a security mode completion message, a request message, or a response message. The method according to claim 3.

5. transmitting a fifth message to the first terminal device, wherein the fifth message carries the first identifier and information about the second terminal device, and the fifth message is used to determine a correspondence between the first identifier and the second terminal device; transmitting a sixth message to the second terminal device, wherein the sixth message carries the second identifier and information about the first terminal device, and the sixth message is used to determine a correspondence between the second identifier and the first terminal device; and the method according to claim 1 or 2 further comprising the above steps.

6. The message type of the fifth message and / or the message type of the sixth message is A method according to claim 5, which is one of the types of DCR message, DCA message, security mode command message, security mode completion message, request message, response message, or notification message. The method according to claim 5, which is one of the types of DCR message, DCA message, security mode command message, security mode completion message, request message, response message, or notification message. **Claim 7** A step of transmitting a seventh message to the first terminal device, wherein the seventh message carries information about the second terminal device. A step of transmitting an eighth message to the second terminal device, wherein the eighth message carries information about the first terminal device. The method according to any one of claims 3 to 6, further comprising the above steps. **Claim 8** The message type of the seventh message, and / or the message type of the eighth message is A DCR message, a DCA message, a security mode command message, or a security mode completion message. The method according to claim 7, which is one of the types of DCR message, DCA message, security mode command message, or security mode completion message. **Claim 9** Based on the first message, the step of transmitting a second message to the second terminal device is Replacing the first identifier carried in the first message with the second identifier to obtain the second message. Transmitting the second message to the second terminal device. The method according to any one of claims 3 to 8, including the above steps. **Claim 10** The first message further carries the first identifier, the second message is the same as the first message, and before the step of receiving the first message from the first terminal device, A step of transmitting a ninth message to the first terminal device, wherein the ninth message carries the second identifier. A step of transmitting a tenth message to the second terminal device, wherein the tenth message carries the first identifier. The method according to any one of claims 3 to 8, further comprising the above steps. **Claim 11** The method according to claim 10, wherein the message type of the ninth message, and / or the message type of the tenth message is a radio resource control (RRC) message. **Claim 12** The method according to claim 5 or 6, wherein the second message carries the first identifier, the second identifier is the same as the first identifier, and the second message is the same as the first message.

13. The method according to any one of claims 1 to 12, wherein the first identifier is arranged in a convergence layer header of the first message.

14. The first message further carries information about the second terminal device, The step of receiving a first message from a first terminal device comprises the step of receiving the first message from the first terminal device through a pre-set sidelink radio link control protocol RLC channel and The step of transmitting a second message to the second terminal device based on the first message comprises the step of transmitting the second message to the second terminal device based on information about the second terminal device through a pre-set sidelink RLC channel and is the method according to claim 1.

15. A communication method applied to a first terminal device, comprising: a step of transmitting a first message to a third terminal device, wherein the first message carries a first identifier, the first identifier indicates a second terminal device, and the first message is used by the third terminal device to transmit a second message to the second terminal device and

16. The method according to claim 15, wherein the second message carries a second identifier and / or the first identifier, and the second identifier indicates the first terminal device.

17. The method according to claim 16, wherein the message type of the first message and the message type of the second message are both one of the types of a direct communication request DCR message, a direct communication acceptance DCA message, a security mode command message, or a security mode completion message.

18. The method according to claim 16 or 17, further comprising a step of transmitting a third message to the third terminal device, wherein the third message carries the first identifier. and

19. The message type of the third message is The method according to claim 18, which is one of the message types of DCR message, DCA message, security mode command message, security mode completion message, request message, or response message. **Claim 20** The step of receiving a fifth message from the third terminal device, wherein the fifth message conveys the first identifier and information about the second terminal device, and the fifth message is used to determine a correspondence between the first identifier and the second terminal device. The method according to claim 16 or 17, further comprising this step. **Claim 21** The message type of the fifth message is one of the message types of DCR message, DCA message, security mode command message, security mode completion message, request message, response message, or notification message. The method according to claim 20. **Claim 22** The step of receiving a seventh message transmitted by the third terminal device, wherein the seventh message conveys information about the second terminal device. The method according to any one of claims 18 to 21, further comprising this step. **Claim 23** The message type of the seventh message is one of the message types of DCR message, DCA message, security mode command message, or security mode completion message. The method according to claim 22. **Claim 24** The method according to any one of claims 16 to 223, wherein the second message conveys the second identifier. **Claim 25** The first message further conveys the second identifier, the second message conveys the second identifier and the first identifier, the first message is the same as the second message, before the step of transmitting the first message to a third terminal device, the step of receiving a ninth message from the third terminal device, wherein the ninth message conveys the second identifier. The method according to any one of claims 16 to 24, further comprising this step. **Claim 26** The method according to claim 25, wherein the message type of the ninth message is a radio resource control (RRC) message. **Claim 27** ​ ​ The method according to claim 20 or 21, wherein the second message carries the second identifier, the second identifier is the same as the first identifier, and the first message is the same as the second message.

28. The method according to any one of claims 15 to 27, wherein the first identifier is arranged in the adaptation layer header of the first message.

29. The step of transmitting the first message to a third terminal device includes the step of transmitting the first message to the third terminal device through a pre-set sidelink radio link control protocol RLC channel The method according to claim 15.

30. A communication method applied to a second terminal device, comprising: receiving a second message transmitted by a third terminal device, wherein the second message is obtained based on a first message of a first terminal device, the first message carries a first identifier, and the first identifier indicates the second terminal device. The method.

31. The method according to claim 30, wherein the second message carries a second identifier and / or the first identifier, and the second identifier indicates the first terminal device.

32. The method according to claim 31, wherein the message type of the first message and the message type of the second message are both one of the types of direct communication request DCR message, direct communication acceptance DCA message, security mode command message, and security mode completion message.

33. The method according to claim 31 or 32, further comprising: transmitting a fourth message to the third terminal device, wherein the fourth message carries the second identifier.

34. The message type of the fourth message is one of the types of DCR message, DCA message, security mode command message, security mode completion message, request message, or response message The method according to claim 33.

35. Receiving a sixth message from the third terminal device, where the sixth message carries the second identifier and information about the first terminal device, and the sixth message is used to determine a correspondence between the second identifier and the first terminal device The method according to claim 31 or 32, further comprising

36. The message type of the sixth message is One of the types of DCR message, DCA message, security mode command message, security mode completion message, request message, response message, or notification message The method according to claim 35

37. Receiving an eighth message from the third terminal device, where the eighth message carries information about the first terminal device, and Generating the second identifier based on the information about the first terminal device The method according to any one of claims 33 to 36, further comprising

38. The message type of the eighth message is One of the types of DCR message, DCA message, security mode command message, or security mode completion message The method according to claim 37

39. The method according to any one of claims 31 to 38, wherein the second message carries the second identifier

40. The first message further carries the second identifier, the second message carries the second identifier and the first identifier, the first message is the same as the second message, and Before the step of receiving the second message transmitted by the third terminal device, Receiving a tenth message from the third terminal device, where the tenth message carries the first identifier Further comprising The method according to any one of claims 31 to 38

41. The message type of the tenth message is a radio resource control RRC message. The method according to claim 40

42. The method according to claim 35 or 36, wherein the second message carries the second identifier, the second identifier is the same as the first identifier, and the first message is the same as the second message.

43. The method according to any one of claims 30 to 42, wherein the first identifier is arranged in the adaptation layer header of the first message.

44. The step of receiving a second message transmitted by a third terminal device includes the step of receiving the second message transmitted by the third terminal device through a pre-set sidelink radio link control protocol RLC channel The method according to claim 30.

45. A communication device, wherein the communication device comprises a unit for executing the method according to any one of claims 1 to 14, or the communication device comprises a unit for executing the method according to any one of claims 15 to 29, or the communication device comprises a unit for executing the method according to any one of claims 30 to 44.

46. A communication device comprising a processor, wherein the processor executes a computer program or instructions stored in a memory to implement the method according to any one of claims 1 to 14, or to implement the method according to any one of claims 15 to 29, or to implement the method according to any one of claims 30 to 44.

47. A communication device comprising a processor and an interface circuit, wherein the interface circuit is configured to receive a signal from a communication device other than the communication device and transmit the signal to the processor, or to transmit a signal from the processor to a communication device other than the communication device, and the processor is configured to implement the method according to any one of claims 1 to 14 by using a logic circuit or by executing instructions, or the processor is configured to implement the method according to any one of claims 15 to 29 by using a logic circuit or by executing instructions, or the processor is configured to implement the method according to any one of claims 30 to 44 by using a logic circuit or by executing instructions. Claim 48 A computer-readable storage medium storing a computer program or instructions, wherein when the computer program or the instructions are executed by a communication device, the method according to any one of claims 1 to 14 is executed, the method according to any one of claims 15 to 29 is executed, or the method according to any one of claims 30 to 44 is executed. A computer-readable storage medium.

Citation Information

Patent Citations

  • Methods, apparatuses and systems directed to a change of WTRU to WTRU relay

    WO2021207219A1