Communication method and device, and storage medium

JP2025504855AActive Publication Date: 2025-02-19HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024543063
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-01-21
Filing Date
2022-12-06
Publication Date
2025-02-19
Estimated Expiration
2042-12-06

Smart Images

  • Figure 2025504855000001_ABST
    Figure 2025504855000001_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a communication method and apparatus, as well as a storage medium. The method includes: A first terminal device receives a first broadcast message sent by a second terminal device; If the first terminal device does not receive a second broadcast message from the second terminal device within a first period after the first terminal device receives the first broadcast message, the first terminal device determines that the second terminal device is not a relay device of the first terminal device. According to the embodiments of the present application, it can be more accurately determined whether a terminal device is suitable to act as a relay terminal.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to Chinese Patent Application No. 202210073460.1, filed with the State Intellectual Property Office of China on January 21, 2022, entitled “COMMUNICATION METHOD AND APPARATUS, AND STORAGE MEDIUM,” the entire contents of which are incorporated herein by reference.

[0002] The present application relates to the field of communications technology, and in particular to communications methods and devices and storage media. [Background technology]

[0003] In a user equipment-to-network relay (UE-to-Network Relay, U2N Relay) communication system, a remote terminal may communicate with a network device through a relay terminal. The remote terminal communicates with the relay terminal through a sidelink (SL), and the corresponding interface is called PC5. The relay terminal and the network device are directly connected to each other, i.e., they communicate with each other through an air interface (e.g., Uu interface).

[0004] In a U2N relay communication system, a remote terminal may measure the communication quality of a current serving cell and the communication quality of a sidelink between the remote terminal and surrounding relay terminals based on the configuration of a network device to facilitate mobility management. For example, the remote terminal may switch from directly connecting to a network device to connecting to the network device via a relay terminal. The remote terminal determines an appropriate relay device based on the measurement result and reports the relay device to the network device, so that the network device can make a decision based on the relay device reported by the remote terminal, and the remote terminal switches to an appropriate relay terminal.

[0005] The remote terminal can usually measure the signal quality between the remote terminal and the relay terminal based on the discovery message broadcast by the relay terminal, and determine whether the relay terminal is suitable to serve as a relay device of the remote terminal based on the signal quality. However, in the above method, it cannot be accurately determined whether the relay terminal is suitable to serve as a relay device of the remote terminal. Summary of the Invention

[0006] The embodiments of the present application provide a communication method and apparatus, as well as a storage medium, to more accurately determine whether a terminal device is suitable to act as a relay terminal.

[0007] According to a first aspect, an embodiment of the present application provides a communication method, the method including:

[0008] The first terminal device receives a first broadcast message sent by the second terminal device, and if the first terminal device does not receive a second broadcast message from the second terminal device within a first period after the first terminal device receives the first broadcast message, the first terminal device determines that the second terminal device is not a relay device of the first terminal device.

[0009] In this embodiment of the present application, the first broadcast message and the second broadcast message may be discovery messages sent by the first terminal device at different times, and the discovery message indicates that the second terminal device provides a relay service. When providing a relay service, the second terminal device usually broadcasts a discovery message periodically. When the second terminal device does not provide a relay service, the second terminal device stops sending a discovery message. Thus, if the first terminal device does not receive the second broadcast message within a first period after receiving the first broadcast message, the first terminal device may determine that the second terminal device is no longer suitable to serve as a relay device, and thus the first terminal device can determine an inappropriate terminal device, i.e., can more accurately determine whether the second terminal device is suitable to serve as a relay device for the first terminal device.

[0010] In a possible implementation, after determining that the second terminal device is not a relay device of the first terminal device, the method further includes: the first terminal device deletes measurement information corresponding to the second terminal device.

[0011] In this embodiment of the present application, after determining that the second terminal device is not a relay device of the first terminal device, in other words, that the second terminal device is not suitable to serve as a relay device of the first terminal device, the first terminal device may not report measurement information corresponding to the second terminal device to the network device. Therefore, the first terminal device may delete the measurement information corresponding to the second terminal device from the measurement result, thus ensuring that the measurement result reported by the first terminal device does not include measurement information corresponding to an inappropriate terminal device, but includes measurement information of an appropriate terminal device. Furthermore, the memory space occupied by the measurement result may be saved, and the resources required for reporting the measurement result are reduced.

[0012] In a possible implementation, after determining that there is a unicast connection between the first terminal device and the second terminal device and that the second terminal device is not a relay device of the first terminal device, the method further includes at least one of the following: The first terminal device decides to reselect a relay device. Alternatively, the first terminal device reports a measurement result to the first network device.

[0013] In this embodiment of the present application, the second terminal device is currently the relay device of the first terminal device. The above of determining that the second terminal device is not the relay device of the first terminal device can be understood as the second terminal device is no longer the relay device of the first terminal device. Therefore, the first terminal device may reselect a relay device or trigger a measurement report to switch from the relay device of the first terminal device to an appropriate terminal device. For example, when the first terminal device is in an RRC connected state, after determining that the second terminal device is not the relay device of the first terminal device, the first terminal device may trigger a measurement report to report the measurement result to the first network device, and thus the first network device may indicate to the first terminal device that it will switch to an appropriate cell or relay device based on the measurement result. When the first terminal device is in an RRC idle state or an RRC inactive state, after determining that the second terminal device is not a relay device of the first terminal device, the first terminal device decides to reselect a relay device, so that the first terminal device can switch to an appropriate relay device.

[0014] In a possible implementation, before determining that there is a unicast connection between the first terminal device and the second terminal device and the second terminal device is not a relay device of the first terminal device, the method further includes: the first terminal device sends first indication information to the second terminal device through the unicast connection; the first indication information is used to trigger the second terminal device to send a first message, the first message is used to measure a first signal quality, the first signal quality being a signal quality between the first terminal device and the second terminal device; the first terminal device receives the first message; the first terminal device determines the first signal quality based on the first message; determining that the second terminal device is not a relay device of the first terminal device includes: when the first signal quality is less than a first threshold, the first terminal device determines that the second terminal device is not a relay device of the first terminal device.

[0015] In this embodiment of the present application, there is a unicast connection between a first terminal device and a second terminal device, and the second terminal device provides a relay service to the first terminal device. Thus, when the first terminal device does not receive a second broadcast message sent by the second terminal device within a first period after receiving a first broadcast message, the first terminal device can trigger the second terminal device to send a first message by using the first indication information, so that data transmission is implemented between the first terminal device and the second terminal device, and the first terminal device can detect a first signal quality between the first terminal device and the second terminal device based on the first message. Then, the first terminal device determines whether the second terminal device is suitable to continue to provide a relay service to the first terminal device based on the first signal quality, so as to more accurately determine whether the second terminal device is suitable to serve as a relay device of the first terminal device. When the first signal quality is less than a first threshold, the first terminal device determines that the second terminal device is no longer suitable to provide relay services to the first terminal device, and the first terminal device can report to the first network device to switch from the relay device based on the indication of the first network device. When the first signal quality is not less than the first threshold, the first terminal device determines that the second terminal device is suitable to continue providing relay services to the first terminal device, and does not need to switch from the relay device, thus avoiding unnecessary switching.

[0016] In a possible implementation, determining that the second terminal device is not a relay device of the first terminal device includes: when receiving second indication information from the second terminal device, the first terminal device determines that the second terminal device is not a relay device of the first terminal device, the second indication information indicating that the second terminal device does not provide a relay service.

[0017] In this embodiment of the present application, the first terminal device can more quickly determine that the second terminal device is not a relay device of the first terminal device based on the second indication information sent by the second terminal device, but does not need to determine that the second terminal device is not a relay device of the first terminal device until it detects that the second broadcast message is not received within a first period after the first broadcast message is received.

[0018] In a possible implementation, when the second signal quality is less than a second threshold or the second signal quality is greater than a third threshold, the second indication information is sent by the second terminal device, and the second signal quality is the signal quality between the second terminal device and the second network device.

[0019] In this embodiment of the present application, when the second signal quality is smaller than the second threshold or the second signal quality is greater than the third threshold, the second terminal device is not suitable to provide the relay service. Therefore, the second indication information is sent to the first terminal device in a timely manner to indicate that the second terminal device does not provide the relay service.

[0020] In a possible implementation, the first broadcast message includes a first identifier, the first identifier identifies a second terminal device, and the first identifier is generated when the second terminal device accesses a serving cell of the second terminal device.

[0021] In this embodiment of the present application, after receiving the first broadcast message, the first terminal device determines that the first broadcast message is from the second terminal device based on the first identifier carried in the first broadcast message. After the cell change is implemented, the second terminal device can update the identifier carried in the broadcast message, so that the first terminal device can regard the second terminal device after the cell change as a new measurement object for recording, and does not need to update the serving cell information of the second terminal device, reducing the workload of the first terminal device. This improves the measurement efficiency of the first terminal device.

[0022] In a possible implementation, the first broadcast message includes the first cell information of the second terminal device, and after the first terminal device receives the first broadcast message sent by the second terminal device, the method further includes: the first terminal device determines whether the serving cell of the second terminal device changes based on the first cell information; when the serving cell of the second terminal device changes, the first terminal device sends a second message to the first network device; the second message includes the first cell information.

[0023] In this embodiment of the present application, when the serving cell of the second terminal device is determined to change, the first terminal device sends a second message to the first network device, so that the first network device can update the serving cell information of the second terminal device in a timely manner, and prevent the relay device of the first terminal device from failing to switch to the second terminal device because the first network device does not update the serving cell information of the second terminal device in a timely manner.

[0024] In a possible implementation, the first terminal device sending the second message to the first network device includes: the first terminal device determines whether a current serving cell of the second terminal device is an allowed cell based on the first cell information; and when the current serving cell of the second terminal device is an allowed cell, the first terminal device sends the second message to the first network device.

[0025] In this embodiment of the present application, when the current serving cell of the second terminal device is an allowed cell, it is determined that the second terminal device can provide relay services to the first terminal device. In this case, the first terminal device sends a second message to the first network device, so that the first network device updates the serving cell information of the second network device in a timely manner.

[0026] In a possible implementation, the method further includes: when a current serving cell of the second terminal device is a blocked cell, the first terminal device deletes measurement information corresponding to the second terminal device.

[0027] In this embodiment of the present application, when the current serving cell of the second terminal device is a blocked cell, the first terminal device determines that the second terminal device cannot provide relay services to the first terminal device. Therefore, the first terminal device can delete the measurement information corresponding to the second terminal device from the measurement result of the first terminal device, so that the measurement result reported by the first terminal device does not include the measurement information of the second terminal device, ensuring that the reported measurement result includes the measurement information of the appropriate terminal device. Furthermore, the memory space occupied by the measurement result can be saved, and the resources required when the first terminal device reports the measurement result can be reduced.

[0028] In a possible implementation, the first cell information is included in measurement information corresponding to the second device.

[0029] In this embodiment of the present application, when the serving cell of the second terminal device is determined to change, the first terminal device can trigger a measurement report to report the measurement result of the first terminal device to the first network device. The measurement result includes the measurement information of the second terminal device, and the measurement information includes the first cell information. In this way, the first network device can update the measurement result of the first terminal device in a timely manner, and therefore the first network device can make an appropriate handover decision based on the measurement result.

[0030] In a possible implementation, the first broadcast message includes the first cell information of the second terminal device, and after the first terminal device receives the first broadcast message sent by the second terminal device, the method further includes: the first terminal device receives a third message from the first network device, the third message includes the second cell information of the second terminal device, and the third message indicates switching from the relay device of the first terminal device to the second terminal device, and when the first cell information does not match the second cell information, the first terminal device determines that the switching has failed.

[0031] In this embodiment of the present application, the third message may be a handover command. For example, the first network device makes a handover decision based on the measurement result reported by the first terminal device, and instructs the first terminal device to switch to the second terminal device by using the handover command. The first terminal device may switch to the second terminal device based on the second cell information. It may be understood that the first terminal device may alternatively receive the third message before receiving the first broadcast message, or receive the first broadcast message and the third message simultaneously. When the first cell information does not match the second cell information, it indicates that the serving cell of the second terminal device is being handed over. Therefore, the first terminal device cannot switch to the second terminal device based on the second cell information, determines that the switching has failed, and no longer performs a subsequent switching operation. This can avoid the waste of resources caused by the subsequent switching operation.

[0032] In a possible implementation, after the first terminal device determines that the switching has failed, the method further includes at least one of the following: The first terminal device records the switchover failure. The first terminal device disconnects from the second terminal device. The first terminal device performs a re-establishment of a radio resource control (RRC) connection.

[0033] In this embodiment of the present application, after determining that the switching has failed, the first terminal device may implement a measurement record of the switching failure and report the reason of the switching failure to the first network device. When there is a unicast connection between the first terminal device and the second terminal device, the unicast connection is cut off, so that the first terminal device can establish a new unicast connection to ensure the communication quality of the first terminal device and avoid resource waste. After determining that the switching has failed, the first terminal device may further implement re-establishment of an RRC connection to restore an RRC signaling connection and prevent the first terminal device from going offline.

[0034] In a possible implementation, the method further includes: the first terminal device receives third indication information of the first network device, the third indication information indicating the first period.

[0035] In this embodiment of the present application, the first period may be determined by the first network device, so that the first network device can appropriately manage and control the measurement reporting behavior of the first terminal device.

[0036] In a possible implementation, before determining that the second terminal device is not a relay device of the first terminal device, the method further includes: when receiving the first broadcast message, the first terminal device starts a first timer corresponding to the second terminal device; the operation period of the first timer is equal to a first period; when the first timer expires, the first terminal device determines that the second broadcast message has not been received within the first period.

[0037] In this embodiment of the present application, the first terminal device may effectively monitor a second broadcast message sent by the second terminal device within a first period in a timing manner of a first timer. It should be understood that the first terminal device may receive the broadcast messages of the multiple terminal devices, maintain a timer for each of the multiple terminal devices, effectively monitor the broadcast messages of the multiple terminal devices, and determine whether the multiple terminal devices are suitable to serve as a relay device for the first terminal device.

[0038] In a possible implementation, the method further includes: when receiving a second broadcast message within a first period, the first terminal device resets a first timer.

[0039] In this embodiment of the present application, when receiving the second broadcast message, the first terminal device resets the first timer and continues to monitor the discovery message sent by the second terminal device, so that the first terminal device can detect in time the case where the second terminal device stops sending discovery messages.

[0040] In a possible implementation, the first timer is controlled by a protocol layer of the first terminal device, the protocol layer including any one of a radio resource control (RRC) layer, a physical layer, a medium access control (MAC) layer, and a discovery protocol layer.

[0041] In this embodiment of the present application, the first timer is controlled by a protocol layer of the first terminal device, and therefore the first timer can be effectively maintained.

[0042] According to a second aspect, an embodiment of the present application provides a communication method. The method includes: a first terminal device receives a first broadcast message sent by a second terminal device; if the first terminal device does not receive a broadcast message from the second terminal device within a first period after the first terminal device receives the first broadcast message, the first terminal device performs any one of deleting measurement information corresponding to the second terminal device, determining to reselect a relay device, and reporting a measurement result to a first network device.

[0043] In this embodiment of the present application, the first broadcast message and the second broadcast message may be discovery messages sent by the first terminal device at different times, and the discovery message indicates that the second terminal device provides a relay service. When providing a relay service, the second terminal device usually broadcasts a discovery message periodically. When the second terminal device does not provide a relay service, the second terminal device stops sending a discovery message. Thus, if the first terminal device does not receive the second broadcast message within a first period after receiving the first broadcast message, the first terminal device may determine that the second terminal device is not suitable to serve as a relay device for the first terminal device. The first terminal device may determine a subsequent operation to be performed based on the connection status of the first terminal device. For example, when there is no unicast connection between the first terminal device and the second terminal device, i.e., when the second terminal device does not provide a relay service to the first terminal device, the first terminal device may delete the measurement information corresponding to the second terminal device from the measurement result, thus ensuring that the measurement result reported by the first terminal device does not include measurement information corresponding to an inappropriate terminal device, and the measurement result includes measurement information of an appropriate terminal device. When there is a unicast connection between the first terminal device and the second terminal device and the first terminal device is in an RRC connected state, the first terminal device may trigger a measurement report to report the measurement result to the first network device, so that the first network device can indicate the first terminal device to implement relay device switching based on the measurement result, and the first terminal device can switch to an appropriate cell or relay device. When there is a unicast connection between a first terminal device and a second terminal device, and the first terminal device is in an RRC idle state or an RRC inactive state, the first terminal device may decide to reselect a relay device, and thus the relay device of the first terminal device switches to an appropriate relay device.

[0044] In a possible implementation, when there is a unicast connection between the first terminal device and the second terminal device, before reporting the measurement result to the first network device, the method further includes: the first terminal device sends first indication information to the second terminal device through the unicast connection; the first indication information is used to trigger the second terminal device to send a first message, and the first message is used to measure a first signal quality, the first signal quality being a signal quality between the first terminal device and the second terminal device; the first terminal device receives the first message; and the first terminal device determines the first signal quality based on the first message.

[0045] In this embodiment of the present application, when there is a unicast connection between the first terminal device and the second terminal device, and data transmission is not implemented through the unicast connection between the first terminal device and the second terminal device, and the first terminal device does not receive a second broadcast message within a first period after receiving a first broadcast message, the first terminal device can trigger the second terminal device to send a first message by using the first indication information, and thus data transmission is implemented between the first terminal device and the second terminal device. In this way, the first terminal device can detect the first signal quality between the first terminal device and the second terminal device based on the first message, and can accurately determine whether the second terminal is suitable to continue to provide relay services to the first terminal device.

[0046] In a possible implementation, reporting the measurement result to the first network device includes: when the first signal quality is less than a first threshold, the first terminal device reports the measurement result to the first network device.

[0047] In this embodiment of the present application, when the first signal quality is less than the first threshold, the first terminal device determines that the second terminal device is no longer suitable to provide relay services to the first terminal device, and the first terminal device can report to the first network device, so that the first terminal device can switch to a suitable relay device based on the indication of the first network device. It can be understood that when the first signal quality is not less than the first threshold, the first terminal device determines that the second terminal device is suitable to continue providing relay services to the first terminal device, and does not need to switch from the relay device, thus avoiding unnecessary switching.

[0048] According to a third aspect, an embodiment of the present application provides a communication method, the method including:

[0049] The first terminal device receives a first broadcast message sent by the second terminal device. The first broadcast message includes first cell information of the second terminal device. The first terminal device determines whether a serving cell of the second terminal device is handed over based on the first cell information. When the serving cell of the second terminal device changes, the first terminal device sends a second message to the first network device. The second message includes the first cell information.

[0050] In this embodiment of the present application, when the serving cell of the second terminal device is determined to change, the first terminal device sends a second message to the first network device, so that the first network device can update the serving cell information of the second terminal device in a timely manner, and prevent the relay device of the first terminal device from failing to switch to the second terminal device because the first network device does not update the serving cell information of the second terminal device in a timely manner.

[0051] In a possible implementation, the first terminal device sending the second message to the first network device includes:

[0052] The first terminal device determines whether a current serving cell of the second terminal device is an allowed cell based on the first cell information, and when the current serving cell of the second terminal device is an allowed cell, the first terminal device sends a second message to the first network device.

[0053] In this embodiment of the present application, when the current serving cell of the second terminal device is an allowed cell, it is determined that the second terminal device can provide relay services to the first terminal device. In this case, the first terminal device sends a second message to the first network device, so that the first network device updates the serving cell information of the second network device in a timely manner.

[0054] In a possible implementation, the method further includes:

[0055] When the current serving cell of the second terminal device is a blocked cell, the first terminal device deletes the measurement information corresponding to the second terminal device.

[0056] In this embodiment of the present application, when the current serving cell of the second terminal device is a blocked cell, the first terminal device determines that the second terminal device cannot provide relay services to the first terminal device, and deletes the measurement information corresponding to the second terminal device from the measurement result of the first terminal device to ensure that the reported measurement result includes the measurement information of the appropriate terminal device. Furthermore, the memory space occupied by the measurement result can be saved, and the resources required when the first terminal device reports the measurement result can be reduced.

[0057] In a possible implementation, the first cell information is included in measurement information corresponding to the second device.

[0058] In this embodiment of the present application, when the serving cell of the second terminal device is determined to change, the first terminal device can trigger a measurement report to report the measurement result of the first terminal device to the first network device. The measurement result includes the measurement information of the second terminal device, and the measurement information includes the first cell information. In this way, the first network device can update the measurement result of the first terminal device in a timely manner, and therefore the first network device can make an appropriate handover decision based on the measurement result.

[0059] According to a fourth aspect, an embodiment of the present application provides a communication method, the method including:

[0060] The first terminal device receives a first broadcast message sent by the second terminal device. The first broadcast message includes first cell information of the second terminal device. The first terminal device receives a third message from the first network device. The third message includes second cell information of the second terminal device, and the third message indicates switching from the relay device of the first terminal device to the second terminal device. When the first cell information does not match the second cell information, the first terminal device determines that the switching has failed.

