Communication methods and communication apparatus

By controlling the terminal discovery process through the generation and sending of request messages, the problem of improper discovery control in MANET relay scenarios is solved, achieving resource saving and signaling optimization.

WO2026026258A1PCT designated stage Publication Date: 2026-02-05HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/100724
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-30
Filing Date
2025-06-12
Publication Date
2026-02-05

AI Technical Summary

Technical Problem

In multi-hop U2U relay scenarios based on MANET, it is difficult for a terminal to control whether other terminals can detect it, resulting in improper control of the detection process, waste of resources, and increased signaling overhead.

Method used

The relay terminal controls the terminal discovery process by generating and sending request messages to indicate whether to allow or disallow terminal discovery, or to limit the number of hops. The relay terminal then determines whether to allow other terminals to discover the first terminal based on the instructions.

Benefits of technology

This implements restrictions on terminal discovery, reduces resource waste and signaling overhead, and improves the efficiency of the discovery process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025100724_05022026_PF_FP_ABST
    Figure CN2025100724_05022026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the field of communications. Provided are communication methods and a communication apparatus. A communication method comprises: a relay terminal receiving a first request message from a first terminal, wherein the first request message is used for requesting the establishment of a first direct communication connection, the first direct communication connection is used for the first terminal to communicate with a first relay, the first request message comprises: user information of the first terminal, a first relay service code (RSC), and first information associated with the first RSC, and the first information indicates terminals that are allowed or not allowed to discover the first terminal; and on the basis of the first request message, the relay terminal sending to a second relay second information associated with the first RSC, wherein the second information indicates the terminals that are allowed or not allowed to discover the first terminal. On the basis of the solution, a relay terminal can determine, on the basis of first information or second information and when a second terminal requests the discovery of a first terminal, whether to allow the second terminal to discover the first terminal, thereby achieving terminal discovery restrictions.
Need to check novelty before this filing date? Find Prior Art

Description

Communication methods and communication devices

[0001] This application claims priority to Chinese Patent Application No. 202411035484.3, filed with the State Intellectual Property Office of China on July 30, 2024, entitled "Communication Method and Communication Device", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of communications, and more specifically, to a communication method and a communication device. Background Technology

[0003] Proximity service (ProSe) communication allows direct communication between terminals, enabling terminals to communicate or access the network through other terminals even in the absence of wireless network coverage. Specifically, after terminals discover each other, they can establish a direct communication connection, and then communicate data via Layer 2 or Layer 3 methods. When two terminals requiring direct communication cannot establish a direct connection, one or more terminals can act as relays to forward communication signals or data, thereby indirectly establishing a direct communication connection between the two terminals.

[0004] With the development of ProSe technology, the introduction of technologies from the mobile ad hoc network (MANET) field, which supports multi-hop relay communication between user equipment (UE) and UE (UE-to-UE, U2U) at the Internet Protocol (IP) layer, is one of the current trends. In converged solutions, since the discovery process terminates at the relay terminal, it is difficult for the terminal to control whether other terminals can discover it. Summary of the Invention

[0005] This application provides a communication method and a communication device, which aims to solve the problem of terminal discovery limitations in multi-hop U2U relay scenarios based on MANET.

[0006] In a first aspect, a communication method is provided, which can be executed by a first terminal, or by a component of the first terminal (such as a processor, chip, or chip system), or by a logic module or software capable of implementing all or part of the functions of the first terminal.

[0007] The method includes: generating a first request message; and sending the first request message to a relay terminal. The first request message requests the establishment of a first direct communication connection, which is used for communication between the first terminal and the relay terminal. The first request message includes user information of the first terminal, a first relay service code (RSC), and first information associated with the first RSC. The first information indicates whether or not terminals that can discover the first terminal are allowed to do so, or, the first information indicates that only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal.

[0008] In this embodiment, the relay terminal is either the first relay or the second relay described below. It should be understood that both the first relay and the second relay are U2U relays.

[0009] According to the communication method provided in this application, the first terminal can indicate to the relay terminal during the process of establishing a direct communication connection that terminals that are allowed / not allowed to discover the first terminal are allowed to discover the first terminal, or indicate that only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal. Based on this indication, the relay terminal or other relay terminals located in the same MANET network as the relay terminal can determine whether to allow other terminals (e.g., the second terminal) to discover the first terminal when the other terminal requests to discover the first terminal, thereby realizing the terminal discovery restriction.

[0010] In one possible implementation, the first information is a list of terminals allowed to discover the first terminal; or, the first information is a list of terminals not allowed to discover the first terminal; or, the first information indicates that no terminal is allowed to discover the first terminal; or, the first information indicates that any terminal is allowed to discover the first terminal. For example, the terminal list may be a list of user information for the terminals.

[0011] In one possible implementation, the maximum number of hops is determined based on a first RSC, or the first information indicates the maximum number of hops.

[0012] In one possible implementation, the first request message also includes a first group identifier, which is the group identifier of the group to which the first terminal belongs. Based on this scheme, terminal discovery can be performed based on the group identifier.

[0013] Secondly, a communication method is provided, which can be executed by a first relay, or by a component of the first relay (such as a processor, chip, or chip system), or by a logic module or software capable of implementing all or part of the functions of the first relay.

[0014] The method includes: receiving a first request message from a first terminal, the first request message being used to request the establishment of a first direct communication connection, the first direct communication connection being used for the first terminal to communicate with a first relay, the first request message including: user information of the first terminal, a first relay service code (RSC), and first information associated with the first RSC, the first information indicating whether or not terminals of the first terminal are allowed to be discovered, or the first information indicating that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal; and sending second information associated with the first RSC to a second relay according to the first request message, the second information indicating whether or not terminals of the first terminal are allowed to be discovered, or the second information indicating that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal.

[0015] It should be understood that if the first information indicates whether or not the discovery of a terminal of the first terminal is permitted or prohibited, the second information indicates whether or not the discovery of a terminal of the first terminal is permitted or prohibited. Alternatively, if the first information indicates that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are permitted to discover the first terminal, the second information indicates that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are permitted to discover the first terminal. The first and second information may be the same or different.

[0016] In addition, according to the first request message, the first relay can also send the user information of the first terminal to the second relay.

[0017] According to the communication method provided in this application, a first terminal can, during the process of establishing a direct communication connection, instruct a first relay to allow / disallow the discovery of terminals of the first terminal, or to indicate that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal. The first relay can then instruct a second relay, based on this instruction, to allow / disallow the discovery of terminals of the first terminal, or to indicate that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal. Therefore, the second relay can determine whether to allow the second terminal to discover the first terminal when the second terminal requests to do so, thus implementing terminal discovery restrictions.

[0018] In one possible implementation, the first information is a list of terminals allowed to discover the first terminal; or, the first information is a list of terminals not allowed to discover the first terminal; or, the first information indicates that no terminal is allowed to discover the first terminal; or, the first information indicates that any terminal is allowed to discover the first terminal. For example, the terminal list may be a list of user information for the terminals.

[0019] In one possible implementation, the second information is a list of terminals allowed to discover the first terminal; or, the second information is a list of terminals not allowed to discover the first terminal; or, the second information indicates that no terminal is allowed to discover the first terminal; or, the second information indicates that any terminal is allowed to discover the first terminal. For example, the terminal list may be a list of user information for the terminals.

[0020] The second information and the first information can be different. For example, the first information indicates the list of terminals that are allowed to be discovered, while the second information can indicate the list of terminals that are not allowed to be discovered.

[0021] In one possible implementation, the method further includes: sending a first RSC to a second relay according to the first request message.

[0022] In one possible implementation, the maximum number of hops is determined based on a first RSC, or the first information indicates the maximum number of hops.

[0023] In one possible implementation, the first request message also includes a first group identifier, which is the group identifier of the group to which the first terminal belongs. Based on this scheme, terminal discovery can be performed based on the group identifier.

[0024] In one possible implementation, the method further includes: sending a first set of identifiers to a second relay according to a first request message.

[0025] Thirdly, a communication method is provided, which can be executed by a second relay, or by a component of the second relay (such as a processor, chip, or chip system), or by a logic module or software capable of implementing all or part of the functions of the second relay.

[0026] The method includes: receiving a second request message from a second terminal, the second request message including user information of a first terminal, the second request message being used to discover the first terminal; if it is determined that the second terminal is not allowed to discover the first terminal, sending a rejection message to the second terminal, the rejection message indicating rejection of discovering the first terminal; or, if it is determined that the second terminal is allowed to discover the first terminal, sending an acceptance message to the second terminal, the acceptance message indicating permission to discover the first terminal. Whether the second terminal is allowed to discover the first terminal is determined based on the following information: the user information of the second terminal corresponding to the second request message, the first relay service code (RSC) corresponding to the second request message, the user information of the first terminal, and second information associated with the first RSC, the second information indicating whether or not terminals are allowed to discover the first terminal, or the second information indicating that only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal. Alternatively, whether a second terminal is allowed to discover a first terminal is determined based on the following information: the user information of the second terminal corresponding to the second request message, the first relay service code (RSC) corresponding to the second request message, the user information of the first terminal, and first information associated with the first RSC, wherein the first information indicates whether a terminal is allowed or not allowed to discover the first terminal, or the first information indicates that only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal.

[0027] According to the communication method provided in this application, a first terminal can, during the process of establishing a direct communication connection, instruct a second relay or the first relay to allow / disallow terminals from discovering the first terminal, or to indicate that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal. The second relay can then determine whether to allow the second terminal to discover the first terminal based on this instruction, thus implementing terminal discovery restrictions. Alternatively, the first relay can, based on this instruction, instruct a second relay to allow / disallow terminals from discovering the first terminal, or to indicate that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal. Therefore, the second relay can determine whether to allow the second terminal to discover the first terminal based on this instruction, thus implementing terminal discovery restrictions.

[0028] In one possible implementation, the rejection message also includes a reason value indicating that the reason for rejecting the discovery of the first terminal is that discovery is not allowed.

[0029] Without this reason value, the second terminal might assume that it cannot discover the first terminal due to hop count limitations or other reasons. In this case, the second terminal might perform some extra but unnecessary actions, such as increasing the hop count and then re-executing the process to discover the first terminal. However, with this reason value, the second terminal can determine that the reason for refusing to discover the first terminal is "discovery is not allowed." Therefore, the second terminal can avoid executing the process to discover the first terminal within the preset time, thus avoiding extra but unnecessary actions and saving signaling and power consumption overhead.

[0030] In one possible implementation, the rejection message also includes a reason value indicating that the reason for rejecting the discovery of the first terminal is a maximum hop count limitation. Based on this scheme, the second terminal can increase the hop count and then re-execute the process of discovering the first terminal without having to wait a preset time.

[0031] In one possible implementation, before receiving the second request message from the second terminal, the method further includes: receiving second information from the first relay; or, receiving first information from the first terminal. Based on this scheme, the second relay can obtain the first information.

[0032] In one possible implementation, the method further includes: obtaining user information of the second terminal and / or the first RSC.

[0033] For example, the second request message may include the user information of the second terminal and / or the first RSC. Alternatively, if the second request message does not include the user information of the second terminal and / or the first RSC, the second terminal can obtain the user information and / or the first RSC from its own stored information.

[0034] In one possible implementation, receiving a second request message from a second terminal includes: receiving the second request message from a second direct communication connection via a ProSe layer of proximity services; wherein obtaining user information and / or a first RSC of the second terminal includes: the ProSe layer obtaining user information and / or a first RSC of the second terminal from information associated with the second direct communication connection based on the second request message, wherein the information associated with the second direct communication connection includes user information and / or a first RSC of the second terminal.

[0035] Based on this scheme, the user information of the second terminal and / or the first RSC can be omitted from the second request message, thereby saving signaling overhead.

[0036] In one possible implementation, obtaining the user information of the second terminal includes: obtaining the user information of the second terminal based on the address of the second terminal corresponding to the second request message. For example, the address could be an Internet Protocol (IP) address.

[0037] In one possible implementation, the first information or the second information is a list of terminals that are allowed to discover the first terminal; or, the first information or the second information is a list of terminals that are not allowed to discover the first terminal; or, the first information or the second information indicates that no terminal is allowed to discover the first terminal; or, the first information or the second information indicates that any terminal is allowed to discover the first terminal.

[0038] Fourthly, a communication method is provided, which can be executed by a second terminal, or by a component of the second terminal (such as a processor, chip, or chip system), or by a logic module or software capable of implementing all or part of the functions of the second terminal.

[0039] The method includes: sending a second request message to a second relay, the second request message including user information of the first terminal, the second request message being used to discover the first terminal; and receiving a rejection message from the second relay, the rejection message indicating rejection of discovering the first terminal.

[0040] According to the communication method provided in this application, the second relay can determine whether to allow the second terminal to discover the first terminal when the second terminal requests to discover the first terminal, thereby implementing terminal discovery restrictions.

[0041] In one possible implementation, the rejection message also includes a reason value indicating that the reason for rejecting the discovery of the first terminal is that discovery is not allowed.

[0042] Without this reason value, the second terminal might assume that it cannot discover the first terminal due to hop count limitations or other reasons. In this case, the second terminal might perform some extra but unnecessary actions, such as increasing the hop count and then re-executing the process to discover the first terminal. However, with this reason value, the second terminal can determine that the reason for refusing to discover the first terminal is "discovery is not allowed." Therefore, the second terminal can avoid executing the process to discover the first terminal within the preset time, thus avoiding extra but unnecessary actions and saving signaling and power consumption overhead.

[0043] In one possible implementation, the rejection message also includes a reason value indicating that the reason for rejecting the discovery of the first group of terminals is the maximum hop count limit. Based on this scheme, the second terminal can increase the hop count and then re-execute the process of discovering the first terminal without having to wait a preset time.

[0044] In one possible implementation, the second request message may also include the first relay service code (RSC) corresponding to the second request message and / or the user information of the second terminal corresponding to the second request message.

[0045] In one possible implementation, the method further includes: not initiating a discovery process for the first terminal for a preset time period. This can save on signaling and power consumption overhead.

[0046] Fifthly, a communication method is provided, which can be executed by a second relay, or by a component of the second relay (e.g., a processor, a chip, or a chip system), or by a logic module or software capable of implementing all or part of the functions of the second relay.

[0047] The method includes: receiving a second request message from a second terminal, the second request message including third information indicating a first group of terminals, the second request message being used to discover the first group of terminals; if it is determined that the second terminal is not allowed to discover the first group of terminals, sending a rejection message to the second terminal, the rejection message indicating that the discovery of the first group of terminals is refused; or, if it is determined that the second terminal is allowed to discover at least one terminal in the first group of terminals, sending an acceptance message to the second terminal, the acceptance message indicating that the discovery of the at least one terminal is allowed. Whether a second terminal is allowed to discover the first terminal in the first group of terminals is determined based on the following information: the user information of the second terminal corresponding to the second request message, the first relay service code (RSC) corresponding to the second request message, the user information of the first terminal, second information associated with the first RSC, and third information. The second information indicates whether a terminal is allowed or not allowed to discover the first terminal, or the second information indicates that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal. Alternatively, whether a second terminal is allowed to discover the first terminal in the first group of terminals is determined based on the following information: the user information of the second terminal corresponding to the second request message, the first relay service code (RSC) corresponding to the second request message, the user information of the first terminal, the first information associated with the first RSC, and third information. The first information indicates whether a terminal is allowed or not allowed to discover the first terminal, or the first information indicates that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal. The first terminal can be any terminal in the first group of terminals.

