Communication method and device, and storage medium

By monitoring broadcast messages and signal quality, the method accurately determines suitable relay devices, reducing resource wastage and improving communication efficiency in U2N relay systems.

JP7735580B2Active Publication Date: 2025-09-08HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In U2N relay communication systems, existing methods fail to accurately determine whether a relay terminal is suitable for a remote terminal, leading to potential inefficiencies and resource wastage due to inappropriate relay device selection.

Method used

A method where a terminal device determines a relay device's suitability by monitoring broadcast messages and signal quality, deleting inappropriate measurement information, and triggering reselection or reporting when necessary, using timers and indication messages to manage relay services effectively.

Benefits of technology

This approach enhances the accuracy of relay device selection, reduces resource consumption, and minimizes unnecessary switching, thereby optimizing communication quality and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007735580000001
    Figure 0007735580000001
  • Figure 0007735580000002
    Figure 0007735580000002
  • Figure 0007735580000003
    Figure 0007735580000003
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 communication technologies, and in particular to communication 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 via 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., a 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 connecting directly 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. Thus, the network device can make a decision based on the relay device reported by the remote terminal, and the remote terminal switches to the 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 for the remote terminal based on the signal quality. However, in the above method, it is not possible to accurately determine whether the relay terminal is suitable to serve as a relay device for the remote terminal. Summary of the Invention

[0006] The embodiments of the present application provide a communication method and apparatus and 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, where the discovery message indicates that the second terminal device provides a relay service. When providing a relay service, the second terminal device typically broadcasts discovery messages periodically. When the second terminal device does not provide a relay service, the second terminal device stops sending discovery messages. Therefore, 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. Thus, the first terminal device can determine an inappropriate terminal device, i.e., 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 for the first terminal device, in other words, that the second terminal device is not suitable to serve as a relay device for 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 results, thereby ensuring that the measurement results reported by the first terminal device include measurement information of appropriate terminal devices without including measurement information corresponding to inappropriate terminal devices. Furthermore, memory space occupied by the measurement results may be saved, and resources required for reporting the measurement results may be 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 determines to reselect a relay device; Alternatively, the first terminal device reports measurement results 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 determination that the second terminal device is not the relay device of the first terminal device can be understood as the second terminal device no longer being 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 therefore 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, 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 method further includes: the first terminal device sending 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 the signal quality between the first terminal device and the second terminal device; the first terminal device receiving the first message; and the first terminal device determining 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 determining that the second terminal device is not a relay device of the first terminal device.

[0015] In this embodiment of the present application, a unicast connection exists between a first terminal device and a second terminal device, and the second terminal device provides a relay service to the first terminal device. Therefore, 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 first indication information, thereby performing data transmission between the first terminal device and the second terminal device. The first terminal device can then detect a first signal quality between the first terminal device and the second terminal device based on the first signal quality. The first terminal device then determines whether the second terminal device is suitable to continue providing a relay service to the first terminal device, thereby more accurately determining whether the second terminal device is suitable to serve as a relay device for 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 service to the first terminal device, and the first terminal device can report to the first network device and 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 service to the first terminal device, and there is no need to switch from the relay device, thereby 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, where the second indication information indicates 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 lower than the second threshold or higher than the third threshold, the second terminal device is not suitable to provide the relay service, and 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 the 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. There is no need to update the serving cell information of the second terminal device, which reduces 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 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; and 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 determining 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.

[0024] In a possible implementation, the first terminal device sending the second message to the first network device includes: the first terminal device determining 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 sending 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 service 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 service to the first terminal device. Therefore, the first terminal device can delete measurement information corresponding to the second terminal device from the measurement results of the first terminal device, so that the measurement results reported by the first terminal device do not include the measurement information of the second terminal device, ensuring that the reported measurement results include the measurement information of the appropriate terminal device. Furthermore, memory space occupied by the measurement results can be saved, and resources required when the first terminal device reports the measurement results 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 first terminal device determines that the serving cell of the second terminal device is 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 measurement information of the second terminal device, and the measurement information includes first cell information. In this way, the first network device can timely update the measurement result of the first terminal device, and therefore the first network device can make appropriate handover decisions based on the measurement result.

[0030] 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 further includes: 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, 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 results reported by the first terminal device and uses the handover command to instruct the first terminal device to switch to the second terminal device. The first terminal device may switch to the second terminal device based on the second cell information. Alternatively, the first terminal device may receive the third message before receiving the first broadcast message, or may 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 switch has failed, and no longer performs a subsequent switch operation. This can avoid resource waste caused by a subsequent switch 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 perform a measurement record of the switching failure and report the reason for 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 disconnected, so that the first terminal device can establish a new unicast connection to ensure the communication quality of the first terminal device and avoid wasting resources. After determining that the switching has failed, the first terminal device may further perform re-establishment of an RRC connection to restore the 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 operating period of the first timer is equal to the first period, and 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 a 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 broadcast messages of a plurality of terminal devices, maintain timers for each of the plurality of terminal devices, effectively monitor the broadcast messages of the plurality of terminal devices, and determine whether the plurality of terminal devices are suitable to serve as relay devices for the first terminal device.

[0038] In a possible implementation, the method further includes: if 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 maintained effectively.

[0042] According to a second aspect, an embodiment of the present application provides a communication method, the method including: 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 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, where the discovery message indicates that the second terminal device provides a relay service. When providing a relay service, the second terminal device typically broadcasts discovery messages periodically. When the second terminal device does not provide a relay service, the second terminal device stops sending discovery messages. Therefore, 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 action 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 measurement information corresponding to the second terminal device from the measurement result, thereby 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 to 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. 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 can 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 sending 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 receiving the first message; and the first terminal device determining the first signal quality based on the first message.

[0045] In this embodiment of the present application, when a unicast connection exists between a first terminal device and a second terminal device, and data transmission is not performed 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 first indication information, and thus data transmission is performed between the first terminal device and the second terminal device. In this way, 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, and can accurately determine whether the second terminal is suitable to continue providing relay service 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 service to the first terminal device, and the first terminal device can report this to the first network device, so that the first terminal device can switch to an appropriate 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 service to the first terminal device, and there is no need to switch from the relay device, thereby 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 a second terminal device. The first broadcast message includes first cell information of the second terminal device. The first terminal device determines whether the serving cell of the second terminal device is to be 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 determining 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.