[0061] In this embodiment of the present application, the third message may be a handover command. For example, the first network device makes a handover decision based on the measurement result reported by the first terminal device, and instructs the first terminal device to switch to the second terminal device by using the handover command. When the first cell information does not match the second cell information, the first terminal device cannot switch to the second terminal device based on the third message. Therefore, it is determined that the switching has failed, and the subsequent switching operation is no longer performed. This can avoid the waste of resources caused by the subsequent switching operation.

[0062] In a possible implementation, after the first terminal device determines that the switching has failed, the method further includes at least one of the following: The first terminal device records the switchover failure. The first terminal device disconnects from the second terminal device. The first terminal device performs a re-establishment of a radio resource control (RRC) connection.

[0063] According to a fifth aspect, an embodiment of the present application provides a communication method, the method including:

[0064] The second terminal device measures a second signal quality. The second signal quality is a signal quality between the second terminal device and the second network device. When the second signal quality is smaller than a second threshold or the second signal quality is larger than a third threshold, the second terminal device sends second indication information. The second indication information indicates that the second terminal device does not provide a relay service.

[0065] In this embodiment of the present application, when the second signal quality does not satisfy the threshold condition, i.e., when the second signal quality is smaller than the second threshold or the second signal quality is smaller than the third threshold, the second terminal device does not provide the relay service. Thus, the second indication information may be sent to notify the surrounding terminal devices that the second terminal device does not provide the relay service in a timely manner, thereby preventing the surrounding terminal devices of the second terminal device from reporting the second terminal device as a relay device.

[0066] According to a sixth aspect, an embodiment of the present application provides a communication device configured to perform a method according to the first aspect or any one of the possible implementations of the first aspect, the communication device comprising a unit for performing the method according to the first aspect or any one of the possible implementations of the first aspect.

[0067] According to a seventh aspect, an embodiment of the present application provides a communication device configured to perform a method according to the second aspect or any one of the possible implementations of the second aspect, the communication device comprising a unit for performing a method according to the second aspect or any one of the possible implementations of the second aspect.

[0068] According to an eighth aspect, an embodiment of the present application provides a communication device configured to perform a method according to the third aspect or any one of the possible implementations of the third aspect, the communication device comprising a unit for performing a method according to the third aspect or any one of the possible implementations of the third aspect.

[0069] According to a ninth aspect, an embodiment of the present application provides a communication device configured to perform a method according to the fourth aspect or any one of the possible implementations of the fourth aspect, the communication device comprising a unit for performing a method according to the fourth aspect or any one of the possible implementations of the fourth aspect.

[0070] According to a tenth aspect, an embodiment of the present application provides a communication device configured to perform a method according to the fifth aspect or any one of the possible implementations of the fifth aspect, the communication device comprising: a unit for performing a method according to the fifth aspect or any one of the possible implementations of the fifth aspect.

[0071] In the sixth, seventh, eighth, ninth, or tenth aspect, the communication device may include a transceiver unit and a processing unit. For a specific description of the transceiver unit and the processing unit, please refer to the device embodiment given below.

[0072] According to an eleventh aspect, the present application provides a communication device. The communication device includes a processor. The processor may be configured to execute computer-executable instructions stored in a memory, so as to implement the method shown in the first aspect or any one of the possible implementations of the first aspect, the method shown in the second aspect or any one of the possible implementations of the second aspect, the method shown in the third aspect or any one of the possible implementations of the third aspect, the method shown in the fourth aspect or any one of the possible implementations of the fourth aspect, or the method shown in the fifth aspect or any one of the possible implementations of the fifth aspect.

[0073] In this embodiment of the present application, in the process of implementing the above method, the process of sending information in the above method can be understood as a process of outputting information based on the instruction of a processor. When information is output, the processor outputs the information to the transceiver, and thus the transceiver transmits the information. After the information is output by the processor, other processing may still need to be performed on the information before the information arrives at the transceiver. Similarly, when the processor receives input information, the transceiver receives the information and inputs the information to the processor. Furthermore, after the transceiver receives the information, other processing may still need to be performed on the information before the information is input to the processor.

[0074] Unless otherwise specifically described, or unless the operations conflict with the actual functionality or internal logic of the operations of the relevant description, operations such as sending and / or receiving related to a processor may be generally understood as instruction output based on the processor.

[0075] In the implementation process, the processor may be a processor specially configured to perform these methods, or may be a processor, e.g., a general-purpose processor, that executes computer instructions in a memory to perform these methods. For example, the processor may be further configured to execute a program stored in the memory. When the program is executed, the communication device is enabled to perform the method shown in the first aspect or any one of the possible implementations of the first aspect.

[0076] In a possible implementation, the memory is located external to the communication device.

[0077] In a possible implementation, the memory is located within the communication device.

[0078] In this embodiment of the present application, the processor and the memory may alternatively be integrated into one component, in other words, the processor and the memory may alternatively be integrated together.

[0079] In a possible implementation, the communication device further includes a transceiver, the transceiver being configured to receive packets, send packets, and so on.

[0080] According to a twelfth aspect, the present application provides a communication device. The communication device includes a processing circuit and an interface circuit. The interface circuit is configured to obtain data or output data. The processing circuit is configured to perform a corresponding method shown in the first aspect or any one of the possible implementations of the first aspect, a corresponding method shown in the second aspect or any one of the possible implementations of the second aspect, a corresponding method shown in the third aspect or any one of the possible implementations of the third aspect, a corresponding method shown in the fourth aspect or any one of the possible implementations of the fourth aspect, or a corresponding method shown in the fifth aspect or any one of the possible implementations of the fifth aspect.

[0081] According to a thirteenth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium is configured to store a computer program. When the computer program is executed on a computer, the method shown in the first aspect or any one of the possible implementations of the first aspect is performed, the method shown in the second aspect or any one of the possible implementations of the second aspect is performed, the method shown in the third aspect or any one of the possible implementations of the third aspect is performed, the method shown in the fourth aspect or any one of the possible implementations of the fourth aspect is performed, or the method shown in the fifth aspect or any one of the possible implementations of the fifth aspect is performed.

[0082] According to a fourteenth aspect, the present application provides a computer program product. The computer program product includes a computer program or computer code. When the computer program product runs on a computer, it performs the method shown in the first aspect or any one of the possible implementations of the first aspect, performs the method shown in the second aspect or any one of the possible implementations of the second aspect, performs the method shown in the third aspect or any one of the possible implementations of the third aspect, performs the method shown in the fourth aspect or any one of the possible implementations of the fourth aspect, or performs the method shown in the fifth aspect or any one of the possible implementations of the fifth aspect.

[0083] According to a fifteenth aspect, the present application provides a communication system. The communication system includes a first terminal device and a second terminal device. The first terminal device is configured to perform a method according to any one of the first to fourth aspects, and the second terminal device is configured to perform a fifth aspect or any one of the possible implementations of the fifth aspect. [Brief description of the drawings]

[0084] The following describes the accompanying drawings used in the embodiments of the present application. [Figure 1] FIG. 1 is a diagram of the architecture of a communication system according to one embodiment of the present application. [Diagram 2] FIG. 1 illustrates a control plane protocol architecture for sidelink communication according to one embodiment of the present application. [Diagram 3] FIG. 2 is a diagram of a protocol architecture for discovery messages according to one embodiment of the present application. [Figure 4A] FIG. 2 is a diagram of a discovery process scenario according to one embodiment of the present application. [Figure 4B] FIG. 2 is a diagram of another discovery processing scenario according to an embodiment of the present application. [Figure 5A]FIG. 2 is a schematic interaction diagram of a unicast connection establishment process according to an embodiment of the present application; [Figure 5B] FIG. 11 is a schematic interaction diagram of another unicast connection establishment process according to an embodiment of the present application; [Figure 6] FIG. 1 is a diagram of the structure of a communication system according to an embodiment of the present application. [Figure 7] FIG. 2 is a diagram of a control plane protocol architecture according to one embodiment of the present application. [Figure 8] FIG. 1 is a diagram of a user plane protocol architecture according to one embodiment of the present application. [Figure 9] FIG. 2 illustrates a scenario of switching from direct to indirect communication according to one embodiment of the present application. [Figure 10] FIG. 2 is a schematic interaction diagram of switching from direct communication to indirect communication according to an embodiment of the present application; [Figure 11] FIG. 2 is a diagram of a scenario of switching from indirect communication to direct communication according to one embodiment of the present application. [Figure 12] FIG. 2 is a schematic interaction diagram of switching from indirect communication to direct communication according to an embodiment of the present application; [Figure 13] FIG. 1 is a diagram of an architecture of a multi-path relay communication system according to one embodiment of the present application. [Figure 14] FIG. 2 is a diagram of a communication scenario according to one embodiment of the present application. [Figure 15A] 1 is a schematic interaction diagram of a communication method according to an embodiment of the present application; [Figure 15B] FIG. 2 is a schematic interaction diagram of another communication method according to an embodiment of the present application; [Figure 15C] FIG. 2 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application; [Figure 16] FIG. 2 is a diagram of a scenario of a communication method according to an embodiment of the present application. [Figure 17] FIG. 2 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application; [Figure 18A] FIG. 2 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application; [Figure 18B] FIG. 2 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application; [Figure 19] FIG. 2 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application; [Figure 20] FIG. 2 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application; [Figure 21] FIG. 2 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application; [Figure 22] 1 is a diagram of a structure of a communication device according to an embodiment of the present application; [Figure 23] FIG. 2 is a diagram of the structure of another communication device according to an embodiment of the present application. [Figure 24] FIG. 2 is a diagram of the structure of yet another communication device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0085] In the specification, claims, and accompanying drawings of this application, terms such as "first" and "second" are merely intended to distinguish between different objects, and do not limit the sequence, time sequence, priority, or degree of importance of the multiple objects. In the embodiments of this application, the term "multiple" refers to two or more. Furthermore, the terms "include", "have", and any other variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but instead optionally includes further steps or units that are not listed, or optionally includes further steps or units that are specific to these processes, methods, products, or devices. Furthermore, the character " / " typically indicates an "or" relationship between related objects.

[0086] An "embodiment" described herein means that a particular feature, structure, or characteristic described in combination with an embodiment may be included in at least one embodiment of the present application. Phrases appearing in various locations in the present specification may not necessarily refer to the same embodiment, and are not separate or optional embodiments excluding another embodiment. It may be explicitly or implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0087] The terminal device in the embodiment of the present application may be a user equipment (UE), an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent, or a user equipment. The terminal device may alternatively be a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication capabilities, a computing device connected to a wireless modem, another processing device, a vehicle-mounted device, a wearable device, a terminal device in a future 5G network, a terminal device in a future developed public land mobile network (PLMN), etc. This is not limited in the embodiment of the present application.

[0088] The network device in the embodiment of the present application may be a device that connects a terminal device to a wireless network, and may be, in particular, a base station. The base station may include various forms of base stations, for example, a macro base station, a micro base station (also called a small cell), a relay station, and an access point. The network device may be, in particular, an access point (AP) in a wireless local area network (WLAN), a base transceiver station (BTS) in a global system for mobile communications (GSM) or code division multiple access (CDMA), a Node B (NB) in a wideband code division multiple access (WCDMA), an evolved Node B (eNB or eNode B) in LTE, a relay station or an access point, an in-vehicle device, a wearable device, a next generation Node B (gNB) in a 5G system, a base station in a PLMN network to be developed in the future, etc.

[0089] The terms used in the embodiments of the present application are explained below.

[0090] 1. Sidelink (SL) communication

[0091] In a wireless communication system, terminal devices may perform data communication with each other through a network device, or terminal devices may perform communication with each other directly without a network device. Communication for data transmission between terminal devices without a network device may be referred to as sidelink communication. For example, FIG. 1 is a diagram of an architecture of a communication system according to an embodiment of the present application. In sidelink communication, the communication system may include at least two terminal devices. For example, FIG. 1 shows two terminal devices, UE1 and UE2. The interface between UE1 and UE2 is called a PC5 interface, and the communication link between UE1 and UE2 is called a sidelink. Data transmission may be performed directly between UE1 and UE2 through the sidelink rather than through a network, and thus communication delay may be effectively reduced. For example, an application scenario of the sidelink communication system may be vehicle-to-everything (V2X). In V2X, each vehicle is a terminal device, and data transmission may be performed directly between the vehicles through the sidelink.

[0092] For example, see Figure 2. Figure 2 is a diagram of a control plane protocol architecture for sidelink communication. As shown in Figure 2, the peer protocol layers established between UE1 and UE2 include a radio resource control (RRC) layer, a packet data convergence protocol (PDCP) layer, a radio link control (RLC) layer, a media access control (MAC) layer, and a physical layer (PHY) layer. In the control plane, UE1 encapsulates an RRC message generated in the RRC layer in a PDCP protocol data unit (PDU), which is sent to UE2 after processing is successively performed in the RLC layer, the MAC layer, and the PHY layer. UE2 obtains the PDCP PDU after processing is successively performed in the PHY layer, the MAC layer, and the RLC layer.

[0093] For example, sidelink communications may support several communication modes, such as broadcast, unicast, and multicast.

[0094] The broadcast communication may be similar to broadcasting system information by a network device. Specifically, a transmitting terminal sends broadcast service data to the outside without encryption, and other terminal devices that are within the effective receiving range of the transmitting terminal and are interested in the broadcast service can receive the broadcast service data.

[0095] In unicast communication, a unicast connection needs to be established between two terminal devices first. This is similar to data communication that is implemented after an RRC connection is established between a terminal device and a network device. After the unicast connection is established, the two terminal devices can implement data communication based on a negotiated identifier, and the data may be encrypted or unencrypted. Compared with broadcast communication, in unicast communication, the unicast communication can only be implemented between two UEs that have a unicast connection established.

[0096] Multicast communication refers to communication between all terminal devices in a communication group. In multicast communication, any terminal device in the communication group can receive or send multicast service data. For example, a terminal device in the communication group can send one multicast service data, and another terminal device in the communication group can receive the multicast service data. A terminal device can further receive the multicast service data sent by another terminal device in the communication group.

[0097] It should be understood that the above communication modes supported by the sidelink are merely examples. The communication modes supported by the sidelink in the embodiments of the present application are not limited to the above three examples, and may further include other new communication modes that emerge with the development of technology. Therefore, the above three communication modes should not be understood as limitations on the implementation of the present application.

[0098] In sidelink communication, a one-time sidelink communication corresponds to one pair of source layer-2 identifier (L2 ID) and destination L2 ID. In other words, a source L2 ID and a destination L2 ID are needed for a one-time sidelink communication. The source L2 ID and the destination L2 ID may be included in the sub-header of the MAC data protocol unit (PDU), so that the data may be transmitted from the transmitting terminal to the correct receiving terminal.

[0099] For example, the source L2 ID is assigned by the transmitting terminal (also called source terminal). For example, the transmitting terminal may select different source L2 IDs based on the communication type and the standard. The communication type may include unicast, broadcast, and multicast communication, and the standard may include long term evolution (LTE) or new radio (NR). In some implementations, the transmitting terminal may periodically update the source L2 ID to implement privacy protection for the sidelink service type, thereby preventing another terminal device from tracking and identifying the sidelink service type.

[0100] For example, the destination L2 ID may depend on the service type. The transmitting terminal may determine the correspondence between the destination L2 ID and the broadcast service, the multicast service, or the unicast service based on a pre-configuration, an application layer server configuration, a core network configuration, etc. For example, in a broadcast communication process or a multicast communication process, the transmitting terminal may determine the destination L2 ID based on a broadcast service type or a multicast service type. In a unicast communication, the transmitting terminal first establishes a unicast connection to a receiving terminal (also called a destination terminal). For example, in a unicast connection establishment process, the transmitting terminal may select a default destination L2 ID. The default destination L2 ID is associated with the service type of the unicast communication. After the unicast connection is established, the transmitting terminal may continue to use the default destination L2 ID to implement the unicast communication.

[0101] For example, a terminal device supporting a proximity-based service (ProSe) may perform a discovery process to discover surrounding terminal devices to which the terminal device can be connected, establish a unicast connection to the terminal device, and then perform communication based on the unicast connection.

[0102] (1) Discovery process

[0103] The protocol stack of a discovery message is shown in Figure 3. The peer protocol layer established between UE1 and UE2 includes a discovery protocol layer, a PDCP layer, an RLC layer, a MAC layer, and a PHY layer. The discovery message of UE1 may be generated in the discovery protocol layer, and is sent to UE2 after being successively processed in the PDCP layer, the RLC layer, the MAC layer, and the PHY layer. UE2 obtains the discovery message after successively performing processing in the PHY layer, the MAC layer, the RLC layer, and the PDCP layer.

[0104] For example, the above discovery process may include two discovery models, a first discovery model and a second discovery model. For example, in the first discovery model, the terminal device may include an announcing terminal (announcement UE) and a monitoring terminal (monitoring UE). The announcing terminal broadcasts a discovery message. The discovery message may carry a source L2 ID and a destination L2 ID. For example, the source L2 ID may be allocated by the announcing terminal, and the destination L2 ID may be a predefined or preconfigured destination L2 ID. The discovery message may also be called an announcement message, and the announcement message may carry information about the announcement terminal. For example, the announcement message may include information about a service type indicating a type of service that may be provided by the announcement terminal, and thus the monitoring terminal determines whether the service provided by the announcement terminal is required based on the announcement message. The monitoring terminal monitors the announcement message broadcasted by the announcement terminal. After receiving the announcement message broadcast by the announcing terminal, the monitoring terminal may determine whether the service provided by the announcing terminal is required based on the information carried in the announcement message, in other words, determine whether to establish a unicast connection to the announcing terminal. Figure 4A is an example of a first discovery model according to an embodiment of the present application. The first discovery model may include multiple terminal devices. Figure 4A shows five terminal devices, such as UE1, UE2, UE3, UE4, and UE5. UE1 is an announcing terminal, and UE2, UE3, UE4, and UE5 are monitoring terminals. UE1 broadcasts an announcement message. UE2, UE3, UE4, and UE5 monitor the announcement message, and after receiving the announcement message, determine whether to establish a unicast connection to UE1 based on the information carried in the announcement message.

[0105] For example, in the second discovery model, the terminal devices may include a discovering terminal (discovering UE) and a discovered terminal (discovered UE). The discovering terminal may broadcast a discovery message. The discovery message may carry a source L2 ID and a destination L2 ID. For example, the source L2 ID may be assigned by the discovering terminal, and the destination L2 ID may be a predefined or preconfigured destination L2 ID. The discovery message may also be called a solicitation message, and the solicitation message carries information about a service type required by the discovering terminal. The discovered terminal monitors the solicitation message broadcast by the discovering terminal, and when receiving the solicitation message, determines whether the service required by the discovering terminal can be provided. When determining that the service required by the discovering terminal can be provided, the discovered terminal sends a response message to the discovering terminal. Figure 4B is an example of the second discovery model according to one embodiment of the present application. The second discovery model may include multiple terminal devices. FIG. 4B shows five terminal devices, such as UE1, UE2, UE3, UE4, and UE5. UE1 is a discovering terminal, and UE2, UE3, UE4, and UE5 are discovered terminals. UE1 broadcasts a request message. The request message may include the service requirements of UE1. UE2, UE3, UE4, and UE5 monitor the request message, and after receiving the request message, determine whether the service requirements of UE1 are met based on the information carried in the request message. For example, if UE2 and UE3 determine that the service requirements of UE1 are met, they send a response message to UE1. After receiving the response messages sent by UE2 and UE3, UE1 may select one of UE2 and UE3 to establish a unicast connection.

[0106] It should be understood that the above two discovery models of discovery process are merely examples. The discovery model of discovery process in the embodiment of the present application is not limited to the above two examples, and may further include another new discovery model that appears with the development of technology. Therefore, the above two discovery models should not be understood as limitations on the implementation of the present application.

[0107] (2) Establishing a unicast connection

[0108] For example, in a unicast connection establishment process, a terminal device that initiates a unicast connection establishment procedure may be referred to as an initiating terminal (initiating UE), e.g., a monitoring terminal in the first discovery model and a discoverer terminal in the second discovery model. A peer end of the initiating terminal may be referred to as a target terminal (target UE), e.g., an announcing terminal in the first discovery model and a discovered terminal in the second discovery model. For example, after the discovery process, the initiating terminal may determine a target terminal with which a unicast connection can be established and initiate a unicast connection establishment procedure.

[0109] For example, after the discovery process, the initiating terminal may determine a source L2 ID for the unicast connection and a destination L2 ID of the target terminal. For example, the destination L2 ID may be obtained based on the discovery process. After determining the source L2 ID and the destination L2 ID, the initiating terminal sends a unicast connection establishment request (direct communication request, DCR) message to the target terminal. The DCR message may carry the source L2 ID, the destination L2 ID, and user information (User Info). After receiving the DCR message, the target terminal stores the source L2 ID and the destination L2 ID, and associates the source L2 ID and the destination L2 ID with the current unicast connection context. For example, the target terminal may determine whether to accept the unicast connection establishment request of the initiating terminal based on the user information included in the DCR message. If deciding to accept the unicast connection establishment request, the target terminal sends a unicast connection accept (direct communication accept, DCA) message (shown in FIG. 5A) to the initiating terminal. If the target terminal decides not to accept the unicast connection establishment request, it sends a unicast connection reject (direct communication reject) message (shown in FIG. 5B) to the initiating terminal.

[0110] 2.Measurement report