[0048] According to the communication method provided in this application, a first terminal can, during the process of establishing a direct communication connection, indicate to a second relay or a first relay whether or not it is allowed to discover terminals of the first terminal, or indicate that only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal, along with a group identifier corresponding to the above indication. The second relay can determine whether to allow the second terminal to discover the first terminal in that group of terminals when the second terminal requests to discover the group of terminals corresponding to the group identifier, based on the indication and the corresponding group identifier, thus implementing terminal discovery restrictions. Alternatively, the first relay can indicate to the second relay whether or not it is allowed to discover terminals of the first terminal, or indicate that only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal, along with the corresponding group identifier. Therefore, the second relay can determine whether to allow the second terminal to discover the first terminal in that group of terminals when the second terminal requests to discover the group of terminals corresponding to the group identifier, based on the indication and the group identifier, thus implementing terminal discovery restrictions.

[0049] It should be understood that the group of terminals corresponding to this set of identifiers may include at least one terminal, including a first terminal. Assuming that the at least one first terminal also includes a third terminal, the third terminal may, during the process of establishing a direct communication connection with the relay, indicate to the relay which terminals are allowed / disallowed from discovering the third terminal, or indicate that only terminals whose hop count corresponding to the path to the second terminal is less than or equal to the maximum hop count are allowed to discover the third terminal, along with the set of identifiers. Furthermore, the second relay can, based on the aforementioned indications and the set of identifiers, determine whether to allow the second terminal to discover the third terminal within that group of terminals when the second terminal requests to discover the group of terminals corresponding to this set of identifiers, thereby implementing terminal discovery restrictions.

[0050] In one possible implementation, the third information is either the first RSC or the first group identifier, the terminal supporting the first RSC is the first group terminal, and the first group identifier is the group identifier of the first group terminal.

[0051] In one possible implementation, the received message includes user information and an address for at least one terminal. For example, the address could be an IP address.

[0052] In one possible implementation, the rejection message also includes a reason value, which indicates that the reason for rejecting the discovery of the first group of terminals is that discovery is not allowed or that the reason for rejecting the discovery of the first terminal is a maximum hop limit.

[0053] Based on this reason value, the second terminal may not execute the process of discovering the first terminal within the preset time, thus avoiding some extra but unnecessary actions and saving signaling, power consumption and other overhead.

[0054] In one possible implementation, before receiving the second request message from the second terminal, the method further includes: receiving second information from the first relay; or, receiving first information from the first terminal.

[0055] In one possible implementation, the method further includes: obtaining user information of the second terminal and / or the first RSC.

[0056] For example, the second request message may include the user information of the second terminal and / or the first RSC. Alternatively, if the second request message does not include the user information of the second terminal and / or the first RSC, the second terminal can obtain the user information and / or the first RSC from its own stored information.

[0057] In one possible implementation, receiving a second request message from a second terminal includes: receiving the second request message from a second direct communication connection via the ProSe layer of the proximity service; wherein obtaining the user information and / or the first RSC of the second terminal includes: the ProSe layer obtaining the user information and / or the first RSC of the second terminal from the information associated with the second direct communication connection according to the second request message, wherein the information associated with the second direct communication connection includes the user information and / or the first RSC of the second terminal.

[0058] Based on this scheme, the user information of the second terminal and / or the first RSC can be omitted from the second request message, thereby saving signaling overhead.

[0059] In one possible implementation, obtaining the user information of the second terminal includes: obtaining the user information of the second terminal based on the address of the second terminal corresponding to the second request message. For example, the address could be an IP address.

[0060] In one possible implementation, the first information or the second information is a list of terminals that are allowed to discover the first terminal; or, the first information or the second information is a list of terminals that are not allowed to discover the first terminal; or, the first information or the second information indicates that no terminal is allowed to discover the first terminal; or, the first information or the second information indicates that any terminal is allowed to discover the first terminal; or, the first information or the second information is a group identifier.

[0061] Sixthly, a communication method is provided, which can be executed by a second terminal, or by a component of the second terminal (such as a processor, chip, or chip system), or by a logic module or software capable of implementing all or part of the functions of the second terminal.

[0062] The method includes: sending a second request message to a second relay, the second request message including third information indicating a first group of terminals, the second request message being used to send the first group of terminals; receiving a rejection message from the second relay, the rejection message indicating rejection of discovering the first group of terminals, or receiving an acceptance message from the second relay, the acceptance message indicating permission to discover at least one terminal in the first group of terminals.

[0063] According to the communication method provided in this application, the second relay can determine whether to allow the second terminal to discover the first group of terminals when the second terminal requests to discover the first group of terminals, thereby implementing terminal discovery restrictions.

[0064] In one possible implementation, the third information is the first relay service code (RSC) or the first group identifier corresponding to the second request message. The terminal that supports the first RSC is the first group terminal, and the first group identifier is the group identifier of the first group terminal.

[0065] In one possible implementation, the received message includes user information and an address for at least one terminal. For example, the address could be an IP address.

[0066] In one possible implementation, the rejection message also includes a reason value, which indicates that the reason for rejecting the discovery of the first group of terminals is that discovery is not allowed or that the reason for rejecting the discovery of the first terminal is a maximum hop limit.

[0067] Based on this reason value, the second terminal may not execute the process of discovering the first terminal within the preset time, thus avoiding some extra but unnecessary actions and saving signaling, power consumption and other overhead.

[0068] In one possible implementation, the second request message may also include the first relay service code (RSC) corresponding to the second request message and / or the user information of the second terminal corresponding to the second request message.

[0069] In one possible implementation, the method further includes: not initiating a discovery process for at least one terminal for a preset time period.

[0070] In a seventh aspect, a communication method is provided, which can be executed by a second relay, or by a component of the second relay (e.g., a processor, a chip, or a chip system), or by a logic module or software capable of implementing all or part of the functions of the second relay.

[0071] The method includes: receiving a discovery message from a second terminal, the discovery message including a first RSC, user information of the second terminal and user information of the first terminal, the discovery message being used by the second terminal to discover the first terminal; if it is determined, based on the discovery message and the first information, that the second terminal is allowed to discover the first terminal, or if it is determined, based on the discovery message and the second information, that the second terminal is allowed to discover the first terminal, sending a discovery response message to the second terminal, the discovery response message indicating that the second terminal is allowed to discover the first terminal, the first information and the second information both indicating terminals that are allowed or not allowed to discover the first terminal, or the first information and the second information both indicating that only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal; and establishing a direct communication connection with the second terminal.

[0072] According to the communication method provided in this application, the second terminal can first discover the first terminal. Since the first terminal is discovered before establishing a direct communication connection with the relay terminal, resource waste caused by establishing a direct communication connection with a relay terminal that cannot discover the first terminal can be avoided. Furthermore, during the process of the second terminal discovering the first terminal, the second relay can determine whether to allow the second terminal to discover the first terminal based on first information or second information, thereby implementing terminal discovery restrictions.

[0073] In one possible implementation, the discovery response message includes a first RSC, user information of the first terminal, and the address of the first terminal.

[0074] Eighthly, a communication method is provided, which can be executed by a second terminal, or by a component of the second terminal (such as a processor, chip, or chip system), or by a logic module or software capable of implementing all or part of the functions of the second terminal.

[0075] The method includes: broadcasting a discovery message, the discovery message including a first RSC, user information of the second terminal and user information of the first terminal, the discovery message being used by the second terminal to discover the first terminal; receiving a discovery response message from a relay terminal, the discovery response message indicating permission for the second terminal to discover the first terminal, the discovery response message including a first RSC, user information of the first terminal and address of the first terminal; and establishing a direct communication connection with the relay terminal.

[0076] According to the communication method provided in this application, the second terminal can first discover the first terminal. Since the first terminal is discovered before establishing a direct communication connection with the relay terminal, resource waste caused by establishing a direct communication connection with a relay terminal that cannot discover the first terminal can be avoided. Furthermore, during the process of the second terminal discovering the first terminal, the second relay can determine whether to allow the second terminal to discover the first terminal based on first information or second information, thereby implementing terminal discovery restrictions.

[0077] Ninthly, this application provides a communication device. In one possible design, the communication device has the function of implementing any one of the above aspects or one of the above aspects. For example, the communication device includes a module, unit, or means corresponding to the operation involved in any one of the above aspects. The module, unit, or means can be implemented by software, or by hardware, or by a combination of software and hardware.

[0078] Tenthly, this application provides a communication device including an interface circuit and one or more processors. The one or more processors are coupled to a memory. The memory stores part or all of a computer program or instructions necessary for implementing any of the above-described aspects or the functions involved in that aspect. The one or more processors are executable to the computer program or instructions, which, when executed, cause the communication device to implement the methods in any possible design or implementation of any of the above-described aspects or that aspect. The interface circuit is used to implement communication functions within the communication device and / or communication functions between the communication device and other devices or components.

[0079] In one possible design, the processor is used to communicate with other devices or components through the interface circuit.

[0080] In one possible design, the communication device may also include the memory.

[0081] The aforementioned communication device may be a terminal, a communication module in a terminal, or a chip in a terminal that is responsible for communication functions, such as a modem chip (also known as a baseband chip), a system-on-chip (SoC) chip containing a modem module, or a system-in-package (SIP) chip.

[0082] In one aspect, this application provides a communication system including one or more of a first relay, a second relay, a first terminal, and a second terminal. The first relay, second relay, first terminal, and second terminal can respectively implement the methods described in the corresponding aspects above.

[0083] In a twelfth aspect, this application provides a computer-readable storage medium storing computer-readable instructions, wherein when a computer reads and executes the computer-readable instructions, the method in any of the above aspects or any possible implementations of the above aspects is performed.

[0084] In a thirteenth aspect, this application provides a computer program product in which, when a computer reads and executes the computer program product, the method in any of the above aspects or any possible implementation of the above aspects is performed.

[0085] In a fourteenth aspect, a communication device is provided, including a processor, wherein when the processor executes a program or instructions, a method of any of the foregoing aspects or any possible implementation thereof is performed.

[0086] In a fifteenth aspect, a chip is provided, including a processor for calling and running a computer program from memory, wherein the method of any of the foregoing aspects or any possible implementation of the foregoing aspects is executed. Attached Figure Description

[0087] Figure 1 is a schematic diagram of a direct communication method;

[0088] Figure 2 is a schematic diagram of a communication method based on U2U Relay;

[0089] Figure 3 is a schematic diagram of the discovery process of U2U Relay mode B;

[0090] Figure 4 is a schematic diagram of the discovery process of U2U Relay mode A;

[0091] Figure 5 is a schematic diagram of a multi-hop U2U Relay scenario based on MANET provided in an embodiment of this application;

[0092] Figures 6 to 10 are schematic flowcharts of the communication method provided in the embodiments of this application;

[0093] Figure 11 is a schematic diagram of another multi-hop U2U Relay scenario based on MANET provided in an embodiment of this application;

[0094] Figure 12 is a schematic flowchart of the communication method provided in an embodiment of this application;

[0095] Figure 13 is a schematic diagram of a communication device provided in an embodiment of this application;

[0096] Figure 14 is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Detailed Implementation

[0097] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0098] In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" in this application merely describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Additionally, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or the order of execution, and that the words "first" and "second" do not necessarily imply that they are different.

[0099] In the various method embodiments of this application, the order of the sequence numbers does not imply the order of execution. The execution order should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0100] It is understood that in this application, descriptions such as "under the circumstances," "if," "when," and "if..." can be used interchangeably. Furthermore, these descriptions all refer to the corresponding actions that will be taken under certain objective circumstances, and are not time-limited, nor do they require any judgment action during implementation, nor do they imply any other limitations.

[0101] It is understood that in this application, the information indicated by the instruction information / information is called the information to be instructed. In specific implementations, there are many ways to instruct the information to be instructed, such as, but not limited to, directly instructing the information to be instructed, such as using the instruction information / information as an index to the information to be instructed. It can also indirectly instruct the information to be instructed by instructing other information, where there is a correlation between the other information and the information to be instructed. It can also instruct only a part of the information to be instructed, while the other parts are known or pre-agreed upon. For example, the instruction of specific information can be achieved by using a pre-agreed (e.g., protocol-defined) arrangement of various pieces of information, thereby reducing instruction overhead to some extent.

[0102] It is understood that some optional features in the embodiments of this application can be implemented independently in certain scenarios without relying on other features, such as the current solution on which they are based, to solve the corresponding technical problems and achieve the corresponding effects. Alternatively, they can be combined with other features as needed in certain scenarios. Correspondingly, the apparatus given in the embodiments of this application can also implement these features or functions, which will not be elaborated here.

[0103] In this application, unless otherwise specified, the same or similar parts between the various embodiments can be referred to each other. In the various embodiments of this application, and in the various implementation methods / methods / implementations within each embodiment, unless otherwise specified or logically conflicting, the terminology and / or descriptions between different embodiments and between the various implementation methods / methods / implementations within each embodiment are consistent and can be mutually referenced. The technical features in different embodiments and the various implementation methods / methods / implementations within each embodiment can be combined according to their inherent logical relationships to form new embodiments, implementation methods, methods, or implementation approaches. The embodiments described below do not constitute a limitation on the scope of protection of this application.

[0104] The technical solutions provided in this application can be applied to various communication systems, such as: 5th generation (5G) or new radio (NR) systems, long term evolution (LTE) systems, LTE frequency division duplex (FDD) systems, LTE time division duplex (TDD) systems, and other mobile communication systems that may emerge in the future.

[0105] In this application embodiment, "terminal" refers to a device that provides voice and / or data connectivity to the user. A terminal can also be called user equipment (UE), mobile station (MS), mobile terminal (MT), etc. For example, a terminal can be a mobile phone, tablet computer, laptop computer, PDA, mobile internet device (MID), wearable device, virtual reality (VR) device, augmented reality (AR) device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical surgery, wireless terminal in smart grid, wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home, etc.

[0106] To facilitate understanding of the embodiments of this application, the concepts involved in the embodiments of this application will be introduced first.

[0107] 1. Direct communication

[0108] Proximity service (ProSe), also known as device-to-device (D2D) communication, allows direct communication between intermediaries without the need for forwarding through network devices (such as base stations).

[0109] For example, Figure 1 illustrates a direct communication method. Referring to Figure 1, the interface between terminal 11 and terminal 12 is called a near-field communications 5 (PC5) interface, and the connection (or link) between terminal 11 and terminal 12 used for direct communication can be called a direct communication connection. After terminal 11 and terminal 12 discover each other, they can establish a direct communication connection, and then data can be transmitted through this direct communication connection in a Layer 2 or Layer 3 manner.