[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 the 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 service 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 service 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 first terminal device determines that the serving cell of the second terminal device is 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 measurement information of the second terminal device, and the measurement information includes first cell information. In this way, the first network device can timely update the measurement result of the first terminal device, and therefore the first network device can make appropriate handover decisions 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 a 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 results reported by the first terminal device and uses the handover command to instruct the first terminal device to switch to the second terminal device. 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 switch has failed, and subsequent switching operations are no longer performed. This can avoid resource waste caused by subsequent switching operations.

[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 the signal quality between the second terminal device and the second network device. When the second signal quality is less than a second threshold or greater 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. Therefore, the second indication information is sent to timely notify the surrounding terminal devices that the second terminal device does not provide the relay service, 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, wherein the communication device includes 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, wherein the communication device includes a unit for performing the 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, wherein the communication device includes a unit for performing the 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, wherein the communication device includes a unit for performing the 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, wherein the communication device includes a unit for performing the 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 aspects, 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 embodiments provided below.

[0072] According to an eleventh aspect, the present application provides a communications device, the communications device including a processor, the processor may be configured to execute computer-executable instructions stored in a memory, such that the method illustrated in the first aspect or any one of its possible implementations is performed, the method illustrated in the second aspect or any one of its possible implementations, the method illustrated in the third aspect or any one of its possible implementations, the method illustrated in the fourth aspect or any one of its possible implementations, or the method illustrated in the fifth aspect or any one of its possible implementations.

[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 the 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 generally be 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, such as 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 the like.

[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 acquire data or output data. The processing circuit is configured to perform a corresponding method shown in the first aspect or any one of possible implementations of the first aspect, a corresponding method shown in the second aspect or any one of possible implementations of the second aspect, a corresponding method shown in the third aspect or any one of possible implementations of the third aspect, a corresponding method shown in the fourth aspect or any one of possible implementations of the fourth aspect, or a corresponding method shown in the fifth aspect or any one of possible implementations of the fifth aspect.

[0081] According to a thirteenth aspect, the present application provides a computer-readable storage medium configured to store a computer program, which, when run on a computer, performs the method set forth in the first aspect or any one of its possible implementations, the method set forth in the second aspect or any one of its possible implementations, the method set forth in the third aspect or any one of its possible implementations, the method set forth in the fourth aspect or any one of its possible implementations, or the method set forth in the fifth aspect or any one of its possible implementations.

[0082] According to a fourteenth aspect, the present application provides a computer program product, the computer program product including a computer program or computer code, which, when run on a computer, performs the method set forth in the first aspect or any one of its possible implementations, the method set forth in the second aspect or any one of its possible implementations, the method set forth in the third aspect or any one of its possible implementations, the method set forth in the fourth aspect or any one of its possible implementations, or the method set forth in the fifth aspect or any one of its possible implementations.

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

[0084] The following describes the accompanying drawings used in the embodiments of the present application. [Figure 1] 1 is a diagram of an architecture of a communication system according to an embodiment of the present application; [Figure 2] FIG. 1 illustrates a control plane protocol architecture for sidelink communication according to an embodiment of the present application. [Figure 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 an embodiment of the present application. [Figure 4B] FIG. 10 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. 10 is a schematic interaction diagram of another unicast connection establishment process according to an embodiment of the present application; [Figure 6] 1 is a diagram of the structure of a communication system according to an embodiment of the present application; [Figure 7] FIG. 1 is a diagram of a control plane protocol architecture according to an embodiment of the present application. [Figure 8] FIG. 1 is a diagram of a user plane protocol architecture according to an embodiment of the present application. [Figure 9] FIG. 1 is a diagram of a scenario of switching from direct communication to indirect communication according to an 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. 1 is a diagram of a scenario of switching from indirect communication to direct communication according to an 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 an embodiment of the present application. [Figure 14] FIG. 1 is a diagram of a communication scenario according to an 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. 10 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application; [Figure 16] 1 is a diagram of a scenario of a communication method according to an embodiment of the present application; [Figure 17] FIG. 10 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application; [Figure 18A] FIG. 10 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application; [Figure 18B] FIG. 10 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application; [Figure 19] FIG. 10 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application; [Figure 20] FIG. 10 is a schematic interaction diagram of yet another communication method according to an embodiment of the present application; [Figure 21] FIG. 10 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 the structure of a communication device according to an embodiment of the present application; [Figure 23] FIG. 1 is a diagram of the structure of another communication device according to an embodiment of the present application. [Figure 24] FIG. 10 is a diagram of the structure of yet another communication device according to an embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION

[0085] In the specification, claims, and accompanying drawings of this application, terms such as "first" and "second" are intended merely to distinguish between different objects and do not limit the sequence, time sequence, priority, or degree of importance of 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 other steps or units that are inherent to these processes, methods, products, or devices. Furthermore, the character " / " typically indicates an "or" relationship between related objects.

[0086] The term "embodiment" as used herein means that a particular feature, structure, or characteristic described in connection 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 an independent or optional embodiment 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 embodiments 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. Alternatively, the terminal device may 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 embodiments 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 types of base stations, such as 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 wideband code division multiple access (WCDMA), an evolved Node B (eNB or eNodeB) in LTE, a relay station or access point, an in-vehicle device, a wearable device, a next generation Node B (gNB) in a 5G system, a base station in a future PLMN network, etc.

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

[0090] 1. Sidelink (SL) communication

[0091] In a wireless communication system, terminal devices may communicate with each other via a network device, or may communicate directly with each other 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 a communication system architecture 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, thereby effectively reducing communication latency. For example, an application scenario of a 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, 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 performed consecutively in the RLC layer, MAC layer, and PHY layer. UE2 obtains the PDCP PDU after processing is performed consecutively in the PHY layer, MAC layer, and RLC layer.

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

[0094] Broadcast communication may be similar to broadcasting system information by network devices. Specifically, a transmitting terminal sends broadcast service data to the outside without encryption, and other terminal devices that are within the effective reception 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 must first be established between two terminal devices. This is similar to data communication that is performed 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 perform data communication based on a negotiated identifier, and the data may be encrypted or unencrypted. Compared with broadcast communication, in unicast communication, unicast communication can only be performed between two UEs with an established unicast connection.

[0096] Multicast communication refers to communication among 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 also receive 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 required for a one-time sidelink communication. The source L2 ID and the destination L2 ID are used by the MA. Cp Protocol dataThe data may be included in a sub-header of a protocol data unit (PDU) so that the data can 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 referred to as source terminal). For example, the transmitting terminal may select different source L2 IDs based on the communication type and standard. The communication type may include unicast communication, broadcast communication, 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 provide 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 a broadcast service, a multicast service, or a unicast service based on 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 the broadcast service type or the 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 that supports 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 layers established between UE1 and UE2 include 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 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 assigned by the announcing terminal, and the destination L2 ID may be a predefined or preset destination L2 ID. The discovery message may also be called an announcement message, and the announcement message may carry information about the announcing terminal. For example, the announcement message may include information about a service type indicating the type of service that can be provided by the announcing terminal. Therefore, the monitoring terminal determines whether the service provided by the announcing terminal is required based on the announcement message. The monitoring terminal monitors the announcement message broadcast by the announcing 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, 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 the announcing terminal, and UE2, UE3, UE4, and UE5 are monitoring terminals. UE1 broadcasts the 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, 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 preset 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 upon 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. FIG. 4B is an example of the second discovery model according to an embodiment of the present application. The second discovery model may include multiple terminal devices. 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 solicitation message. The solicitation message may include UE1's service requirements. UE2, UE3, UE4, and UE5 monitor the solicitation message and, after receiving the solicitation message, determine whether UE1's service requirements are met based on the information carried in the solicitation message. For example, if UE2 and UE3 determine that UE1's service requirements are met, they send response messages 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 the discovery process are merely examples. The discovery model of the discovery process in the embodiments of the present application is not limited to the above two examples and may further include other new discovery models that emerge 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 the 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 the unicast connection establishment procedure.

[0109] For example, after a 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 during 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 surrounding cells based on the configuration message, and perform measurement reporting to report the measurement results to the network device when the measured signal quality satisfies the measurement reporting condition set in the configuration message. 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 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 for at least one measurement object. An NR measurement object is used as an example. The configuration information for 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, whitelisted and blacklisted cells, and cell frequencies and identifiers. For example, when an SSB signal received by the terminal device satisfies the configuration information of the NR measurement object, the SSB signal is determined to be the 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 the reporting 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 SSB measurement results. 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 the 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 an event-triggered report and a periodic-triggered report.

[0115] For example, in the case of a measurement reporting configuration for an event-triggered report, the measurement reporting configuration may include an event type, a threshold, a period during which a trigger condition is satisfied, a measurement quantity, a reference signal type, etc., of a measurement reporting event corresponding to the measurement reporting configuration. The trigger quantity of a measurement reporting event is an indicator of the measurement reporting event. The trigger quantity 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). When the terminal device detects through measurement that the trigger quantity satisfies the trigger threshold of the measurement reporting event, the terminal device triggers a measurement report corresponding to the measurement reporting event. For example, in a Uu interface change process, i.e., in a serving cell change process of the terminal device, the trigger quantity of the measurement reporting event may be RSRP or RSRQ. For example, the terminal device may determine whether to trigger a measurement report corresponding to the measurement reporting event by measuring the RSRP or RSRQ of an SSB signal.

[0116] For example, when a network device implements a measurement reporting configuration for event-triggered reporting for a terminal device, the network device may correspondingly configure the entrance and exit thresholds of the measurement reporting event corresponding to the measurement reporting configuration. For example, the entrance threshold condition for measurement reporting event A1 (Event A1) is Ms-Hys>Thresh, and the condition persists for a TimeToTrigger 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 the terminal device's measurement variables (VarMeasReportList) 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 and its measurement result that triggers the measurement reporting condition. 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 the 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 an event-triggered one-time report and an event-triggered periodic report. For example, in the case of the event-triggered one-time report, when the terminal device meets the entrance threshold of a measurement report event and maintains the situation for a certain period of time, the terminal device triggers reporting of only a one-time measurement report. In the case of the event-triggered periodic report, after the terminal device's measurement report 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 configured by the network device. When the counter reaches the requirement for the number of reports, the terminal device stops reporting and completes the measurement reporting procedure corresponding to the measurement report 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 will no longer include the measurement result of the measurement object.

[0119] For example, when a network device implements a measurement reporting configuration of periodic triggered reporting for 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 reporting 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, which 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-to-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 communicate with a network device, or 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 a U2N relay communication architecture, terminal devices can be classified into remote terminals (remote UEs) and relay terminals (relay UEs). The remote terminals can communicate with network devices through relay terminals. 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 terminals communicate with network devices through relay terminals. The remote terminals communicate with relay terminals through side links, and the corresponding interface is called PC5. The relay terminals are directly connected to network devices, i.e., communicate with network devices 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 Figure 7 and the user plane protocol stack architecture shown in Figure 8 are applicable to an L2 U2N relay scenario. For the control plane, as shown in Figure 7, a PC5 interface is established between a remote terminal and a relay terminal, and the end-to-end protocol layers include 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 layers include an adaptation layer, an RLC layer, a MAC layer, and a PHY layer. An N2 interface is established between the network device and a core network, and the end-to-end protocol layers include an N2 interface protocol stack (N2 Stack). Furthermore, an end-to-end protocol layer including an RRC layer and a PDCP layer exists between the remote terminal and the network device. An end-to-end protocol layer, including a non-access stratum (NAS) layer, exists 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) tunneling 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, a data packet from a remote terminal is relayed and forwarded under the PDCP layer of the relay terminal. Specifically, the relay terminal, including an RLC layer, a MAC layer, and a PHY layer, maintains the relayed RLC bearer. Furthermore, in the U2N relay communication architecture, an adaptation layer is added between the RLC layer and the PDCP layer in the control plane protocol architecture and the user plane protocol architecture. The main function of the adaptation layer is radio bearer multiplexing and segmentation. 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 an L3 U2N relay communication architecture, a data packet from a remote terminal is relayed and forwarded at an internet protocol (IP) layer of a relay terminal, where the IP layer is above an access stratum (AS) layer. Specifically, the IP layer is above an SDAP layer, a PDCP layer, an adaptation layer, an RLC layer, a MAC layer, and a PHY layer. Therefore, there are end-to-end IP layers, SDAP layer, PDCP layer, adaptation layer, RLC layer, MAC layer, and PHY layer between the remote terminal and the relay terminal, and there are end-to-end IP layers, SDAP layer, PDCP layer, adaptation layer, RLC layer, MAC layer, and PHY layer between the relay terminal and the network device, but 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 surrounding cells and the signal quality of surrounding relay devices, and perform mobility management based on the measured signal quality, so that the remote terminal can continuously enjoy network services during the moving process. For example, the mobility management of the remote terminal may include the following cases:

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

[0131] Switching from direct communication to indirect communication means that a remote terminal switches from communicating directly with a network device to communicating with the network device via 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 surrounding relay terminals based on a configuration message from the network device, and perform measurement reporting based on the configuration message to report the measurement results to the network device. Then, based on the measurement results reported by the remote terminal, the network device indicates to the remote terminal that it will switch to a target relay terminal, obtain relay service via the target relay terminal, and thereby access 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 configure measurement reporting 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 and reports the measurement results to the network device. For example, the configuration message may be, in particular, an RRCReconfiguration message.

[0132] For example, FIG. 9 illustrates 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 the Uu interface, UE2 directly communicates with gNB1, and UE3 directly communicates with gNB2. For example, UE2 and UE3 broadcast discovery messages. 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 satisfies 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 and access gNB1 or gNB2 via UE2 or UE3.

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

[0134] For example, the entry conditions for measurement report event Y may 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 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 may 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 longer than the TimeToTrigger period, the exit conditions for measurement report event Y are satisfied.

[0136] For example, the sidelink signal quality in measurement reporting event Y may be SD-RSRP. Specifically, the remote terminal acquires the sidelink signal quality 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 entry condition for measurement reporting event Y, i.e., when the signal quality of the terminal device's serving cell is lower than threshold Y1 and the SD-RSRP of the surrounding relay terminals is higher than threshold Y2, the remote terminal may perform measurement recording, i.e., the remote terminal records measurement objects corresponding to the surrounding relay terminals in its measurement variables and performs measurement reporting based on the measurement reporting configuration corresponding to measurement reporting event Y. For example, the measurement results 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 sidelink signal quality 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 a 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 measurement results 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 results include ID information of surrounding relay terminals, ID information of serving cells of the surrounding relay terminals, and sidelink signal qualities 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 results.

[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 remote terminal's identification information. 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, which 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 via the target relay terminal. The RRC Reconfiguration Complete message indicates that the switchover 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 may alternatively be the same network device, that is, an intra-site switching is performed. When an intra-site switching is performed, steps S13 and S14 may not be performed.

[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 discovery messages sent by surrounding relay terminals. For example, the remote terminal may measure the signal quality of the sidelink between the remote terminal and surrounding relay terminals by measuring the RSRP of the discovery messages sent by the relay terminal. The signal quality of the sidelink, which the remote terminal obtains by measuring the RSRP of the discovery messages sent by surrounding relay terminals, may be referred to as SD-RSRP. In the U2N relay communication architecture, the relay terminal sends a discovery message when the signal quality of the relay terminal on the Uu interface between the relay terminal and the network device satisfies a threshold condition. Specifically, the relay terminal sends a discovery message when the signal quality of the relay terminal on the Uu interface is between a minimum threshold and a maximum threshold. The minimum threshold and maximum threshold may be set by the network device. When the relay terminal does not satisfy the above threshold condition, the relay terminal does not provide 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, discovery messages are periodically sent when the Uu-RSRP of the surrounding relay terminal satisfies the above threshold condition. The remote terminal can detect the SD-RSRP of the surrounding relay terminal based on the discovery messages. When the SD-RSRP of the surrounding relay terminal satisfies the entry condition of measurement report event Y, the surrounding relay terminal is added to the measurement variables to form a measurement entry corresponding to the surrounding relay terminal, and the corresponding measurement report is performed. If the Uu-RSRP of the surrounding relay terminal no longer satisfies the threshold condition after a certain period of time, the transmission of discovery messages stops. If the remote terminal no longer receives discovery messages 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 measurement report event Y based on the SD-RSRP of the surrounding relay terminals. Therefore, the measurement entries corresponding to the surrounding relay terminals are retained in the measurement variables of the remote terminal. Furthermore, when a measurement report is triggered next time (where, for example, the measurement report is triggered when another measurement object satisfies the entry condition of the measurement report event corresponding to the remote terminal), the measurement result reported by the remote terminal still includes the measurement entry. For example, when a surrounding relay terminal no longer provides relay service, the remote terminal still reports the measurement entry corresponding to the surrounding relay terminal. As a result, the reported measurement result includes an inappropriate relay terminal. In view of this, one 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 a surrounding relay terminal, when the SD-RSRP of the surrounding relay terminal satisfies the entry condition of measurement report event Y, the remote terminal adds the surrounding relay terminal to the measurement variables to form a measurement entry corresponding to the surrounding relay terminal and performs a corresponding measurement report. After the remote terminal adds the surrounding relay terminal to the measurement variables and performs a measurement report, the surrounding relay terminal performs 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 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, one 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 via a relay terminal to communicating directly with the network device. For example, the remote terminal is in an RRC connected state. When communicating with a network device through its serving relay 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 surrounding cells based on a configuration message from the network device and perform measurement reporting based on the measurement report configuration in the configuration message. Figure 11 illustrates an example of a switching scenario from indirect communication to direct communication according to an embodiment of the present application. Figure 11 illustrates 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 via UE2, UE2 communicates with gNB1 through the Uu interface, and UE1 communicates with UE2 through the sidelink. UE1 may receive a configuration message from gNB1 via UE2 and measure the signal quality of the sidelink between UE1 and UE2 and the signal quality of cells surrounding UE1 based on the configuration message. For example, UE1 may measure the signal quality of a cell served by gNB1 and the signal quality of a cell served by gNB2. When the signal quality measured by UE1 meets a reporting condition, UE1 performs measurement reporting and sends the measurement result to gNB1. Based on the measurement result reported by UE1, gNB1 may indicate to UE1 that it will switch to an appropriate cell. For example, gNB1 may indicate to UE1 that it will 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 a threshold X1 and the signal quality of the surrounding cells is greater than a threshold X2, a 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 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 longer than the TimeToTrigger period, the entry conditions of the measurement report event are satisfied and a 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 longer than the TimeToTrigger period, the exit conditions of the measurement report event Y are satisfied.

[0156] For example, the sidelink signal quality between the remote terminal and the serving relay terminal at measurement report event X may be SL-RSRP. Specifically, the remote terminal may obtain the sidelink signal quality between the remote terminal and the relay terminal by receiving and measuring 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 SD-RSRP by measuring a discovery message sent by the serving relay terminal and use SD-RSRP as the sidelink signal quality 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 entry condition of measurement reporting event X, the remote terminal performs measurement recording, i.e., the remote terminal records a measurement object corresponding to measurement reporting event X in a variable, performs measurement reporting based on the measurement reporting configuration of measurement reporting event X, and reports 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 report event X, the remote terminal deletes the measurement object corresponding to the measurement report 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 a 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 in Figure 12.

[0160] S21: The remote terminal sends a measurement result to the source network device through the serving relay terminal, where the measurement result includes the ID information of the surrounding cells and the signal quality 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, which indicates that the switchover is completed.

[0167] S28: The source network device sends an RRC reconfiguration message to the serving relay terminal. The RRC reconfiguration message indicates to the serving relay terminal that a configuration related to the remote terminal, for example, an air interface configuration related to the remote terminal, is to be released. In response to this, 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 may alternatively be the same network device, that is, an intra-site switching is performed. When an intra-site switching is performed, steps S23 and S24 may not be performed.

[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 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, if the Uu-RSRP of the serving relay terminal does not satisfy the threshold condition at time T, the remote terminal stops transmitting discovery messages. Furthermore, before time T, the SD-RSRP of the serving relay terminal does not satisfy the entrance condition of 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 measurement report event X. Therefore, the remote terminal does not trigger a measurement report. In this case, the serving relay terminal is no longer suitable to serve as the relay device for 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 serving as the relay device for the remote terminal, and a measurement report can be triggered when the serving relay terminal is no longer suitable to continue serving as the relay device for the remote terminal device, so that the relay device for the remote terminal can switch to an appropriate relay terminal in a timely manner. For a specific implementation of the communication method, see the associated 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 within the range of the remote terminal changes from one relay terminal to another. For example, the remote terminal is in a connected state. For example, the remote terminal may communicate with a network device via a current serving relay terminal and receive a configuration message from the network device via the current serving relay terminal. For example, the configuration message may set a condition for satisfying a measurement report for the remote terminal. The remote terminal may measure the sidelink signal quality between the remote terminal and the current serving relay terminal and the sidelink signal quality between the remote terminal and 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, for example, when 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 greater than a second specified threshold, the remote terminal triggers a measurement report to report the measurement result to the network device. The first and second specified thresholds 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 that it will 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 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 a network device, the remote terminal may select a relay device if the remote terminal detects that the signal quality of the current serving cell is lower than a third specified threshold or receives indication information from the network device. The third specified threshold may be set by the network device, and the indication information indicates to the remote terminal that the relay device should be selected. When the remote terminal indirectly communicates with the network device through a serving relay terminal, the remote terminal reselects the relay terminal if the remote terminal satisfies a trigger condition for reselecting 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 being lower than a fourth specified threshold; receiving indication information from the network device; and sidelink communication failing. The fourth specified threshold may be set by the network device, and the indication information indicates to the remote terminal that the relay device should be reselected.

[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 satisfy 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 needs to reselect a relay device. Therefore, the remote terminal cannot reselect a relay terminal in a timely manner. In view of this, one 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 Figure 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 merely examples. During actual 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 a surrounding relay device and the signal quality of a surrounding cell, and report the measurement results to the network device when the measured signal quality satisfies a reporting condition. The network device may indicate to the remote terminal that it will switch to a target relay terminal or a target cell based on the measurement results reported by the remote terminal. Therefore, the above several switching scenarios should not be understood as limitations 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 a 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 simultaneously have multiple indirect communication connections, i.e., the remote terminal may simultaneously establish connections to a network device via multiple relay terminals. When connected to a network device through a Uu interface direct link, the remote terminal may further establish a connection to the network device via 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 via UE2. It can be understood that UE1 may have multiple indirect communication connections to a network device via multiple relay terminals. Figure 13 shows only one indirect communication connection. It should be understood that in a 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 a limitation in the present application.

[0183] Figure 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 Figure 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 the Uu interface, relay UE1 directly communicates with gNB1 through the Uu interface, relay UE2 directly communicates with gNB2 through the Uu interface, and relay UE3 directly communicates with gNB2 through the Uu interface. Remote UE2 communicates with gNB2 via 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 the signal quality between Remote UE1 and Relay UE1, Relay UE2, and Relay UE3 based on the discovery messages broadcast by Relay UE1, Relay UE2, and Relay UE3. When the signal quality of any relay terminal satisfies the reporting condition in the measurement reporting 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 satisfies the reporting setting in the corresponding measurement reporting configuration, Remote UE1 records and reports the measurement result corresponding to Relay UE1. Based on the measurement result reported by Remote UE1, gNB1 may indicate to Remote UE1's serving relay device to switch to Relay UE1, Relay UE2, or Relay UE3.

[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 surrounding relay terminals, and the signal quality of 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 broadcast 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 illustrated in FIG. 14 is merely an example and does not set limitations on application scenarios to which the embodiments of the present application are applicable. It should be understood that the relay terminal used in the embodiments of the present application is for illustrative purposes only and does not mean that the solution in the embodiments of the present application is applicable only to U2N relay scenarios. In the embodiments 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 embodiments 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 embodiments of the present application may be applied to a scenario in which a measurement signal suddenly changes, for example, a scenario in which a 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 one 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, the 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 may indicate 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 may measure the signal strength of the first broadcast message to obtain an L1 measurement result and deliver the L1 measurement result to the RRC layer. The RRC layer may perform 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, and 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, that is, 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 after receiving the first broadcast message, it indicates that the second terminal device is not suitable to provide relay service 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 will not use the second terminal device as a relay device for the first terminal device.

[0194] For example, when a discovery message transmission condition is not met, the second terminal device stops sending discovery messages. For example, when the signal quality between the second terminal device and the second network device does not satisfy a threshold condition, the second terminal device stops broadcasting discovery messages. 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 a minimum threshold or greater than a maximum threshold, the second terminal device does not provide relay service. Therefore, the second terminal device stops sending discovery messages. 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 should stop sending discovery messages. Therefore, the first terminal device determines that the second terminal device is not a relay device for 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 can 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 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 can be understood as the first terminal device determining that the second terminal device will no longer be a relay device for the first terminal device after the current time point, i.e., the first terminal device will not continue to use the second terminal device as a relay device for the first terminal device after the current time point. 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 for 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 for the first terminal device to another terminal device, so that the second terminal device no longer provides 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 for the first terminal device, the first terminal device reports a measurement result to the first network device, and the relay device for 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 for 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 for the first terminal device, the first terminal device decides to reselect a relay device and handover the relay device for the first terminal device to another terminal device, and therefore, the second terminal device is no longer a relay device for 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, where the discovery message indicates that the second terminal device provides a relay service. When providing a relay service, the second terminal device typically broadcasts discovery messages periodically. When the second terminal device does not provide a relay service, the second terminal device stops sending discovery messages. Therefore, 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 for the first terminal device. Thus, the first terminal device may determine an inappropriate terminal device and more accurately determine whether the second terminal device is suitable to serve as a relay device for 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 serve 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 following: The first terminal device sends a first broadcast message, where the first broadcast message indicates that the first terminal device requests relay service. Step 1502 may be replaced with the following: 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 for the first terminal device. For example, the first broadcast message is a request message sent by the first terminal device. When requiring relay service, the first terminal device may periodically send a request message. The request message indicates that the first terminal device requires 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 relay service. If the first terminal device does not receive a response message from the second terminal device within a second period after sending the discovery message, it indicates that the second terminal device is not suitable to provide 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.

[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 network implementation and actual conditions 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 conditions and indicate, by using the third indication information, that the first terminal device does not receive a discovery message sent by the second terminal device within the first period. In this case, it is determined that the second terminal device is not a relay device for 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, 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 may be a discovery message broadcast by the second terminal device. The first broadcast message and the third broadcast message may be discovery messages received at different times. The first terminal device may determine the first period based on the time interval between the received discovery messages sent by the second terminal device, i.e., the first terminal device may determine the first period based on the 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 discovery message transmission condition is satisfied, the second terminal device may periodically send discovery messages. In some implementations, the second terminal device may determine the first period based on a period at which the second terminal device sends discovery messages 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 at which the second terminal device sends discovery messages. After receiving the fourth indication information, the first terminal device determines a period at which the second terminal device sends discovery messages and determines the first period based on the period at which the second terminal device sends discovery messages. For example, the first period is longer than the period at which the second terminal device sends discovery messages.

[0213] In this embodiment of the present application, the first period may be determined by any one of the first network device, the first terminal device, and the second terminal device. The first period may be longer than the period in which the second terminal device sends a discovery message. For example, the first period may be two periods, which avoids a 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 in time due to network delay. This may improve fault tolerance.

[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 first timer has an operating period equal to the 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 operating 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 operating 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, i.e., 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 has already been 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 multiple terminal devices, set multiple timers for the multiple terminal devices, and monitor discovery messages sent by the terminal devices within the operation times 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 that identifies the third terminal device. After receiving the fourth broadcast message, the first terminal device starts a second timer corresponding to the second identifier and detects 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 serve 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 an 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 the RRC layer, the physical layer, the medium access control (MAC) layer, and the 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 measurements, and delivers the L1 measurement results to the RRC layer. After receiving the L1 measurement results 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 that the first timer will be started or reset. When the first timer expires, the physical layer or the MAC layer indicates that the RRC layer will not receive a second broadcast message within a first period of time after the first broadcast message is received.

[0223] For example, after receiving a first broadcast message, the AS layer of the first terminal device may deliver 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 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 FIG. 16, it is assumed that at time T0, the second terminal device satisfies 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 satisfies 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 bold arrows in FIG. 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 satisfies 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 does not receive the discovery message sent by the second terminal device. The first terminal device may determine that the second terminal device has stopped sending discovery messages. 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 the measurement information corresponding to the second terminal device.

[0229] For example, the measurement information corresponding to the second terminal device may include measurement identification information of the second terminal device. This 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 serving cell information of the second terminal device, ID information of the second terminal device, and sidelink signal quality 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, when the first terminal device subsequently triggers a measurement report, the measurement result reported by the first terminal device 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 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 inlet corresponding to the second terminal device from the measurement variable.

[0231] For example, when a discovery message sending condition 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 satisfies the measurement report event entry condition, the first terminal device uses the second terminal device as a measurement object and records the second terminal device in the measurement variables of the first terminal device to form a measurement entry corresponding to the second terminal device. The first terminal device may further perform 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 assumed to detect that the SD-RSRP of the second terminal device satisfies the entry condition of measurement reporting event Y. Specifically, within the first time segment, the signal quality of the serving cell of the first terminal device remains below threshold Y1, and the SD-RSRP of the second terminal device remains above threshold Y2. The duration of the first time segment is equal to or longer than the TimeToTrigger period. The first terminal device uses the second terminal device as a measurement object, records the second terminal device in its measurement variables, and performs measurement reporting based on the measurement reporting configuration corresponding to measurement reporting event Y. At time T4, the second terminal device does not satisfy the discovery message sending condition, for example, the Uu-RSRP of the second terminal device does not satisfy the threshold condition. In this case, the second terminal device stops sending discovery messages. 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 service. 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 variables of the first terminal device. The measurement reporting event may be the measurement reporting event Y or 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 sidelink of a neighboring relay device 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 deletes the second terminal device from the measurement variable, i.e., deletes the measurement entry corresponding to the second terminal device.

[0235] For a specific description of the measurement reporting event Y, please refer to the related description above, 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 variables to ensure that the measurement report includes the measurement results of the appropriate terminal device. In addition, the memory space occupied by the measurement results is saved, and the resources required for reporting the measurement results 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, the 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] Please refer to Figure 15A for a specific implementation of steps 1501 and 1502. The details will not be described again here.

[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 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. The first terminal device may determine that the second terminal device is not a relay device of the first terminal device as follows: 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.

[0242] For example, the first message may be any message sent by a second terminal device to a 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 a 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, which is used to trigger the second terminal device to send a first message, thereby allowing the first terminal device to 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 relay service to the first terminal device. Therefore, the first terminal device determines that the second terminal device is not a relay device for the first terminal device. For example, the first threshold may be a threshold X1 for measurement report event X.

[0243] When the first signal quality is greater than or equal to 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 a 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 serves as 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. If 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. If 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, and 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 results may include measurement results of optional cells in the vicinity of the first terminal device and measurement results of optional relay terminals in the vicinity. The measurement results of optional cells in the vicinity of the first terminal device or measurement results of optional relay terminals in the vicinity may be understood to satisfy the entry condition of a corresponding measurement report event. The measurement results of optional cells in the vicinity include IDs of optional cells in the vicinity and signal qualities of the optional cells in the vicinity. The measurement results of optional relay terminals in the vicinity may include IDs of optional relay terminals in the vicinity, IDs of serving cells of optional relay terminals in the vicinity, and signal qualities of optional relay terminals in the vicinity. 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 for the first terminal device, the first terminal device may trigger a measurement report and report the measurement results to the first network device. After receiving the measurement result, the first network device may instruct the first terminal device to switch from the second terminal device to one of a surrounding optional cell and a 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 a neighboring cell, and the signal quality of a 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 a discovery message sending condition is satisfied, the second terminal device may periodically broadcast a discovery message. If 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 sent by the second terminal device, the first terminal device determines that the second terminal device has stopped sending discovery messages. The first broadcast message and the second broadcast message are discovery messages sent by the second terminal device at different times. When the first terminal device determines that the second terminal device has stopped sending discovery messages, the first terminal device determines that the second terminal device is no longer suitable to provide 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 a 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 the measurement result to the first network device, and the first network device can instruct the relay device of the first terminal device based on the measurement result to switch from the second terminal device to a nearby optional cell or a nearby optional relay terminal.

[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 results include the measurement results 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 a neighboring cell and the signal quality of a sidelink between the first terminal device and a neighboring relay terminal. For example, when the signal quality of the neighboring cell satisfies a 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 results are reported. The measurement results include the measurement results corresponding to the neighboring cell.

[0251] In a possible implementation, the first terminal device may determine, based on the indication of the first network device, that the second terminal device is not a relay device for the first terminal device. For example, after determining that the second terminal device has stopped sending discovery messages, the first terminal device may trigger a measurement report and report the measurement result to the first network device. The first network device may determine, based on the measurement result, whether to continue using the second terminal device as a relay device for the first terminal device. When the first network device determines that the second terminal device is no longer being used as a relay device for the first terminal device, the first network device sends fifth indication information to the first terminal device. The fifth indication information indicates that the second terminal device is no longer being used as a relay device for 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 for 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 optionally selected cell or a nearby optionally selected relay terminal based on the fifth indication information.

[0252] For example, the first terminal device may report the measurement result to the first network device as follows: when the first terminal device determines that the second terminal device has stopped sending discovery messages and the signal quality of the surrounding optional cell meets the entrance condition of the measurement reporting event, the first terminal device reports the measurement result to the first network device. For example, when the second terminal device has stopped sending discovery messages and the signal quality of the surrounding optional cell is determined to be 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 threshold X1. The entry condition of measurement reporting event X is not met, and no measurement report is triggered. At time T5, the first terminal device does not receive a 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. In this case, if the first terminal device detects that the signal quality of a nearby optional cell is greater than threshold X2, a measurement report corresponding to 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 perform measurement reporting based on the measurement reporting configuration of measurement reporting event X.

[0254] It may 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 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 reporting 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 reporting event X is satisfied, and a measurement report corresponding to the measurement reporting event X is triggered.

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

[0256] In this embodiment of the present application, when the second terminal device is 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, the 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] Please refer to Figure 15A for a specific implementation of steps 1501 and 1502. The details will not be described again here.

[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 for the first terminal device, the first terminal device decides to reselect a relay device. As shown in FIG. 16, 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. 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 for 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, the first terminal device receives the first broadcast message.

[0267] It can be understood that the specific implementation of step 1701 refers to the relevant description of step 1501 in Figure 15A, and 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] It can be understood that the specific implementation of step 1702 refers to the relevant description of step 1503 in Figure 15A, and 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 a second broadcast message within a first period after receiving the first broadcast message, the first terminal device deletes 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 for the first terminal device. For example, the first terminal device may delete measurement information corresponding to the second terminal device as follows: when there is no unicast connection between the first terminal device and the second terminal device, the first terminal device may delete measurement information corresponding to the second terminal device from the measurement result. If the second broadcast message is not received within a first period after receiving the first broadcast message, it may be determined that the second terminal device is not suitable to be a relay device for 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 the measurement result may include measurement information of an appropriate 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 as follows: if 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 reports the measurement result to the first network device.

[0272] 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 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 instruct 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 a unicast connection exists between a first terminal device and a second terminal device, and no data transmission is performed 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 may use the first indication information to trigger the second terminal device to send a first message, so that data transmission is performed between the first terminal device and the second terminal device. In this way, 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, and can accurately determine whether the second terminal is suitable to continue providing relay service 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 a first threshold, the first terminal device determines that the second terminal device is no longer suitable to provide relay service to the first terminal device, and the first terminal device can report this to the first network device, so that the first terminal device can switch to an appropriate 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 service 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 a 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 can 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, the 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, where the first time point is the time point when the second terminal device sends the first broadcast message, and the first time point can also be understood as the time point when 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 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 will change based on the comparison result between 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 will change. 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 will change. 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 will not change.

[0286] In this 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 first cell information from the first broadcast message, the first terminal device may determine serving cell information of the second terminal device before the first time point based on measurement information corresponding to the second terminal device, and then compare the serving cell information of the first cell information with 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, and 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 implementation, sending the second message to the first network device may be as follows: when the measurement variables of the first terminal device include 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 variables of the first terminal device include a measurement inlet corresponding to the second terminal device, it indicates that the first terminal device has reported measurement information corresponding to the second terminal device to the first network device before the first time point. The measurement information includes serving cell information of the second terminal device before the first time point. Therefore, when it is determined that the serving cell of the second terminal device changes, 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 variables of the first terminal device do 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 updates the serving cell information of the second terminal device in a timely manner, and can 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 measurement information corresponding to the second terminal device, for example, including measurement results 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 the 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 timely update the serving cell information of the second terminal device.

[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. If 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, the current serving cell of the second terminal device is determined to be 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 in which 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 allowed 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 allowed 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, the second message ensures that the first network device can make an appropriate decision to avoid a situation in which 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, the 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 for the first terminal device. Therefore, the first terminal device may trigger an exit condition of a measurement reporting event corresponding to the second terminal device and delete the measurement inlet corresponding to the second terminal device from the measurement variables. For example, when the measurement reporting event corresponding to the second terminal device triggers a measurement report, the measurement report corresponding to the measurement reporting 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. Therefore, the first terminal device deletes measurement information corresponding to the second terminal device. Optionally, the blocked cell list (block list) may alternatively be based on a pre-configuration or 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 measurement information corresponding to the second terminal device from the measurement results of the first terminal device to ensure that the reported measurement results include the measurement information of the appropriate terminal device. In addition, the memory space occupied by the measurement results can be saved, and the resources required when the first terminal device reports the measurement results 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 here.

[0309] 1902: The first network device sends a third message. In response, the first terminal device receives a third message, which includes second cell information of the second terminal device and 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, or may be generated by the first network device based on measurement results reported by the first terminal device. For example, the first terminal device may measure 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 satisfies 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 for 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] The first terminal device may perform step 1901 before step 1902, but may not perform step 1902. 1 It may be understood that step 1901 and step 1902 may be performed simultaneously, or step 1902 may be performed before step 1901. This is not a limitation 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 re-establishing 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 an 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 a security policy not aligned, a protocol error, or an unspecified reason. It should be understood that the rejection reasons are merely examples. The rejection reasons in this embodiment of the present application may further include other reasons. For example, the rejection reasons may further include new reasons defined based on application scenarios. Therefore, the rejection reasons listed above should not be understood as limiting the implementation of the present application.

[0317] In this embodiment of the present application, when receiving a handover command sent by a first network device and the discovery information of a 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, so as 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 the 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 can communicate with the second network device through a Uu interface. The second signal quality can be Uu-RSRP, that is, the signal quality of the second terminal device on the 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 transmitted 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 transmitted data or reference signal. When data or a reference signal is not transmitted 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 satisfies a threshold condition, the second terminal device may provide the relay service, and the second terminal device may periodically broadcast a discovery message. The discovery message indicates that the terminal device can provide the 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 second indication information.

[0324] 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 will not provide a relay service. For example, when the second signal quality does not satisfy the threshold condition, the second terminal device determines not to provide a relay service and sends second indication information. After receiving the second indication information, the first terminal device determines that the second terminal device will not provide a relay service. Therefore, it may be determined that the second terminal device is not suitable to serve as a relay device for the first terminal device. The second signal quality is the signal quality between the second terminal device and a 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 a second threshold or when the second signal quality is greater than a 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 satisfies the condition for sending a discovery message and periodically broadcasts the discovery message to its neighbors. For example, when the signal quality between the second terminal device and the second network device satisfies 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 (as indicated by the thick arrows in FIG. 16). At time T4, the second terminal device no longer satisfies the condition for sending a discovery message, and the second terminal device may send the aforementioned second indication information (as indicated by the thin arrows 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 broadcast the second indication information to indicate to surrounding terminal devices that the second terminal device does not provide a relay service. For example, the second indication information may be included in a discovery message broadcast by the second terminal device, and the discovery message may carry 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 for 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 PC5 signaling, a PC5-RRC message, or a sidelink medium access control message. request Media access control l The MAC address may be in one of the following forms:

[0329] In an implementation, a unicast connection exists 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 lower than a second threshold or higher than a third threshold, the second terminal device is no longer suitable for providing the 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, the first terminal device receives the first broadcast message.

[0333] It can be understood that the specific implementation of step 2101 refers to the relevant description of step 1501 in Figure 15A, and 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, which 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 ends of the multiple broadcast messages based on the identifiers carried in the multiple broadcast messages. The first terminal device may determine that 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 may be a discovery message broadcast by the second terminal device, and the second terminal device may periodically send the discovery message, which 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 discovery messages sent by multiple terminal devices and determine the transmitting end of the discovery message based on the source L2 ID carried in the discovery message. Therefore, for a discovery message sent by the second terminal device after the source L2 ID has been changed, the first terminal device may consider the discovery message not to be from the second terminal device. Specifically, the first terminal device may measure the second terminal device as a new measurement object after the source L2 ID has been changed.

[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 performs a cell change, the second terminal device is regarded as a new terminal device, that is, 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 the 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 Figure 18A. The details will not be described again here.

[0342] In a possible implementation, the communication method shown in FIG. 21 may include step 2104 and step 2105.

[0343] 2104: The second terminal device measures a second signal quality, which is the signal quality between the second terminal device and the 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 Figure 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] It can be understood that the specific implementation of step 2106 refers to the relevant description of step 1502 in Figure 15A, and 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 the following several implementations.

[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 Figure 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 Figure 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, and 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 implementations of step 2107 and step 2108, it may be understood that reference is made to the relevant descriptions 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 action. 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 re-establishing 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 a handover command sent by a first network device and the discovery information of a 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 to avoid wasting resources in subsequent switching operations.

[0363] In some implementations, a first terminal device may communicate with a network device through multiple serving relay terminals. The first terminal device may measure measurement results of the serving relay terminal and surrounding relay terminals based on discovery messages sent by the serving relay terminal and surrounding relay terminals. The first terminal device may release or add a relay terminal based on the measurement results of the serving relay terminal or surrounding relay terminals. For example, in a multipath relay communication scenario, the first terminal device may communicate with the serving relay terminal and the network device through a 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 lower than a preset threshold or when the first terminal device cannot receive a 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. The first network device may then indicate 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, after the first terminal device detects that the neighboring relay terminal has stopped sending discovery messages, it may delete measurement information corresponding to the neighboring relay terminal. For example, the first terminal device may delete measurement entries 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 for 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 for the neighboring relay terminal, the first terminal device may delete measurement information corresponding to the neighboring relay terminal from the measurement results, so that the measurement results of the first terminal device include 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 for the first terminal device, and more accurately determine whether the second terminal device is suitable to serve as a relay device for the first terminal device. Optionally, when receiving 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 for 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 for 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 will change 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 one embodiment of the present application is described below.

[0367] In the present application, the communication device is divided into functional modules based on the above-mentioned 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 functional module. It should be noted that the module division in the present application is an example and is merely a logical functional division. In actual implementation, other division methods may be used. Below, the communication device in the embodiment of the present 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 Figure 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 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 less than a first threshold.

[0375] Optionally, the transceiver unit 2202 is further configured to receive second indication information from the 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 particularly 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 a 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 that reference is made 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 herein.

[0384] It may be understood that the specific descriptions of the transceiver unit and the processing unit described in this embodiment of the present application are merely examples. For the specific functions, steps, etc. of the transceiver unit and the processing unit, please refer to the aforementioned method embodiments. The details will not be described again herein. 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 step 1502, step 1503, step 1505, step 1702, step 1802, step 1804, step 1805, step 1903, step 2102, step 2104, and step 2106.

[0385] 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 the second indication information.

[0388] For specific descriptions of 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. The details will not be described again herein.

[0389] It can be understood that the specific descriptions of the transceiver unit and the processing unit described in this embodiment of the present application are merely examples. 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 herein. 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 embodiments of the present application have been described above. 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 functions of the first terminal device in FIG. 22 or any form of product having the functions of the second terminal device in FIG. 22 falls within the scope of protection of the embodiments 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 embodiments of the present application are not limited thereto.

[0391] 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 Figure 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 communications 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 may signal The transceiver 2310 is configured to measure the quality of the signal. The transceiver 2310 is configured to send a second indication.

[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 illustrated in Figures 15A, 15B, 15C, 17, 18A, 18B, 19, and 20. The details will not be described again herein.

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

[0398] In various implementations of the communication device shown in Figure 23, the transceiver may include a receiver and a transmitter, where the receiver is configured to perform receiving functions (or operations) and the transmitter is configured to perform transmitting functions (or operations). 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 electrical, mechanical, or other form of indirect coupling or communication connection between devices, units, or modules, used for information exchange between the devices, units, or modules. The processor 2320 may cooperate with the memory 2330. The processor 2320 may execute 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 other components is merely an example for illustration and is not limited thereto. The bus may be categorized 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 imply 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 can 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 connection with the embodiments of the present application may be implemented directly 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, memory may include, but is not limited to, non-volatile memory such as a hard disk drive (HDD) or a solid-state drive (SSD), random access memory (RAM), erasable programmable read-only memory (EPROM), read-only memory (ROM), portable read-only memory (Compact Disc Read-Only Memory (CD-ROM)), etc. 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). Memory in this embodiment of the present application may alternatively be a circuit or any other device that can implement a storage function and that is configured to store program instructions and / or data.

[0403] The processor 2320 is primarily configured to process communication protocols and communication data, control the entire communication device, execute software programs, and process data from the software programs. The memory 2330 is primarily configured to store software programs and data. The transceiver 2310 may include control circuitry and an antenna. The control circuitry is primarily configured to convert between baseband signals and radio frequency signals and process radio frequency signals. The antenna is primarily configured to transmit and receive radio frequency signals in the form of electromagnetic waves. An input / output device, such as a touchscreen, display, or keyboard, is primarily 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, the processor 2320 performs baseband processing on the data to be sent, and then 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 the antenna, converts the high-frequency signal to a baseband signal, and outputs the baseband signal to the processor 2320. The processor 2320 converts the baseband signal to data and processes the data.

[0405] In another implementation, the radio frequency circuitry and antenna may be deployed independently from the processor that performs 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-described methods implemented by the processor and transceiver are merely examples. Please refer to the above-described methods for 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. An 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 processing unit 2201 may be implemented using the logic circuit 2401, and the transceiver unit 2202 may be implemented using the 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 illustrates an example in which the communication device is a chip. The chip includes the logic circuit 2401 and the interface 2402.

[0408] In this embodiment of the present application, the logic circuit and the interface may further be 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 communications apparatus is configured to perform the method, function, or step 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 as follows: 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 the 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 methods provided in the embodiments of the present application in the form of hardware, or may implement the methods provided in the embodiments 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 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. The details will not be described again herein.

[0413] For specific implementation of the embodiment shown in Figure 24, please refer to the aforementioned embodiment, and the details will not be described again here.

[0414] An embodiment of the present application further provides a wireless communication system, including a first terminal device and a second terminal device, wherein the first terminal device and the second terminal device can be configured to implement a method according to any one of the above-described 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 actions and / or processes performed by the second terminal device in the methods provided herein.

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

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

[0419] The present application further provides a computer program product, which includes 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, which includes 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 systems, devices, and methods may be implemented in other manners. For example, the described device embodiments are merely examples. For example, the unit division is merely a logical functional division, and other divisions may be used in actual implementation. For example, multiple units or components may be combined or integrated to form 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, mechanical, or other forms of connection.

[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, and may be located in one location or distributed across multiple network units. Some or all of the units may be selected based on 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 unit 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 a portion contributing to the prior art, or all or a portion 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 several instructions for instructing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or a portion 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 can be 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. A communication method executed by a first terminal device, comprising: receiving a first broadcast message sent by a second terminal device, the first broadcast message comprising first cell information of the second terminal device; receiving a third message from a 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 a relay device of the first terminal device to the second terminal device; determining that the switching has failed when the first cell information does not match the second cell information; A method for providing the above.

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

3. determining that the second terminal device is not a relay device for 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 receiving the first broadcast message. The method of claim 1.

4. 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 the measurement information corresponding to the second terminal device; Further equipped The method of claim 3.

5. 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 to reselect a relay device; reporting the measurement results to the first network device; Further comprising at least one of The method of claim 3.

6. 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 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 the first message; determining the first signal quality based on the first message; Furthermore, The step of determining that the second terminal device is not a relay device of the first terminal device comprises: determining 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; Equipped with The method of claim 3.

7. The step of determining that the second terminal device is not a relay device of the first terminal device comprises: determining, upon receiving second indication information from the second terminal device, that the second terminal device is not the relay device of the first terminal device, the second indication information indicating that the second terminal device does not provide a relay service. The method of claim 3.

8. 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 a signal quality between the second terminal device and a second network device. The method of claim 7.

9. The first broadcast message comprises a first identifier, the first identifier identifying the second terminal device, and the first identifier being generated when the second terminal device accesses a serving cell of the second terminal device. The method of claim 3.

10. After the step of receiving a first broadcast message sent by a second terminal device, the method further comprises: determining whether a serving cell of the second terminal device changes based on the first cell information; sending 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; Further equipped The method of claim 3.

11. Prior to the step of sending a second message to the first network device, the method further comprises: determining whether a current serving cell of the second terminal device is an allowed cell based on the first cell information; Furthermore, The step of sending a second message 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. Equipped with The method of claim 10.

12. The method comprises: deleting measurement information corresponding to the second terminal device when the current serving cell of the second terminal device is a blocked cell; Further equipped The method of claim 11.

13. Apparatus configured to perform the method of any one of claims 1 to 12.

14. A computer readable storage medium comprising instructions that, when executed by a computing device, cause the computing device to perform the method of any one of claims 1 to 12.

15. A computer program comprising instructions which, when executed by a computing device, cause the computing device to perform the method of any one of claims 1 to 12.

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