[0111] For example, when a terminal device accesses a network device, the network device may send a configuration message to the terminal device. The configuration message may include information such as a measurement object, a measurement report configuration, a measurement gap (GAP), and a measurement identifier (ID). The measurement gap is a time segment in which the terminal device leaves the current frequency and performs measurements on another frequency. The terminal device may measure the signal quality of the terminal device's serving cell and the signal quality of the surrounding cells based on the configuration message, and perform measurement reporting when the measured signal quality meets the measurement report condition set in the configuration message to report the measurement result to the network device. The network device may indicate to the terminal device that it will perform a cell change based on the measurement result. Specifically, the network device may indicate to the terminal device that it will perform a cell change based on the signal quality of the serving cell and the signal quality of the surrounding cells.

[0112] For example, the configuration message may include at least one measurement object. The at least one measurement object is an object on which the terminal device performs measurements, and each of the at least one measurement object may correspond to one measurement object ID (MeasobjectvieId). For example, the configuration message may include configuration information of the at least one measurement object. An NR measurement object is used as an example. The configuration information of the NR measurement object may include information such as a synchronization signal and physical broadcast channel (PBCH) block (SSB) frequency, an SSB subcarrier spacing, an SSB-based measurement timing configuration (SMTC) configuration, a whitelist cell and a blacklist cell, and a frequency and an identifier of a cell. For example, when an SSB signal received by a terminal device meets the configuration information of an NR measurement object, it is determined that the SSB signal is a measurement object. In other words, the terminal device may measure the SSB signal. For example, the configuration message may be an RRC Reconfiguration message, and the at least one measurement object may be included in a measurement object list (measObjectiveToAddModList) of an information element measconfig of the RRC Reconfiguration message.

[0113] For example, the configuration message may include at least one measurement report configuration, and each of the at least one measurement report configuration may include a standard for triggering a report of a measurement report (i.e., a measurement report condition) and a measurement report format. For example, each of the at least one measurement report configuration corresponds to one measurement report event and is associated with one measurement object. For example, a measurement report corresponding to an NR measurement object may include a measurement result of an SSB. For example, any one of the at least one measurement report configuration has one configuration identifier (reportConfigId). For example, the configuration message may be an RRC reconfiguration message, and the at least one measurement report configuration is included in an information element reportConfigToAddModList of the RRC reconfiguration message.

[0114] For example, based on different trigger types, the at least one measurement reporting configuration may be categorized into event-triggered reporting and periodic-triggered reporting.

[0115] For example, for a measurement report configuration of an event-triggered report, the measurement report configuration may include an event type, a threshold, a period during which a trigger condition is satisfied, a measurement amount, a reference signal type, etc., of a measurement report event corresponding to the measurement report configuration. The trigger amount of the measurement report event is an indicator of the measurement report event. The trigger amount may include a reference signal received power (RSRP), a received signal strength indicator (RSSI), a reference signal received quality (RSRQ), and a signal to interference plus noise ratio (SINR). Through the measurement, when detecting that the trigger amount satisfies the trigger threshold of the measurement report event, the terminal device triggers a measurement report corresponding to the measurement report event. For example, in a change process of the Uu interface, i.e., in a change process of the serving cell of the terminal device, the trigger amount of the measurement report event may be RSRP or RSRQ. For example, the terminal device may determine whether to trigger a measurement report corresponding to the measurement report event by measuring the RSRP of the SSB signal or the RSRQ of the SSB signal.

[0116] For example, when a network device implements a measurement reporting configuration of event-triggered reporting for a terminal device, the network device may correspondingly configure an entrance threshold and an exit threshold of a measurement reporting event corresponding to the measurement reporting configuration. For example, the entrance threshold condition of a measurement reporting event A1 (Event A1) is Ms-Hys>Thresh, and the condition persists for a TimeToTriger period, where Ms is the measurement result of the serving cell, Hys is the hysteresis of the measurement result, and Thresh is the threshold value. When the terminal device meets the entrance threshold of the measurement reporting event, the terminal device records a measurement object corresponding to the measurement reporting event in a measurement variable (VarMeasReportList) of the terminal device to form a measurement entry corresponding to the measurement object. The measurement variable is used to record related measurement information of the triggered measurement reporting condition. The measurement entry may include a measurement ID and may be associated with the measurement object that triggers the measurement reporting condition and its measurement result. After forming the measurement inlet, the terminal device generates a measurement report, where the measurement report includes the measurement result associated with the above measurement ID or measurement object, and reports the measurement report to the network device. The measurement variable may include measurement inlets corresponding to multiple measurement objects. The measurement report includes the measurement variable, and the format of the measurement report is determined based on the measurement report setting corresponding to the measurement report event. For example, the terminal device may report the measurement report to the network device based on the measurement report setting corresponding to the measurement report event. For example, the terminal device may report the measurement report to the network device by using a MeasurementReport message. The measurement report includes a measurement object corresponding to the measurement inlet in the measurement variable of the terminal device and its measurement result.

[0117] For example, the network device configures that the event-triggered reporting scheme may include event-triggered one-time reporting and event-triggered periodic reporting. For example, in the case of event-triggered one-time reporting, when the terminal device meets the entry threshold of a measurement reporting event and maintains the status for a certain period of time, the terminal device triggers the reporting of only one-time measurement reports. In the case of event-triggered periodic reporting, after the measurement reporting of the terminal device is triggered, the terminal device starts a timer (reportInterval) between multiple measurements and a counter (reportAmount) for the amount of measurements. Both the timer and the counter are set by the network device. When the counter reaches a requirement for the number of reports, the terminal device stops reporting and completes the measurement reporting procedure corresponding to the measurement reporting event. When the counter is infinity, the terminal device reports the measurement results periodically.

[0118] For example, when the terminal device meets the exit threshold of the measurement reporting event, the terminal device may delete the corresponding measurement inlet from the measurement variable. For example, when the terminal device detects through measurement that the measurement object meets the exit threshold of the measurement reporting event, the terminal device may delete the measurement inlet corresponding to the measurement object from the measurement variable. In other words, when the terminal device performs measurement reporting next time, the reported measurement result no longer includes the measurement result of the measurement object.

[0119] For example, when a network device implements a measurement report configuration of periodic triggered reporting to a terminal device, the terminal device may send a measurement report based on a report interval (reportInterval) set by the network device. A measurement object corresponding to the measurement report configuration is always recorded in the measurement variable of the terminal device. Specifically, a measurement result corresponding to the measurement object is sent to the network device every time a measurement report is implemented.

[0120] For example, the above configuration message further includes at least one measurement ID, and the measurement ID is used to associate the measurement object with the measurement report configuration. The terminal device may determine a correspondence between the measurement object and the measurement report configuration based on the measurement ID, and measure the measurement object based on the requirements of the measurement report configuration corresponding to the measurement object. For example, the at least one measurement ID may be included in an information element measObjectiveToAddModList of the RRC reconfiguration message.

[0121] 3. User Equipment-Network Relay (UE-to-Network Relay, U2N Relay) Technology

[0122] For example, U2N relay technology is a technology in which a terminal device helps another terminal device to communicate with a network device, or U2N relay technology is a technology in which a terminal device communicates with a network device through another terminal device. U2N relay technology is sometimes called relay technology. In the U2N relay communication architecture, a terminal device can be classified into a remote terminal (remote UE) and a relay terminal (relay UE). The remote terminal can communicate with a network device through a relay terminal. FIG. 6 is an example of a U2N relay communication architecture according to an embodiment of the present application. FIG. 6 shows a remote terminal, a relay terminal, and a network device. The remote terminal communicates with a network device through a relay terminal. The remote terminal communicates with the relay terminal through a side link, and the corresponding interface is called PC5. The relay terminal is directly connected to the network device, i.e., communicates with the network device through a Uu interface. For example, a direct communication link between a relay terminal and a network device may be called a direct link.

[0123] For example, see Figures 7 and 8. Figure 7 is a diagram of a control plane protocol architecture in a U2N relay communication architecture, and Figure 8 is a diagram of a user plane protocol architecture in a U2N relay communication architecture.

[0124] For example, the control plane protocol stack architecture shown in FIG. 7 and the user plane protocol stack architecture shown in FIG. 8 are applicable to the L2 U2N relay scenario. For the control plane, as shown in FIG. 7, a PC5 interface is established between a remote terminal and a relay terminal, and the end-to-end protocol layer includes an adaptation layer (Adapt), an RLC layer, a MAC layer, and a PHY layer. A Uu interface is established between a relay terminal and a network device (i.e., a gNB), and the end-to-end protocol layer includes an adaptation layer, an RLC layer, a MAC layer, and a PHY layer. An N2 interface is established between a network device and a core network, and the end-to-end protocol layer includes an N2 interface protocol stack (N2 Stack). In addition, an end-to-end protocol layer including an RRC layer and a PDCP layer is between the remote terminal and the network device. An end-to-end protocol layer including a non-access stratum (NAS) layer is between the remote terminal and the core network (5G Core Network, 5GC).

[0125] For the user plane, a PC5 interface is established between the remote terminal and the relay terminal, and the end-to-end protocol layer includes an adaptation layer, an RLC layer, a MAC layer, and a PHY layer. A Uu interface is established between the relay terminal and the network device, and the end-to-end protocol layer includes an adaptation layer, an RLC layer, a MAC layer, and a PHY layer. A general packet radio service (GPRS) tunnelling protocol user plane (GTP-U) interface is established between the network device and the core network, and the end-to-end protocol layer includes an N3 stack. Furthermore, an end-to-end protocol layer including a service data adaptation protocol (SDAP) layer and a PDCP layer is established between the remote terminal and the network device. An end-to-end protocol layer including an internet protocol (IP) layer is between the remote terminal and the core network.

[0126] For example, the data packets of the remote terminal are relayed and forwarded under the PDCP layer of the relay terminal. Specifically, the relay terminal, including the RLC layer, the MAC layer, and the PHY layer, maintains the relayed RLC bearer. Furthermore, in the U2N relay communication architecture, in the control plane protocol architecture and the user plane protocol architecture, an adaptation layer is added between the RLC layer and the PDCP layer. The main function of the adaptation layer is the multiplexing and segmentation of radio bearers. Specifically, the adaptation layer supports multiplexing of data from different PDCP entities on one RLC bearer, or segmentation of data on one RLC bearer on different radio bearers.

[0127] For example, in the L3 U2N relay communication architecture, the data packet of the remote terminal is relayed and forwarded at the internet protocol (IP) layer of the relay terminal, where the IP layer is above the access stratum (AS) layer. Specifically, the IP layer is above the SDAP layer, the PDCP layer, the adaptation layer, the RLC layer, the MAC layer, and the PHY layer. Therefore, there are end-to-end IP layers, SDAP layers, PDCP layers, adaptation layers, RLC layers, MAC layers, and PHY layers between the remote terminal and the relay terminal, there are end-to-end IP layers, SDAP layers, PDCP layers, adaptation layers, RLC layers, MAC layers, and PHY layers between the relay terminal and the network device, and there is no end-to-end protocol layer between the network device and the remote terminal.

[0128] For ease of explanation, in the embodiments of the present application, a relay device that provides relay service to a remote terminal may be referred to as a serving relay device of the remote terminal, and a relay device that does not provide relay service to the remote terminal may be referred to as a surrounding relay device.

[0129] For example, the remote terminal may measure the signal quality of the surrounding cells and the signal quality of the surrounding relay devices, and implement mobility management based on the measured signal quality, so that the remote terminal can continuously enjoy the network service during the moving process. For example, the mobility management of the remote terminal may include some of the following cases:

[0130] Case 1: Switching from direct to indirect communication

[0131] Switching from direct communication to indirect communication means that the remote terminal switches from communicating directly with the network device to communicating with the network device through a relay device. For example, the remote terminal is in an RRC connected state (RRC_CONNECTED). When communicating directly with the network device, the remote terminal may measure the signal quality of the current serving cell and the signal quality of the sidelink between the remote terminal and the surrounding relay terminals based on the configuration message of the network device, and implement measurement reporting based on the configuration message to report the measurement result to the network device. Then, based on the measurement result reported by the remote terminal, the network device indicates to the remote terminal that it will switch to the target relay terminal, and obtains relay service via the target relay terminal, thereby accessing the target base station of the target relay terminal. For example, when the remote terminal accesses the network device, the network device sends a configuration message to the remote terminal. The configuration message is used to implement measurement reporting configuration for the remote terminal. For example, the configuration message may set a reporting condition for triggering measurement reporting for the remote terminal. When the reporting condition is met, the remote terminal triggers measurement reporting to report the measurement result to the network device. For example, the configuration message may be, inter alia, an RRC Reconfiguration message.

[0132] For example, FIG. 9 is an example of a switching scenario from direct communication to indirect communication. In FIG. 9, three terminal devices (i.e., UE1, UE2, and UE3) and two network devices (i.e., gNB1 and gNB2) are used as an example. UE1 is a remote terminal, and UE2 and UE3 are relay terminals around UE1. UE1 directly communicates with gNB1 through a Uu interface, UE2 directly communicates with gNB1, and UE3 directly communicates with gNB2. For example, UE2 and UE3 broadcast a discovery message. UE1 may measure the signal quality of the sidelink between UE1 and UE2 based on the discovery message broadcast by UE2, and measure the signal quality of the sidelink between UE1 and UE3 based on the discovery message broadcast by UE3. When the signal quality measured by UE1 meets the reporting condition in the measurement configuration, UE1 triggers measurement recording and reporting to report the measurement result to gNB1. Based on the measurement results reported by UE1, gNB1 may indicate to UE1 to switch to UE2 or UE3 to access gNB1 or gNB2 via UE2 or UE3.

[0133] For example, in a switching scenario from direct communication to indirect communication, the network device may configure a measurement reporting event Y for the remote terminal by using a configuration message to limit the measurement reporting behavior of the remote terminal. For example, the measurement reporting event Y may be defined as follows: A measurement report is triggered when the signal quality of the current serving cell of the remote terminal is smaller than a threshold Y1 and the signal quality of the surrounding optional relay terminal on the sidelink is larger than a threshold Y2.

[0134] For example, the entry conditions for measurement report event Y can be (Mn + Hys < ThreshY1) and (Mr - Hys > ThreshY2), and the conditions persist during the TimeToTrigger period. Mn is the signal quality of the serving cell, Mr is the signal quality of the surrounding relay terminals on the sidelink, Hys is the hysteresis of the measurement result, TimeToTrigger indicates the period during which the entry conditions for the measurement report event are continuously satisfied, i.e., the trigger time, and ThreshY1 corresponds to threshold Y1 in measurement report event Y. When the remote terminal satisfies the conditions (Mn + Hys < ThreshY1) and (Mr - Hys > ThreshY2), and the period during which the conditions are continuously satisfied is equal to or longer than the TimeToTrigger period, it is determined that the entry conditions for the measurement report event are satisfied and the measurement report is triggered.

[0135] For example, the exit conditions for measurement report event Y can be (Mn + Hys > ThreshY1) and (Mr - Hys < ThreshY2), and the conditions persist during the TimeToTrigger period. ThreshY2 corresponds to threshold Y2. When the period during which the remote terminal satisfies the condition (Mn + Hys > ThreshY1) or (Mr - Hys < ThreshY2) is equal to or longer than the TimeToTrigger period, the exit conditions for measurement report event Y are satisfied.

[0136] For example, the signal quality of the sidelink in the measurement reporting event Y may be SD-RSRP. Specifically, the remote terminal obtains the signal quality of the sidelink between the remote terminal and the surrounding relay terminals by receiving and measuring discovery messages sent by the surrounding relay terminals. When the terminal device satisfies the entrance condition of the measurement reporting event Y, i.e., when the signal quality of the serving cell of the terminal device is smaller than the threshold Y1 and the SD-RSRP of the surrounding relay terminals is larger than the threshold Y2, the remote terminal may perform measurement recording, i.e., the remote terminal records the measurement objects corresponding to the surrounding relay terminals in the measurement variables of the remote terminal, and performs measurement reporting based on the measurement reporting configuration corresponding to the measurement reporting event Y. For example, the measurement result reported by the remote terminal may include ID information of the surrounding relay terminals, ID information of the serving cells of the surrounding relay terminals, and the signal quality of the sidelink between the remote terminal and the relay terminal.

[0137] For example, when the measurement result of the remote terminal satisfies the exit condition of the measurement reporting event Y, the remote terminal may delete the measurement object corresponding to the measurement reporting event Y from the measurement variable.

[0138] For example, after receiving the measurement result reported by the remote terminal, the network device makes a corresponding handover decision based on the measurement result, and indicates to the remote terminal to implement switching from direct communication to indirect communication, that is, the remote terminal switches from directly communicating with the network device to communicating with the network device via the relay device. A specific procedure of switching from direct communication to indirect communication is shown in Figure 10. The following describes the steps of Figure 10.

[0139] S11: The remote terminal sends a measurement result to a source network device. The source network device is a network device that communicates with the remote terminal. The remote terminal may perform measurement reporting based on a measurement reporting configuration. The reported measurement result includes ID information of surrounding relay terminals, ID information of serving cells of the surrounding relay terminals, and signal quality of sidelinks of the surrounding relay terminals.

[0140] S12: The source network device determines a target network device and a target relay terminal based on the measurement result.

[0141] S13: The source network device sends a handover request message to the target network device.

[0142] S14: The target network device returns a handover acknowledgment (ACK) message to the source network device.

[0143] S15: The target network device sends RRC configuration information to the target relay terminal. The RRC configuration message includes the air interface configuration required by the target relay terminal and provides the relay service for the remote terminal and the identification information of the remote terminal. After receiving the RRC configuration message, the target relay terminal may return a complete message to the target network device.

[0144] S16: The source network device sends a handover command (HO command) to the remote terminal. The handover command includes the settings required by the remote terminal to access the target network device through the target relay terminal and the identification information of the target relay terminal device.

[0145] S17: The remote terminal establishes a unicast connection to the target relay terminal.

[0146] S18: The remote terminal returns an RRC reconfiguration complete message to the target network device through the target relay terminal. The RRC reconfiguration complete message indicates that the switch is completed.

[0147] It should be understood that in the process of switching from direct communication to indirect communication, the source network device and the target network device can alternatively be the same network device, that is, an intra-site switching is implemented. When an intra-site switching is implemented, steps S13 and S14 may not be implemented.

[0148] In this case, the remote terminal may measure the signal quality of the sidelink between the remote terminal and the relay terminal by receiving and measuring the discovery message sent by the surrounding relay terminal. For example, the remote terminal may measure the signal quality of the sidelink between the remote terminal and the surrounding relay terminal by measuring the RSRP of the discovery message sent by the relay terminal. The signal quality of the sidelink and obtained by the remote terminal by measuring the RSRP of the discovery message sent by the surrounding relay terminal may be referred to as SD-RSRP. In the U2N relay communication architecture, when the signal quality of the relay terminal on the Uu interface between the relay terminal and the network device meets a threshold condition, the relay terminal sends a discovery message. Specifically, when the signal quality of the relay terminal on the Uu interface is between a minimum threshold and a maximum threshold, the relay terminal sends a discovery message. The minimum threshold and the maximum threshold may be set by the network device. When the relay terminal does not meet the above threshold condition, the relay terminal does not provide a relay service and therefore stops sending discovery messages. For example, the signal quality of the relay terminal on the Uu interface between the relay terminal and the network device may be referred to as the Uu-RSRP of the relay terminal.

[0149] For surrounding relay terminals, when the Uu-RSRP of the surrounding relay terminals meets the above threshold condition, the discovery message is sent periodically. The remote terminal may detect the SD-RSRP of the surrounding relay terminals based on the discovery message. When the SD-RSRP of the surrounding relay terminals meets the entry condition of the measurement report event Y, the surrounding relay terminals are added to the measurement variables to form a measurement entry corresponding to the surrounding relay terminals, and the corresponding measurement report is implemented. If the Uu-RSRP of the surrounding relay terminals no longer meets the threshold condition after a certain period of time, the transmission of the discovery message is stopped. If the remote terminal no longer receives the discovery message of the surrounding relay terminals, the SD-RSRP of the surrounding relay terminals cannot be measured. In this case, the remote terminal cannot determine whether the surrounding relay terminals meet the entry condition or the exit condition of the measurement report event Y based on the SD-RSRP of the surrounding relay terminals. Therefore, the measurement entry corresponding to the surrounding relay terminals is held in the measurement variable of the remote terminal. Furthermore, when the measurement report is triggered next time (where, for example, the measurement report is triggered when another measurement object meets the inlet condition of the measurement report event corresponding to the remote terminal), the measurement result reported by the remote terminal still includes the measurement inlet. For example, when the surrounding relay terminals no longer provide relay services, the remote terminal still reports the measurement inlets corresponding to the surrounding relay terminals. As a result, the reported measurement result includes an inappropriate relay terminal. In view of this, an embodiment of the present application provides a communication method to solve the problem that the measurement result reported by the remote terminal includes an inappropriate relay terminal. For details, please refer to the related description of FIG. 15A.