[0110] In some embodiments, direct communication may be referred to as direct communication, PC5 communication, or sidelink (SL) communication, etc.

[0111] In some embodiments, the direct communication connection may also be referred to as a direct communication connection, PC5 connection, PC5 direct communication connection, PC5 direct communication connection, SL, or SL connection, etc.

[0112] It should be noted that the naming of the interfaces between terminals should not limit this application in any way, and this application does not preclude the possibility of using other names for the interfaces between terminals. That is, the interfaces between terminals may also use names other than PC5.

[0113] II. UE-to-UE (U2U) Relay

[0114] U2URelay can also be called terminal-to-terminal relay. ProSe not only supports direct communication between terminals, but also supports U2URelay technology. Specifically, when two terminals cannot establish a direct communication connection, one or more terminals can act as relays to forward communication signals or data between the two terminals, thereby enabling the two terminals to indirectly establish a direct communication connection.

[0115] For example, Figure 2 shows a schematic diagram of a communication method based on U2U Relay. Referring to Figure 2, end terminal 21 and end terminal 23 can communicate through the relay terminal 22.

[0116] In this context, a relay terminal refers to a terminal that acts as a relay. A relay terminal can also be called a trunk, U2U trunk, or U2U trunk terminal. An end terminal refers to a terminal that performs discovery and / or communication through a relay terminal.

[0117] During the terminal discovery process, the UE that initiates the discovery process based on U2U Relay can be called the source terminal. The terminal that the source terminal wants to discover or that is discovered by the source terminal can be called the target terminal.

[0118] III. Single-hop U2U Relay discovery

[0119] Single-hop U2U Relay discovery refers to the discovery between end-to-end devices through a single relay terminal. Currently, two single-hop U2U Relay discovery modes are defined: Mode A and Mode B. A brief explanation of these two modes is provided below; for more details, please refer to the relevant technical documentation.

[0120] Figure 3 is a schematic diagram of the U2U Relay mode B discovery process. The U2U Relay mode B discovery process mainly includes steps 1 to 4 as shown in Figure 3.

[0121] Step 1: When a source terminal wants to discover a target terminal through a relay terminal to conduct direct communication corresponding to a certain relay service code (RSC), the source terminal sends a discovery message to surrounding terminals in a broadcast manner to indicate that it wants to discover the target terminal.

[0122] It should be understood that RSC is used to distinguish relay services and can indicate the connection service information provided by the relay terminal to the end terminal. RSC can be pre-configured on the end terminal and the relay terminal. Only the relay terminal that supports the RSC provided by the source terminal will forward the discovery message, and only end terminals that support the same RSC can discover and communicate with each other.

[0123] Step 2: After receiving the discovery message from the source terminal requesting to discover the target terminal, the relay terminal adds its own identity information (User Info) and then sends the discovery message via broadcast. The User Info can be an application layer identifier (ID), a user information identifier (UserInfoID), or a proximity service identifier (ProSeID), etc.

[0124] Relay terminals can choose whether to broadcast a discovery message based on conditions such as signal quality. For example, in Figure 3, relay terminals 1 and 2 broadcast discovery messages after receiving them from the source terminal, while relay terminal 3 does not broadcast a discovery message for some reason. For example, relay terminal 3 may not broadcast a discovery message because the signal quality of the discovery message received by it is poor or for other reasons.

[0125] Step 3: After receiving the discovery message sent by one or more relay terminals in Step 2, the target terminal can send a discovery response message to one or more relay terminals in unicast form according to conditions such as signal quality.

[0126] Specifically, the target terminal can determine whether to allow the source terminal to discover it based on the User Info of the source terminal in the discovery message. If not, it will not send a discovery response message, thus skipping steps 3, 4, and 5. If the target terminal allows the source terminal to discover it, it can proceed to step 3.

[0127] Step 4: After receiving the response message, relay terminal 1 and relay terminal 2 send the response message to the source terminal in unicast form.

[0128] The source terminal can identify the relays connected to the target terminal, namely relay terminal 1 and relay terminal 2, based on the response message. If the source terminal receives response messages from multiple relay terminals, it can select a relay, for example, based on the signal quality between the source terminal and the multiple relays, and then establish a connection with the target terminal through the selected relay terminal.

[0129] Figure 4 is a schematic diagram of the U2U Relay mode A discovery process. The U2U Relay mode A discovery process mainly includes steps 1 to 2 as shown in Figure 4.

[0130] Step 1: The relay terminal discovers certain terminal terminals through other processes (such as the Mode B discovery process).

[0131] Step 2: The relay terminal sends a discovery message, which may contain the User Info of the terminal that the relay terminal has discovered.

[0132] If a terminal receives the discovery message, and the discovery message includes User Info of other terminals, then that terminal can connect to other terminals through the relay terminal.

[0133] If a terminal does not want a relay terminal to send its information to other terminals and be discovered by them through the Mode A discovery process, the terminal can send an Announce Prohibited Indication to the relay terminal during the Mode B discovery process, instructing the relay terminal not to broadcast its User Info in Mode A. That is, the source terminal can include this indication information in step 1 of the Mode B discovery process; the target terminal can include this indication information in step 3.

[0134] Combining Mode A and Mode B, it can be seen that during the relay discovery process, the terminal can explicitly or implicitly control other terminals to discover it.

[0135] With the development of ProSe technology, the introduction of technologies from the mobile ad-hoc network (MANET) field, which together with the PC5 interface support IP-layer multi-hop U2U relay communication, is one of the current trends.

[0136] Figure 5 is a schematic diagram of a multi-hop U2U relay scenario based on MANET provided in an embodiment of this application. Referring to Figure 5, end terminal 51 and its adjacent relay terminal 52 can discover each other and establish a direct communication connection (for ease of understanding, the direct communication connection is described as a PC5 connection in Figure 5). End terminal 57 and its adjacent relay terminal 55 or relay terminal 56 can discover each other and establish a PC5 connection. Adjacent relay terminals supporting the same RSC can discover each other and establish PC5 connections, such as relay terminal 52 and relay terminal 53, relay terminal 53 and relay terminal 54, relay terminal 52 and relay terminal 54, etc. Furthermore, the relay terminals use the MANET protocol at the IP layer to form a MANET network.

[0137] In the scenario shown in Figure 5, after terminal 51 and relay terminal 52 discover each other, according to the MANET protocol, relay terminal 52 can directly or indirectly send a Domain Name System (DNS) entry to other relay terminals. This DNS entry includes the user information and address of terminal 51. Thus, each relay terminal in the MANET network can obtain the user information and address of terminal 51 using existing MANET or DNS technologies. If terminal 57 discovers terminal 51, terminal 57 requests relay terminal 55 or relay terminal 56 to discover terminal 51. Relay terminal 55 or relay terminal 56 then sends the user information and address of terminal 51 to terminal 57 based on previously stored DNS entries, thus enabling terminal 57 to discover terminal 51.

[0138] As can be seen, in the above process, the discovery process of terminal 57 to terminal 51 ends at relay terminal 55 or relay terminal 56. Terminal 51 cannot control whether terminal 57 can discover itself by controlling whether to send a response message.

[0139] In view of this, this application provides a variety of solutions to restrict the discovery between terminal devices in scenarios such as those shown in Figure 5.

[0140] It should be understood that the scenario shown in Figure 5 may include more terminal devices, such as terminal device 58 and terminal device 59.

[0141] The solution provided in this application will be described in detail below with reference to the accompanying drawings. This application does not limit the executing entity of the method embodiments. For ease of understanding, the following description uses a first terminal, a second terminal, a first relay, and a second relay as examples of executing entities to illustrate the method embodiments. It can be understood that the first terminal / second terminal / first relay / second relay used as the executing entity in the following description can also be replaced by a chip, chip system, processor, logic module, or software capable of performing corresponding operations or implementing corresponding functions. It should also be understood that the first relay and second relay in the embodiments of this application are both U2U Relays described above. Furthermore, in the embodiments of this application, "association" and "correspondence" can be replaced, and this will not be elaborated further below.

[0142] Figure 6 is a schematic flowchart of a communication method provided in this application. The method 100 shown in Figure 6 can be applied to the scenario shown in Figure 5. For example, the first terminal, second terminal, first relay, and second relay in method 100 can be, in sequence, end terminal 51, end terminal 57, relay terminal 52, and relay terminal 55 (or relay terminal 56) as shown in Figure 5. Alternatively, the first terminal, second terminal, first relay, and second relay in method 100 can be, in sequence, terminal 58, end terminal 59, relay terminal 53, and relay terminal 55 as shown in Figure 5. The first terminal, second terminal, first relay, and second relay are (pre-)configured with a first RSC for multi-hop U2U communication. The steps in method 100 are described below.

[0143] S101, the first terminal sends a first request message to the first relay. Correspondingly, the first relay receives the first request message from the first terminal.

[0144] Specifically, the first terminal can first generate a first request message, and then send the first request message to the first relay.

[0145] The first request message can be used to request the establishment of a first direct communication connection, which is used for communication between the first terminal and the first relay. For example, the first request message can be a direct communication request (DCR) message.

[0146] The first request message may include user information (User Info) of the first terminal, a first RSC, and first information associated with the first RSC. Alternatively, the first request message includes the user information, first RSC, and first information of the interconnected first terminal. Or, the first request message includes the user information and first information of the first terminal associated with the first RSC. Optionally, the first request message may also include the address of the first terminal. For example, the address may be one or more of the following: an IP address (e.g., an IPv4 address and / or an IPv6 address), a medium access control (MAC) address, a Layer-2 identifier (ID), or a unicast link identifier. The unicast link identifier is the identifier of the first direct communication connection. It should be understood that the first request message may also include user information of the first relay.

[0147] In a first implementation of the first information, the first information indicates whether or not the discovery of a terminal of the first terminal is permitted or prohibited. Specifically, the indication of whether or not the discovery of a terminal of the first terminal is permitted or prohibited is associated with a first RSC. That is, the first information specifically indicates whether or not the discovery of a terminal of the first terminal is permitted or prohibited based on the first RSC.

[0148] In one example, the first information could be a list of terminals allowed to discover the first terminal or a list of terminals not allowed to discover the first terminal. For example, the terminal list could be a list of user information for the terminals. In another example, the first information indicates that no terminal is allowed to discover the first terminal, or the first information indicates that any terminal is allowed to discover the first terminal. For example, if the first information is a wildcard, it means that any terminal is allowed to discover the first terminal. For example, if the first information is empty (None), it means that no terminal is allowed to discover the first terminal.

[0149] In a second implementation of the first information, the first information indicates that any terminal is allowed to discover the first terminal, that is, any terminal is allowed to discover the first terminal based on the first RSC. Specifically, if any terminal is allowed to discover the first terminal based on the first RSC, the first information can be included in the first request message; if no terminal is allowed to discover the first terminal based on the first RSC, the information indicating whether discovery of the first terminal is allowed or the information indicating which terminal is allowed / disallowed to discover the first terminal may not be included in the first request message.

[0150] In the third implementation of the first information, the opposite of the second implementation, the first information indicates that no terminal is allowed to discover the first terminal; that is, no terminal is allowed to discover the first terminal based on the first RSC. Specifically, when no terminal is allowed to discover the first terminal based on the first RSC, the first information can be included in the first request message; when any terminal is allowed to discover the first terminal based on the first RSC, the information indicating whether discovery of the first terminal is allowed or the information indicating which terminal is allowed / disallowed to discover the first terminal may not be included in the first request message.

[0151] In some embodiments, upon accepting the establishment of a first direct communication connection, the first relay may send a first response message to the first terminal in response to the first request message. The first response message indicates that the first relay accepts the establishment of the first direct communication connection. For example, the first response message may be a direct communication accept (DCA) message. Optionally, the first response message may include the address of the first terminal. For example, if the first request message does not include the IP address of the first terminal, the first relay may assign an IP address to the first terminal and include the IP address of the first terminal in the first response message.

[0152] In other embodiments, if the first relay accepts the establishment of the first direct connection, it may not respond to the first request message; if the first relay rejects the establishment of the first direct connection, it may send a corresponding response message to the first terminal, instructing the first relay to reject the establishment of the first direct connection. Therefore, if the first terminal does not receive a response message for the first request message, it can determine that the first relay accepted the establishment of the first direct connection.

[0153] After receiving the first request message, or upon accepting the establishment of the first direct communication connection, the first relay may store the user information and first information of the first terminal. For example, the first relay may update the DNS entry associated with the first RSC based on the first request message, and the updated DNS entry will store the user information and first information of the first terminal. Optionally, the updated DNS entry may also store the first RSC. Optionally, the updated DNS entry may also store the IP address of the first terminal.

[0154] For example, Table 1 shows an example of a DNS entry associated with the first RSC stored in the first relay.

[0155] Table 1

[0156] Wherein, User Information #1 is the user information of the first terminal. The first information is {User Information #2, User Information #3, User Information #4}, where User Information #2, User Information #3, and User Information #4 are the user information of the second, third, and fourth terminals, respectively. The first information indicates that the second, third, and fourth terminals are not allowed to discover the first terminal based on the first RSC. IP #1 is the IP address of the first terminal.

[0157] It should be understood that the DNS entries shown in Table 1 may also include the three columns of information in Table 1 corresponding to other terminals, such as the three columns of information in Table 1 corresponding to a second terminal.

[0158] S102, the first relay sends the second information associated with the first RSC to the second relay according to the first request message.

[0159] Accordingly, the second relay receives the second information from the first relay.

[0160] The second information may indicate whether a terminal is allowed or not allowed to discover the first terminal, or indicate whether any terminal is allowed to discover the first terminal, or indicate whether any terminal is not allowed to discover the first terminal.

[0161] Specifically, after receiving the first request message, or upon accepting the establishment of the first direct communication connection, the first relay can, according to the MANET protocol, directly or indirectly send second information associated with the first RSC to other relays (including the second relay). These other relays can be relays belonging to the same MANET network as the first relay. For example, assuming the first terminal is terminal 51 in Figure 5 and the first relay is relay terminal 52 in Figure 5, then the other relays can be relay terminals 53, 54, 55, and 56. After receiving the first request message, relay terminal 52 can send the second information to relay terminals 53 and 54, and then relay 54 can send the second information to relay terminals 55 and 56. The second relay can be either relay terminal 55 or relay terminal 56.

[0162] In addition to sending the second information to other relays, the first relay can also send other content from the first request message to other relays, such as the user information of the first terminal, the first RSC, and / or the IP address of the first terminal.

[0163] Other relays, such as a second relay, can store the information sent by the first relay after receiving it. For example, other relays can update the DNS entries associated with the first RSC. It should be understood that the DNS entries stored by the first relay and other relays can be the same; for example, relays belonging to the same MANET network can store the same DNS entries.

[0164] Corresponding to the first implementation of the first information, in the first implementation of the second information, the second information indicates whether or not a terminal is allowed to discover the first terminal. The terminal indicated by the second information as allowed or not allowed to discover the first terminal is associated with the first RSC. That is, the second information specifically indicates whether or not a terminal is allowed to discover the first terminal based on the first RSC.