[0150] For the surrounding relay terminal, when the SD-RSRP of the surrounding relay terminal satisfies the entrance condition of the measurement report event Y, the remote terminal adds the surrounding relay terminal to the measurement variable to form a measurement entrance corresponding to the surrounding relay terminal, and implements the corresponding measurement report. After the remote terminal adds the surrounding relay terminal to the measurement variable and implements the measurement report, the surrounding relay terminal implements a cell change. In this case, the network device cannot update the cell information of the surrounding relay terminal in a timely manner. As a result, the remote terminal may fail to switch from the relay device. For example, the network device sends a handover request to the network device before the cell change of the surrounding relay terminal based on the cell information before the cell change of the surrounding relay terminal, and the handover request is rejected by the network device before the cell change of the surrounding relay terminal. In view of this, an embodiment of the present application provides a communication method, so that the network device can update the cell information of the surrounding relay terminal in a timely manner to prevent the relay device of the remote terminal from failing to switch to the surrounding relay terminal because the network device does not update the cell information of the surrounding relay terminal in a timely manner. For details, please refer to the related description of FIG. 18A.

[0151] Case 2: Switching from indirect to direct communication

[0152] The switching process from indirect communication to direct communication refers to a process in which a remote terminal switches from communicating with a network device through a relay terminal to directly communicating with the network device. For example, the remote terminal is in an RRC connected state. When communicating with a network device through the serving relay terminal of the remote terminal, the remote terminal may measure the signal quality of the sidelink between the remote terminal and the serving relay terminal and the signal quality of the surrounding cells based on the configuration message of the network device, and perform measurement reporting based on the measurement report configuration in the configuration message. Figure 11 is an example of a switching scenario from indirect communication to direct communication according to an embodiment of the present application. Figure 11 shows two terminal devices (i.e., UE1 and UE2) and two network devices (i.e., gNB1 and gNB2). UE1 is a remote terminal, and UE2 is a relay terminal. UE1 communicates with gNB1 through UE2, UE2 communicates with gNB1 through the Uu interface, and UE1 communicates with UE2 through the sidelink. UE1 may receive a configuration message of gNB1 via UE2, and measure the signal quality of the sidelink between UE1 and UE2 and the signal quality of the cell around UE1 based on the configuration message. For example, UE1 may measure the signal quality of the cell served by gNB1 and the signal quality of the cell served by gNB2. When the signal quality measured by UE1 meets the reporting condition, UE1 performs measurement reporting and sends the measurement result to gNB1. gNB1 may indicate to UE1 to switch to a suitable cell based on the measurement result reported by UE1. For example, gNB1 may indicate to UE1 to switch to a cell served by gNB2.

[0153] In the indirect communication to direct communication scenario, the network device may set a measurement report event X (Event X) for the remote terminal to limit the measurement report behavior of the remote terminal. For example, the measurement report event X may be defined as follows. When the signal quality of the sidelink between the remote terminal and the serving relay terminal is less than the threshold X1, and the signal quality of the surrounding cells is greater than the threshold X2, the measurement report is triggered.

[0154] For example, the entry conditions for the measurement report event X may be (Mr + Hys < ThreshX1) and (Mn + Offset - Hys > ThreshX2), and the conditions persist for the TimeToTrigger period. Mr is the signal quality of the current serving relay terminal, Mn is the signal quality of the surrounding cells, Hys is the hysteresis of the measurement result, TimeToTrigger indicates the period during which the entry conditions of the event are continuously satisfied, i.e., the trigger time, and Offset indicates the sum of the frequency offsets of the adjacent cells. The offset is the sum of Ofn and Ocn, where Ofn is the specific frequency offset of the measurement object in the cell and Ocn is the cell-level offset. ThreshX1 corresponds to the threshold X1 in the measurement report event X. When the remote terminal satisfies the conditions (Mr + Hys < ThreshX1) and (Mn + Offset - Hys > ThreshX2), and the period during which the conditions are satisfied is equal to or greater than the TimeToTrigger period, the entry conditions of the measurement report event are satisfied and the measurement report is triggered.

[0155] For example, the exit conditions for the measurement report event X may be (Mr + Hys > ThreshX1) or (Mn + Offset - Hys < ThreshX2), and the conditions persist for the TimeToTrigger period. ThreshX2 corresponds to the threshold X2 in the measurement report event X. When the period during which the remote terminal satisfies the condition (Mr + Hys > ThreshX1) or (Mn + Offset - Hys < ThreshX2) is equal to or greater than the TimeToTrigger period, the exit conditions of the measurement report event Y are satisfied.

[0156] For example, the signal quality of the sidelink between the remote terminal and the serving relay terminal in the measurement report event X may be SL-RSRP. Specifically, the remote terminal may obtain the signal quality of the sidelink between the remote terminal and the relay terminal by receiving and measuring the data sent by the serving relay terminal. In some implementations, when there is no data transmission between the remote terminal and the serving relay terminal, the remote terminal may also obtain the SD-RSRP by measuring a discovery message sent by the serving relay terminal and use the SD-RSRP as the signal quality of the sidelink between the remote terminal and the serving relay terminal.

[0157] For example, when the signal quality of the sidelink between the remote terminal and the serving relay terminal and the signal quality of the surrounding cell satisfy the entrance condition of the measurement reporting event X, the remote terminal performs measurement recording, i.e., the remote terminal records a measurement object corresponding to the measurement reporting event X in a variable, and performs measurement reporting based on the measurement reporting configuration of the measurement reporting event X to report the measurement result to the network device. For example, the measurement result includes the ID information of the surrounding cell and the signal quality of the surrounding cell.

[0158] For example, when the measurement result of the remote terminal satisfies the exit condition of the measurement reporting event X, the remote terminal deletes the measurement object corresponding to the measurement reporting event X from the measurement variables.

[0159] For example, after receiving the measurement result reported by the remote terminal, the network device makes a corresponding handover decision based on the measurement result, and indicates to the remote terminal to implement switching from indirect communication to direct communication, that is, the remote terminal switches from communicating with the network device via the relay device to communicating directly with the network device. A specific procedure of switching from indirect communication to direct communication is shown in Figure 12. The following describes the steps of Figure 12.

[0160] S21: The remote terminal sends a measurement result to a source network device through a serving relay terminal. The measurement result includes ID information of surrounding cells and signal qualities of the surrounding cells.

[0161] S22: The source network device determines a target network device based on the measurement result.

[0162] S23: The source network device sends a handover request message to the target network device.

[0163] S24: The target network device returns a handover ACK message to the source network device.

[0164] S25: The source network device sends a handover command to the remote terminal via the serving relay terminal device, where the handover command includes settings required by the remote terminal to access the target network device.

[0165] S26: The remote terminal accesses the target network device based on the handover command. For example, the remote terminal may access the target network device in a random access manner.

[0166] S27: The remote terminal returns an RRC reconfiguration complete message to the target network device. The RRC reconfiguration complete message indicates that the switch is completed.

[0167] S28: The source network device sends an RRC reconfiguration message to the serving relay terminal. The RRC configuration message indicates to the serving relay terminal to release the configuration related to the remote terminal, for example, the air interface configuration related to the remote terminal. Correspondingly, after S28, the relay device further returns an RRC reconfiguration complete message to the source network device.

[0168] S29: The serving relay terminal releases the unicast connection between the serving relay terminal and the remote terminal. It should be understood that the unicast connection may alternatively be released by the remote terminal.

[0169] It should be understood that in the process of switching from indirect communication to direct communication, the source network device and the target network device can alternatively be the same network device, that is, an intra-site switching is implemented. When an intra-site switching is implemented, steps S23 and S24 may not be implemented.

[0170] In this case, the remote terminal may measure the signal quality of the sidelink between the remote terminal and the serving relay terminal by receiving and measuring data sent by the serving relay terminal based on a unicast connection. For example, the remote terminal may measure the signal quality of the sidelink between the remote terminal and the serving relay terminal by measuring the RSRP of the data sent by the serving relay terminal. The signal quality of the sidelink and obtained by the remote terminal by measuring the RSRP of the data sent by the serving relay terminal may be referred to as SL-RSRP. Alternatively, the remote terminal may measure the signal quality of the sidelink between the remote terminal and the serving relay terminal based on a discovery message broadcast by the serving relay terminal.

[0171] For example, when there is no data transmission on a unicast connection between the remote terminal and the serving relay terminal, the remote terminal may detect the SD-RSRP of the serving relay terminal. For example, at time T, if the Uu-RSRP of the serving relay terminal does not satisfy the threshold condition, the transmission of the discovery message is stopped. Furthermore, before time T, the SD-RSRP of the serving relay terminal does not satisfy the entrance condition of the measurement report event X. The remote terminal cannot receive the discovery message sent by the serving relay terminal and cannot determine whether the SD-RSRP of the serving relay terminal satisfies the entrance condition of the measurement report event X. Thus, the remote terminal does not trigger a measurement report. In this case, the serving relay terminal is no longer suitable to serve as a relay device of the remote terminal. According to the communication method provided in the embodiment of the present application, it can be determined whether the serving relay terminal is suitable to continue to serve as a relay device of the remote terminal, and a measurement report can be triggered when the serving relay terminal is no longer suitable to continue to serve as a relay device of the remote terminal device, so that the relay device of the remote terminal can switch to a suitable relay terminal in a timely manner. For a specific implementation of the communication method, please refer to the related description of FIG. 15B.

[0172] Case 3: Switching from indirect to indirect communication

[0173] For example, switching from indirect communication to indirect communication means that the remote terminal switches from indirect communication to indirect communication, i.e., the relay device in the range of the remote terminal changes from one relay terminal to another relay terminal. For example, the remote terminal is in a connected state. For example, the remote terminal may communicate with the network device via a current serving relay terminal and receive a configuration message of the network device via the current serving relay terminal. For example, the configuration message may set a condition to satisfy a measurement report for the remote terminal. The remote terminal may measure a sidelink signal quality between the remote terminal and the current serving relay terminal and a sidelink signal quality between the remote terminal and the surrounding relay terminals based on the configuration message. When the signal quality measured by the remote terminal satisfies the measurement report condition set in the configuration message, e.g., the sidelink signal quality of the serving relay terminal is smaller than a first specified threshold and the sidelink signal quality measured by the surrounding relay terminals is larger than a second specified threshold, the remote terminal triggers a measurement report to report the measurement result to the network device. The first specified threshold and the second specified threshold may be set by the network device. For example, the network device may determine a target relay terminal based on measurements reported by the remote terminal and indicate to the remote terminal to switch from the current serving relay terminal to the target relay terminal. It should be understood that the current serving relay terminal and the target relay terminal may communicate with one network device or different network devices.

[0174] It can be understood that for the specific procedure of switching from indirect communication to indirect communication, please refer to the related description of switching from direct communication to indirect communication and the related description of switching from indirect communication to direct communication, and the details will not be described again in this specification.

[0175] Case 4: Relay terminal selection and reselection

[0176] For example, when the remote terminal is in an idle or inactive state, the remote terminal may select and reselect a relay terminal. For example, when the remote terminal directly communicates with the network device, if the remote terminal detects that the signal quality of the current serving cell is less than a third specified threshold or receives indication information of the network device, the remote terminal may select a relay device. The third specified threshold may be set by the network device, and the indication information indicates to the remote terminal to select a relay device. When the remote terminal indirectly communicates with the network device through a serving relay terminal, if the remote terminal satisfies a trigger condition for reselecting the relay terminal, the remote terminal reselects the relay terminal. The trigger condition for reselecting the relay terminal may include one or more of: the signal quality of the sidelink between the remote terminal and the current relay terminal is less than a fourth specified threshold, indication information of the network device is received, and the sidelink communication fails. The fourth specified threshold may be set by the network device, and the indication information indicates to the remote terminal to reselect a relay device.

[0177] In this case, the remote terminal may detect the SD-RSRP of the relay terminal based on the discovery message broadcast by the serving relay terminal to determine whether to reselect the relay terminal. When the Uu-RSRP of the serving relay terminal does not meet the threshold condition and the transmission of the discovery message stops, the remote terminal cannot detect the SD-RSRP of the serving relay terminal and cannot determine whether it is necessary to reselect the relay device. Therefore, the remote terminal cannot reselect the relay terminal in a timely manner. In view of this, an embodiment of the present application provides a communication method, so that the remote terminal can reselect a relay terminal in a timely manner. For a specific implementation of the communication method, please refer to the related description of FIG. 15C.

[0178] It should be understood that the above several switching scenarios, such as switching from direct communication to indirect communication, switching from indirect communication to direct communication, and switching from indirect communication to indirect communication, are only examples. During practical application, the switching of the remote terminal may not be limited to the above several scenarios. For example, the remote terminal may measure both the signal quality of the sidelink between the remote terminal and the surrounding relay device and the signal quality of the surrounding cell, and report the measurement result to the network device when the measured signal quality meets the reporting condition. The network device may indicate to the remote terminal to switch to the target relay terminal or the target cell based on the measurement result reported by the remote terminal. Therefore, the above several switching scenarios should not be understood as a limitation on the implementation of the present application.

[0179] For example, in a first discovery model, a relay terminal that satisfies the above Uu-RSRP threshold condition may periodically broadcast an announcement message (i.e., a discovery message), and a remote terminal monitors and receives the announcement messages of surrounding relay terminals. In a second discovery model, a remote terminal may periodically broadcast a request message. The request message indicates that the remote terminal requires relay service. After monitoring and receiving the request message, if the above threshold condition is met, the surrounding relay terminals send a response message (a discovery message) to the remote terminal. The response message indicates that the relay terminal can provide relay service.

[0180] For example, a discovery message (announcement message or response message) sent by a relay terminal may include a source L2 ID, a destination L2 ID, and the serving cell information of the relay terminal, for example, identity document (ID) information of the serving cell.

[0181] 4. Multi-path relaying

[0182] In the multipath relay communication architecture, there may be multiple connections between one remote terminal and a network device. In the multipath relay communication architecture, a remote terminal may have multiple indirect communication connections simultaneously, i.e., a remote terminal may simultaneously establish connections to a network device through multiple relay terminals. When connected to a network device through a Uu interface direct link, a remote terminal may further establish a connection to a network device through a relay terminal. Figure 13 is an example of a multipath relay architecture. In Figure 13, one remote terminal (i.e., UE1), a relay terminal (i.e., UE2), and a network device (i.e., gNB1) are used as an example. UE1 may directly communicate with gNB1 through the Uu interface and indirectly communicate with gNB1 through UE2. It can be understood that UE1 may have multiple indirect communication connections to a network device through multiple relay terminals. Figure 13 shows only one indirect communication connection. It should be understood that in the multipath relay communication architecture, a remote terminal may establish connections to different network devices or the same network device through direct communication and indirect communication. This is not limited in the present application.

[0183] FIG. 14 shows an example of a communication scenario of the U2N relay architecture. The communication scenario may include at least one remote terminal, at least one relay terminal, and at least one network device. In FIG. 14, two remote terminals, three relay terminals, and two network devices are used as an example. The two remote terminals are remote UE1 and remote UE2, the three relay terminals are relay UE1, relay UE2, and relay UE3, and the two network devices are gNB1 and gNB2. Remote UE1 directly communicates with gNB1 through a Uu interface, relay UE1 directly communicates with gNB1 through a Uu interface, relay UE2 directly communicates with gNB2 through a Uu interface, and relay UE3 directly communicates with gNB2 through a Uu interface. Remote UE2 communicates with gNB2 through relay UE3, and remote UE2 is connected to relay UE3 through a sidelink.

[0184] For example, relay UE1, relay UE2, and relay UE3 may periodically broadcast discovery messages. Remote UE1 may measure signal quality between remote UE1 and relay UE1, relay UE2, and relay UE3 based on discovery messages broadcast by relay UE1, relay UE2, and relay UE3. When the signal quality of any relay terminal meets the reporting condition in the measurement report configuration corresponding to the relay terminal, remote UE1 triggers measurement recording and reporting corresponding to the relay terminal and reports the measurement result to gNB1. For example, when the signal quality of relay UE1 meets the reporting configuration in the corresponding measurement report configuration, remote UE1 records and reports the measurement result corresponding to relay UE1. gNB1 may indicate to the serving relay device of remote UE1 to switch to relay UE1, relay UE2, or relay UE3 based on the measurement result reported by remote UE1.

[0185] For example, the remote UE 2 may measure the signal quality of the sidelink between the remote UE 2 and the relay UE 3, the signal quality of the surrounding relay terminals, and the signal quality of the surrounding cells. When there is no data transmission between the remote UE 2 and the relay UE 3, the remote UE 2 may measure the signal quality of the sidelink between the remote UE 2 and the relay UE 3 based on the discovery message broadcasted by the relay UE 3, and perform a measurement report when the signal quality of the sidelink between the remote UE 2 and the relay UE 3 meets a reporting condition.

[0186] It should be noted that the communication scenario shown in FIG. 14 is only an example and does not set a limitation on the application scenario to which the embodiment of the present application is applicable. It should be understood that the relay terminal used in the embodiment of the present application is only for explanation and does not mean that the solution in the embodiment of the present application applies only to the U2N relay scenario. In the embodiment of the present application, the relay terminal may generally refer to any node or device having a relay function. The communication method provided in the embodiment of the present application may be applied to various communication systems including relay devices, for example, NR systems, LTE systems, LTE-A systems, worldwide interoperability for microwave access (WiMAX) systems, or wireless local area networks (WLANs). For example, the communication method provided in the embodiment of the present application may be applied to a scenario in which the measurement signal changes suddenly, for example, a scenario in which the relay device suddenly stops sending measurement information or suddenly sends measurement information.

[0187] Figure 15A is a schematic flowchart of a communication method according to an embodiment of the present application. The communication method can be applied to the scenario shown in Figure 14. As shown in Figure 15A, the communication method includes, but is not limited to, the following steps:

[0188] 1501: A second terminal device sends a first broadcast message, and in response, a first terminal device receives the first broadcast message.

[0189] For example, the first broadcast message may be a discovery message broadcast by the second terminal device. For example, the first broadcast message indicates that the second terminal device can provide a relay service. When providing a relay service, the second terminal device may periodically broadcast a discovery message to indicate that the second terminal device can provide a relay service.

[0190] For example, after receiving the first broadcast message, the first terminal device may measure the signal quality of the first broadcast message. For example, after receiving the first broadcast message, the physical layer of the first terminal device measures the signal strength of the first broadcast message to obtain an L1 measurement result, and delivers the L1 measurement result to the RRC layer. The RRC layer performs L3 filtering on the L1 measurement result to obtain the signal quality SD-RSRP of the first broadcast message. For example, when the first terminal device is in an RRC connected state, the first terminal device may perform corresponding measurement recording and measurement reporting based on the SD-RSRP. Alternatively, when the first terminal device is in an RRC idle state or an inactive state, the first terminal device may select and reselect a relay device based on the SD-RSRP.

[0191] 1502: If the first terminal device does not receive a second broadcast message from the second terminal device within a first period after the first terminal device receives a first broadcast message, the first terminal device determines that the second terminal device is not a relay device of the first terminal device.

[0192] For example, the second broadcast message may be a discovery message broadcast by the second terminal device. For example, the second terminal device may periodically send a discovery message, where the discovery message indicates that the second terminal device provides a relay service. The discovery message may include the first broadcast message and the second broadcast message, i.e., the first broadcast message and the second broadcast message are discovery messages sent by the second terminal device at different times.

[0193] If the first terminal device does not receive a second broadcast message from the second terminal device within a first period of time after receiving the first broadcast message, it indicates that the second terminal device is not suitable to provide relay services to the first terminal device, and therefore the first terminal device determines that the second terminal device is not a relay device for the first terminal device, i.e., the first terminal device does not use the second terminal device as a relay device for the first terminal device.

[0194] For example, when the sending condition of the discovery message is not met, the second terminal device stops sending the discovery message. For example, when the signal quality between the second terminal device and the second network device does not meet the threshold condition, the second terminal device stops broadcasting the discovery message. For example, the signal quality between the second terminal device and the second network device may be the Uu-RSRP of the second terminal device. When the Uu-RSRP of the second terminal device is less than the minimum threshold or greater than the maximum threshold, the second terminal device does not provide a relay service. Thus, the second terminal device stops sending the discovery message. If the first terminal device does not receive a second broadcast message from the second terminal device within a first period after receiving the first broadcast message, the first terminal device determines that the second terminal device stops sending the discovery message. Thus, the first terminal device determines that the second terminal device is not a relay device of the first terminal device.

[0195] For example, determining in step 1502 that the second terminal device is not a relay device of the first terminal device may include some of the following cases.

[0196] Case 1: The second terminal device is not currently a relay device of the first terminal device.

[0197] When the second terminal device is not currently a relay device for the first terminal device, the first terminal device's determination that the second terminal device is not a relay device for the first terminal device may be understood as the first terminal device determining that it will not use the second terminal device as a relay device for the first terminal device after the current point in time, in other words, that it will not use the second terminal device as a candidate relay device.

[0198] Case 2: The second terminal device is currently a relay device of the first terminal device.

[0199] When the second terminal device is a relay device of the first terminal device at the present time, the first terminal device's determination that the second terminal device is not a relay device of the first terminal device can be understood as the first terminal device's determination that the second terminal device is no longer a relay device of the first terminal device after the current time, i.e., the first terminal device will not continue to use the second terminal device as a relay device of the first terminal device after the current time. In this case, there is a unicast connection between the first terminal device and the second terminal device, and the second terminal device provides a relay service to the first terminal device based on the unicast connection. After determining that the second terminal device is not a relay device of the first terminal device, the first terminal device may release the unicast connection between the first terminal device and the second terminal device and hand over the relay device of the first terminal device to another terminal device, and thus the second terminal device will no longer provide a relay service to the first terminal device. For example, when the first terminal device is in an RRC connected state, after determining that the second terminal device is not a relay device of the first terminal device, the first terminal device reports a measurement result to the first network device, and thus the relay device of the first terminal device switches to another terminal device based on the indication of the first network device. In this way, the second terminal device is no longer a relay device of the first terminal device. When the first terminal device is in an RRC idle state or an RRC inactive state, after determining that the second terminal device is not a relay device of the first terminal device, the first terminal device decides to reselect a relay device and handover the relay device of the first terminal device to another terminal device, and thus the second terminal device is no longer a relay device of the first terminal device.

[0200] In this embodiment of the present application, the first broadcast message and the second broadcast message may be discovery messages sent by the first terminal device at different times, and the discovery message indicates that the second terminal device provides a relay service. When providing a relay service, the second terminal device usually broadcasts a discovery message periodically. When the second terminal device does not provide a relay service, the second terminal device stops sending a discovery message. Thus, if the first terminal device does not receive the second broadcast message within a first period after receiving the first broadcast message, the first terminal device may determine that the second terminal device is not a relay device of the first terminal device, and thus the first terminal device can determine an inappropriate terminal device and more accurately determine whether the second terminal device is suitable to serve as a relay device of the first terminal device. It may be understood that if a first terminal device receives a second broadcast message within a first period after receiving a first broadcast message, the first terminal device may determine whether the second terminal device is suitable to act as a relay device for the first terminal device by measuring the signal quality of the first broadcast message and the second broadcast message.

[0201] In some embodiments, the first terminal device may broadcast a discovery message. Step 1501 may be replaced with: The first terminal device sends a first broadcast message, where the first broadcast message indicates that the first terminal device requests a relay service. Step 1502 may be replaced with: If a response message is not received from the second terminal device within a second period after the first broadcast message is sent, it is determined that the second terminal device is not a relay device of the first terminal device. For example, the first broadcast message is a request message sent by the first terminal device. When the first terminal device needs a relay service, the first terminal device may periodically send a request message. The request message indicates that the first terminal device needs a relay service. After receiving the request message, the second terminal device sends a response message to the first terminal device when the second terminal device is able to provide the relay service. If the first terminal device does not receive a response message from the second terminal device within a second period after the first terminal device sends the discovery message, it indicates that the second terminal device is not suitable to provide the relay service to the first terminal device. Therefore, the first terminal device determines that the second terminal device is not a relay device of the first terminal device.

[0202] For example, during the first period, the following several implementations are provided in this embodiment of the present application.

[0203] Implementation 1: The first period of time is determined by the first network device.

[0204] For example, before step 1502, the communication method shown in FIG. 15A may further include the following steps:

[0205] The first terminal device receives third indication information of the first network device, where the third indication information indicates the first period of time.

[0206] For example, the first network device is a network device that connects the first terminal device to the network. The first period is set by the first network device. The first network device may determine the first period based on the implementation and actual situation of the network, and indicate the first period by using the third indication information. For example, the first network device may determine the first period based on the actual situation, and indicate that the first terminal device does not receive a discovery message sent by the second terminal device within the first period by using the third indication information. In this case, it is determined that the second terminal device is not a relay device of the second terminal device. After receiving the third indication information, the first terminal device determines the first period based on the third indication information. For example, the first period is longer than a period during which the second terminal device broadcasts a discovery message. In an optional manner, the period during which the relay device broadcasts a discovery message is indicated to the first network device at an application layer of the network, for example, at a discovery layer. Alternatively, the first network device may determine the first period of time based on an indication of the network.

[0207] Implementation 2: The first period may be determined by the first terminal device. The first terminal device determines the first period based on a message received from the second terminal device in the past. Before step 1502, the communication method shown in FIG. 15A may further include the following steps.

[0208] The first terminal device receives a third broadcast message sent by the second terminal device and determines a first period based on a time interval between receiving the first broadcast message and receiving the third broadcast message.

[0209] For example, the third broadcast message is a discovery message broadcast by the second terminal device. The first broadcast message and the third broadcast message are discovery messages received at different times. The first terminal device may determine the first period based on a time interval of the received discovery messages sent by the second terminal device, i.e., the first terminal device may determine the first period based on a time interval between receiving the first broadcast message and receiving the third broadcast message. For example, the first broadcast message and the second broadcast message may be two discovery messages sent consecutively by the second terminal device. For example, the first period may be longer than the time interval.

[0210] Implementation 3: The first period is determined by the second terminal device. Before step 1502, the communication method shown in FIG.

[0211] The first terminal device receives fourth indication information of the second terminal device, where the fourth indication information indicates the first period.

[0212] For example, when a transmission condition for a discovery message is satisfied, the second terminal device may periodically send a discovery message. In some implementations, the second terminal device may determine a first period based on a period in which the second terminal device sends a discovery message, and indicate the first period to the first terminal device by using the fourth indication information. After receiving the fourth indication information, the first terminal device determines the first period based on the fourth indication information. In some other implementations, the fourth indication information may include information regarding a period in which the second terminal device sends a discovery message. After receiving the fourth indication information, the first terminal device determines a period in which the second terminal device sends a discovery message, and determines the first period based on the period in which the second terminal device sends a discovery message. For example, the first period is longer than a period in which the second terminal device sends a discovery message.

[0213] In this embodiment of the present application, the first period can be determined by any one of the first network device, the first terminal device, and the second terminal device. The first period is longer than the period in which the second terminal device sends a discovery message. For example, the first period can be two periods, which avoids the case in which the second terminal device sends a discovery message and the first terminal device does not receive the second broadcast message sent by the second terminal device on time due to network delay. This can improve the fault tolerance rate.

[0214] In a possible implementation, before determining in step 1502 that the second terminal device is not a relay device of the first terminal device, the communication method further includes the following steps:

[0215] When receiving the first broadcast message, the first terminal device starts a first timer corresponding to the second terminal device. The operation period of the first timer is equal to a first period. When the first timer expires, the first terminal device determines that the second broadcast message has not been received within the first period.

[0216] For example, the first timer is a timer set by the first terminal device for the second terminal device, and is used to enable the first terminal device to monitor a discovery message sent by the second terminal device within an operation time of the first timer. For example, the first broadcast message includes a first identifier of the second terminal device, and the first identifier identifies the second terminal device. For example, after receiving the first broadcast message, the first terminal device determines that the first broadcast message is from the second terminal device based on the first identifier carried in the first broadcast message. For example, the first identifier is associated with the first timer. After receiving the first broadcast message, the first terminal device starts the first timer and monitors a second broadcast message sent by the second terminal device within an operation time of the first timer. The second broadcast message includes the first identifier. For example, the first identifier may be a source L2 ID, and the source L2 ID is determined by the second terminal device. The source L2 ID in the first broadcast message is the same as that in the second broadcast message.

[0217] When receiving the second broadcast message, the first terminal device resets a first timer. When the first timer expires, the first terminal device does not receive the second broadcast message within the operation period of the first timer, that is, the first terminal device determines that the second broadcast message has not been received within the first period.

[0218] It should be understood that when the first timer is already started when the first terminal device receives the first broadcast message, starting the first timer may be understood as resetting the first timer.

[0219] For example, a first terminal device may receive discovery messages broadcast by a plurality of terminal devices, and set a plurality of timers for the plurality of terminal devices to monitor discovery messages sent by the terminal devices within the operation time of the timers corresponding to the terminal devices. For example, the first terminal device may receive a fourth broadcast message sent by a third terminal device, where the fourth broadcast message includes a second identifier, and the second identifier identifies the third terminal device. After receiving the fourth broadcast message, the first terminal device starts a second timer corresponding to the second identifier to detect a fifth broadcast message sent by the third terminal device within the operation time of the second timer. For example, the fourth broadcast message and the fifth broadcast message are discovery messages sent by the third terminal device at different times.

[0220] In this embodiment of the present application, the first terminal device may maintain one timer for each terminal device, and may effectively detect broadcast messages of the multiple terminal devices to determine whether the multiple terminal devices are suitable to act as relay devices for the first terminal device.

[0221] In a possible implementation, the first timer is controlled by a protocol layer of the first terminal device, the protocol layer including any one of a radio resource control (RRC) layer, a physical layer, a medium access control (MAC) layer, and a discovery protocol layer.

[0222] For example, the first timer is controlled by a protocol layer of the first terminal device. For example, the protocol layer may start or reset the first timer, or set the operation period of the first timer. The protocol layer includes any one of a radio resource control (RRC) layer, a physical layer, a medium access control (MAC) layer, and a discovery protocol layer, that is, the first timer may be controlled by any one of an RRC layer, a physical layer, a medium access control (MAC) layer, and a discovery protocol layer. For example, when the first timer is controlled by the RRC layer of the first terminal device, the physical layer of the first terminal device receives a first broadcast message, performs L1 measurement, and delivers the L1 measurement result to the RRC layer. After receiving the L1 measurement result sent by the physical layer, the RRC layer starts or resets the first timer. When the first timer is controlled by the physical layer or the MAC layer, after the first terminal device receives the first broadcast message, the physical layer of the first terminal device indicates to the MAC layer to start or reset the first timer. When the first timer expires, the physical layer or the MAC layer indicates that the RRC layer does not receive a second broadcast message within a first period of time after the first broadcast message is received.

[0223] For example, after receiving the first broadcast message, the AS layer of the first terminal device may deliver the associated content of the first broadcast message to a discovery protocol layer. Thus, the first timer may alternatively be controlled by the discovery protocol layer. When the discovery protocol layer receives the associated content of the first broadcast message, the discovery protocol layer starts or resets the first timer. When the discovery protocol layer detects that the first timer expires, the discovery protocol layer indicates that the RRC layer will not receive a second broadcast message within a first period after the first broadcast message is received.

[0224] For example, as shown in Figure 16, it is assumed that at time T0, the second terminal device meets the condition for sending a discovery message and periodically broadcasts the discovery message to the surroundings. For example, when the signal quality between the second terminal device and the second network device meets a threshold condition, the second terminal device periodically broadcasts the discovery message. For example, the signal quality between the second terminal device and the second network device may be Uu-RSRP. At times T0, T1, T2, and T3, the second terminal device broadcasts the discovery message (shown by the bold arrows in Figure 16).

[0225] At times T0, T1, T2, and T3, the first terminal device receives and measures a discovery message broadcast by the second terminal device. For example, the physical layer of the first terminal device performs L1 measurement of the discovery message to obtain an L1 measurement result, and delivers the L1 measurement result to the RRC layer. After receiving the L1 measurement result, the RRC layer starts or resets a first timer. Alternatively, when receiving the discovery message, the physical layer sends indication information to the RRC layer to indicate to the RRC layer that the discovery message has been received.

[0226] At time T4, the second terminal device no longer meets the condition for sending a discovery message. Therefore, the second terminal device stops sending a discovery message. At time T5, the first terminal device detects that the first timer has expired, but the discovery message sent by the second terminal device is not received. The first terminal device may determine that the second terminal device has stopped sending a discovery message. Therefore, the first terminal device determines that the second terminal device is not a relay device of the first terminal device.

[0227] In a possible implementation, when the second terminal device is not currently a relay device of the first terminal device, the communication method shown in FIG. 15A may further include step 1503.

[0228] 1503: The first terminal device deletes measurement information corresponding to the second terminal device.

[0229] For example, the measurement information corresponding to the second terminal device may include a measurement identification information of the second terminal device. The measurement identification information may be associated with a measurement report configuration corresponding to the second terminal device and may be further associated with one or more of the following: serving cell information of the second terminal device, ID information of the second terminal device, and signal quality of the sidelink of the second terminal device. After the first terminal device determines that the second terminal device is not a relay device of the first terminal device, the first terminal device deletes the measurement information corresponding to the second terminal device. Specifically, the measurement result reported by the first terminal device when the first terminal device subsequently triggers a measurement report does not include the measurement information of the second terminal device.

[0230] For example, the measurement information may include a measurement inlet, and the measurement inlet is recorded in the form of a measurement variable of the first terminal device. The measurement inlet recorded in the measurement variable may be measurement ID information of the first terminal device, and the measurement variable may include measurement inlets corresponding to multiple terminal devices. When determining that the second terminal device is not a relay device of the first terminal device, the first terminal device deletes the measurement inlet corresponding to the second terminal device from the measurement variable.

[0231] For example, when a condition for sending a discovery message is met, the second terminal device periodically broadcasts a discovery message. The first terminal device receives and measures the discovery message sent by the second terminal to obtain an SD-RSRP corresponding to the second terminal device. When the SD-RSRP of the first terminal device meets an entry condition of a measurement report event, the first terminal device uses the second terminal device as a measurement object and records the second terminal device in the measurement variable of the first terminal device to form a measurement entry corresponding to the second terminal device. The first terminal device may further implement measurement reporting based on a measurement report setting corresponding to the measurement report event.

[0232] For example, as shown in FIG. 16, at time T1, the first terminal device is supposed to detect that the SD-RSRP of the second terminal device meets the entrance condition of the measurement report event Y. Specifically, within the first time segment, the signal quality of the serving cell of the first terminal device remains below the threshold Y1, and the SD-RSRP of the second terminal device remains above the threshold Y2. The duration of the first time segment is equal to or greater than the TimeToTrigger period. The first terminal device uses the second terminal device as a measurement object, records the second terminal device in the measurement variables of the first terminal device, and implements measurement reporting based on the measurement report configuration corresponding to the measurement report event Y. At time T4, the second terminal device does not meet the sending condition of the discovery message, for example, the Uu-RSRP of the second terminal device does not meet the threshold condition. In this case, the second terminal device stops sending the discovery message. At time T5, the first terminal device does not receive the discovery message sent by the second terminal device. In this case, the first terminal device determines that the second terminal device has stopped sending discovery messages. The second terminal device stops sending discovery messages to indicate that the second terminal device is no longer suitable for providing relay services. Therefore, the first terminal device may delete the second terminal device from the measurement variables, i.e., delete the measurement inlet corresponding to the second terminal device.

[0233] It may be understood that the measurement reporting event Y is merely an example. When the signal quality of the sidelink between the first terminal device and the second terminal device satisfies the entrance condition of the measurement reporting event, the first terminal device may record the second terminal device as a measurement object in the measurement variable of the first terminal device. The measurement reporting event may be the measurement reporting event Y, or may be another measurement reporting event. For example, the entrance condition of the measurement reporting event is as follows: the signal quality difference between the signal quality of the neighboring relay device of the sidelink and the signal quality of the serving cell is greater than a fourth threshold. The measurement reporting event is not limited in this application.

[0234] It may be understood that at time T5, if the first terminal device does not receive a discovery message sent by the second terminal device, the first terminal device may determine that the SD-RSRP of the second terminal device satisfies the exit condition of the measurement reporting event, or may determine that the SD-RSRP of the second terminal device is 0. If the exit condition of the measurement reporting event Y is satisfied, the first terminal device removes the second terminal device from the measurement variable, i.e., removes the measurement entry corresponding to the second terminal device.

[0235] For a specific description of the measurement report event Y, please refer to the above related description, and the details will not be described again in this specification.

[0236] In this embodiment of the present application, after it is determined that the second terminal device is not a relay device of the first terminal device, the measurement information corresponding to the second terminal device is deleted from the measurement variable to ensure that the measurement report includes the measurement result of the appropriate terminal device. In addition, the memory space occupied by the measurement result is saved, and the resources required for reporting the measurement result are reduced.

[0237] 15B is a schematic interaction diagram of another communication method according to an embodiment of the present application. As shown in FIG. 15B, the method includes the following steps:

[0238] 1501: A second terminal device sends a first broadcast message, and in response, a first terminal device receives the first broadcast message.

[0239] 1502: If the first terminal device does not receive a second broadcast message from the second terminal device within a first period after the first terminal device receives a first broadcast message, the first terminal device determines that the second terminal device is not a relay device of the first terminal device.

[0240] For specific implementations of steps 1501 and 1502, see Figure 15A. The details will not be described again in this specification.

[0241] In a possible implementation, when there is a unicast connection between the first terminal device and the second terminal device, before determining that the second terminal device is not a relay device of the first terminal device, the first terminal device may perform the following operations: the first terminal device sends first indication information to the second terminal device through the unicast connection; the first indication information is used to trigger the second terminal device to send a first message, and the first message is used to measure a first signal quality, where the first signal quality is a signal quality between the first terminal device and the second terminal device; the first terminal device receives the first message; the first terminal device determines the first signal quality based on the first message; the first terminal device determines that the second terminal device is not a relay device of the first terminal device may be as follows: when the first signal quality is smaller than a first threshold, the first terminal device determines that the second terminal device is not a relay device of the first terminal device.

[0242] For example, the first message may be any message sent by the second terminal device to the first terminal device. For example, there is a unicast connection between the first terminal device and the second terminal device, and the second terminal device provides a relay service to the first terminal device. When there is no data transmission over the unicast connection between the first terminal device and the second terminal device, the first terminal device may measure the signal quality between the first terminal device and the second terminal device based on the discovery message broadcast by the second terminal device. For example, if the first terminal device does not receive a second broadcast message sent by the second terminal device within a first period after receiving the first broadcast message, the first terminal device may determine that the second terminal device has stopped sending discovery messages. The first broadcast message and the second broadcast message are discovery messages broadcast by the second terminal device at different times. After the first terminal device determines that the second terminal device has stopped sending discovery messages, the first terminal device may send first indication information to the second terminal device, and the first indication information is used to trigger the second terminal device to send a first message, so that the first terminal device may measure a first signal quality based on the first message. The first signal quality may be SL-RSRP. The first terminal device receives and measures the first message to obtain the first signal quality. When the first signal quality is smaller than a first threshold, the second terminal device is not suitable to provide a relay service to the first terminal device. Thus, the first terminal device determines that the second terminal device is not a relay device of the first terminal device. For example, the first threshold may be a threshold X1 in a measurement report event X.

[0243] When the first signal quality is equal to or greater than the first threshold, it may be understood that the signal quality of the sidelink between the first terminal device and the second terminal device satisfies the requirement for the second terminal device to provide a relay service to the first terminal device, and the second terminal device can continue to provide the relay service to the first terminal device, and the first terminal device can continue to use the second terminal device as a relay device for the first terminal device.

[0244] In this embodiment of the present application, when the second terminal device provides a relay device for the first terminal device, if the first terminal device does not receive a second broadcast message sent by the second terminal device within a first period after receiving the first broadcast message, the first indication information may be used to trigger data transmission between the first terminal device and the second terminal device to detect a first signal quality between the first terminal device and the second terminal device. When the first signal quality is less than a first threshold, it is determined that the second terminal device is not a relay device for the first terminal device. When the first signal quality is not less than the first threshold, it is determined that the second terminal device can continue to serve as a relay device for the first terminal device, thereby avoiding unnecessary switching.

[0245] 1504: The first terminal device reports the measurement result to the first network device. In response, the first network device receives the measurement result.

[0246] For example, the first network device is a network device that connects the first terminal device to the network. The measurement result may include a measurement result of a peripheral optional cell of the first terminal device and a measurement result of a peripheral optional relay terminal. The measurement result of the peripheral optional cell or the measurement result of the peripheral optional relay terminal may be understood to satisfy the entrance condition of the corresponding measurement report event. The measurement result of the peripheral optional cell includes an ID of the peripheral optional cell and a signal quality of the peripheral optional cell. The measurement result of the peripheral optional relay terminal may include an ID of the peripheral optional relay terminal, an ID of a serving cell of the peripheral optional relay terminal, and a signal quality of the peripheral optional relay terminal. When the first terminal device is in an RRC connected state, after determining that the second terminal device is no longer suitable to serve as a relay device of the first terminal device, the first terminal device may trigger a measurement report and report the measurement result to the first network device. After receiving the measurement result, the first network device may indicate to the first terminal device to switch from the second terminal device to one of the surrounding optional cell and the surrounding optional relay terminal based on the measurement result.

[0247] For example, there is a unicast connection between a first terminal device and a second terminal device, and the second terminal device provides a relay service to the first terminal device. The first terminal device obtains the relay service through the second terminal device to access the first network device. The first terminal device may report measurement results to the first network device through the second terminal device.

[0248] For example, when the first terminal device is in an RRC connected state, the first terminal device detects the signal quality of the sidelink between the first terminal device and the second terminal device, the signal quality of the neighboring cell, and the signal quality of the neighboring relay terminal, and performs measurement reporting. When there is no data transmission between the first terminal device and the second terminal device, i.e., when a unicast connection is not used for data transmission between the first terminal device and the second terminal device, the first terminal device may detect the signal quality of the sidelink between the first terminal device and the second terminal device based on a discovery message broadcast by the second terminal device, i.e., the first terminal device measures the SD-RSRP of the second terminal device.