[0165] The second piece of information can be the same as the first piece of information; that is, the second piece of information is the same as the first piece of information. The second piece of information can also be different from the first piece of information. For example, the first piece of information might be a list of terminals allowed to discover the first terminal, while the second piece of information could be a list of terminals not allowed to discover the first terminal.

[0166] In a second implementation of the first information, the second information indicates that any terminal is allowed to discover the first terminal. For example, the second information is the same as the first information.

[0167] Corresponding to the third implementation of the first information, in the third implementation of the second information, the second information indicates that no terminal is allowed to discover the first terminal. For example, the second information is the same as the first information.

[0168] S103, the second terminal sends a second request message to the second relay.

[0169] Accordingly, the second relay receives the second request message from the second terminal.

[0170] Specifically, if the second terminal wants to discover the first terminal, it can send a second request message to the second relay. For example, the second request message could be a DNS query message.

[0171] The second request message is used to (request) the discovery of the first terminal, and the second request message may include the user information of the first terminal.

[0172] It should be noted that before the second terminal sends the second request message, the second terminal has already established a direct communication connection with the second relay. This direct communication connection is denoted as the second direct communication connection. After the second relay and the second terminal establish the second direct communication connection, the second relay (e.g., the ProSe layer of the second relay) and the second terminal can store information associated with the second direct communication connection (i.e., a link profile), including the first RSC, the user information of the second relay, the user information of the second terminal, and the Layer-2 ID of the second terminal. Additionally, the second relay can also store the mapping between the IP address of the second terminal and the user information of the second terminal.

[0173] S104, the second relay determines whether to allow the second terminal to discover the first terminal based on the user information of the second terminal corresponding to the second request message, the first RSC corresponding to the second request message, the user information of the first terminal, and the second information associated with the first RSC.

[0174] Specifically, after receiving the second request message, the second relay can first obtain the RSC corresponding to the second request message. In this embodiment, the RSC corresponding to the second request message is the first RSC. Based on the first RSC and the user information of the first terminal, and if the second relay determines that it stores second information associated with the first RSC and the user information of the first terminal, it can obtain the user information of the sending end (or "source terminal") corresponding to the second request message. In this embodiment, the sending end corresponding to the second request message is the second terminal. Then, based on the second information, the second relay can determine whether to allow the second terminal to discover the first terminal.

[0175] In one implementation, the second relay can obtain user information of the first RSC and the second terminal from the second request message. That is, the second request message may include user information of the first RSC and the second terminal.

[0176] If the second request message does not include the first RSC and / or the user information of the second terminal, the first RSC and / or the user information of the second terminal can be obtained in the following corresponding ways. For example, if the second request message may include the user information of the second terminal, the first RSC can be obtained in the following ways of obtaining the first RSC. For example, if the second request message may include the first RSC, the user information of the second terminal can be obtained in either method one or method two. For example, if the second request message does not include the first RSC and the user information of the second terminal, the first RSC can be obtained in the following ways, and the user information of the second terminal can be obtained in either method one or method two. It is understood that omitting the first RSC and / or the user information of the second terminal in the second request message can reduce signaling overhead.

[0177] Method for obtaining the first RSC: In S103, the ProSe layer of the second relay receives the second request message from the second direct communication connection, and then the ProSe layer can obtain the first RSC from the information associated with the second direct communication connection according to the second request message.

[0178] Specifically, as mentioned above, after the second relay establishes a second direct communication connection with the second terminal, the second relay (e.g., the ProSe layer of the second relay) can store information associated with the second direct communication connection, including the first RSC, the user information of the second relay, the user information of the second terminal, and the Layer-2 ID of the second terminal. Then, after the ProSe layer receives the second request message from the second direct communication connection, it can obtain the RSC corresponding to the second request message, i.e., the first RSC, based on the information associated with the second direct communication connection stored by the second relay.

[0179] Method 1 for obtaining user information of the second terminal: In S103, the ProSe layer of the second relay receives a second request message from the second direct communication connection, and then the ProSe layer can obtain the user information of the second terminal from the information associated with the second direct communication connection according to the second request message.

[0180] Specifically, as mentioned above, after the second relay establishes a second direct communication connection with the second terminal, the second relay (e.g., the ProSe layer of the second relay) can store information associated with the second direct communication connection, including the first RSC, the user information of the second relay, the user information of the second terminal, and the Layer-2 ID of the second terminal. Then, after the ProSe layer receives the second request message from the second direct communication connection, it can obtain the user information of the sender corresponding to the second request message, i.e., the user information of the second terminal, based on the information associated with the second direct communication connection stored by the second relay.

[0181] Method 2 for obtaining user information of the second terminal: The second relay can obtain the user information of the second terminal based on the IP address of the second terminal corresponding to the second request message.

[0182] Specifically, after receiving the second request message, the second relay can obtain the IP address of the sender corresponding to the second request message. Then, based on the correspondence between the IP address and user information, it can determine the user information corresponding to the IP address, which is the user information of the sender corresponding to the second request message, i.e., the user information of the second terminal. After obtaining the user information of the first RSC and the second terminal, the second relay can determine whether to allow the second terminal to discover the first terminal based on the second information.

[0183] For example, if the second information is a list of terminals allowed to discover the first terminal, then if the terminal list includes the user information of the second terminal, the second terminal is allowed to discover the first terminal; otherwise, the second terminal is not allowed to discover the first terminal. Alternatively, if the second information is a list of terminals not allowed to discover the first terminal, then if the terminal list includes the user information of the second terminal, the second terminal is not allowed to discover the first terminal; otherwise, the second terminal is allowed to discover the first terminal.

[0184] For example, if the second information indicates that no terminal is allowed to discover the first terminal, then it can be determined that the second terminal is not allowed to discover the first terminal. Alternatively, if the second information indicates that any terminal is allowed to discover the first terminal, then it can be determined that the second terminal is allowed to discover the first terminal.

[0185] In some embodiments, if it is determined that the second terminal is not allowed to discover the first terminal, the second relay may not respond to the second request message.

[0186] In other embodiments, when it is determined that the second terminal is not allowed to discover the first terminal, the method 100 may further include:

[0187] S105, the second relay sends a rejection message to the second terminal in response to the second request message.

[0188] Accordingly, the second terminal receives the rejection message.

[0189] The rejection message may indicate that the first terminal is not discovered. The rejection message may include user information of the first terminal. For example, the rejection message may be a DNS query rejection message.

[0190] Optionally, the rejection message may also include a reason value, which indicates that the reason for rejecting the discovery of the first terminal is that discovery is not allowed.

[0191] Without this reason value, the second terminal might assume that it cannot discover the first terminal due to hop count limitations or other reasons. In this case, the second terminal might perform some extra but unnecessary actions, such as increasing the hop count and then re-executing the process to discover the first terminal. However, with this reason value, the second terminal can determine that the reason for refusing to discover the first terminal is "discovery is not allowed." Therefore, the second terminal can avoid executing the process to discover the first terminal within the preset time, thus avoiding extra but unnecessary actions and saving signaling and power consumption overhead.

[0192] In some other embodiments, when it is determined that the second terminal is allowed to discover the first terminal, the method 100 may further include:

[0193] S106, the second relay sends an acceptance message to the second terminal in response to the second request message.

[0194] Accordingly, the second terminal receives the acceptance message.

[0195] The acceptance message may indicate permission to discover the first terminal. This acceptance message may include the user information and IP address of the first terminal. For example, the acceptance message may be a DNS query response message.

[0196] In summary, according to the method 100 provided in this application, the first terminal can indicate to the first relay during the process of establishing a direct communication connection that terminals of the first terminal are allowed / not allowed to be discovered. The first relay can send the information indicating terminals of the first terminal are allowed / not allowed to be discovered to the second relay. Thus, the second relay can determine whether to allow the second terminal to discover the first terminal based on the information when the second terminal requests to discover the first terminal, thereby implementing terminal discovery restrictions.

[0197] Figure 7 is a schematic flowchart of a communication method provided in this application. Method 200 is a specific example of method 100. Concepts or operations in method 200 that are the same as those in method 100 can be referred to the relevant descriptions of method 100, and will not be repeated in method 200. It should be understood that the first terminal, the second terminal, the first relay, and the second relay are (pre-)configured with a first RSC for multi-hop U2U communication.

[0198] S201 to S203 support the mutual discovery of nearby relay terminals of the first RSC and the establishment of direct communication connections.

[0199] Specifically, in S201, the first relay and the second relay discover each other. For example, the second relay can send a discovery message to the first relay, and the first relay can send a response message to the second relay. The mutual discovery process between the first relay and the second relay can be found in relevant technologies and will not be elaborated upon here.

[0200] In S202, the second relay can send a request message to the first relay to establish a direct communication connection between the first and second relays. For example, this request message can be a DCR message as shown in Figure 7. This request message may include a first RSC, user information of the first relay, and user information of the second relay.

[0201] In step S203, if the first relay accepts the request to establish a direct communication connection between the first relay and the second relay, it can reply with a response message to the second relay. For example, this response message can be a DCA message as shown in Figure 7. This response message may include the first RSC, user information of the first relay, and user information of the second relay.

[0202] S204, the first and second trunks form a MANET network using the MANET protocol at the IP layer.

[0203] For example, the second relay sends a HELLO message and a topology control message from the MANET protocol to the first relay, completing the mutual discovery between the first and second relays and exchanging MANET network topology information. The first relay generates MANET network routing information according to the MANET protocol. More detailed information about S204 can be found in relevant technical documents and will not be elaborated upon here.

[0204] S205, the first terminal broadcasts a discovery message.

[0205] The discovery message is used to discover relay terminals. This discovery message may include the first RSC and the user information of the first terminal. For example, the discovery message may be a discovery message.

[0206] S206. After receiving the discovery message, if the first relay determines that it is allowed for the first terminal to discover the first relay, it sends a discovery response message to the first terminal.

[0207] The discovery response message may include the first RSC, the user information of the first relay, and the user information of the first terminal.

[0208] S207, the first terminal sends a first request message to the first relay.

[0209] Specifically, this step can be the same as S101.

[0210] S208, upon receiving the establishment of the first direct communication connection, the first relay sends a first response message to the first terminal.

[0211] For information on the first response message, please refer to the relevant description in Method 100.

[0212] S209, the first relay stores the user information, IP address and first information of the first terminal, and synchronizes the user information, IP address and first information of the first terminal with other relay terminals in the MANET network.

[0213] It should be noted that the information synchronized here can be the second information instead of the first information.

[0214] Regarding S209, please refer to the relevant explanations of S101 and S102 in Method 100.

[0215] S210, the second terminal and the second relay discover each other based on the first RSC and establish a direct communication connection to synchronize the relevant information of the second terminal to other relay terminals in the MANET network.

[0216] The relevant information of the second terminal includes the user information of the second terminal and the IP address of the second terminal.

[0217] In addition, the second relay can store relevant information about the second terminal.

[0218] It should be understood that the process of mutual discovery and establishment of direct communication connection between the second terminal and the first relay is similar to that in S205 to S208, and S205 to S208 can be referred to.

[0219] In one example, each relay terminal in a MANET network can store relevant information about the terminal (such as the first terminal and the second terminal) in a DNS entry.

[0220] For example, after S210, the DNS entries associated with the first RSC stored by each relay terminal in the MANET network are shown in Table 2.

[0221] Table 2

[0222] The content of the second row of Table 2 can be the same as the content of the second row of Table 1 above, and will not be repeated here. User information #2 is the user information of the second terminal. User information #4 is the user information of the fourth terminal, and {User information #4} indicates that the fourth terminal is not allowed to discover the second terminal based on the first RSC. IP #2 is the IP address of the second terminal.

[0223] S211, the second terminal sends a second request message to the second relay, requesting the discovery of the first terminal.

[0224] S212, the second relay determines that the second terminal is not allowed to discover the first terminal.

[0225] Specifically, the second relay can determine whether to allow the second terminal to discover the first terminal based on the user information of the second terminal corresponding to the second request message, the first RSC corresponding to the second request message, the user information of the first terminal, and the first information associated with the first RSC. For example, in method 200, if the list of terminals allowed to discover the first terminal indicated by the first information does not include the user information of the second terminal, then in S212, the second relay determines that the second terminal is not allowed to discover the first terminal.

[0226] S211 to S212 are similar to S103 to S104, and can be referenced from S103 to S104.

[0227] S213, the second relay sends a rejection message to the second terminal in response to the second request message.

[0228] If the second relay determines that the second terminal is not allowed to send data to the first terminal, S213 can be executed. For example, in S212, the second relay looks up table 2 and finds that the terminal list corresponding to the user information of the first terminal is {user information #2, user information #3, user information #4}. Therefore, it determines that the second terminal is not allowed to discover the first terminal, and thus S213 can be executed. S213 is the same as S105, and S105 can be referred to.

[0229] Furthermore, if the second relay determines, based on the user information of the second terminal corresponding to the second request message, the first RSC corresponding to the second request message, the user information of the first terminal, and the first information associated with the first RSC, that the second relay is permitted to allow the second terminal to discover the first terminal, then the second relay may send an acceptance message to the second terminal in response to the second request message. For details regarding the acceptance message, please refer to S106; it will not be elaborated upon here.

[0230] According to the method 200 provided in this application, the first terminal can indicate to the first relay during the process of establishing a direct communication connection that terminals of the first terminal are allowed / not allowed to be discovered. The first relay can send the information indicating terminals of the first terminal are allowed / not allowed to be discovered to the second relay. Thus, the second relay can determine whether to allow the second terminal to discover the first terminal when the second terminal requests to discover the first terminal based on the information, thereby implementing terminal discovery restriction.

[0231] In one scenario, the path from the first terminal to the second terminal passes through only one relay terminal. For example, if the first terminal and the second terminal are end terminal 59 and end terminal 57 in Figure 5, respectively, then the path from the first terminal to the second terminal passes through only relay terminal 55. In this scenario, assuming the relay terminal traversed by the path from the first terminal to the second terminal is denoted as the second relay, then in method 100 or method 200, the first terminal will send a first request message to the second relay, and the second information in the steps related to the second information in the operation performed by the second relay will be replaced with the first information.

[0232] Figure 8 is a schematic flowchart of another communication method provided in this application. The method 300 shown in Figure 8 can be applied to the scenario shown in Figure 5. For example, the first terminal, second terminal, first relay, and second relay in method 300 can be, in sequence, end terminal 51, end terminal 57, relay terminal 52, and relay terminal 55 (or relay terminal 56) as shown in Figure 5. Alternatively, the first terminal, second terminal, first relay, and second relay in method 300 can be, in sequence, terminal 58, end terminal 59, relay terminal 53, and relay terminal 55 as shown in Figure 5. The first terminal, second terminal, first relay, and second relay are (pre-)configured with a first RSC for multi-hop U2U communication. The steps in method 300 are described below.

[0233] S301, the first terminal sends a first request message to the first relay.

[0234] Accordingly, the first relay receives the first request message from the first terminal.

[0235] Specifically, the first terminal can first generate a first request message, and then send the first request message to the first relay.

[0236] The first request message can be used to request the establishment of a first direct communication connection, which is used for communication between the first terminal and the first relay. For example, the first request message can be a DCR message.

[0237] The first request message may include user information (User Info) of the first terminal, a first RSC, and first information associated with the first RSC. Alternatively, the first request message includes the user information, first RSC, and first information of the interconnected first terminal. Or, the first request message includes the user information and first information of the first terminal associated with the first RSC. Optionally, the first request message may also include the address of the first terminal. For example, the address may be one or more of the following: IP address (e.g., IPv4 address and / or IPv6 address), MAC address, Layer-2 ID, or unicast link identifier. The unicast link identifier is the identifier of the first direct communication connection. It should be understood that the first request message may also include user information of the first relay.

[0238] The first information indicates that only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal.

[0239] In one example, the first information can be a predefined value. For instance, the first request message may include a specific field. If the information in this field is the first information, such as 1, it means that only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal. If the information in this field is not the first information, such as 0 or None, it means that terminals can be discovered without hop count restrictions. In this example, the maximum hop count can be determined based on the first RSC or business requirements. For example, RSC and maximum hop count are related, and the maximum hop count associated with the first RSC can be determined based on the first RSC. As another example, if the business requirement is a latency requirement, assuming the latency requirement corresponding to the first RSC is 100 milliseconds, and the latency of each hop in the path to the first terminal is 30 milliseconds, the maximum hop count can be the value obtained by rounding down the ratio of the latency requirement to the latency of each hop, i.e., 3.

[0240] In another example, the first information is the maximum hop count, where only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal.

[0241] In this embodiment, the hop count corresponding to the path from one terminal to another represents the number of nodes traversed or the number of direct communication connections along the path. For example, in Figure 5, there are four paths from terminal 51 to terminal 57: (1) Terminal 51 → Relay Terminal 52 → Relay Terminal 53 → Relay Terminal 54 → Relay Terminal 55 → Terminal 57; (2) Terminal 51 → Relay Terminal 52 → Relay Terminal 53 → Relay Terminal 54 → Relay Terminal 56 → Terminal 57; (3) Terminal 51 → Relay Terminal 52 → Relay Terminal 54 → Relay Terminal 55 → Terminal 57; (4) Terminal 51 → Relay Terminal 52 → Relay Terminal 54 → Relay Terminal 56 → Terminal 57. The hop counts corresponding to the above four paths are 4, 4, 3, and 3, respectively. The maximum hop count corresponding to the path from terminal 51 to terminal 57 is 4. Assuming the first terminal is end terminal 51 as shown in Figure 5, the first information indicates that only terminals with a hop count less than or equal to 4 corresponding to the path to the first terminal are allowed to discover the first terminal. In this case, end terminal 57 is allowed to discover the first terminal.

[0242] In some embodiments, upon accepting the establishment of a first direct communication connection, the first relay may send a first response message to the first terminal in response to the first request message. The first response message indicates that the first relay accepts the establishment of the first direct communication connection. For example, the first response message may be a DCA message. Optionally, the first response message may include the address of the first terminal. For example, if the first request message does not include the address of the first terminal, the first relay may use an IP address assigned to the first terminal and include the IP address of the first terminal in the first response message.

[0243] In other embodiments, if the first relay accepts the establishment of the first direct connection, it may not respond to the first request message; if the first relay rejects the establishment of the first direct connection, it may send a corresponding response message to the first terminal, instructing the first relay to reject the establishment of the first direct connection. Therefore, if the first terminal does not receive a response message for the first request message, it can determine that the first relay accepted the establishment of the first direct connection.

[0244] After receiving the first request message, or upon accepting the establishment of the first direct communication connection, the first relay may store the user information and first information of the first terminal. For example, the first relay may update the DNS entry associated with the first RSC based on the first request message, and the updated DNS entry will store the user information and first information of the first terminal. Optionally, the updated DNS entry may also store the first RSC. Optionally, the updated DNS entry may also store the IP address of the first terminal.

[0245] For example, Table 3 shows an example of a DNS entry associated with the first RSC stored in the first relay.

[0246] Table 3

[0247] In this context, User Information #1 represents the user information of the first terminal. The first piece of information is the maximum hop count, which is 4. Only terminals with a hop count less than or equal to 4 corresponding to the path to the first terminal are allowed to discover the first terminal. IP #1 represents the IP address of the first terminal.

[0248] It should be understood that the DNS entries shown in Table 3 may also include the three columns of information in Table 3 corresponding to other terminals, such as the three columns of information in Table 3 corresponding to a second terminal.

[0249] S302, the first relay sends the second information associated with the first RSC to the second relay according to the first request message.

[0250] Accordingly, the second relay receives the second information from the first relay.

[0251] Specifically, after receiving the first request message, or upon accepting the establishment of the first direct communication connection, the first relay can, according to the MANET protocol, directly or indirectly send relevant information about the first terminal associated with the first RSC, such as second information, to other relays (including the second relay). These other relays can be those belonging to the same MANET network as the first relay. For example, assuming the first terminal is terminal 51 in Figure 5 and the first relay is relay terminal 52 in Figure 5, then the other relays can be relay terminals 53, 54, 55, and 56. After receiving the first request message, relay terminal 52 can also send second information to relay terminals 53 and 54, and then relay 54 can send second information to relay terminals 55 and 56. The second relay can be either relay terminal 55 or relay terminal 56.

[0252] In addition to sending the second information to other relays, the first relay can also send other content from the first request message to other relays, such as the user information of the first terminal, the first RSC, and / or the IP address of the first terminal.

[0253] Other relays, such as a second relay, can store the information sent by the first relay after receiving it. For example, other relays can update the DNS entries associated with the first RSC. It should be understood that the DNS entries stored by the first relay and other relays can be the same; for example, relays belonging to the same MANET network can store the same DNS entries.

[0254] The second information indicates that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal. The second information can be the same as the first information; that is, the second information is the same as the first information. The second information and the first information can also be different. For example, if the first information is the maximum hop count, and the first relay finds that this maximum hop count is the same as the maximum hop count corresponding to the first RSC, then the first relay can send only the RSC and not the maximum hop count when synchronizing DNS entries. The second relay can then determine the maximum hop count based on the first RSC.

[0255] S303, the second terminal sends a second request message to the second relay.

[0256] Accordingly, the second relay receives the second request message from the second terminal.

[0257] Specifically, if the second terminal wants to discover the first terminal, it can send a second request message to the second relay. For example, the second request message could be a DNS query message.

[0258] The second request message is used to (request) the discovery of the first terminal, and the second request message may include the user information of the first terminal.

[0259] It should be noted that before the second terminal sends the second request message, the second terminal has already established a direct communication connection with the second relay. This direct communication connection is denoted as the second direct communication connection. After the second relay and the second terminal establish the second direct communication connection, the second relay (e.g., the ProSe layer of the second relay) and the second terminal can store the associated information of the second direct communication connection (i.e., linkprofile), including the first RSC, the user information of the second relay, the user information of the second terminal, and the Layer-2 ID of the second terminal. In addition, the second relay can also store the mapping relationship between the IP address of the second terminal and the user information of the second terminal.

[0260] S304, the second relay determines whether to allow the second terminal to discover the first terminal based on the user information of the second terminal corresponding to the second request message, the first RSC corresponding to the second request message, the user information of the first terminal, the hop count corresponding to the path from the second terminal to the first terminal, and the second information associated with the first RSC.

[0261] Specifically, after receiving the second request message, the second relay can first obtain the RSC corresponding to the second request message. In this embodiment, the RSC corresponding to the second request message is the first RSC. Based on the first RSC and the user information of the first terminal, and if the second relay determines that it stores second information associated with the first RSC and the user information of the first terminal, it can obtain the user information of the sending end (or "source terminal") corresponding to the second request message. In this embodiment, the sending end corresponding to the second request message is the second terminal. Then, the second relay can determine whether to allow the second terminal to discover the first terminal based on the second information and the hop count corresponding to the path from the second terminal to the first terminal.

[0262] The method by which the second relay obtains user information from the first RSC and the second terminal is the same as that in S104, and can be referred to the description in S104. It will not be repeated here.

[0263] After the second relay obtains the user information of the first RSC and the second terminal, it can determine whether to allow the second terminal to discover the first terminal based on the second information and the hop count corresponding to the path from the second terminal to the first terminal.

[0264] For example, if the second information indicates that only terminals with a hop count of less than or equal to 4 corresponding to the path to the first terminal are allowed to discover the first terminal, then if the minimum hop count corresponding to the path from the second terminal to the first terminal is 5, then the second terminal is not allowed to discover the first terminal.

[0265] In some embodiments, if it is determined that the second terminal is not allowed to discover the first terminal, the second relay may not respond to the second request message.

[0266] In other embodiments, when it is determined that the second terminal is not allowed to discover the first terminal, the method 300 may further include:

[0267] S305, the second relay sends a rejection message to the second terminal in response to the second request message.

[0268] Accordingly, the second terminal receives the rejection message.

[0269] The rejection message may indicate that the first terminal is not discovered. The rejection message may include user information of the first terminal. For example, the rejection message may be a DNS query rejection message.

[0270] Optionally, the rejection message may also include a reason value, which indicates that the reason for rejecting the discovery of the first terminal is that discovery is not allowed, or the reason for rejecting the discovery of the first terminal is a maximum hop limit.

[0271] Based on this reason value, the second terminal may not execute the process of discovering the first terminal within the preset time, thus avoiding some extra but unnecessary actions and saving signaling, power consumption and other overhead.

[0272] In some other embodiments, when it is determined that the second terminal is allowed to discover the first terminal, the method 300 may further include:

[0273] S306, the second relay sends an acceptance message to the second terminal in response to the second request message.

[0274] Accordingly, the second terminal receives the acceptance message.

[0275] The acceptance message may indicate permission to discover the first terminal. This acceptance message may include the user information and IP address of the first terminal. For example, the acceptance message may be a DNS query response message.

[0276] In summary, according to the method 300 provided in this application, the first terminal can indicate to the first relay during the process of establishing a direct communication connection that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal. The first relay can send this indication to the second relay, so that the second relay can determine whether to allow the second terminal to discover the first terminal based on the hop count of the path from the second terminal to the first terminal when the second terminal requests to discover the first terminal, thereby implementing terminal discovery restrictions.

[0277] It should be understood that the difference between Method 300 and Method 100 is that Method 100 restricts terminal discovery by limiting which terminals are allowed / disallowed to discover the first terminal, while Method 300 restricts terminal discovery by limiting the number of hops corresponding to the path to the first terminal. A specific example of Method 300 is implemented similarly to Method 200; please refer to Method 200 for details, which will not be elaborated here.

[0278] In some embodiments, the first request message in method 300 may not include the first information; that is, it may be assumed that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal, where the maximum hop count corresponds to the first RSC. In this embodiment, the first relay may send the first RSC to the second relay, and the second relay, upon receiving the second request message, will determine the maximum hop count based on the first RSC.

[0279] In one scenario, the path from the first terminal to the second terminal passes through only one relay terminal. For example, if the first terminal and the second terminal are end terminal 59 and end terminal 57 in Figure 5, respectively, then the path from the first terminal to the second terminal passes through only relay terminal 55. In this scenario, assuming the relay terminal traversed by the path from the first terminal to the second terminal is denoted as the second relay, then in method 300, the first terminal will send a first request message to the second relay, and the second information in the steps related to the second information in the operation performed by the second relay will be replaced with the first information.

[0280] Figure 9 is a schematic flowchart of another communication method provided in this application. The method 400 shown in Figure 9 can be applied to the scenario shown in Figure 5. For example, the first terminal, second terminal, first relay, and second relay in method 400 can be, in sequence, end terminal 51, end terminal 57, relay terminal 52, and relay terminal 55 (or relay terminal 56) as shown in Figure 5. Alternatively, the first terminal, second terminal, first relay, and second relay in method 400 can be, in sequence, terminal 58, end terminal 59, relay terminal 53, and relay terminal 55 as shown in Figure 5. The first terminal, second terminal, first relay, and second relay are (pre-)configured with a first RSC for multi-hop U2U communication. The steps in method 400 are described below.

[0281] S401, the first terminal sends a first request message to the first relay.

[0282] Accordingly, the first relay receives the first request message from the first terminal.

[0283] S402, the first relay sends the second information associated with the first RSC to the second relay according to the first request message.

[0284] Accordingly, the second relay receives the second information from the first relay.

[0285] In some embodiments, S401 to S402 are the same as S101 to S102, and reference can be made to S101 to S102. In other embodiments, S401 to S402 are the same as S301 to S302, and reference can be made to S301 to S302.

[0286] Referring to the description of the first request message in S101 or S301, the first request message may include first information. For ease of subsequent description, in method 400, the first information is described as the first information of the first terminal. Additionally, in method 400, the second information is described as the second information of the first terminal.

[0287] It should be understood that other terminals may also send their first information during the process of establishing a direct communication connection with the first relay or with other relays in the MANET network where the first relay is located, as per S401. The first information of the other terminal has a similar meaning to the first information of the first terminal, indicating whether a terminal is allowed or not to discover the other terminal, or indicating that only terminals whose path to the other terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal. It should be understood that the maximum hop count corresponding to the first information sent by different terminals may be the same or different. The first information of the other terminal, or, equivalently, the information derived from the first information of the other terminal (denoted as the second information of the other terminal, the meaning of which is similar to that of the second information of the first terminal), can be synchronized to other relays in the MANET network. In method 400, the second information of the first terminal is the second information sent by the first relay in S102 or S302. The other terminal can also send its user information to the other relay or the first relay during the process of establishing a direct communication connection with it. Furthermore, it can also send its address. Alternatively, the other relay or the first relay can assign the other terminal's address (e.g., an IP address). The other terminal's user information and IP address can also be synchronized to relay terminals in the MANET network.

[0288] For example, in the scenario shown in Figure 5, terminal 58 can send information indicating whether or not it is allowed to discover terminals of terminal 58 during the process of establishing a direct communication connection with relay terminal 53; this is known as the first information of terminal 58. The first information of terminal 58 can be synchronized to relay terminals 52, 54, 55, and 56. Terminal 59 can send information indicating whether or not it is allowed to discover terminals of terminal 59 during the process of establishing a direct communication connection with relay terminal 55; this is known as the first information of terminal 59. The first information of terminal 59 can be synchronized to relay terminals 52, 53, 54, and 56.

[0289] S403, the second terminal sends a second request message to the second relay.

[0290] Accordingly, the second relay receives the second request message from the second terminal.

[0291] The second request message is used to discover terminals that support the first RSC, and the second request message may include the first RSC (an example of third information). In this embodiment, terminals that support the first RSC are referred to as: the first group of terminals. For example, the second request message may be a DNS query message.

[0292] It should be noted that before the second terminal sends the second request message, the second terminal has already established a direct communication connection with the second relay, which is denoted as the second direct communication connection. After the second relay and the second terminal establish the second direct communication connection, the second relay (e.g., the ProSe layer of the second relay) and the second terminal can store the associated information of the second direct communication connection (i.e., linkprofile), including the first RSC, the user information of the second relay, the user information of the second terminal, and the Layer-2 ID of the second terminal's address. In addition, the second relay can also store the mapping relationship between the IP address of the second terminal and the user information of the second terminal.

[0293] S404, the second relay determines whether to allow the second terminal to discover the first group of terminals based on the user information of the second terminal corresponding to the second request message, the first RSC, the user information of each terminal in the first group of terminals, and the second information of each terminal in the first group of terminals.

[0294] For example, taking a first group of terminals including a first terminal, a third terminal, and a fourth terminal as an example. The second relay can determine whether to allow the second terminal to discover the first terminal based on the user information of the second terminal, the first RSC, the user information of the first terminal, and the second information of the first terminal; the second relay can determine whether to allow the second terminal to discover the third terminal based on the user information of the second terminal, the first RSC, the user information of the third terminal, and the second information of the third terminal; the second relay can determine whether to allow the second terminal to discover the fourth terminal based on the user information of the second terminal, the first RSC, the user information of the fourth terminal, and the second information of the fourth terminal. For example, the first terminal, the second terminal, the third terminal, and the fourth terminal can be terminal 51, terminal 57, terminal 58, and terminal 59 in Figure 5, respectively.

[0295] It should be understood that the way the second terminal determines whether to allow any terminal in the first group of terminals to discover the first terminal is similar to the way the second terminal determines whether to allow the second terminal to discover the first terminal as described in S104 or S304. For details, please refer to the relevant descriptions in S104 or S304, which will not be repeated here.

[0296] It is understandable that if the second relay determines that the second terminal is not allowed to discover all terminals in the first group of terminals, then it is considered that the second relay is not allowed to discover the first group of terminals.

[0297] In some embodiments, if it is determined that the second terminal is not allowed to discover the first group of terminals, the second relay may not respond to the second request message.

[0298] In other embodiments, when it is determined that the second terminal is not allowed to discover the first group of terminals, the method 400 may further include:

[0299] S405, the second relay sends a rejection message to the second terminal in response to the second request message.

[0300] Accordingly, the second terminal receives the rejection message.

[0301] The rejection message may indicate a refusal to discover the first group of terminals. The rejection message may include a first RSC. For example, the rejection message may be a DNS query rejection message.

[0302] Optionally, the rejection message may also include a reason value, which indicates that the reason for rejecting the discovery of the first terminal is that discovery is not allowed, or the reason for rejecting the discovery of the first terminal is a maximum hop limit.

[0303] Based on this reason value, the second terminal may not execute the process of discovering the first terminal within the preset time, thus avoiding some extra but unnecessary actions and saving signaling, power consumption and other overhead.

[0304] In some other embodiments, if it is determined that the second terminal is allowed to discover some or all of the terminals in the first group of terminals, the method 400 may further include:

[0305] S406, the second relay sends an acceptance message to the second terminal in response to the second request message.

[0306] Accordingly, the second terminal receives the acceptance message.

[0307] The acceptance message indicates permission to discover some or all of the terminals in the first group of terminals. This acceptance message may include user information and IP addresses of some or all of the terminals in the first group that are permitted to be discovered. For example, the acceptance message may be a DNS query response message.

[0308] In summary, according to method 400 provided in this application, a terminal (e.g., a first terminal) can, during the establishment of a direct communication connection, indicate to a relay (e.g., a first relay) which terminals are allowed / are allowed to discover the terminal, or indicate that only terminals whose hop count corresponding to the path to the terminal is less than or equal to the maximum hop count are allowed to discover the terminal. The above indication can be synchronized to other relays, which can then determine whether to allow the second terminal to discover the group of terminals corresponding to the first RSC when the second terminal requests to do so, thereby implementing terminal discovery restrictions.

[0309] It should be understood that the difference between Method 400 and Methods 100 and 200 is that in Methods 100 and 200, the second terminal requests to discover a terminal, while in Method 400, the first RSC can be used as a group identifier, allowing the second terminal to discover a group of terminals at once. A specific example of the implementation process of Method 400 is similar to that of Method 200; please refer to Method 200 for details, which will not be elaborated here.

[0310] In one scenario, the path from the first terminal to the second terminal passes through only one relay terminal. For example, if the first terminal and the second terminal are end terminal 59 and end terminal 57 in Figure 5, respectively, then the path from the first terminal to the second terminal passes through only relay terminal 55. In this scenario, assuming the relay terminal traversed by the path from the first terminal to the second terminal is denoted as the second relay, then in method 400, the first terminal will send a first request message to the second relay, and the second information in the steps related to the second information in the operation performed by the second relay will be replaced with the first information.

[0311] Figure 10 is a schematic flowchart of a communication method provided in this application. This method 500 can be applied to the scenario shown in Figure 5. For example, the first terminal, second terminal, first relay, and second relay in this method 400 can be, in sequence, end terminal 51, end terminal 57, relay terminal 52, and relay terminal 55 (or relay terminal 56) as shown in Figure 5. Alternatively, the first terminal, second terminal, first relay, and second relay in this method 400 can be, in sequence, terminal 58, end terminal 59, relay terminal 53, and relay terminal 55 as shown in Figure 5. The first terminal, second terminal, first relay, and second relay are (pre-)configured with a first RSC for multi-hop U2U communication. The steps in method 500 are described below.

[0312] S501, the first terminal sends a first request message to the first relay.

[0313] Accordingly, the first relay receives the first request message from the first terminal.

[0314] In method 500, the first request message, based on the first request message in method 400, may further include a first group identifier (an example of third information), whereby the first group identifier is the group identifier of the group to which the first terminal belongs. In this embodiment, the group to which the first terminal belongs is referred to as the first terminal group. The first relay may store the first group identifier, for example, by storing it in a DNS entry. It should be understood that the first group identifier corresponds to the user information of the first terminal.

[0315] For more information related to S501, please refer to S401; it will not be repeated here.

[0316] S502, the first relay sends the second information and the first set of identifiers to the second relay.

[0317] Compared to S402, the first relay also sends the first set of identifiers to the second relay. The second relay can store the first set of identifiers, for example, in a DNS entry.

[0318] For more information related to S502, please refer to S402; it will not be repeated here.

[0319] S503, the second terminal sends a second request message to the second relay.

[0320] Accordingly, the second relay receives the second request message from the second terminal.

[0321] Specifically, if a second terminal wishes to discover terminals in the terminal group identified by the first set of identifiers, it can send a second request message to the second relay. For example, the second request message could be a DNS query message.

[0322] The second request message may include a first set of identifiers. The second request message is used to discover terminals in the terminal group identified by the first set of identifiers, that is, the second request message is used to discover terminals in the first terminal group.

[0323] It should be noted that before the second terminal sends the second request message, the second terminal has already established a direct communication connection with the second relay. This direct communication connection is denoted as the second direct communication connection. After the second relay and the second terminal establish the second direct communication connection, the second relay (e.g., the ProSe layer of the second relay) and the second terminal can store the associated information of the second direct communication connection (i.e., linkprofile), including the first RSC, the user information of the second relay, the user information of the second terminal, and the Layer-2 ID of the second terminal. In addition, the second relay can also store the mapping relationship between the IP address of the second terminal and the user information of the second terminal.

[0324] S504, the second relay determines whether to allow the second terminal to discover the first group of terminals based on the first group identifier, the user information of the second terminal corresponding to the second request message, the first RSC corresponding to the second request message, the user information of each terminal in the first group of terminals, and the second information of each terminal in the first group of terminals.

[0325] Specifically, after receiving the second request message, the second relay can first obtain the RSC corresponding to the second request message. In this embodiment, the RSC corresponding to the second request message is the first RSC. Based on the first RSC and the first identifier, and if the second relay determines that it stores the second information corresponding to the first identifier associated with the first RSC, it can obtain the user information of the sending end (or "source terminal") corresponding to the second request message. In this embodiment, the sending end corresponding to the second request message is the second terminal. Then, the second relay can determine whether to allow the second terminal to discover the first group of terminals based on the second information corresponding to the first identifier. For example, if the first relay synchronizes the second information of the first identifier and the first terminal, and the second information of the first identifier and the third terminal to the second relay, and the third relay synchronizes the second information of the first identifier and the fourth terminal to the second relay, then the second relay can determine whether to allow the second terminal to discover the first terminal, the third terminal, and the fourth terminal.

[0326] For instructions on how to obtain user information from the first RSC and / or the second terminal, please refer to the relevant instructions in S104 or S304, which will not be repeated here.

[0327] It is understandable that if the second relay determines that the second terminal is not allowed to discover all terminals in the first group of terminals, then it is considered that the second relay is not allowed to discover the first group of terminals.

[0328] In some embodiments, if it is determined that the second terminal is not allowed to discover the first group of terminals, the second relay may not respond to the second request message.

[0329] In other embodiments, when it is determined that the second terminal is not allowed to discover the first group of terminals, the method 500 may further include:

[0330] S505, the second relay sends a rejection message to the second terminal in response to the second request message.

[0331] Accordingly, the second terminal receives the rejection message.

[0332] The rejection message indicates that the first group of terminals is not discovered. The rejection message may include a first identifier. For example, the rejection message may be a DNS query rejection message.

[0333] Optionally, the rejection message may also include a reason value, which indicates that the reason for rejecting the discovery of the first terminal is that discovery is not allowed, or the reason for rejecting the discovery of the first terminal is a maximum hop limit.

[0334] Based on this reason value, the second terminal may not execute the process of discovering the first terminal within the preset time, thus avoiding some extra but unnecessary actions and saving signaling, power consumption and other overhead.

[0335] In yet other embodiments, if it is determined that the second terminal is allowed to discover some or all of the terminals in the first group of terminals, the method 500 may further include:

[0336] S506, the second relay sends an acceptance message to the second terminal in response to the second request message.

[0337] Accordingly, the second terminal receives the acceptance message.

[0338] The acceptance message indicates permission to discover some or all of the terminals in the first group of terminals. This acceptance message may include user information and IP addresses of some or all of the terminals in the first group that are permitted to be discovered. For example, the acceptance message may be a DNS query response message.

[0339] In summary, according to the method 500 provided in this application, a terminal (e.g., a first terminal) can, during the establishment of a direct communication connection, indicate to a relay (e.g., a first relay) which terminals are allowed / are allowed to discover the terminal, or indicate that only terminals whose path to the terminal has a hop count less than or equal to the maximum hop count are allowed to discover the terminal. The above indication can be synchronized to other relays, which can then determine whether to allow the second terminal to discover the group of terminals identified by the first identifier when the second terminal requests to do so, thereby implementing terminal discovery restrictions.

[0340] It should be understood that the difference between Method 500 and Methods 100 and 200 is that in Methods 100 and 200, the second terminal requests to discover a terminal, while in Method 500, by introducing a group identifier, the second terminal can discover a group of terminals at once. The difference between Method 500 and Method 400 is that in Method 300, the first RSC is used as the group identifier, while in Method 500, a dedicated group identifier is introduced. The implementation process of a specific example of Method 500 is similar to that of Method 200; please refer to Method 200 for details, which will not be elaborated here.

[0341] In one scenario, the path from the first terminal to the second terminal passes through only one relay terminal. For example, if the first terminal and the second terminal are end terminal 59 and end terminal 57 in Figure 5, respectively, then the path from the first terminal to the second terminal passes through only relay terminal 55. In this scenario, assuming the relay terminal traversed by the path from the first terminal to the second terminal is denoted as the second relay, then in method 500, the first terminal will send a first request message to the second relay, and the second information in the steps related to the second information in the operation performed by the second relay will be replaced with the first information.

[0342] Figure 11 illustrates another scenario of ProSe U2U multi-hop relay based on MANET. Referring to Figure 11, terminal 61 does not establish a direct communication connection with relay terminal 64; therefore, terminal 62 cannot discover terminal 61 through relay terminal 64. Terminal 61 establishes a direct communication connection with relay terminal 65; therefore, terminal 62 can discover terminal 61 through relay terminal 66. It is evident that the direct communication connection between terminal 62 and relay terminal 64 is useless for discovering terminal 61. Therefore, to save signaling overhead, terminal 62 can first discover terminal 61 and then establish a direct communication connection with the relay terminal. This scheme will be explained in detail below with reference to Figure 12.

[0343] Figure 12 is a schematic flowchart of the communication method provided in this application. This method 600 can be applied to the scenario shown in Figure 11. The first terminal, second terminal, first relay, and second relay in this method 600 can be, in sequence, end terminal 61, end terminal 62, relay terminal 65, and relay terminal 66 as shown in Figure 11. The steps in method 600 are described below.

[0344] S601, the first terminal sends a first request message to the first relay.

[0345] Accordingly, the first relay receives the first request message from the first terminal.

[0346] S602, the first relay sends the second information associated with the first RSC to the second relay according to the first request message.

[0347] Accordingly, the second relay receives the second information from the first relay.

[0348] In some embodiments, S601 to S602 are the same as S101 to S102, and reference can be made to S101 to S102. In other embodiments, S601 to S602 are the same as S301 to S302, and reference can be made to S301 to S302.

[0349] In S602, the first relay can also send the user information and IP address of the first terminal to the second relay.

[0350] It should be understood that prior to S601, the first terminal could discover each other with the first relay, as detailed in S201. Furthermore, prior to S602, nearby relay terminals supporting the first RSC could discover each other and establish a direct communication connection. For example, the first relay could discover the second relay and establish a direct communication connection. Moreover, the first and second relays formed a MANET network at the IP layer using the MANET protocol.

[0351] S603, Second terminal broadcasts discovery message.

[0352] The discovery message may include a first RSC, user information of the second terminal, and user information of the first terminal. The discovery message is used to discover the first terminal.

[0353] S604, the second relay determines whether to allow the second terminal to discover the first terminal based on the discovery message.

[0354] Specifically, the second relay determines that the discovery message is for discovering the first terminal based on the discovery message, and then searches for information related to the first terminal associated with the first RSC stored locally. As can be seen from the aforementioned steps, the second relay stores second information, and therefore the second relay can determine whether to allow the second terminal to discover the first terminal based on the second information. For example, if the second information indicates that the terminals allowed to discover the first terminal include the second terminal, then the second terminal is allowed to discover the first terminal.

[0355] Other relays that receive the discovery message can also search their local storage for information related to the first terminal associated with the first RSC. For example, if relay terminal 64 receives the discovery message from end terminal 62 for discovering end terminal 61, it can search its local storage for information related to the first terminal associated with the first RSC. Since relay terminal 64 and end terminal 62 are in different MANET networks, relay terminal 64 does not have the information related to the first terminal associated with the first RSC. Therefore, relay terminal 64 cannot determine whether to allow the second terminal to discover the first terminal, nor can it discover the first terminal. Thus, relay terminal 64 may choose not to respond to the discovery message or indicate to end terminal 62 that it cannot discover the first terminal.

[0356] If the second relay determines that the second terminal is allowed to discover the first terminal, the method 600 may further include:

[0357] S605, the second relay sends a response message to the first terminal.

[0358] Accordingly, the first terminal receives the response message.

[0359] The response message may include the first RSC and the user information of the first terminal. Optionally, the response message may include the IP address of the first terminal.

[0360] S606, the second terminal establishes a direct communication connection with the second relay based on the response message.

[0361] The process of the second terminal establishing a direct communication connection with the second relay is similar to the process of the first terminal establishing a direct communication connection with the first relay, and can be referred to S602 to S603.

[0362] If the second relay determines that the second terminal is not allowed to discover the first terminal, the second relay may choose not to respond to the discovery message, or the second relay may send a rejection message to the second terminal. This rejection message is the same as the rejection message in method 100 or method 300, and will not be described again here.

[0363] According to method 600 provided in this application, the second terminal can first discover the first terminal. Since the first terminal is discovered before establishing a direct communication connection with the relay terminal, resource waste caused by establishing a direct communication connection with a relay terminal that cannot discover the first terminal can be avoided. Furthermore, during the establishment of the direct communication connection, the first terminal can indicate to the first relay whether terminals are allowed / disallowed to discover the first terminal, or indicate that only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal. The first relay's indication can be synchronized to the second relay. During the second terminal's discovery of the first terminal, the second relay can determine whether to allow the second terminal to discover the first terminal based on this indication, thus implementing terminal discovery restrictions.

[0364] In one scenario, the path from the first terminal to the second terminal passes through only one relay terminal. In this scenario, the relay terminal traversed by the path from the first terminal to the second terminal can be referred to as the second relay. Then, in method 600, the first terminal will send a first request message to the second relay, and the second information in the steps related to the second information in the operation performed by the second relay will be replaced with the first information.

[0365] In some embodiments, the IP address in any of the above embodiments can be replaced with a MAC address.

[0366] The method provided in this application has been described above; the apparatus provided in this application will be described below.

[0367] Figure 13 illustrates a possible exemplary block diagram of the communication device involved in the embodiments of this application. As shown in Figure 13, the communication device 2000 may include modules or units for implementing the methods described above. In one possible design, the communication device 2000 includes a processing unit 2010 and a communication unit 2020. Optionally, the communication device 2000 may further include a storage unit 2030 for storing device program code and / or data.

[0368] In one design, the communication device 2000 can realize the functions that the first terminal in methods 100, 200, 300, 400, or 500 can perform. For example, the communication device 2000 is the first terminal, a communication module in the first terminal, or a circuit or chip in the first terminal responsible for communication functions.

[0369] In one embodiment, processing unit 2010 is used to generate a first request message; communication unit 2020 is used to send the first request message to a relay terminal. The first request message requests the establishment of a first direct communication connection, which is used for communication between communication device 2000 and the relay terminal. The first request message includes user information of communication device 2000, a first relay service code (RSC), and first information associated with the first RSC. The first information indicates whether or not terminals of communication device 2000 are allowed to discover it, or indicates that only terminals whose path to communication device 2000 has a hop count less than or equal to the maximum hop count are allowed to discover communication device 2000.

[0370] Optionally, the first information is a list of terminals that are allowed to discover the communication device 2000; or, the first information is a list of terminals that are not allowed to discover the communication device 2000; or, the first information indicates that no terminal is allowed to discover the communication device 2000; or, the first information indicates that any terminal is allowed to discover the communication device 2000.

[0371] Optionally, the maximum number of hops is determined based on a first RSC, or the first information indicates the maximum number of hops.

[0372] Optionally, the first request message may also include a first group identifier, which is the group identifier of the group to which the communication device 2000 belongs.

[0373] In one design, the communication device 2000 can perform the functions of the first relay in methods 100, 200, 300, 400, or 500. For example, the communication device 2000 is the first relay, a communication module in the first relay, or a circuit or chip in the first relay responsible for communication functions.

[0374] In one embodiment, the communication unit 2020 is configured to receive a first request message from a first terminal. The first request message requests the establishment of a first direct communication connection, which is used for the first terminal to communicate with the communication device 2000. The first request message includes: user information of the first terminal, service code (RSC) of the communication device 2000, and first information associated with the first RSC. The first information indicates whether or not the discovery of the first terminal is permitted, or indicates that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are permitted to discover the first terminal. The communication unit 2020 is further configured to send second information associated with the first RSC to a second relay according to the first request message. The second information indicates whether or not the discovery of the first terminal is permitted, or indicates that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are permitted to discover the first terminal.

[0375] Optionally, the first information is a list of terminals that are allowed to discover the first terminal; or, the first information is a list of terminals that are not allowed to discover the first terminal; or, the first information indicates that no terminal is allowed to discover the first terminal; or, the first information indicates that any terminal is allowed to discover the first terminal.

[0376] Optionally, the second information is a list of terminals that are allowed to discover the first terminal; or, the second information is a list of terminals that are not allowed to discover the first terminal; or, the second information indicates that no terminal is allowed to discover the first terminal; or, the second information indicates that any terminal is allowed to discover the first terminal.

[0377] Optionally, the communication unit 2020 is further configured to send a first RSC to the second relay according to the first request message.

[0378] Optionally, the maximum number of hops is determined based on a first RSC, or the first information indicates the maximum number of hops.

[0379] Optionally, the first request message may also include a first group identifier, which is the group identifier of the group to which the first terminal belongs.

[0380] Optionally, the communication unit 2020 is further configured to send a first set of identifiers to the second relay according to the first request message.

[0381] In one design, the communication device 2000 can perform the functions of the second relay in methods 100, 200, or 300. For example, the communication device 2000 is a second relay, a communication module in the second relay, or a circuit or chip in the second relay responsible for communication functions.

[0382] In one embodiment, the communication unit 2020 is configured to receive a second request message from a second terminal, the second request message including user information of the first terminal, and the second request message being used to discover the first terminal; the communication unit 2020 is further configured to send a rejection message to the second terminal if the processing unit 2010 determines that the second terminal is not allowed to discover the first terminal, the rejection message indicating rejection of discovering the first terminal; or, the communication unit 2020 is further configured to send an acceptance message to the second terminal if the processing unit 2010 determines that the second terminal is allowed to discover the first terminal, the acceptance message indicating that discovery of the first terminal is allowed. Whether the second terminal is allowed to discover the first terminal is determined by the processing unit 2010 based on the following information: the user information of the second terminal corresponding to the second request message, the first relay service code (RSC) corresponding to the second request message, the user information of the first terminal, and second information associated with the first RSC, the second information indicating whether or not terminals are allowed to discover the first terminal, or the second information indicating that only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal. Alternatively, whether to allow the second terminal to discover the first terminal is determined by the processing unit 2010 based on the following information: the user information of the second terminal corresponding to the second request message, the first relay service code (RSC) corresponding to the second request message, the user information of the first terminal, and first information associated with the first RSC. The first information indicates whether a terminal is allowed or not to discover the first terminal, or the first information indicates that only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal.

[0383] Optionally, the rejection message may also include a reason value, which indicates that the reason for rejecting the discovery of the first terminal is that discovery is not allowed.

[0384] Optionally, the rejection message may also include a reason value indicating that the reason for rejecting the discovery of the first terminal is the maximum hop limit.

[0385] Optionally, the communication unit 2020 is further configured to receive second information from the first relay; or to receive first information from the first terminal.

[0386] Optionally, the processing unit 2010 is further configured to acquire user information and / or the first RSC of the second terminal.

[0387] Optionally, the communication unit 2020 is specifically configured to receive a second request message from the second direct communication connection through the ProSe layer of the proximity service; wherein the processing unit 2010 is specifically configured to have the ProSe layer obtain the user information and / or the first RSC of the second terminal from the information associated with the second direct communication connection according to the second request message, wherein the information associated with the second direct communication connection includes the user information and / or the first RSC of the second terminal.

[0388] Optionally, the processing unit 2010 is specifically used to obtain user information of the second terminal based on the address of the second terminal corresponding to the second request message.

[0389] Optionally, the first information or the second information is a list of terminals that are allowed to discover the first terminal; or, the first information or the second information is a list of terminals that are not allowed to discover the first terminal; or, the first information or the second information indicates that no terminal is allowed to discover the first terminal; or, the first information or the second information indicates that any terminal is allowed to discover the first terminal.

[0390] In one design, the communication device 2000 can perform the functions that the second terminal in method 100, method 200, or method 300 described above can perform. For example, the communication device 2000 can be a second terminal, a communication module in a second terminal, or a circuit or chip in a second terminal that is responsible for communication functions.

[0391] In one embodiment, the communication unit 2020 is configured to send a second request message to a second relay, the second request message including user information of the first terminal, the second request message being used to discover the first terminal; the communication unit 2020 is also configured to receive a rejection message from the second relay, the rejection message indicating rejection of discovering the first terminal.

[0392] Optionally, the rejection message may also include a reason value, which indicates that the reason for rejecting the discovery of the first terminal is that discovery is not allowed.

[0393] Optionally, the rejection message may also include a reason value indicating that the reason for rejecting the discovery of the first group of terminals is the maximum hop limit.

[0394] Optionally, the second request message may also include the first relay service code RSC corresponding to the second request message and / or the user information of the communication device 2000 corresponding to the second request message.

[0395] Optionally, the processing unit 2010 is configured to refrain from initiating a discovery process for the first terminal within a preset time period.

[0396] In one design, the communication device 2000 can perform the functions of the second relay in method 400 or method 500. For example, the communication device 2000 is a second relay, a communication module in the second relay, or a circuit or chip in the second relay responsible for communication functions.

[0397] In one embodiment, the communication unit 2020 is configured to receive a second request message from a second terminal, the second request message including third information indicating a first group of terminals, and the second request message being used to discover the first group of terminals; the communication unit 2020 is further configured to send a rejection message to the second terminal if the processing unit 2010 determines that the second terminal is not allowed to discover the first group of terminals, the rejection message indicating that the discovery of the first group of terminals is refused; or, the communication unit 2020 is further configured to send an acceptance message to the second terminal if the processing unit 2010 determines that the second terminal is allowed to discover at least one terminal in the first group of terminals, the acceptance message indicating that the discovery of at least one terminal is allowed. Whether a second terminal is allowed to discover the first terminal in the first group of terminals is determined by the processing unit 2010 based on the following information: user information of the second terminal corresponding to the second request message, the first relay service code (RSC) corresponding to the second request message, user information of the first terminal, second information associated with the first RSC, and third information. The second information indicates whether a terminal is allowed or not allowed to discover the first terminal, or indicates that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal. Alternatively, whether a second terminal is allowed to discover the first terminal in the first group of terminals is determined by the processing unit 2010 based on the following information: user information of the second terminal corresponding to the second request message, the first relay service code (RSC) corresponding to the second request message, user information of the first terminal, first information associated with the first RSC, and third information. The first information indicates whether a terminal is allowed or not allowed to discover the first terminal, or indicates that only terminals whose path to the first terminal has a hop count less than or equal to the maximum hop count are allowed to discover the first terminal. The first terminal can be any terminal in the first group of terminals.

[0398] Optionally, the third information is either the first RSC or the first group identifier. Terminals that support the first RSC are the first group terminals, and the first group identifier is the group identifier of the first group terminals.

[0399] Optionally, the received message includes user information and address of at least one terminal.

[0400] Optionally, the rejection message may also include a reason value, which indicates that the reason for rejecting the discovery of the first group of terminals is that discovery is not allowed or that the reason for rejecting the discovery of the first terminal is a maximum hop limit.

[0401] Optionally, the communication unit 2020 is further configured to receive second information from the first relay; or to receive first information from the first terminal.

[0402] Optionally, the processing unit 2010 is further configured to acquire user information and / or the first RSC of the second terminal.

[0403] Optionally, the communication unit 2020 is specifically configured to receive a second request message from the second direct communication connection through the ProSe layer of proximity service; wherein, the processing unit 2010 is specifically configured to have the ProSe layer obtain the user information and / or the first RSC of the second terminal from the information associated with the second direct communication connection according to the second request message, wherein the information associated with the second direct communication connection includes the user information and / or the first RSC of the second terminal.

[0404] Optionally, the processing unit 2010 is specifically used to obtain user information of the second terminal based on the address of the second terminal corresponding to the second request message.

[0405] Optionally, the first information or the second information is a list of terminals that are allowed to discover the first terminal; or, the first information or the second information is a list of terminals that are not allowed to discover the first terminal; or, the first information or the second information indicates that no terminal is allowed to discover the first terminal; or, the first information or the second information indicates that any terminal is allowed to discover the first terminal; or, the first information or the second information is a group identifier.

[0406] In one design, the communication device 2000 can perform the functions that the second terminal in method 400 or method 500 can perform. For example, the communication device 2000 is a second terminal, a communication module in the second terminal, or a circuit or chip in the second terminal that is responsible for communication functions.

[0407] In one embodiment, the communication unit 2020 is configured to send a second request message to a second relay, the second request message including third information indicating a first group of terminals, the second request message being used to send the first group of terminals; the communication unit 2020 is also configured to receive a rejection message from the second relay, the rejection message indicating rejection of discovering the first group of terminals, or to receive an acceptance message from the second relay, the acceptance message indicating permission to discover at least one terminal in the first group of terminals.

[0408] Optionally, the third information is the first relay service code (RSC) or the first group identifier corresponding to the second request message. The terminal that supports the first RSC is the first group terminal, and the first group identifier is the group identifier of the first group terminal.

[0409] Optionally, the received message includes user information and address of at least one terminal.

[0410] Optionally, the rejection message may also include a reason value, which indicates that the reason for rejecting the discovery of the first group of terminals is that discovery is not allowed or that the reason for rejecting the discovery of the first terminal is a maximum hop limit.

[0411] Optionally, the second request message may also include the first relay service code RSC corresponding to the second request message and / or the user information of the communication device 2000 corresponding to the second request message.

[0412] Optionally, the processing unit 2010 is configured to refrain from initiating a discovery process for at least one terminal within a preset time period.

[0413] In one design, the communication device 2000 can perform the functions of the second relay in the method 600 described above. For example, the communication device 2000 is a second relay, a communication module in the second relay, or a circuit or chip in the second relay responsible for communication functions.

[0414] In one embodiment, the communication unit 2020 is configured to receive a discovery message from the second terminal, the discovery message including a first RSC, user information of the second terminal, and user information of the first terminal, the discovery message being used by the second terminal to discover the first terminal; the communication unit 2020 is further configured to, when the processing unit 2010 determines, based on the discovery message and the first information, that the second terminal is allowed to discover the first terminal, or when the processing unit 2010 determines, based on the discovery message and the second information, that the second terminal is allowed to discover the first terminal, send a discovery response message to the second terminal, the discovery response message indicating that the second terminal is allowed to discover the first terminal, the first information and the second information both indicating which terminals are allowed or not allowed to discover the first terminal, or both the first information and the second information both indicating that only terminals whose hop count corresponding to the path to the first terminal is less than or equal to the maximum hop count are allowed to discover the first terminal; and establish a direct communication connection with the second terminal.

[0415] Optionally, the discovery response message includes a first RSC, user information of the first terminal, and the address of the first terminal.

[0416] In one design, the communication device 2000 can perform the functions of the second terminal in the method 600 described above. For example, the communication device 2000 is a second terminal, a communication module in the second terminal, or a circuit or chip in the second terminal responsible for communication functions.

[0417] In one embodiment, the communication unit 2020 is used to broadcast a discovery message, which includes a first RSC, user information of the communication device 2000, and user information of the first terminal. The discovery message is used by the communication device 2000 to discover the first terminal. The communication unit 2020 is also used to receive a discovery response message from a relay terminal, which indicates that the communication device 2000 is allowed to discover the first terminal. The discovery response message includes a first RSC, user information of the first terminal, and the address of the first terminal. The communication unit 2020 also establishes a direct communication connection with the relay terminal.

[0418] In one possible design, the functionality of the processing unit 2010 can be implemented by one or more processors. Specifically, the processor may include a modem chip, or a system-on-a-chip (SoC) or SIP chip containing a modem core. The functionality of the communication unit 2020 can be implemented by transceiver circuitry.

[0419] In one possible design, the function of the processing unit 2010 can be implemented by a circuit system including one or more processors or processor cores in the circuit or chip responsible for communication functions in the first terminal / second terminal / first relay / second relay. The function of the communication unit 2020 can be implemented by the interface circuit or data transceiver circuit on the aforementioned chip.

[0420] It is understood that the division of units in the above-described device is merely a logical functional division. One function can correspond to one functional unit, or two or more functions can be integrated into one functional unit. In actual implementation, all or some units can be integrated onto a single physical entity, or distributed across different physical entities. Furthermore, the aforementioned functional units can be implemented in hardware, software, or a combination of both. Whether a function is executed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for specific applications, but such implementations should not be considered beyond the scope of this application.

[0421] In one example, the functional unit in any of the above devices may be one or more integrated circuits configured to implement the above methods, such as: one or more application-specific integrated circuits (ASICs), or one or more central processing units (CPUs), one or more microcontroller units (MCUs), one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs), or a combination of at least two of these integrated circuit forms.