[0249] For example, when the sending condition of the discovery message is met, the second terminal device may periodically broadcast the discovery message. If the first terminal device does not receive the second broadcast message sent by the second terminal device within a first period after receiving the first broadcast message sent by the second terminal device, the first terminal device determines that the second terminal device has stopped sending the discovery message. The first broadcast message and the second broadcast message are discovery messages sent by the second terminal device at different times. When determining that the second terminal device has stopped sending the discovery message, the first terminal device determines that the second terminal device is no longer suitable to provide a relay service to the first terminal device. Therefore, the first terminal device may trigger a measurement report and report the measurement result to the first network device. It may be understood that the measurement result should satisfy the entry condition of the corresponding measurement report event. After determining not to use the second terminal device as a relay device for the first terminal device, the first terminal device reports measurement results to the first network device, so that the first network device can instruct the relay device of the first terminal device to switch from the second terminal device to a nearby optional cell or a nearby optional relay terminal based on the measurement results.

[0250] For example, when the measurement variables include at least one measurement object, the first terminal device triggers a measurement report, and the reported measurement result includes the measurement result corresponding to the at least one measurement object. If the measurement object is not in the measurement variables, the first terminal device may detect the signal quality of the neighboring cell and the signal quality of the sidelink between the first terminal device and the neighboring relay terminal. For example, when the signal quality of the neighboring cell meets the measurement reporting condition in the measurement reporting configuration corresponding to the neighboring cell, the neighboring cell is added to the measurement variables of the first terminal device, and the measurement result is reported. The measurement result includes the measurement result corresponding to the neighboring cell.

[0251] In a possible implementation, the first terminal device may determine that the second terminal device is not a relay device of the first terminal device based on the indication of the first network device. For example, after determining that the second terminal device has stopped sending discovery messages, the first terminal device may trigger a measurement report to report the measurement result to the first network device. The first network device determines whether to continue to use the second terminal device as a relay device of the first terminal device based on the measurement result. When the first network device determines that the second terminal device is no longer used as a relay device of the first terminal device, the first network device sends a fifth indication information to the first terminal device. The fifth indication information indicates that the second terminal device is no longer used as a relay device of the first terminal device. After receiving the fifth indication information, the first terminal device determines that the second terminal device is no longer suitable to serve as a relay device of the first terminal device. For example, the first terminal device may further switch from indirect communication to direct communication, or from indirect communication to indirect communication, based on the fifth indication information. Specifically, the first terminal device may switch from the second terminal device to a nearby optional cell, or to a nearby optional relay terminal, based on the fifth indication information.

[0252] For example, the first terminal device reports the measurement result to the first network device may be as follows: when the first terminal device determines that the second terminal device stops sending discovery messages and the signal quality of the surrounding optional cell meets the entrance condition of the measurement report event, the first terminal device reports the measurement result to the first network device. For example, when the second terminal device stops sending discovery messages and determines that the signal quality of the surrounding optional cell is greater than a threshold X1, the first terminal device reports the measurement result to the first network device.

[0253] For example, as shown in FIG. 16, it is assumed that before time T5, the first terminal device detects that the signal quality of the sidelink of the second terminal device is greater than the threshold X1. The entrance condition of the measurement reporting event X is not met, and the measurement report is not triggered. At time T5, the first terminal device does not receive the discovery message sent by the second terminal device. In this case, the first terminal device determines that the second terminal device stops sending discovery messages. In this case, if the first terminal device detects that the signal quality of the surrounding optional cell is greater than the threshold X2, the measurement report corresponding to the measurement reporting event X is triggered. For example, the first terminal device may record the second terminal device as a measurement object in the measurement variables of the first terminal device, and implement the measurement report based on the measurement reporting configuration of the measurement reporting event X.

[0254] It can be understood that when the first terminal device determines that the second terminal device has stopped sending discovery messages, the first terminal device may determine that the SD-RSRP of the second terminal device is 0 or that the SD-RSRP of the second terminal device is less than the threshold value X1, so as to satisfy the condition that the signal quality of the sidelink between the remote terminal and the serving relay terminal is less than the threshold value X1 in the measurement report event X. When the first terminal device detects that the signal quality of the surrounding optional cell is greater than the threshold value X2, the entry condition of the measurement report event X is met, and a measurement report corresponding to the measurement report event X is triggered.

[0255] For a specific description of the measurement report event X, please refer to the above related description, and the details will not be described again in this specification.

[0256] In this embodiment of the present application, when the second terminal device was a relay device of the first terminal device, after determining that the second terminal device is not a relay device of the first terminal device, the first terminal device triggers a measurement report and reports the measurement result to the first network device, so that the first network device can indicate the first terminal device to switch to an appropriate cell or relay device based on the measurement result.

[0257] 15C is a schematic interaction diagram of yet another communication method according to an embodiment of the present application. As shown in FIG. 15C, the method includes the following steps:

[0258] 1501: A second terminal device sends a first broadcast message, and in response, a first terminal device receives the first broadcast message.

[0259] 1502: If the first terminal device does not receive a second broadcast message from the second terminal device within a first period after the first terminal device receives a first broadcast message, the first terminal device determines that the second terminal device is not a relay device of the first terminal device.

[0260] For specific implementations of steps 1501 and 1502, see Figure 15A. The details will not be described again in this specification.

[0261] 1505: The first terminal device decides to reselect a relay device.

[0262] For example, when the first terminal device is in an RRC idle state or an RRC inactive state, after determining that the second terminal device is not a relay device of the first terminal device, the first terminal device decides to reselect a relay device. As shown in FIG. 16, it is assumed that before time T5, the first terminal device detects that the SD-RSRP of the second terminal device is greater than a preset threshold based on the discovery message sent by the second terminal device, and at time T5, the first terminal device does not receive the discovery message of the second terminal device, and the first terminal device determines that the second terminal device has stopped sending discovery messages. Therefore, the second terminal device is no longer suitable to serve as a relay device of the first terminal device, and the first terminal device may reselect a relay device.

[0263] It should be understood that if the first terminal device does not receive a discovery message sent by the second terminal device at time T5, the first terminal device may determine that the SD-RSRP of the second terminal device is 0 and the trigger condition for reselecting a relay device is met.

[0264] In this embodiment of the present application, when the first terminal device is in an RRC idle state or an RRC inactive state, after determining that the second terminal device is not a relay device of the first terminal device, the first terminal device may trigger the first terminal device to reselect a relay device, so that the first terminal device can switch to an appropriate relay device.

[0265] 17 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application. As shown in FIG. 17, the communication method includes but is not limited to the following steps:

[0266] 1701: A second terminal device sends a first broadcast message, and in response, a first terminal device receives the first broadcast message.

[0267] For a specific implementation of step 1701, it may be understood that reference may be made to the relevant description of step 1501 in Fig. 15A. The details will not be described again in this specification.

[0268] 1702: When the first terminal device does not receive a second broadcast message within a first period after the first terminal device receives a first broadcast message, the first terminal device deletes measurement information corresponding to the second terminal device.

[0269] For a specific implementation of step 1702, it may be understood that reference is made to the relevant description of step 1503 in Fig. 15A. The details will not be described again in this specification.

[0270] In this embodiment of the present application, if the first terminal device does not receive the second broadcast message within a first period after receiving the first broadcast message, the first terminal device may delete the measurement information corresponding to the second terminal device, i.e., the first terminal device may not perform the operation of determining in step 1502 that the second terminal device is not a relay device of the first terminal device. For example, the first terminal device may delete the measurement information corresponding to the second terminal device from the measurement result when there is no unicast connection between the first terminal device and the second terminal device. If the second broadcast message is not received within a first period after the first broadcast message is received, it may be determined that the second terminal device is not suitable to be a relay device of the first terminal device. Therefore, the measurement information corresponding to the second terminal device may be deleted so that the measurement result reported by the first terminal device does not include measurement information corresponding to an inappropriate terminal device, and may ensure that the measurement result includes measurement information of a suitable terminal device.

[0271] In some implementations, when there is a unicast connection between the first terminal device and the second terminal device and the first terminal device is in an RRC connected state, step 1702 may be replaced by the following: if the first terminal device does not receive a second broadcast message within a first period after receiving the first broadcast message, the first terminal device reports the measurement result to the first network device.

[0272] When there is a unicast connection between the first terminal device and the second terminal device and the first terminal device is in an RRC connected state, the first terminal device may trigger a measurement report and report the measurement result to the first network device, so that the first network device can indicate the first terminal device to perform relay device switching based on the measurement result, and the first terminal device can switch to an appropriate cell or relay device.

[0273] In a possible implementation, there is a unicast connection between the first terminal device and the second terminal device, and before reporting the measurement result to the first network device, the method further includes: the first terminal device sends first indication information to the second terminal device through the unicast connection; the first indication information is used to trigger the second terminal device to send a first message, and the first message is used to measure a first signal quality, the first signal quality being the signal quality between the first terminal device and the second terminal device; the first terminal device receives the first message; and the first terminal device determines the first signal quality based on the first message.

[0274] In this embodiment of the present application, when there is a unicast connection between the first terminal device and the second terminal device, and no data transmission is implemented between the first terminal device and the second terminal device through the unicast connection, and the first terminal device does not receive a second broadcast message within a first period after receiving a first broadcast message, the first terminal device can trigger the second terminal device to send a first message by using the first indication information, so that data transmission is implemented between the first terminal device and the second terminal device. In this way, the first terminal device can detect the first signal quality between the first terminal device and the second terminal device based on the first message, and can accurately determine whether the second terminal is suitable to continue providing relay services to the first terminal device.

[0275] In a possible implementation, reporting the measurement result to the first network device includes: when the first signal quality is less than a first threshold, the first terminal device reports the measurement result to the first network device.

[0276] In this embodiment of the present application, when the first signal quality is less than the first threshold, the first terminal device determines that the second terminal device is no longer suitable to provide relay services to the first terminal device, and the first terminal device can report to the first network device, so that the first terminal device can switch to a suitable relay device based on the indication of the first network device. When the first signal quality is not less than the first threshold, the first terminal device determines that the second terminal device is suitable to continue providing relay services to the first terminal device, and there is no need to switch from the relay device, thereby avoiding unnecessary switching.

[0277] In some implementations, when there is a unicast connection between the first terminal device and the second terminal device and the first terminal device is in an RRC idle state or an RRC inactive state, step 1702 may be replaced as follows: if the first terminal device does not receive a second broadcast message within a first period after receiving the first broadcast message, the first terminal device decides to reselect a relay device.

[0278] When there is a unicast connection between a first terminal device and a second terminal device, and the first terminal device is in an RRC idle state or an RRC inactive state, the first terminal device may decide to reselect a relay device, so that the relay device of the first terminal device switches to an appropriate relay device.

[0279] 18A is a schematic interaction diagram of yet another communication method according to an embodiment of the present application. As shown in FIG. 18A, the communication method includes but is not limited to the following steps:

[0280] 1801: A second terminal device sends a first broadcast message, and in response, a first terminal device receives the first broadcast message.

[0281] The first broadcast message includes first cell information of the second terminal device. For example, the first cell information may include serving cell information of the second terminal device, and the serving cell information may include identification information of the serving cell. For example, the identification information may be a physical cell identifier (PCI) or a cell identity. The first broadcast message may be a discovery message broadcast by the second terminal device, indicating that the second terminal device can provide a relay service. The first terminal device receives the first broadcast message sent by the second terminal device and obtains the first cell information from the first broadcast message.

[0282] 1802: The first terminal device determines, based on the first cell information, whether a serving cell of the second terminal device changes.

[0283] For example, the first cell information includes serving cell information of the second terminal device at a first time point, the first time point being the time point at which the second terminal device sends a first broadcast message, and the first time point can also be understood as the time point at which the first terminal device receives the first broadcast message.

[0284] For example, the first terminal device may determine serving cell information of the second terminal device before the first time point based on a message received from the second terminal device before the first time point. The first terminal device compares the serving cell information of the second terminal device at the first time point with the serving cell information before the first time point to determine whether the serving cell of the second terminal device changes.

[0285] For example, before receiving the first broadcast message, the first terminal device further receives a third broadcast message from the second terminal device. The third broadcast message includes third cell information of the second terminal device. The third cell information includes identification information of the serving cell at the time when the second terminal device sends the third broadcast message. The first terminal device may compare the third cell information with the first cell information and determine whether the second terminal device changes based on a comparison result of the first cell information and the third cell information. When the first cell information is different from the third cell information, the first terminal device determines that the serving cell of the second terminal device changes. For example, when the serving cell identifier of the first cell information is different from the serving cell identifier of the third cell information, the first terminal device determines that the serving cell of the second terminal device changes. When the first cell information is the same as the third cell information, the first terminal device determines that the serving cell of the second terminal device does not change.

[0286] In the implementation, the third broadcast message may be a discovery message broadcast by the second terminal device. After receiving the third broadcast message, the first terminal device may further measure the signal quality between the first terminal device and the second terminal device based on the third broadcast message, i.e., measure the SD-RSRP of the second terminal device. When the SD-RSRP of the second terminal device satisfies the entry condition of the measurement report event Y, i.e., when the SD-RSRP is greater than the threshold Y2, the first terminal device records the second terminal device as a measurement object in the form of a measurement variable to form a measurement entry corresponding to the second terminal device. The measurement entry may include serving cell information at the time when the second terminal device sends the third broadcast message.

[0287] For example, after receiving a first broadcast message and obtaining the first cell information from the first broadcast message, the first terminal device may determine the serving cell information of the second terminal device before the first time point based on the measurement information corresponding to the second terminal device, and then the first terminal device compares the serving cell information of the first cell information with the serving cell information associated with the measurement inlet to determine whether the serving cell of the second terminal device changes.

[0288] 1803: The first terminal device sends a second message. In response, the first network device receives the second message.

[0289] When the serving cell of the second terminal device changes, the first terminal device sends a second message to the first network device. The second message includes the first cell information. For example, the second message may be used to indicate that the serving cell of the second terminal device has changed. When the serving cell of the second terminal device determines to change, the first terminal device sends a second message to the first network device. The second message includes the first cell information. After receiving the second message, the first network device may update the serving cell information of the second terminal device based on the first cell information.

[0290] In the implementation, sending the second message to the first network device may be as follows: when the measurement variable of the first terminal device includes a measurement inlet corresponding to the second terminal device, send the second message to the first network device. The measurement inlet is used to record the measurement result of the second terminal device. When the measurement variable of the first terminal device includes a measurement inlet corresponding to the second terminal device, it indicates that the first terminal device has reported the measurement information corresponding to the second terminal device to the first network device before the first time point. The measurement information includes the serving cell information of the second terminal device before the first time point. Thus, when the serving cell of the second terminal device is determined to change, the first terminal device sends the second message to the first network device, so that the first network device can timely update the serving cell information of the second terminal device.

[0291] Optionally, if the measurement variable of the first terminal device does not include a measurement inlet corresponding to the second terminal device, the first terminal device may not send the second message.

[0292] In this embodiment of the present application, when the first terminal device determines that the serving cell of the second terminal device changes, the first terminal device sends a second message to the first network device, so that the first network device can update the serving cell information of the second terminal device in a timely manner, and prevent the relay device of the first terminal device from failing to switch to the second terminal device because the first network device does not update the serving cell information of the second terminal device in a timely manner.

[0293] In a possible implementation, the second message may include a measurement result of the first terminal device, and the first cell information is included in the measurement information corresponding to the second terminal device. For example, when the first terminal device determines that the serving cell of the second terminal device changes, the first terminal device may trigger a measurement report to report the measurement result to the first network device. The measurement result includes the measurement information corresponding to the second terminal device, for example, includes a measurement result associated with a measurement inlet corresponding to the second terminal device, and the measurement result corresponding to the second terminal device includes the first cell information. The first terminal device triggers a measurement report to send the serving cell information of the second terminal device after the change to the first network device, so that the first network device can update the serving cell information of the second terminal device in a timely manner.

[0294] In a possible implementation, before sending the second message to the first network device, the first terminal device may perform the following operation: The first terminal device determines whether the current serving cell of the second terminal device is an allowed cell based on the first cell information. The first terminal device sends the second message to the first network device as follows: When the current serving cell of the second terminal device is an allowed cell, the first terminal device sends the second message to the first network device.

[0295] For example, an allowed cell is a cell that can be accessed by the first terminal device. In other words, access to the cell is not prohibited. The first terminal device determines whether the current serving cell of the second terminal device is an allowed cell based on the first cell information. When the current serving cell of the second terminal device is an allowed cell, it indicates that the second terminal device can still support the access of the first terminal device, and the first terminal device sends a second message to the first network device, so that the first network device updates the serving cell information of the second terminal device in a timely manner.

[0296] For example, the first terminal device may determine whether the current serving cell of the second terminal device belongs to an allowed cell list. When the current serving cell of the second terminal device belongs to the allowed cell list, it is determined that the current serving cell of the second terminal device is an allowed cell. The allowed cell list may be set by the first network device, pre-set by the first terminal device, or set by the network where the first terminal device is located. This is not limited in the present application.

[0297] In this embodiment of the present application, before sending the second message to the first network device, the first terminal device first determines whether the current serving cell of the second terminal device is an authorized cell to determine whether the second terminal device can provide relay service to the first terminal device. When the current serving cell of the second terminal device is an authorized cell, the second terminal device can provide relay service to the first terminal device. Therefore, the first terminal device sends the second message to the first network device, so that the first network device updates the serving cell information of the second terminal device in a timely manner. In addition, to ensure that the first network device can make an appropriate decision, in order to avoid the situation where the second terminal device cannot provide relay service to the first terminal device and the first network device decides to use the second terminal device as a relay device for the first terminal device.

[0298] 18B is a schematic interaction diagram of yet another communication method according to an embodiment of the present application. As shown in FIG. 18B, the communication method includes but is not limited to the following steps:

[0299] 1801: A second terminal device sends a first broadcast message, and in response, a first terminal device receives the first broadcast message.

[0300] The first broadcast message includes first cell information of the second terminal device.

[0301] 1804: The first terminal device determines, based on the first cell information, whether a current serving cell of the second terminal device is a blocked cell.

[0302] 1805: When a current serving cell of the second terminal device is a blocked cell, the first terminal device deletes measurement information corresponding to the second terminal device.

[0303] For example, the measurement information corresponding to the second terminal device includes a measurement inlet corresponding to the second terminal. The blocked cell is determined by the first network device. When the current serving cell of the second terminal device is a blocked cell, it indicates that the second terminal device is not suitable to serve as a relay device of the first terminal device. Therefore, the first terminal device may trigger an exit condition of a measurement report event corresponding to the second terminal device and delete the measurement inlet corresponding to the second terminal device from the measurement variable. For example, when the measurement report event corresponding to the second terminal device triggers a measurement report, the measurement report corresponding to the measurement report event is stopped.

[0304] For example, the first network device may set a blocked cell list (block list) for the first terminal device. When the current serving cell of the second terminal device belongs to the blocked cell list, the current serving cell of the second terminal device is determined to be a blocked cell. Thus, the first terminal device deletes the measurement information corresponding to the second terminal device. Optionally, the blocked cell list (block list) may alternatively be based on a pre-configuration or a network configuration of the first terminal device.

[0305] In this embodiment of the present application, when the current serving cell of the second terminal device is a blocked cell, the second terminal device cannot provide relay service to the first terminal device. Therefore, the first terminal device can delete the measurement information corresponding to the second terminal device from the measurement result of the first terminal device to ensure that the reported measurement result includes the measurement information of the appropriate terminal device. In addition, the memory space occupied by the measurement result can be saved, and the resources required when the first terminal device reports the measurement result can be reduced.

[0306] 19 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application. As shown in FIG. 19, the communication method includes but is not limited to the following steps:

[0307] 1901: A second terminal device sends a first broadcast message. In response, the first terminal device receives the first broadcast message. The first broadcast message includes first cell information of the second terminal device.

[0308] For a specific implementation of step 1901, please refer to the specific description of step 1801 shown in Figure 18A. The details will not be described again in this specification.

[0309] 1902: The first network device sends a third message. In response, the first terminal device receives a third message, where the third message includes second cell information of the second terminal device, and the third message indicates switching from the relay device of the first terminal device to the second terminal device.

[0310] For example, the third message may be a handover command (e.g., an HO command message) sent by the first network device, and the third message may be generated by the first network device based on the measurement result reported by the first terminal device. For example, the first terminal device may measure a signal quality between the first terminal device and the second terminal device. When the signal quality between the first terminal device and the second terminal device meets an entry condition of a measurement report event corresponding to the second terminal device, a measurement report is triggered and the measurement result is reported to the first network device. The measurement result may include measurement information corresponding to the second terminal device. For example, the measurement information may include ID information of a serving cell of the second terminal device, ID information of the second terminal device, and the signal quality between the first terminal device and the second terminal device. After receiving the measurement result, the first network device determines to use the second terminal device as a relay device of the first terminal device based on the measurement result, and sends the third message to the first terminal device. The third message indicates switching from the relay device of the first terminal device to the second terminal device, and includes second cell information of the second terminal device, so that the first terminal device can access the serving cell of the second terminal device through the second terminal device.

[0311] It can be understood that the first terminal device may perform step 1901 before step 1902, perform step 1902 and step 1902 simultaneously, or perform step 1902 before step 1901. This is not limited in the present application.

[0312] 1903: When the first cell information does not match the second cell information, the first terminal device determines that the switching has failed.

[0313] For example, when the first cell information does not match the second cell information, it indicates that the second terminal device has performed a cell change, and therefore the first terminal device determines that the switch has failed and does not perform a subsequent switch action.