[0422] In one example, storage unit 2030 may include random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory and / or registers, etc.

[0423] Figure 14 is a schematic diagram of a terminal provided in an embodiment of this application. The terminal 3000 can be used to implement the operations of the first terminal / second terminal / first relay / second relay in the above embodiments. As shown in Figure 14, the terminal includes: one or more antennas 3010, a radio frequency processing system 3020, and a processor system 3030.

[0424] In the downlink or sidelink direction, the RF processing system 3020 receives RF signals through the antenna 3010 and sends the RF-processed signals to the processor system 3030 for further processing. In the uplink or sidelink direction, the processor system 3030 processes the terminal-side information and sends it to the RF processing system 3020, which then processes the signal and transmits it through the antenna 3010.

[0425] In one example, the RF processing system 3020 serves as the communication interface for external communication of the terminal and may include an RF front end (RFFE) 3021 and an RF transceiver 3022. The RFFE 3021 is primarily used for one or more processing operations, such as shaping, passband selection, or gain adjustment, on the RF signals received by the antenna or those to be transmitted through the antenna. It may include one or more components such as RF switches, duplexers, filters, power amplifiers, antenna tuners, and low-noise amplifiers. The RFFE 3021 can be a circuit system composed of multiple discrete devices or integrated into one or more chips. The RF transceiver 3022 processes the RF signals received by the RFFE into baseband / IF signals for further processing by the processor system 3030, and processes the baseband / IF signals provided by the processor system 3030 into RF signals for transmission to the RFFE 3021. The baseband / IF signals transmitted between the RF transceiver 3022 and the processor system 3030 can be digital or analog signals. The RF transceiver 3022 can be implemented by one or more chips, which are commonly referred to as RF ICs.

[0426] In one example, the processor system 3030 may include one or more processors for processing signals and executing one or more communication protocols. Optionally, the processor system 3030 may also include a memory 3036. In one example, the one or more processors include at least one baseband processor 3031 (also known as a modem processor). The memory 3036 is used to store data and / or computer program instructions. Optionally, the processor system 3030 may also include one or more application processors 3032 for implementing processing of the terminal operating system and application layer. Optionally, the processor system 3030 may also include one or more of a voice subsystem 3033, a multimedia subsystem 3034, or an interface circuit 3035. The voice subsystem 3033 is used to process voice signals, the multimedia subsystem 3034 is used to handle multimedia-related operations, such as video encoding / decoding, image processing, etc., and the interface circuit 3035 is used to implement communication with other terminal components, such as a display 3040, an input device 3050, a memory 3060, etc. The above-mentioned components in the processor system 3030 can communicate with each other via a bus or communication interface circuit.

[0427] In one example, the processor system 3030 can be packaged as a single processor chip, such as a SoC chip or a SIP chip. In another example, the processor system 3030 can be a system composed of multiple chips; for example, the baseband processor 3031 can be packaged as a single chip, or packaged with part or all of the circuitry of the radio frequency processing system into a single chip.

[0428] In one example, memory 3036 can be on-chip memory, i.e., located on the processor system 3030 chip. In another example, memory 3060 can be off-chip memory, i.e. located outside the processor system 3030 chip.