[0314] In an implementation, after the first terminal device determines that the switching has failed, the method further includes at least one of the following: The first terminal device records the switching failure; The first terminal device disconnects from the second terminal device; and The first terminal device performs a re-establishment of a radio resource control (RRC) connection.

[0315] For example, when determining that the switchover has failed, the first terminal device may perform a switchover failure process, such as recording the switchover failure, disconnecting the unicast connection to the second terminal device, and performing re-establishment of the RRC connection. For example, the first terminal device may perform a measurement record of the switchover failure and send the measurement record to the first network device upon receiving a request from the first network device.

[0316] In the implementation, if the first terminal device receives a unicast connection establishment request message sent by the second terminal device when the first cell information does not match the second cell information, the first terminal device may return a unicast connection rejection message to the second terminal device. The unicast connection rejection message may include a rejection reason. The rejection reason may include any one of security policy not aligned, protocol error, or unspecified reason. It should be understood that the rejection reason is merely an example. The rejection reason in this embodiment of the present application may further include another reason. For example, the rejection reason may further include a new reason defined based on an application scenario. Therefore, some rejection reasons shown above should not be understood as limiting the implementation of the present application.

[0317] In this embodiment of the present application, when receiving the handover command sent by the first network device and the discovery information of the second terminal device, the first terminal device compares whether the cell information of the second terminal device carried in the handover command is the same as the cell information of the second terminal device carried in the discovery information. When the first cell information does not match the second cell information, the first terminal device determines that the switching has failed, to avoid wasting resources in subsequent switching actions.

[0318] 20 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application. As shown in FIG. 20, the communication method includes but is not limited to the following steps:

[0319] 2001: A second terminal device measures a second signal quality, the second signal quality being a signal quality between the second terminal device and a second network device.

[0320] For example, the second network device is a network device that connects a second terminal device to a network, and the second terminal device may communicate with the second network device through a Uu interface. The second signal quality may be Uu-RSRP, i.e., the signal quality of the second terminal device on a direct link of the Uu interface. The signal quality on the Uu interface is obtained by measuring a cell beam (e.g., an SSB beam).

[0321] For example, when data or a reference signal is communicated through a direct link between the second terminal device and the second network device, the second terminal device may measure the second signal quality based on the communicated data or reference signal. When data or a reference signal is not communicated through a direct link between the second terminal device and the second network device, the second terminal device may measure the second signal quality based on a broadcast message sent by the second network device.

[0322] For example, the second terminal device may determine whether to provide a relay service based on the second signal quality. When the second signal quality meets a threshold condition, the second terminal device may provide a relay service, and the second terminal device may periodically broadcast a discovery message. The discovery message indicates that the terminal device can provide a relay service. For example, the discovery message may carry a source L2 ID of the second terminal device. In some implementations, the second terminal device may change the source L2 ID in the discovery message after performing a cell change.

[0323] 2002: The second terminal device sends second indication information, and in response, the first terminal device receives the second indication information.

[0324] When the second signal quality does not meet the threshold condition, the second terminal device sends the second indication information. The second indication information indicates that the second terminal device does not provide a relay service. For example, when the second signal quality does not meet the threshold condition, the second terminal device determines not to provide a relay service and sends the second indication information. After receiving the second indication information, the first terminal device determines that the second terminal device does not provide a relay service. Thus, the second terminal device may be determined not to be suitable to serve as a relay device for the first terminal device. The second signal quality is a signal quality between the second terminal device and the second network device, and the second network device is a network device that connects the second terminal device to a network. For example, when the second signal quality is greater than the second threshold or when the second signal quality is greater than the third threshold, the second terminal device sends the second indication information. The second threshold and the third threshold may be set by the second network device. For example, the second threshold is a minimum threshold of the signal quality of the second terminal device on the Uu interface when the second terminal device can send a discovery message, and the third threshold is a maximum threshold of the signal quality of the second terminal device on the Uu interface when the second terminal device can send a discovery message.

[0325] For example, as shown in FIG. 16, at time T0, it is assumed that the second terminal device meets the condition for sending a discovery message and periodically broadcasts a discovery message to the surroundings. For example, when the signal quality between the second terminal device and the second network device meets a threshold condition, the second terminal device periodically broadcasts a discovery message. For example, the signal quality between the second terminal device and the second network device may be Uu-RSRP. At time T0, T1, T2, and T3, the second terminal device broadcasts a discovery message (as shown by the thick arrow in FIG. 16). At time T4, the second terminal device no longer meets the condition for sending a discovery message, and the second terminal device may send the aforementioned second indication information (as shown by the thin arrow in FIG. 16). At time T4, the first terminal device may receive the second indication information sent by the second terminal device and determine that the second terminal device does not provide a relay service. It may be known that the first terminal device may determine at time T4 that the second terminal device is not suitable to serve as a relay device for the first terminal device, and does not need to wait until the first timer expires at time T5. Specifically, the first terminal device may more quickly determine that the second terminal device is not suitable to serve as a relay device for the first terminal device based on the second indication information sent by the second terminal device.

[0326] For example, the second terminal device may send the second indication information in a broadcast manner to indicate to the surrounding terminal devices that the second terminal device does not provide a relay service. For example, the second indication information is included in a discovery message broadcast by the second terminal device, and the discovery message carries the second indication information indicating that the second terminal device does not provide a relay service. Alternatively, the second indication information may be indication information separately broadcast by the second terminal device. Correspondingly, after receiving the second indication information, the first terminal device determines that the second terminal device is not a relay device of the first terminal device.

[0327] In some implementations, there is a unicast connection between the second terminal device and the first terminal device. In step 2002, sending the second indication information may be as follows: the second terminal device sends the second indication information to the first terminal device based on the unicast connection.

[0328] For example, the second indication information may be in the form of any one of PC5 signaling, a PC5-RRC message, or a sidelink media access control element (MAC CE).

[0329] In an implementation, there is a unicast connection between a first terminal device and a second terminal device, and the second terminal device provides a relay service to the first terminal device. When the second signal quality is smaller than a second threshold or when the second signal quality is greater than a third threshold, the second terminal device is no longer suitable to provide a relay service to the first terminal device. Therefore, the second terminal device may send a unicast connection release request to the first terminal device to release the unicast connection between the second terminal device and the first terminal device.

[0330] In this embodiment of the present application, when the second signal quality of the second terminal device does not satisfy the threshold condition, i.e., when the second signal quality is smaller than the second threshold or the second signal quality is smaller than the third threshold, the second terminal device will not provide a relay service, and will send second indication information to notify the surrounding terminal devices in a timely manner that the second terminal device will not provide a relay service, in order to prevent the surrounding terminal devices of the second terminal device from reporting the second terminal device as a relay device.

[0331] 21 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application. As shown in FIG. 21, the method may include the following steps:

[0332] 2101: A second terminal device sends a first broadcast message, and in response, a first terminal device receives the first broadcast message.

[0333] For a specific implementation of step 2101, it may be understood that reference may be made to the relevant description of step 1501 in Fig. 15A. The details will not be described again in this specification.

[0334] In a possible implementation, the first broadcast message includes a first identifier, the first identifier identifies the second terminal device, and the first identifier is generated when the second terminal device accesses a serving cell of the second terminal device.

[0335] For example, the first identifier may be a source L2 ID, and the source L2 ID is determined by the second terminal device. After receiving the first broadcast message, the first terminal device may determine that the first broadcast message is from the second terminal device based on the first identifier carried in the first broadcast message. For example, the first terminal device may receive multiple broadcast messages from multiple terminal devices and determine the transmitting end of the multiple broadcast messages based on the identifiers carried in the multiple broadcast messages. The first terminal device may determine that the broadcast messages carrying different identifiers are broadcast messages from different terminal devices. For example, the first terminal device receives a fourth broadcast message, and the fourth broadcast message carries a second identifier, but the second identifier is different from the first identifier. In this case, the first terminal device determines that the fourth broadcast message is not from the second terminal device.

[0336] For example, the first broadcast message is a discovery message broadcast by the second terminal device, and the second terminal device may periodically send the discovery message, and the discovery message includes a source L2 ID. After implementing the change, the second terminal device may change the source L2 ID in the discovery message. Specifically, the source L2 ID carried in the discovery message currently sent by the second terminal device is generated when the second terminal device accesses the current serving cell. The first terminal device may receive the discovery messages sent by the multiple terminal devices and determine the sending end of the discovery message based on the source L2 ID carried in the discovery message. Therefore, for the discovery message sent by the second terminal device after the source L2 ID is changed, the first terminal device may consider that the discovery message is not from the second terminal device. Specifically, the first terminal device may measure the second terminal device after the source L2 ID is changed as a new measurement object.

[0337] In this embodiment of the present application, the first terminal device may determine that the first broadcast message is from the second terminal device based on the first identifier carried in the first broadcast message. After the second terminal device implements a cell change, the second terminal device is regarded as a new terminal device, i.e., the second terminal device is used as a new measurement object of the measurement, and the serving cell information of the second terminal device does not need to be updated, so that the workload of the first terminal device can be reduced and the measurement efficiency of the first terminal device can be improved.

[0338] In a possible implementation, the first broadcast message includes first cell information of the second terminal device, and after the first terminal device receives the first broadcast message sent by the second terminal device, the method shown in FIG. 21 may include steps 2102 and 2103.

[0339] 2102: The first terminal device determines, based on the first cell information, whether a serving cell of the second terminal device changes.

[0340] 2103: When a serving cell of the second terminal device changes, the first terminal device sends a second message to the first network device, where the second message includes the first cell information.

[0341] For specific implementations of step 2102 and step 2103, please refer to the relevant descriptions of step 1802 and step 1803 in Fig. 18A. The details will not be described again in this specification.

[0342] In a possible implementation, the communication method shown in FIG.

[0343] 2104: The second terminal device measures a second signal quality, the second signal quality being a signal quality between the second terminal device and a second network device.

[0344] 2105: The second terminal device sends second indication information, and in response, the first terminal device receives the second indication information.

[0345] When the second signal quality does not satisfy the threshold condition, the second terminal device sends second indication information. The second indication information indicates that the second terminal device does not provide a relay service. After receiving the second indication information, the first terminal device determines that the second terminal device is not a relay device of the first terminal device.

[0346] For specific implementation of step 2104 and step 2105, it may be understood that reference is made to the relevant description of step 2001 and step 2002 in Fig. 20. The details will not be described again in this specification.

[0347] 2106: If the first terminal device does not receive a second broadcast message from the second terminal device within a first period after the first terminal device receives the first broadcast message, the first terminal device determines that the second terminal device is not a relay device of the first terminal device.

[0348] For a specific implementation of step 2106, it may be understood that reference may be made to the relevant description of step 1502 in Fig. 15A. The details will not be described again in this specification.

[0349] It may be understood that when the first terminal device does not receive a second broadcast message from the second terminal device within a first period after receiving the first broadcast message, or when the first terminal device receives second indication information sent by the second terminal device, the first terminal device determines that the second terminal device is not a relay device of the first terminal device.

[0350] For example, after determining that the second terminal device is not a relay device of the first terminal device, this embodiment of the present application further provides several implementations as follows.

[0351] Implementation 1: When the second terminal device is not currently a relay device of the first terminal device, the first terminal device deletes the measurement information corresponding to the second terminal device.

[0352] For a specific implementation of Implementation 1, it can be understood that reference is made to the relevant description of step 1503 in Figure 15A. The details will not be described again in this specification.

[0353] Implementation 2: When the second terminal device is currently a relay device of the first terminal device and the first terminal device is in an RRC connected state, the first terminal device reports the measurement result to the first network device.

[0354] For a specific implementation of Implementation 2, it can be understood that reference is made to the relevant description of step 1504 in FIG. 15B. The details will not be described again in this specification.

[0355] Implementation 3: When the second terminal device is currently a relay device of the first terminal device and the first terminal device is in an RRC idle state or an RRC inactive state, the first terminal device decides to reselect a relay device.

[0356] For a specific implementation of Implementation 3, it can be understood that reference is made to the relevant description of step 1505 in FIG. 15C. The details will not be described again in this specification.

[0357] In a possible implementation, the first broadcast message includes first cell information of the second terminal device, and after the first terminal device receives the first broadcast message sent by the second terminal device, the communication method shown in FIG. 21 may include steps 2107 and 2108.

[0358] 2107: The first terminal device receives a third message from the first network device, the third message including second cell information of the second terminal device, the third message indicating switching from the relay device of the first terminal device to the second terminal device.

[0359] 2108: When the first cell information does not match the second cell information, the first terminal device determines that the switching has failed.

[0360] For specific implementation of step 2107 and step 2108, it may be understood that reference is made to the relevant description of step 1902 and step 1903 in Figure 19. The details will not be described again in this specification.

[0361] If the first terminal device receives the third message before step 2106, it may be understood that the first terminal device compares the first cell information with the second cell information. When the first cell information does not match the second cell information, the first terminal device determines that the switching has failed and does not perform a subsequent switching action. When the first cell information matches the second cell information, the first terminal device continues to perform a subsequent operation. After the first terminal device determines that the switching has failed, the first terminal device may perform one or more of the following: recording the switching failure, disconnecting the unicast connection between the first terminal device and the second terminal device, and performing a re-establishment of the RRC connection. If the first terminal device receives the third message after step 2106, the first terminal device determines that the switching has failed and does not need to compare the first cell information with the second cell information.

[0362] In this embodiment of the present application, when receiving the handover command sent by the first network device and the discovery information of the second terminal device, the first terminal device compares whether the cell information of the second terminal device carried in the handover command is the same as the cell information of the second terminal device carried in the discovery information. When the first cell information does not match the second cell information, the first terminal device determines that the switching has failed, and no longer performs subsequent switching operations, so as to avoid resource waste in subsequent switching operations.

[0363] In some implementations, the first terminal device may communicate with the network device through multiple serving relay terminals. The first terminal device may measure the measurement results of the serving relay terminal and the surrounding relay terminals based on the discovery messages sent by the serving relay terminal and the surrounding relay terminals. The first terminal device may release the relay terminal or add a relay terminal based on the measurement results of the serving relay terminal or the surrounding relay terminals. For example, in a multipath relay communication scenario, the first terminal device may communicate with the network device through the serving relay terminal and the direct link of the Uu interface. When the first terminal device detects that the signal quality of the sidelink of the serving relay terminal is smaller than a preset threshold or when the first terminal device cannot receive the discovery message sent by the serving relay terminal, the first terminal device may perform measurement reporting and report the measurement results to the first network device, so that the first network device indicates to the first terminal device to release the serving relay terminal, add a serving relay terminal, or hand over the serving relay terminal based on the measurement results. The signal quality of the sidelink of the serving relay terminal may be SD-RSRP or SL-RSRP. For example, the first terminal device may delete the measurement information corresponding to the neighboring relay terminal after detecting that the neighboring relay terminal has stopped sending discovery messages. For example, the first terminal device may delete the measurement inlet corresponding to the neighboring relay terminal from the measurement variables of the first terminal device.

[0364] In this embodiment of the present application, for a serving relay terminal, after the first terminal device does not receive a discovery message of the serving relay terminal, the first terminal device triggers a measurement report. For a neighboring relay terminal, after the first terminal device does not receive a discovery message of the neighboring relay terminal, the first terminal device may delete the measurement information corresponding to the neighboring relay terminal from the measurement result, so that the measurement result of the first terminal device includes the measurement information of the appropriate neighboring relay terminal. In this way, the first terminal device can effectively remove or add a serving relay terminal.

[0365] In this embodiment of the present application, if the first terminal device does not receive the second broadcast message within a first period after receiving the first broadcast message, the first terminal device may determine that the second terminal device is not a relay device of the first terminal device, and more accurately determine whether the second terminal device is suitable to serve as a relay device of the first terminal device. Optionally, when receiving the second indication information sent by the second terminal device, the first terminal device may further determine that the second terminal device is not a relay device of the first terminal device. The first terminal device may more quickly determine whether the second terminal device is suitable to serve as a relay device of the first terminal device based on the second indication information. Optionally, the first terminal device may further determine whether the serving cell of the second terminal device changes based on the first broadcast message. When the serving cell of the second terminal device changes, the first terminal device sends a second message to the first network device to timely update the serving cell information of the second terminal device in the first network device.

[0366] A communication device provided in an embodiment of the present application is described below.

[0367] In this application, the communication device is divided into functional modules based on the above method embodiment. For example, each functional module may be obtained by division based on each corresponding function, or two or more functions may be integrated into one processing module. The integrated module may be implemented in the form of hardware or in the form of a software function module. It should be noted that in this application, the module division is an example and is merely a logical function division. In actual implementation, other division methods may be used. In the following, the communication device in the embodiment of this application will be described in detail with reference to Figures 22 to 24.

[0368] 22 is a block diagram of a communication device according to an embodiment of the present application. As shown in FIG. 22, the communication device includes: a processing unit 2201 and a transceiver unit 2202.

[0369] In some embodiments of the present application, the communication device may be the first terminal device described above. Specifically, the communication device shown in FIG. 22 may be configured to perform the steps, functions, etc. performed by the first terminal device in the method embodiments described above.

[0370] The transceiver unit 2202 is configured to receive a first broadcast message sent by a second terminal device.

[0371] The processing unit 2201 is configured to determine that the second terminal device is not a relay device of the first terminal device when the first terminal device does not receive a second broadcast message from the second terminal device within a first period after the first terminal device receives a first broadcast message.

[0372] Optionally, the processing unit 2201 is further configured to delete the measurement information corresponding to the second terminal device.

[0373] Optionally, the processing unit 2201 is further configured to determine to reselect a relay device. In another example, the processing unit 2201 is further configured to report the measurement result to the first network device.

[0374] Optionally, the transceiver unit 2202 is further configured to send the first indication information to the second terminal device and receive the first message. The processing unit 2201 is further configured to determine a first signal quality based on the first message, and determine that the second terminal device is not a relay device of the first terminal device when the first signal quality is smaller than a first threshold.

[0375] Optionally, the transceiver unit 2202 is further configured to receive second indication information from a second terminal device.

[0376] Optionally, the processing unit 2201 is further configured to determine whether a serving cell of the second terminal device is handed over. The transceiver unit 2202 is further configured to send a second message to the first network device.

[0377] Optionally, the processing unit 2201 is further configured to determine whether a current serving cell of the second terminal device is an allowed cell. The transceiver unit is specifically configured to send a second message to the first network device when the current serving cell of the second terminal device is an allowed cell.

[0378] Optionally, the processing unit 2201 is further configured to delete the measurement information corresponding to the second terminal device when a current serving cell of the second terminal device is a blocked cell.

[0379] Optionally, the transceiver unit 2202 is further configured to receive a third message from the first network device. The processing unit 2201 is further configured to determine, by the first terminal device, that the switching has failed when the first cell information does not match the second cell information.

[0380] Optionally, the processing unit 2201 is further configured to record a switching failure, to disconnect the connection to the second terminal device, or to perform a re-establishment of a radio resource control (RRC) connection.

[0381] Optionally, the transceiver unit 2202 is further configured to receive a third indication information of the first network device.

[0382] Optionally, the processing unit 2201 is further configured to start the first timer. In another example, the processing unit 2201 is further configured to reset the first timer.

[0383] For specific descriptions of the first broadcast message, the second broadcast message, the measurement information, the first indication information, the first message, the first signal quality, the second indication information, the second message, the third message, etc., it may be understood to refer to the aforementioned method embodiments, i.e., the methods shown in Figures 15A, 15B, 15C, 17, 18A, 18B, 19, 20, and 21. The details will not be described again in this specification.

[0384] It may be understood that the specific description of the transceiver unit and the processing unit described in this embodiment of the present application is merely an example. For the specific functions, steps, etc. of the transceiver unit and the processing unit, please refer to the above method embodiment. The details will not be described again in this specification. For example, the transceiver unit 2202 may be further configured to perform the receiving steps of step 1501, step 1701, step 1801, step 1901, step 1902, step 2002, step 2101, and step 2105, and the sending steps of step 1504, step 1803, and step 2103. The processing unit 2201 may be further configured to perform the steps 1502, step 1503, step 1505, step 1702, step 1802, step 1804, step 1805, step 1903, step 2102, step 2104, and step 2106.

[0385] FIG. 22 is reused. In some other embodiments of the present application, the communication device may be the second terminal device described above. Specifically, the communication device shown in FIG. 22 may be configured to perform the steps, functions, etc. performed by the second terminal device in the method embodiments described above.

[0386] The processing unit 2201 is configured to measure a second signal quality.

[0387] The transceiver unit 2202 is configured to send a second indication information.

[0388] For specific descriptions of the second signal quality, the second indication information, etc., it may be understood to refer to the aforementioned method embodiments, i.e., the methods shown in Figures 15A, 15B, 15C, 17, 18A, 18B, 19, and 20. The details will not be described again in this specification.

[0389] It can be understood that the specific description of the transceiver unit and the processing unit described in this embodiment of the present application is merely an example. For the specific functions, steps, etc. of the transceiver unit and the processing unit, please refer to the above-mentioned method embodiment. The details will not be described again in this specification. For example, the transceiver unit 2202 is further configured to perform the sending steps of step 1501, step 1701, step 1801, step 1901, step 2002, and step 2101, and the processing unit is further configured to perform step 2001.