[0429] In one example, the baseband processor 3031 may include one or more processor cores 30311 and interface circuitry 30314. The one or more processor cores 30311 are used to process signals and execute one or more communication protocols. Optionally, the baseband processor 3031 may also include a memory 30312 for storing at least a portion of the corresponding computer program instructions and / or data. In one example, the one or more processor cores 30311 implement the relevant operations in the above method embodiments by executing the computer program instructions stored in the memory 30312. In this disclosure, memory 30312 is used to store corresponding computer program instructions and / or data. This can mean that memory 30312 stores all corresponding computer program instructions and / or data for execution by processor core 30311; or it can mean that memory 30312 stores a portion of corresponding computer program instructions and / or data, including the computer program instructions and / or data currently required to be executed by processor core 30311. Memory 30312 can store different portions of computer program instructions and / or data multiple times for execution by processor core 30311 to implement the relevant operations in the above method embodiments. Interface circuit 30314 serves as a communication interface for communication with other components, such as transmitting signals with radio frequency processing system 3020, communicating with other subsystems and related components of processor system 3030 via bus, such as transmitting data control signals with application processor 3032, and transmitting data or computer program instructions with memory 3036 or memory 3060. Optionally, in order to reduce the load on the processor core, a baseband signal processing circuit 30313 can be set to perform at least some baseband signal processing, including one or more of signal demodulation, modulation, encoding or decoding.

[0430] In one example, terminal 3000 may include a communication module of processor system 3030 and radio frequency processing system 3020, processor system 3030, or baseband processor 3031.

[0431] The processor, processor system, application processor, baseband processor, processor circuit, or processor core mentioned above can be collectively referred to as a processor. The processor may include one or more of the following: central processing unit (CPU), digital signal processor (DSP), microprocessor unit (MPU), microcontroller unit (MCU), graphics processing unit (GPU), field programmable gate array (FPGA), artificial intelligence processor (AI processor), or neural processing unit (NPU).

[0432] The aforementioned memory may include one or more of the following storage media: random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), phase-change memory (PCM), resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), cache, register, read-only memory (ROM), flash memory, erasable programmable read-only memory (EPROM), hard disk, etc. In one example, computer program instructions for executing the above embodiments may be stored in non-volatile memory, such as at least a portion of the aforementioned memory 3060 (e.g., one or more of ROM, flash memory, EPROM, or hard disk). When the terminal is running, the corresponding computer program instructions may be partially or wholly loaded onto a memory with a faster transfer speed than the processor, such as at least a portion of memory 3036 and / or memory 30312 (e.g., one or more of RAM, SRAM, DRAM, PCM, RERAM, MRAM, FRAM, cache, or register), for the processor to execute in order to implement the steps in the above method embodiments.

[0433] In one example, the RF transceiver 3022 and the RF front-end 3021 can also be packaged in a single chip. In another example, the RF transceiver 3022, the RF front-end 3021, and the baseband processor 3031 can also be packaged in a single chip.

[0434] This application also provides a computer program product, including computer program instructions, which, when executed, cause the various steps or processes performed by the first terminal / second terminal / first relay / second relay in any of the above method embodiments to be executed.

[0435] It should be understood that the " / " in this application means "or". For example, "A / B" means A or B.

[0436] This application also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed, causes the various steps or processes performed by the first terminal / second terminal / first relay / second relay in any of the above method embodiments to be executed.

[0437] This application also provides a chip, including a processor, for calling and running a computer program or instructions from a memory, wherein when the computer program or instructions are executed, the various steps or processes performed by the first terminal / second terminal / first relay / second relay in any of the above method embodiments are executed.

[0438] This application also provides a communication system including at least one of a first terminal, a second terminal, a first relay, and a second relay. The first terminal, the second terminal, the first relay, and the second relay can respectively perform the operations or steps performed by the first terminal, the second terminal, the first relay, and the second relay in any of the aforementioned methods 200, 300, 400, 500, or 600.

[0439] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, etc.) containing computer-usable program code.

[0440] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0441] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0442] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0443] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A communication method characterized by comprising: The method comprises: generating a first request message; sending the first request message to a relay terminal; wherein the first request message is used to request establishment of a first direct communication connection, the first direct communication connection being used for communication between a first terminal and the relay terminal, the first request message comprising user information of the first terminal, a first relay service code (RSC), and first information associated with the first RSC, the first information indicating whether to allow or not to allow terminals to discover the first terminal.

2. The method of claim 1, wherein, The first information is a list of terminals allowed to discover the first terminal; or the first information is a list of terminals not allowed to discover the first terminal; or the first information indicates that no terminal is allowed to discover the first terminal; or the first information indicates that any terminal is allowed to discover the first terminal.

3. The method of claim 1 or 2, wherein, The first request message further comprises a first group identifier, the first group identifier being a group identifier of a group to which the first terminal belongs.

4. A communication method characterized by comprising: The method comprises: receiving a first request message from a first terminal, the first request message being used to request establishment of a first direct communication connection, the first direct communication connection being used for communication between the first terminal and a first relay, the first request message comprising user information of the first terminal, a first relay service code (RSC), and first information associated with the first RSC, the first information indicating whether to allow or not to allow terminals to discover the first terminal; sending, according to the first request message, second information associated with the first RSC to a second relay, the second information indicating whether to allow or not to allow terminals to discover the first terminal.

5. The method of claim 4, wherein, The method further comprises: sending, according to the first request message, the first RSC to the second relay.

6. The method of claim 4 or 5, wherein, The second information is a list of terminals allowed to discover the first terminal; or the second information is a list of terminals not allowed to discover the first terminal; or the second information indicates that no terminal is allowed to discover the first terminal; or the second information indicates that any terminal is allowed to discover the first terminal.

7. The method of any one of claims 4-6, wherein, The first request message further comprises a first group identifier, the first group identifier being a group identifier of a group to which the first terminal belongs.

8. The method of claim 7, wherein, The method further comprises: sending, according to the first request message, the first group identifier to the second relay.

9. A communication method characterized by comprising: The method comprises: receiving a second request message from a second terminal, the second request message comprising user information of a first terminal, the second request message being used to discover the first terminal; in a case where it is determined that the second terminal is not allowed to discover the first terminal, sending a rejection message to the second terminal, the rejection message indicating rejection of discovery of the first terminal; or in a case where it is determined that the second terminal is allowed to discover the first terminal, sending an acceptance message to the second terminal, the acceptance message indicating permission of discovery of the first terminal; The information includes a first relay service code (RSC) corresponding to the second request message, user information of the second terminal corresponding to the second request message, user information of the first terminal, and second information associated with the first RSC, the second information indicating whether to allow the second terminal to discover the first terminal. The information includes a first relay service code (RSC) corresponding to the second request message, user information of the second terminal corresponding to the second request message, user information of the first terminal, and first information associated with the first RSC, the first information indicating whether to allow the second terminal to discover the first terminal.

10. The method of claim 9, wherein, The rejection message further includes a reason value, the reason value indicating that the reason for rejecting the discovery of the first terminal is that the discovery is not allowed.

11. The method of claim 9 or 10, wherein, Before the receiving of the second request message from the second terminal, the method further includes: receiving the second information from a first relay; or receiving the first information from the first terminal.

12. The method of any one of claims 9-11, wherein, The method further includes: obtaining user information of the second terminal and / or the first RSC.

13. The method of claim 12, wherein, The receiving of the second request message from the second terminal includes: receiving the second request message from a second direct communication connection through a proximity service (ProSe) layer; The obtaining of the user information of the second terminal and / or the first RSC includes: the ProSe layer obtaining the user information of the second terminal and / or the first RSC from information associated with the second direct communication connection according to the second request message, wherein the information associated with the second direct communication connection includes the user information of the second terminal and / or the first RSC.

14. The method of claim 12, wherein, The obtaining of the user information of the second terminal includes: obtaining the user information of the second terminal according to an address of the second terminal corresponding to the second request message.

15. The method of any one of claims 9-14, wherein, The second request message further includes the user information of the second terminal and / or the first RSC.

16. The method of any one of claims 9-15, wherein, The first information or the second information is a terminal list allowed to discover the first terminal; or the first information or the second information is a terminal list not allowed to discover the first terminal; or the first information or the second information indicates that no terminal is allowed to discover the first terminal; or the first information or the second information indicates that any terminal is allowed to discover the first terminal.

17. A method of communication, comprising: The method includes: sending a second request message to a second relay, the second request message including user information of a first terminal, the second request message being used for discovering the first terminal; receiving a rejection message from the second relay, the rejection message indicating that the discovery of the first terminal is rejected.

18. The method of claim 17, wherein, The rejection message further includes a reason value, the reason value indicating that the reason for rejecting the discovery of the first terminal is that the discovery is not allowed.

19. The method of claim 17 or 18, wherein, The second request message further includes a first relay service code (RSC) corresponding to the second request message and / or user information of a second terminal corresponding to the second request message.

20. The method of any one of claims 17-19, wherein, The method further comprises: not initiating a discovery procedure for the first terminal again within a pre-set time period.

21. A communications device, characterized by comprising means for performing each of the steps of the method of any one of claims 1-20.

22. A communications device, characterized by comprising a processor coupled with a memory for storing a program or instructions, which when executed by the processor, cause the apparatus to perform the method of any one of claims 1-20.

23. A readable storage medium, on which a computer program or instructions are stored, characterized in that, The computer program or instructions, when executed, perform the method of any one of claims 1-20.

24. A computer program product, characterised in that, comprising computer program instructions, which when executed, perform the method of any one of claims 1-20.

25. A chip, characterized by comprising a processor for calling and running a computer program from a memory, the method of any one of claims 1-20 being performed.

26. A communication system, characterized by comprising one or more of the first terminal, the first relay, the second relay, and the second terminal; wherein the first terminal is configured to perform the method of any one of claims 1-3, the first relay is configured to perform the method of any one of claims 4-8, the second relay is configured to perform the method of any one of claims 9-16, and the second terminal is configured to perform the method of any one of claims 17-20.

Citation Information

Patent Citations

  • U2U relay discovery method, communication device and storage medium

    CN117461353A

  • Relay discovery method and device, communication equipment, communication system and medium

    CN117678261A