[0390] The first terminal device and the second terminal device in the embodiment of the present application have been described above. The possible product forms of the first terminal device and the second terminal device are described below. It should be understood that any form of product having the function of the first terminal device in FIG. 22 or any form of product having the function of the second terminal device in FIG. 22 falls within the protection scope of the embodiment of the present application. It should be further understood that the following description is merely an example, and the product forms of the first terminal device and the second terminal device in the embodiment of the present application are not limited thereto.

[0391] In the communication device shown in Figure 22, the processing unit 2201 may be one or more processors, and the transceiver unit 2202 may be a transceiver. Alternatively, the processing unit 2201 may be one or more processors (or the processing unit 2201 may be one or more logic circuits), and the transceiver unit 2202 may be an input / output interface. Details are as follows.

[0392] In a possible implementation, in the communication device shown in FIG. 22, the processing unit 2201 may be one or more processors, and the transceiver unit 2202 may be a transceiver. In this embodiment of the present application, the processor and the transceiver may be combined, etc. The connection manner between the processor and the transceiver is not limited in this embodiment of the present application.

[0393] As shown in FIG. 23, the communications device 230 includes one or more processors 2320 and a transceiver 2310 .

[0394] For example, when the communication apparatus is configured to perform the steps, methods, or functions performed by a first terminal device described above, the transceiver 2310 is configured to receive a first broadcast message sent by a second terminal device, and the processor 2320 is configured to determine that the second terminal device is not a relay device of the first terminal device.

[0395] For example, when the communication apparatus is configured to perform the steps, methods, or functions performed by the second terminal device described above, the processor 2320 is configured to measure the second information quality. The transceiver 2310 is configured to send the second indication information.

[0396] For specific descriptions of the first broadcast message, the second broadcast message, the second signal quality, the second indication information, etc., it may be understood that reference is made to the aforementioned method embodiments, i.e., the methods shown in Figures 15A, 15B, 15C, 17, 18A, 18B, 19, and 20. Details will not be described again in this specification.

[0397] For a specific description of the processor and the transceiver, it may be understood that reference is made to the description of the processing unit and the transceiver unit shown in Figure 22. The details will not be described again in this specification.

[0398] In various implementations of the communication apparatus shown in Figure 23, the transceiver may include a receiver and a transmitter, where the receiver is configured to perform a receiving function (or operation) and the transmitter is configured to perform a transmitting function (or operation). The transceiver is configured to communicate with other devices / apparatuses over a transmission medium.

[0399] Optionally, the communication device 230 may further include one or more memories 2330 configured to store program instructions and / or data. The memory 2330 is coupled to the processor 2320. The coupling in this embodiment of the present application may be an indirect coupling or communication connection between devices, units, or modules in an electrical, mechanical, or other form, and is used for information exchange between the devices, units, or modules. The processor 2320 may cooperate with the memory 2330. The processor 2320 may execute the program instructions stored in the memory 2330. Optionally, at least one of the one or more memories may be included in the processor.

[0400] The specific connection medium between the transceiver 2310, the processor 2320, and the memory 2330 is not limited in this embodiment of the present application. In this embodiment of the present application, the memory 2330, the processor 2320, and the transceiver 2310 are connected through a bus 2340 in FIG. 23, and the bus is represented by a thick line in FIG. 23. The connection manner between the other components is merely an example for illustration and is not limited thereto. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in FIG. 23 to represent the bus, but this does not mean that there is only one bus or only one type of bus.

[0401] In this embodiment of the present application, the processor may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate logic device or transistor logic device, a discrete hardware component, etc. The processor may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor, any conventional processor, etc. The steps of the methods disclosed in conjunction with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented using a combination of hardware modules and software modules in a processor, etc.

[0402] In this embodiment of the present application, the memory may include, but is not limited to, non-volatile memory such as a hard disk drive (HDD) or a solid-state drive (SSD), a random access memory (RAM), an erasable programmable read-only memory (EPROM), a read-only memory (ROM), a portable read-only memory (CD-ROM), etc. The memory is, but is not limited to, any storage medium that can be configured to carry or store program code in the form of instructions or data structures and that can be read and / or written by a computer (e.g., a communication device shown in this application). The memory in this embodiment of the present application may alternatively be a circuit or any other device that can implement a storage function and is configured to store program instructions and / or data.

[0403] The processor 2320 is mainly configured to process communication protocols and communication data, to control the entire communication device, to execute software programs, and to process data of the software programs. The memory 2330 is mainly configured to store software programs and data. The transceiver 2310 may include a control circuit and an antenna. The control circuit is mainly configured to perform conversion between baseband signals and radio frequency signals, and to process radio frequency signals. The antenna is mainly configured to transmit and receive radio frequency signals in the form of electromagnetic waves. The input / output device, such as a touch screen, a display, or a keyboard, is mainly configured to receive data input by a user and output data to a user.

[0404] After the communication device is powered on, the processor 2320 can read the software program in the memory 2330, interpret and execute the instructions of the software program, and process the data of the software program. When data needs to be sent wirelessly, after performing baseband processing on the data to be sent, the processor 2320 outputs the baseband signal to the high-frequency circuit. The high-frequency circuit performs high-frequency processing on the baseband signal and sends the high-frequency signal to the outside in the form of electromagnetic waves through an antenna. When data is sent to the communication device, the high-frequency circuit receives the high-frequency signal through an antenna, converts the high-frequency signal into a baseband signal, and outputs the baseband signal to the processor 2320. The processor 2320 converts the baseband signal into data and processes the data.

[0405] In another implementation, the radio frequency circuitry and antenna may be deployed independently from the processor performing the baseband processing, e.g., in a distributed scenario, the radio frequency circuitry and antenna may be deployed independently and remotely from the communication device.

[0406] It may be understood that the communication device shown in this embodiment of the present application may alternatively include more components than those shown in FIG. 23, etc. This is not limited in this embodiment of the present application. The above-mentioned method implemented by the processor and transceiver is merely an example. Please refer to the above-mentioned method for the specific steps implemented by the processor and transceiver.

[0407] In another possible implementation, in the communication device shown in FIG. 22, the processing unit 2201 may be one or more logic circuits, and the transceiver unit 2202 may be an input / output interface. The input / output interface is also referred to as a communication interface, an interface circuit, an interface, etc. The communication device shown in FIG. 24 includes a logic circuit 2401 and an interface 2402. Specifically, the aforementioned processing unit 2201 may be implemented using a logic circuit 2401, and the transceiver unit 2202 may be implemented using an interface 2402. The logic circuit 2401 may be a chip, a processing circuit, an integrated circuit, a system on a chip (SoC), etc. The interface 2402 may be a communication interface, an input / output interface, a pin, etc. For example, FIG. 24 shows an example in which the communication device is a chip. The chip includes a logic circuit 2401 and an interface 2402.

[0408] In this embodiment of the present application, the logic circuit and the interface may be further coupled to each other, and the specific connection manner between the logic circuit and the interface is not limited in this embodiment of the present application.

[0409] For example, when the communication apparatus is configured to perform the methods, functions, or steps performed by the first terminal device described above, the interface 2402 is configured to receive a first broadcast message, and the logic circuit 2401 is configured to: determine that the second terminal device is not a relay device of the first terminal device if the first terminal device does not receive a second broadcast message from the second terminal device within a first period of time after the first terminal device receives the first broadcast message.

[0410] For example, when the communication device is configured to perform a method, function, or step performed by the second terminal device described above, the interface 2402 is configured to send the second indication information and to send the first broadcast message.

[0411] It can be understood that the communication device shown in this embodiment of the present application may implement the method provided in the embodiment of the present application in the form of hardware, or may implement the method provided in the embodiment of the present application in the form of software, which is not limited in this embodiment of the present application.

[0412] For specific descriptions of the first broadcast message, the second broadcast message, the second signal quality, the second indication information, etc., it may be understood to refer to the aforementioned method embodiments, i.e., the methods shown in Figures 15A, 15B, 15C, 17, 18A, 18B, 19, and 20. The details will not be described again in this specification.

[0413] For specific implementation of the embodiment shown in Figure 24, please refer to the above-mentioned embodiment, and the details will not be described again in this specification.

[0414] An embodiment of the present application further provides a wireless communication system. The wireless communication system includes a first terminal device and a second terminal device. The first terminal device and the second terminal device can be configured to implement a method according to any one of the above-mentioned embodiments (shown in Figures 15A, 15B, 15C, 17, 18A, 18B, 19, 20, etc.).

[0415] In addition, the present application further provides a computer program, which is used to implement the operations and / or processes performed by the first terminal device in the methods provided in the present application.

[0416] The present application further provides a computer program, which is used to implement the operations and / or processes performed by the second terminal device in the methods provided in the present application.

[0417] The present application further provides a computer-readable storage medium. The computer-readable storage medium stores computer code. When the computer code is run on a computer, the computer is enabled to perform the operations and / or processes performed by the first terminal device in the manner provided in the present application.

[0418] The present application further provides a computer-readable storage medium. The computer-readable storage medium stores computer code. When the computer code is run on a computer, the computer is enabled to perform the operations and / or processes performed by the second terminal device in the manner provided in the present application.

[0419] The present application further provides a computer program product, the computer program product including a computer code or a computer program, which, when run on a computer, performs the operations and / or processes performed by the first terminal device in the methods provided herein.

[0420] The present application further provides a computer program product, the computer program product including computer code or a computer program, which, when run on a computer, performs the operations and / or processes performed by the second terminal device in the methods provided herein.

[0421] In some embodiments provided in the present application, it should be understood that the disclosed system, device and method may be implemented in other manners. For example, the described device embodiment is merely an example. For example, the unit division is merely a logical functional division, and may be other divisions during actual implementation. For example, multiple units or components may be combined or integrated to become another system, or some features may be ignored or not implemented. In addition, the shown or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces, indirect couplings or communication connections between devices or units, or electrical connections, mechanical connections, or other forms of connections.

[0422] The units described as separate parts may or may not be physically separated, and the parts presented as units may or may not be physical units, may be located in one location, or may be distributed among multiple network units. Some or all of the units may be selected based on the actual requirements for implementing the technical effects of the solutions provided in the embodiments of the present application.

[0423] In addition, the functional units of the embodiments of the present application may be integrated into one processing unit, each of the units may exist physically alone, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0424] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, the integrated unit may be stored in a computer-readable storage medium. Based on such understanding, the essential technical solution of the present application, or the part contributing to the prior art, or all or part of the technical solution may be implemented in the form of a software product. The computer software product is stored in a readable storage medium and includes some instructions for instructing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application. The readable storage medium includes any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0425] The above description is merely a specific implementation of the present application, and does not limit the scope of protection of the present application. Any variations or replacements that are easily conceived by those skilled in the art within the technical scope disclosed in the present application shall fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the scope of protection of the claims.

Claims

1. 1. A communication method comprising: receiving, by a first terminal device, a first broadcast message sent by a second terminal device; determining that the second terminal device is not a relay device of the first terminal device if the first terminal device does not receive a second broadcast message from the second terminal device within a first period after the first terminal device receives the first broadcast message; A communication method comprising:

2. After the step of determining that the second terminal device is not a relay device of the first terminal device, the method further comprises: deleting, by the first terminal device, measurement information corresponding to the second terminal device; The method of claim 1 further comprising:

3. After the step of determining that there is a unicast connection between the first terminal device and the second terminal device and that the second terminal device is not a relay device of the first terminal device, the method further comprises: determining, by the first terminal device, to reselect a relay device; reporting, by the first terminal device, a measurement result to a first network device; The method of claim 1 , further comprising at least one of:

4. Prior to the step of determining that there is a unicast connection between the first terminal device and the second terminal device and that the second terminal device is not a relay device of the first terminal device, the method further comprises: sending, by the first terminal device, first indication information to the second terminal device through the unicast connection, the first indication information being used to trigger the second terminal device to send a first message, the first message being used to measure a first signal quality, the first signal quality being a signal quality between the first terminal device and the second terminal device; receiving, by the first terminal device, the first message; determining, by the first terminal device, the first signal quality based on the first message; Further equipped with The step of determining that the second terminal device is not a relay device of the first terminal device further comprises: determining, by the first terminal device, that the second terminal device is not the relay device of the first terminal device when the first signal quality is less than a first threshold. The method of claim 1 , comprising:

5. The step of determining that the second terminal device is not a relay device of the first terminal device further comprises:

2. The method of claim 1, comprising: determining, by the first terminal device, that the second terminal device is not the relay device of the first terminal device when receiving second indication information from the second terminal device, the second indication information indicating that the second terminal device does not provide a relay service.

6. 6. The method of claim 5, wherein the second indication information is sent by the second terminal device when a second signal quality is less than a second threshold or the second signal quality is greater than a third threshold, and the second signal quality is a signal quality between the second terminal device and a second network device.

7. 7. The method of claim 1, wherein the first broadcast message comprises a first identifier, the first identifier identifying the second terminal device, the first identifier being generated when the second terminal device accesses a serving cell of the second terminal device.

8. The first broadcast message comprises first cell information of the second terminal device, and after the step of receiving, by the first terminal device, the first broadcast message sent by the second terminal device, the method further comprises: determining, by the first terminal device based on the first cell information, whether the serving cell of the second terminal device is to be changed; sending, by the first terminal device, a second message to the first network device when the serving cell of the second terminal device changes, the second message comprising the first cell information; The method of any one of claims 1 to 7, further comprising:

9. Prior to the step of sending, by the first terminal device, a second message to the first network device, the method further comprises: determining, by the first terminal device based on the first cell information, whether a current serving cell of the second terminal device is an allowed cell; Further equipped with The step of sending a second message by the first terminal device to the first network device comprises: sending the second message to the first network device when the current serving cell of the second terminal device is the allowed cell. The method of claim 8 comprising:

10. The method comprises: deleting, by the first terminal device, the measurement information corresponding to the second terminal device when the current serving cell of the second terminal device is a blocked cell. The method of claim 9 further comprising:

11. The method according to claim 8 or 9, wherein the first cell information is included in the measurement information corresponding to the second terminal device.

12. The first broadcast message comprises the first cell information of the second terminal device, and after the step of receiving, by the first terminal device, the first broadcast message sent by the second terminal device, the method further comprises: receiving, by the first terminal device, a third message from the first network device, the third message comprising second cell information of the second terminal device, the third message indicating to the first terminal device to switch from a relay device of the first terminal device to the second terminal device; determining, by the first terminal device, that the switching has failed when the first cell information does not match the second cell information; The method of any one of claims 1 to 11, further comprising:

13. After the step of determining, by the first terminal device, that the switching has failed, the method further comprises: recording, by the first terminal device, a failure of the switching; disconnecting, by the first terminal device, a connection to the second terminal device; performing a re-establishment of a radio resource control (RRC) connection by the first terminal device; The method of claim 12 , further comprising at least one of:

14. The method comprises: receiving, by the first terminal device, a third indication information of the first network device, the third indication information indicating the first period of time; 14. The method of claim 1, further comprising:

15. Prior to the step of determining that the second terminal device is not a relay device of the first terminal device, the method further comprises: starting, by the first terminal device, a first timer corresponding to the second terminal device when receiving the first broadcast message, wherein an operating period of the first timer is equal to the first period; determining, by the first terminal device when the first timer expires, that the second broadcast message was not received within the first period of time; 15. The method of claim 1, further comprising:

16. The method comprises: resetting the first timer if the first terminal device receives the second broadcast message within the first period of time. The method of claim 15 further comprising:

17. 17. The method of claim 15 or 16, wherein the first timer is controlled by a protocol layer of the first terminal device, the protocol layer comprising any one of a radio resource control (RRC) layer, a physical layer, a medium access control (MAC) layer, and a discovery protocol layer.

18. A communication device, comprising: a transceiver unit configured to receive a first broadcast message sent by a second terminal device; a processing unit configured to determine that the second terminal device is not a relay device of the first terminal device when a second broadcast message from the second terminal device is not received within a first period after the first broadcast message is received; A communication device comprising:

19. The processing unit is further configured to delete measurement information corresponding to the second terminal device.

20. The apparatus of claim 18.

20. The processing unit is further configured to decide to reselect a relay device or to report the measurement result to the first network device.

20. The apparatus of claim 18.

21. a unicast connection between the communication device and the first terminal device; the transceiver unit is specifically configured to: send first indication information to the second terminal device based on the unicast connection, the first indication information being used to trigger the second terminal device to send a first message, the first message being used to measure a first signal quality, the first signal quality being a signal quality between the first terminal device and the second terminal device; and receive the first message; The processing unit is specifically configured to determine the first signal quality based on the first message, and determine, by the first terminal device, that the second terminal device is not a relay device of the first terminal device when the first signal quality is less than a first threshold.

20. The apparatus of claim 18.

22. The processing unit is specifically configured to: determine that the second terminal device is not the relay device of the first terminal device when second indication information is received from the second terminal device, the second indication information indicating that the second terminal device does not provide a relay service.

20. The apparatus of claim 18.

23. 23. The apparatus of claim 22, wherein the second indication information is sent by the second terminal device when a second signal quality is less than a second threshold or the second signal quality is greater than a third threshold, and the second signal quality is a signal quality between the second terminal device and a second network device.

24. 24. The apparatus of claim 18, wherein the first broadcast message comprises a first identifier, the first identifier identifying the second terminal device, the first identifier being generated when the second terminal device accesses a serving cell of the second terminal device.

25. the first broadcast message comprises first cell information of the second terminal device; The processing unit is further configured to determine whether the serving cell of the second terminal device changes based on the first cell information; The transceiver unit is further configured to send a second message to the first network device when the serving cell of the second terminal device changes, the second message comprising the first cell information.

25. Apparatus according to any one of claims 18 to 24.

26. The processing unit is further configured to determine, based on the first cell information, whether a current serving cell of the second terminal device is an allowed cell; The transceiver unit is specifically configured to send the second message to the first network device when the current serving cell of the second terminal device is the allowed cell.

26. The apparatus of claim 25.

27. The processing unit is further configured to delete the measurement information corresponding to the second terminal device when the current serving cell of the second terminal device is a blocked cell.

27. The apparatus of claim 26.

28. 27. The apparatus of claim 25 or 26, wherein the first cell information is included in the measurement information corresponding to the second terminal device.

29. the first broadcast message comprises the first cell information of the second terminal device; The transceiver unit is further configured to receive a third message from the first network device, the third message comprising second cell information of the second terminal device, the third message indicating switching from a relay device of the first terminal device to the second terminal device; The processing unit is further configured to determine that the switching has failed when the first cell information does not match the second cell information.

29. Apparatus according to any one of claims 18 to 28.

30. The processing unit is further configured to record a failure of the switching, to disconnect the second terminal device, or to perform a re-establishment of a radio resource control (RRC) connection.

30. The apparatus of claim 29.

31. The transceiver unit is further configured to receive third indication information of the first network device, the third indication information indicating the first period of time.

31. Apparatus according to any one of claims 18 to 30.

32. The processing unit is further configured to: start a first timer corresponding to the second terminal device, an operating period of the first timer being equal to the first period; and determine, when the first timer expires, that the second broadcast message was not received within the first period.

32. Apparatus according to any one of claims 18 to 31.

33. The processing unit is further configured to reset the first timer.

33. The apparatus of claim 32.

34. 34. The apparatus of claim 32 or 33, wherein the first timer is controlled by a protocol layer of the communications device, the protocol layer comprising any one of a radio resource control (RRC) layer, a physical layer, a medium access control (MAC) layer, and a discovery protocol layer.

35. A communication device comprising a processor and a memory, The processor is configured to store computer-executable instructions; The processor is configured to execute the computer-executable instructions to perform the method of any one of claims 1 to 17. Communications equipment.

36. 18. A computer readable storage medium, the computer readable storage medium being configured to store a computer program which, when executed, performs the method of any one of claims 1 to 17.

37. 1. A communication method comprising: receiving, by a first terminal device, a first broadcast message sent by a second terminal device, the first broadcast message comprising first cell information of the second terminal device; receiving, by the first terminal device, a third message from a first network device, the third message comprising second cell information of the second terminal device, the third message indicating switching from a relay device of the first terminal device to the second terminal device; determining, by the first terminal device, that the switching has failed when the first cell information does not match the second cell information; A method comprising:

38. After the step of determining, by the first terminal device, that the switching has failed, the method further comprises: recording, by the first terminal device, a failure of the switching; disconnecting, by the first terminal device, a connection to the second terminal device; performing a re-establishment of a radio resource control (RRC) connection by the first terminal device; 38. The method of claim 37, further comprising at least one of:

39. A communication device, comprising a unit configured to implement the method according to claim 37 or 38.

40. A communication device comprising a processor and a memory, The processor is configured to store computer-executable instructions; The processor is configured to execute the computer-executable instructions to perform the method of claim 37 or 38. Communications equipment.

41. 40. A computer readable storage medium, the computer readable storage medium being configured to store a computer program which, when executed, performs the method of claim 37 or 38.

Citation Information

Patent Citations

  • Relay control method for proximity service and device therefor

    US20160150373A1

  • Relay Selection Method and Apparatus and System

    US20180160287A1

  • Method for discoveering relay UE via d2d link at UE in wireless communication system and apparatus therefor

    US20180227736A1