Terminal discovery method and device, equipment and storage medium
Patent Information
- Application Number
- CN202280099789.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2025-04-15
AI Technical Summary
In 5G communications, when the first terminal cannot directly communicate with the second terminal at short distances, the existing technology only supports communication through one relay terminal, and cannot realize discovery and establishment of communication through multiple relay terminals.
By receiving the first discovery message sent by the second relay terminal, the first relay terminal instructs the first terminal to discover the second terminal through the first relay terminal, and can select a path to achieve communication, or through the first relay terminal and The second relay terminal implements communication in sequence.
This enables the first terminal to discover the second terminal through multiple relay terminals and select the best communication path to ensure communication establishment and improve communication flexibility and reliability.
Smart Images

Figure CN119836794A_ABST
Abstract
Description
Terminal discovery method, device, equipment and storage medium Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a terminal discovery method, apparatus, device, and storage medium. Background Art
[0002] The fifth generation th In 5G (5G) communications, when a first terminal needs to establish communication with a second terminal, if the first terminal cannot perform direct short-range communication with the second terminal, the first terminal can discover the second terminal through a relay terminal, and can further establish communication with the second terminal through the relay terminal.
[0003] Summary of the Invention
[0004] The embodiments of the present application provide a terminal discovery method, apparatus, device, and storage medium, which can enable a first terminal to discover a second terminal through at least two relay terminals. The technical solution is as follows:
[0005] According to one aspect of the present application, a terminal discovery method is provided. The method is performed by a first relay terminal, and the method includes:
[0006] receiving a first discovery message sent by a second relay terminal;
[0007] The first discovery message is used by the first relay terminal to instruct the first terminal to discover the second terminal through the first relay terminal.
[0008] According to one aspect of the present application, a terminal discovery method is provided, which is performed by a first terminal and includes:
[0009] receiving a second discovery message sent by the first relay terminal;
[0010] The second discovery message is used to instruct the first terminal to discover the second terminal through the first relay terminal.
[0011] According to one aspect of the present application, a terminal discovery device is provided, the device comprising:
[0012] A receiving module, configured to receive a first discovery message sent by a second relay terminal;
[0013] The first discovery message is used by the first relay terminal to instruct the first terminal to discover the second terminal through the first relay terminal.
[0014] According to one aspect of the present application, a terminal discovery device is provided, the device comprising:
[0015] A receiving module, configured to receive a second discovery message sent by the first relay terminal;
[0016] The second discovery message is used to instruct the first terminal to discover the second terminal through the first relay terminal.
[0017] According to one aspect of the present application, a first relay terminal is provided, which includes a memory and a processor; the memory stores at least one program code, and the program code is loaded and executed by the processor to implement the terminal discovery method as described above.
[0018] According to one aspect of the present application, a first terminal is provided, which includes a memory and a processor; the memory stores at least one program code, and the program code is loaded and executed by the processor to implement the terminal discovery method as described above.
[0019] According to one aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to be executed by a processor to implement the terminal discovery method described above.
[0020] According to one aspect of the present application, a chip is provided. The chip includes a programmable logic circuit and / or program instructions, and when an electronic device equipped with the chip is running, it is used to implement the terminal discovery method as described above.
[0021] According to one aspect of the present application, a computer program product is provided. The computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium, and a processor reads and executes the computer instructions from the computer-readable storage medium to implement the terminal discovery method as described above.
[0022] The technical solutions provided by the embodiments of the present application include at least the following beneficial effects:
[0023] By receiving the first discovery message sent by the second relay terminal, the first relay terminal may instruct the first terminal to discover the second terminal through the first relay terminal. Based on the first discovery message, a communication path between the first terminal and the second terminal may be selected so that the first terminal communicates with the second terminal through the first relay terminal, or the first terminal communicates with the second terminal through the first relay terminal and then the second relay terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0025] FIG1 is a schematic diagram of a 5G network architecture provided by an exemplary embodiment of the present application;
[0026] FIG2 is a schematic diagram of establishing communication provided by an exemplary embodiment of the present application;
[0027] FIG3 is a schematic diagram of implementing relay communication provided by an exemplary embodiment of the present application;
[0028] FIG4 is a schematic diagram of an exemplary embodiment of the present application that provides a situation where relay communication cannot be implemented;
[0029] FIG5 is a flow chart of a terminal discovery method provided by an exemplary embodiment of the present application;
[0030] FIG6 is a flow chart of a terminal discovery method provided by an exemplary embodiment of the present application;
[0031] FIG7 is a flowchart of a terminal discovery method provided by an exemplary embodiment of the present application;
[0032] FIG8 is a flowchart of a terminal discovery method provided by an exemplary embodiment of the present application;
[0033] FIG9 is a flowchart of a terminal discovery method provided by an exemplary embodiment of the present application;
[0034] FIG10 is a schematic diagram of a terminal discovery device provided by an exemplary embodiment of the present application;
[0035] FIG11 is a schematic diagram of a terminal discovery device provided by an exemplary embodiment of the present application;
[0036] FIG12 is a schematic structural diagram of a communication device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0038] FIG1 shows a schematic diagram of a 5G network architecture provided by an exemplary embodiment of the present application.
[0039] The 5G network system includes: User Equipment / Mobile Terminal (UE), (Radio) Access Network (R)AN), User Plane Function (UPF), Data Network (DN) and Control Plane Function.
[0040] Among them, the control plane functions include: Access and Mobility Management Function (AMF), Session Management Function (SMF), Policy Control Function (PCF) and Unified Data Manager (UDM), Application Function (AF), Network Slice Selection Function (NSSF), and Authentication Server Function (AUSF).
[0041] Among them, the UE establishes an access layer connection with the AN through the Uu air interface, exchanges access layer messages and performs wireless data transmission. The UE establishes a non-access layer (NAS) connection with the AMF through the N1 interface and exchanges NAS messages. AMF is the mobility management function in the core network, and SMF is the session management function in the core network. In addition to managing the mobility of the UE, the AMF is also responsible for forwarding session management-related messages between the UE and the SMF. PCF is the policy management function in the core network, responsible for formulating policies related to UE mobility management, session management, billing, etc. UPF is the user plane function in the core network, which transmits data with the external data network through the N6 interface and with the AN through the N3 interface.
[0042] Figure 2 shows a schematic diagram of establishing communication provided by an exemplary embodiment of the present application, wherein UE1, UE2, UE3, and UE4 represent different terminals, and a terminal with Prose capability can directly communicate with another terminal with Prose capability via a PC5 interface.
[0043] Referring to FIG2 , taking UE1 as an example, UE1 may send a request to multiple UEs to establish a PC5 connection, specifically including the following steps:
[0044] Step 11: UE2 determines a Layer 2 ID for signaling reception.
[0045] Among them, step 12 and step 13 are similar to step 11 and are not repeated here.
[0046] Step 2: The application layer provides UE1 with application layer information for unicast short-range communication.
[0047] Step 3: UE1 sends a direct communication request message to UE2 via broadcast or unicast.
[0048] Illustratively, the direct communication request message is used by UE1 to request UE2 to establish communication.
[0049] Taking the establishment of short-range communication between UE1 and UE2 as an example, when the short-range link is established with the target UE as the target, the following steps are performed:
[0050] Step 4a: UE1 and UE2 establish security;
[0051] Step 5a: UE2 sends a direct communication reception message to UE1 in unicast mode;
[0052] Step 6: UE1 and UE2 transmit unicast data units.
[0053] For example, if UE1 needs to establish service communication with UE2 and UE4, and the target is to establish a short-range link for the service, the following steps are performed:
[0054] Step 4b: UE1 establishes security with UE2 and UE4 respectively;
[0055] Step 5b: UE2 and UE4 each send a direct communication reception message to UE1 in a unicast manner;
[0056] Step 6: UE1 transmits unicast data units to UE2 and UE4 respectively.
[0057] Illustratively, the direct communication reception message is used to instruct UE2 to establish communication with UE1.
[0058] In one implementation scenario, when two UEs with short-range communication capabilities are far apart and cannot directly establish communication through the PC5 interface, they can also use a relay terminal (Relay UE) with short-range communication capabilities to relay the communication.
[0059] Figure 3 shows a schematic diagram of implementing relay communication provided by an exemplary embodiment of the present application. Taking the direct communication between UE1 and UE2 as an example, the relay terminal (i.e., UE R in the figure) can communicate directly with UE1 through the PC5 interface, and can also communicate directly with UE2 through PC5. UE1 and UE2 can then interact with services through the relay terminal.
[0060] Based on Figure 3, Figure 4 shows a schematic diagram of an exemplary embodiment of the present application that provides an inability to implement relay communication. Still taking the direct communication between UE1 and UE2 as an example, there is no relay terminal between UE1 and UE2 that is close to both UE1 and UE2. In the related art, only communication between UE1 and UE2 is supported through one relay terminal, that is, UE1 and UE2 cannot communicate through the first relay terminal (i.e., UE R1 in the figure). Referring to Figure 4, the second relay terminal (i.e., UE R2 in the figure) is required between the first relay terminal and UE2 to establish or modify the communication between the first terminal and the second terminal.
[0061] The present application provides a terminal discovery method that enables UE1 to discover UE2 through a first relay terminal and a second relay terminal, and further enables the first terminal to establish communication with UE2 through the first relay terminal and the second relay terminal. It should be understood that the embodiments of the present application only use the example of terminal discovery and / or communication establishment between the first terminal and the second terminal through two relay terminals. The case where there are more than two relay terminals between the first terminal and the second terminal is similar, and can be implemented by analogy with reference to the following content, and the specific details are not repeated here.
[0062] FIG5 shows a flowchart of a terminal discovery method provided by an exemplary embodiment of the present application. The method is executed by a first relay terminal and includes the following steps:
[0063] Step 102: Receive a first discovery message sent by the second relay terminal.
[0064] Illustratively, the first discovery message is used by the first relay terminal to instruct the first terminal to discover the second terminal through the first relay terminal.
[0065] In some embodiments, the first discovery message can also be understood as being used by a first relay terminal to instruct the first terminal to discover a second terminal at least through the first relay terminal. The first terminal can directly discover the second terminal through the first relay terminal, or the first terminal can discover the second terminal through the first relay terminal and at least one second relay terminal. For example, after receiving the first discovery message, the first relay terminal generates a second discovery message based on the first discovery message and sends the second discovery message to the first terminal, informing the first terminal that the second terminal can be discovered at least through the first relay terminal.
[0066] With reference to the foregoing, if the first terminal and the second terminal cannot directly discover and establish communication through the first relay terminal, communication between the first relay terminal and the second terminal still needs to pass through at least one second relay terminal. Based on this, the second relay terminal sends a first discovery message to the first relay terminal, so that the first relay terminal informs the first terminal that it can discover the second terminal through the first relay terminal.
[0067] Optionally, the discovery message is a discovery announcement message, or the discovery message is a discovery response message.
[0068] Among them, the discovery message is a message sent by the sender in a broadcast form, which is used by the sender to actively inform the receiving end that terminal discovery and / or communication establishment can be achieved; the discovery response message is a reply to the discovery request message, that is, after the sender receives the discovery request message sent by the receiving end, it can send a discovery response message to the receiving end to passively inform the receiving end that terminal discovery and / or communication establishment can be achieved.
[0069] Exemplarily, the first discovery message is a first discovery announcement message or a first discovery response message, wherein the first discovery announcement message is a message actively sent by the second relay terminal in a broadcast form, and the first discovery response message is a reply of the second relay terminal to the first discovery request message sent by the first relay terminal.
[0070] Optionally, the message content and / or link layer packet structure of the first discovery message carries the identifier of the second terminal. The identifier of the second terminal includes the user identifier and / or layer 2 identifier of the second terminal. Exemplarily, the message content of the first discovery message carries the user identifier of the second terminal at the application layer, and / or the link layer packet structure of the first discovery message carries the layer 2 identifier of the second terminal.
[0071] In some embodiments, in order for the first terminal to discover the second terminal, after receiving the first discovery message sent by the second relay terminal, the first relay terminal may generate a second discovery message based on the first discovery message and send the second discovery message to the first terminal.
[0072] The second discovery message is used to indicate that the first terminal discovers the second terminal through the first relay terminal. Optionally, the second discovery message carries the identifier of the second terminal, or the second discovery message carries the identifier of the first relay terminal and the identifier of the second terminal. It can also be understood that the second discovery message carries at least the identifier of the second terminal. Similar to the identifier of the second terminal, the identifier of the first relay terminal includes the user identifier and / or layer 2 identifier of the first relay terminal. The layer 2 identifier of the first relay terminal is optionally carried in the link layer packet structure of the second discovery message.
[0073] As mentioned above, a first relay terminal and a second relay terminal exist between the first terminal and the second terminal, and the first terminal can discover the second terminal through the first relay terminal. Subsequently, if it is necessary to establish or modify a communication path between the first terminal and the second terminal, this can be achieved in the following two ways:
[0074] Implementation method 1: The first terminal communicates with the second terminal through the first relay terminal;
[0075] Implementation method 2: The first terminal communicates with the second terminal via the first relay terminal and the second relay terminal in sequence.
[0076] The selection of the above two methods may be made by the first relay terminal or by the first terminal.
[0077] In some embodiments, after receiving the first discovery message, the first relay terminal may perform path selection, determine the second relay terminal as a node on the communication path between the first relay terminal and the second terminal, and store the first path information, which includes the identifier of the second relay terminal.
[0078] Subsequently, the first relay terminal generates a second discovery message based on the first discovery message and sends the second discovery message to the first terminal. If the first terminal needs to establish communication with the second terminal, the first terminal sends a first request message to the first relay terminal to request that the communication path between the first terminal and the second terminal be established or modified through the first relay terminal. After receiving the first request message, the first relay terminal may send a second request message to the second relay terminal based on the first path information to request that the communication path between the first terminal and the second terminal be established or modified through the second relay terminal.
[0079] That is, the first relay terminal makes a path selection to determine whether to identify the second relay terminal as a node on the communication path between the first and second terminals. It should be understood that the first relay terminal may not identify the second relay terminal as a node on the communication path between the first and second terminals. In this case, the first relay terminal may store second path information, which includes the identifier of the second terminal. Subsequently, upon receiving the first request message sent by the first terminal, the first relay terminal directly establishes or modifies a communication path with the second terminal based on the second path information.
[0080] In other embodiments, after receiving the first discovery message, the first relay terminal may directly generate a second discovery message based on the first discovery message. In this case, the second discovery message also carries an identifier of the second relay terminal. The identifier of the second relay terminal is used to indicate that the second relay terminal is a candidate node on the communication path between the first relay terminal and the second terminal.
[0081] Subsequently, the first relay terminal sends a second discovery message to the first terminal, and the second discovery message carries the identifier of the second terminal and the identifier of the second relay terminal, or the second discovery message carries the identifier of the second terminal, the identifier of the first relay terminal, and the identifier of the second relay terminal. If the first terminal needs to establish communication with the second terminal, the first terminal sends a third request message to the first relay terminal to instruct the first relay terminal to establish or modify the communication path between the first relay terminal and the second terminal through the second relay terminal. After receiving the third request message, the first relay terminal may send a fourth request message to the second relay terminal to request to establish or modify the communication path between the first relay terminal and the second terminal through the second relay terminal.
[0082] That is, the first terminal makes the path selection to determine whether to determine the second relay terminal as a node on the communication path between the first terminal and the second terminal. It should be understood that the first terminal may also not determine the second relay terminal as a node on the communication path between the first terminal and the second terminal. In this case, the first terminal sends a fifth request message to the first relay terminal, which is used to instruct the first relay terminal to establish or modify a communication connection with the second terminal through the first relay terminal. Subsequently, the first relay terminal can directly establish or modify the communication path with the second terminal based on the fifth request message.
[0083] Taking the first terminal as UE1, the first relay terminal as relay terminal 1, the second relay terminal as relay terminal 2, and the second terminal as UE2 as an example, the terminal discovery method provided in the embodiment of the present application can be implemented as one of the following two optional implementation methods:
[0084] Implementation method 1: Relay terminal 2 sends a first discovery message to relay terminal 1. Optionally, relay terminal 1 determines relay terminal 2 as a node on the communication path between relay terminal 1 and UE2, and stores first path information, where the first path information includes the identifier of relay terminal 2; relay terminal 1 generates a second discovery message based on the first discovery message, and sends the second discovery message to UE1, where the second discovery message carries the identifier of UE2, or the second discovery message carries the identifier of UE2 and the identifier of relay terminal 1. Subsequently, UE1 sends a first request message to relay terminal 1, and relay terminal 1 sends a second request message to relay terminal 2 based on the first path information, and relay terminal 2 establishes or modifies a communication path with UE2. Based on this, UE1 communicates with UE2 through relay terminal 1 and relay terminal 2 in sequence.
[0085] Implementation method two: Relay terminal 2 sends a first discovery message to relay terminal 1. Optionally, relay terminal 1 generates a second discovery message based on the first discovery message, and sends the second discovery message to UE1. The second discovery message carries the identifier of UE2 and the identifier of relay terminal 2, or the second discovery message carries the identifier of relay terminal 1, the identifier of relay terminal 2, and the identifier of UE2. Subsequently, UE1 determines relay terminal 2 as a node on the communication path between relay terminal 1 and UE2, and sends a third request message to relay terminal 1; relay terminal 1 can determine that UE1 instructs to communicate with UE2 through relay terminal 2 based on the third request message, then relay terminal 1 sends a fourth request message to relay terminal 2, and relay terminal 2 establishes or modifies the communication path with UE2. Based on this, UE1 communicates with UE2 through relay terminal 1 and relay terminal 2 in turn.
[0086] It should be understood that in the above two implementations, the number of relay terminals 2 is not less than one. That is, in implementation one, relay terminal 1 may receive first discovery messages sent by multiple relay terminals 2, and relay terminal 1 selects one relay terminal 2 from the multiple relay terminals 2 as a node on the communication path between relay terminal 1 and UE1. In implementation two, the second discovery message sent by relay terminal 1 to UE1 carries the identifiers of multiple relay terminals 2, and UE1 selects one relay terminal 2 from the multiple relay terminals 2 as a node on the communication path between relay terminal 1 and UE1. In implementation two, the identifier of the relay terminal 2 selected by UE1 and the identifier of UE2 will be carried in the third request message sent by UE1 to relay terminal 1.
[0087] In summary, in the terminal discovery method provided in the embodiments of the present application, by receiving a first discovery message sent by a second relay terminal, the first relay terminal can instruct the first terminal to discover the second terminal through the first relay terminal. Based on the first discovery message, a communication path between the first terminal and the second terminal can also be selected, so that the first terminal communicates with the second terminal through the first relay terminal, or the first terminal communicates with the second terminal through the first relay terminal and then the second relay terminal.
[0088] FIG6 shows a flowchart of a terminal discovery method provided by an exemplary embodiment of the present application. The method is executed by a first terminal and includes the following steps:
[0089] Step 202: Receive a second discovery message sent by the first relay terminal.
[0090] Illustratively, the second discovery message is used to instruct the first terminal to discover the second terminal through the first relay terminal.
[0091] With reference to the foregoing, if the first terminal and the second terminal cannot directly discover and establish communication through the first relay terminal, communication between the first relay terminal and the second terminal still needs to pass through at least one second relay terminal. After receiving the first discovery message sent by the second relay terminal, the first relay terminal may generate a second discovery message based on the first discovery message and send it to the first terminal. The relevant content of the first discovery message can be referred to in the foregoing and will not be repeated here.
[0092] Similar to the first discovery message, the second discovery message is a second discovery announcement message or a second discovery response message. The second discovery announcement message is a message actively sent by the first relay terminal in broadcast form, and the second discovery response message is a reply of the first relay terminal to the second discovery request message sent by the first terminal.
[0093] Optionally, the second discovery message carries an identifier of the second terminal, or the second discovery message carries an identifier of the first relay terminal and an identifier of the second terminal. The identifier of the terminal or relay terminal includes a user identifier and / or a layer 2 identifier. The layer 2 identifier of the first relay terminal is optionally carried in the link layer packet structure of the second discovery message.
[0094] Referring to the above, the first terminal can discover the second terminal through the first relay terminal. Subsequently, if it is necessary to establish or modify a communication path between the first terminal and the second terminal, this can be achieved in the following two ways:
[0095] Implementation method 1: The first terminal communicates with the second terminal through the first relay terminal;
[0096] Implementation method 2: The first terminal communicates with the second terminal via the first relay terminal and the second relay terminal in sequence.
[0097] Among them, the relevant descriptions of the above two methods can be referred to the above content and will not be repeated here.
[0098] Taking the first terminal as UE1, the first relay terminal as relay terminal 1, the second relay terminal as relay terminal 2, and the second terminal as UE2 as an example, the terminal discovery method provided in the embodiment of the present application can be implemented as one of the following two optional implementation methods:
[0099] Implementation method 1: Relay terminal 2 sends a first discovery message to relay terminal 1. Optionally, relay terminal 1 determines relay terminal 2 as a node on the communication path between relay terminal 1 and UE2, and stores first path information, where the first path information includes the identifier of relay terminal 2; relay terminal 1 generates a second discovery message based on the first discovery message, and sends the second discovery message to UE1, where the second discovery message carries the identifier of UE2, or the second discovery message carries the identifier of UE2 and the identifier of relay terminal 1. Subsequently, UE1 sends a first request message to relay terminal 1, and relay terminal 1 sends a second request message to relay terminal 2 based on the first path information, and relay terminal 2 establishes or modifies a communication path with UE2. Based on this, UE1 communicates with UE2 through relay terminal 1 and relay terminal 2 in sequence.
[0100] Implementation method two: Relay terminal 2 sends a first discovery message to relay terminal 1. Optionally, relay terminal 1 generates a second discovery message based on the first discovery message, and sends the second discovery message to UE1. The second discovery message carries the identifier of UE2 and the identifier of relay terminal 2, or the second discovery message carries the identifier of relay terminal 1, the identifier of relay terminal 2, and the identifier of UE2. Subsequently, UE1 determines relay terminal 2 as a node on the communication path between relay terminal 1 and UE2, and sends a third request message to relay terminal 1; relay terminal 1 can determine that UE1 instructs to communicate with UE2 through relay terminal 2 based on the third request message, then relay terminal 1 sends a fourth request message to relay terminal 2, and relay terminal 2 establishes or modifies the communication path with UE2. Based on this, UE1 communicates with UE2 through relay terminal 1 and relay terminal 2 in turn.
[0101] It should be understood that in the above two implementations, the number of relay terminals 2 is not less than one. That is, in implementation one, relay terminal 1 may receive first discovery messages sent by multiple relay terminals 2, and relay terminal 1 selects one relay terminal 2 from the multiple relay terminals 2 as a node on the communication path between relay terminal 1 and UE1. In implementation two, the second discovery message sent by relay terminal 1 to UE1 carries the identifiers of multiple relay terminals 2, and UE1 selects one relay terminal 2 from the multiple relay terminals 2 as a node on the communication path between relay terminal 1 and UE1. In implementation two, the identifier of the relay terminal 2 selected by UE1 and the identifier of UE2 will be carried in the third request message sent by UE1 to relay terminal 1.
[0102] In summary, in the terminal discovery method provided in the embodiment of the present application, by receiving the second discovery message sent by the first relay terminal, the first terminal can discover the second terminal through the first relay terminal. Based on the first discovery message, a communication path between the first terminal and the second terminal can also be selected, so that the first terminal communicates with the second terminal through the first relay terminal, or the first terminal communicates with the second terminal through the first relay terminal and then the second relay terminal.
[0103] FIG7 shows a flowchart of a terminal discovery method provided by an exemplary embodiment of the present application, the method comprising the following steps:
[0104] Step 302: The second terminal sends a message carrying the identifier of the second terminal to the second relay terminal.
[0105] Illustratively, the message carrying the identifier of the second terminal is a discovery announcement message or a discovery response message.
[0106] In some embodiments, the second terminal may proactively broadcast a discovery announcement message carrying the second terminal's identifier. In other embodiments, upon receiving a discovery request message sent by the second relay terminal, the second terminal may send a discovery response message carrying the second terminal's identifier to the second relay terminal.
[0107] The identifier of the second terminal includes a user identifier and / or a layer 2 identifier of the second terminal. For example, the discovery announcement message or the discovery response message carries the user identifier of the second terminal at the application layer, or the link layer packet structure of the discovery announcement message or the discovery response message carries the layer 2 identifier of the second terminal.
[0108] Referring to the above content, if the first terminal and the second terminal cannot directly discover and establish communication through the first relay terminal, the communication between the first relay terminal and the second terminal still needs to go through at least one second relay terminal. Based on this, step 304 is executed as follows:
[0109] Step 304: The second relay terminal sends a first discovery message to the first relay terminal.
[0110] Illustratively, the first discovery message is used by the first relay terminal to instruct the first terminal to discover the second terminal through the first relay terminal.
[0111] Exemplarily, the first discovery message is a first discovery announcement message or a first discovery response message, wherein the first discovery announcement message is a message actively sent by the second relay terminal in a broadcast form, and the first discovery response message is a reply of the second relay terminal to the first discovery request message sent by the first relay terminal.
[0112] Similar to step 302, the first discovery declaration message or the first discovery response message carries the user identifier of the second terminal at the application layer, and / or the link layer packet structure of the first discovery declaration message or the first discovery response message carries the layer 2 identifier of the second terminal.
[0113] In some embodiments, the first discovery message also carries an identifier of the second relay terminal, and the identifier of the second relay terminal includes a user identifier and / or a layer 2 identifier of the second relay terminal. That is, the first discovery announcement message or the first discovery response message also carries the user identifier of the second relay terminal at the application layer, and / or the link layer packet structure of the first discovery announcement message or the first discovery response message carries the layer 2 identifier of the second relay terminal.
[0114] Step 304 is the same as step 102 and can be used for reference only and will not be described in detail.
[0115] In order for the first terminal to discover the second terminal, after receiving the first discovery message sent by the second relay terminal, the first relay terminal can generate a second discovery message based on the first discovery message and send the second discovery message to the first terminal. Based on this, step 306 is executed as follows:
[0116] Step 306: The first relay terminal sends a second discovery message to the first terminal.
[0117] Illustratively, the second discovery message is used to instruct the first terminal to discover the second terminal through the first relay terminal.
[0118] Similar to the first discovery message, the second discovery message is a second discovery announcement message or a second discovery response message. The second discovery announcement message is a message actively sent by the first relay terminal in broadcast form, and the second discovery response message is a reply of the first relay terminal to the second discovery request message sent by the first terminal.
[0119] Optionally, the second discovery message carries an identifier of the second terminal, or the second discovery message carries an identifier of the first relay terminal and an identifier of the second terminal. The identifier of the terminal or relay terminal includes a user identifier and / or a layer 2 identifier. The layer 2 identifier of the first relay terminal is optionally carried in the link layer packet structure of the second discovery message.
[0120] As mentioned above, a first relay terminal and a second relay terminal exist between the first terminal and the second terminal, and the first terminal can discover the second terminal through the first relay terminal. Subsequently, if it is necessary to establish or modify a communication path between the first terminal and the second terminal, this can be achieved in the following two ways:
[0121] Implementation method 1: The first terminal communicates with the second terminal through the first relay terminal;
[0122] Implementation method 2: The first terminal communicates with the second terminal via the first relay terminal and the second relay terminal in sequence.
[0123] For the description of the above two methods, please refer to the above content.
[0124] Step 306 is the same as step 202 and can be used for reference only and will not be described again.
[0125] It should be understood that the steps on the second relay terminal side, the first relay terminal side and the first terminal side can all be implemented separately as an embodiment of the terminal discovery method. For specific explanations, please refer to the above content and will not be repeated here.
[0126] In summary, in the terminal discovery method provided in the embodiments of the present application, by transmitting the first discovery message and the second discovery message, the first terminal can discover the second terminal through the first relay terminal. Based on the first discovery message and the second discovery message, path selection can also be performed on the communication path between the first terminal and the second terminal, so that the first terminal communicates with the second terminal through the first relay terminal, or the first terminal communicates with the second terminal through the first relay terminal and then the second relay terminal.
[0127] With reference to the above, there are two optional implementations of the communication path between the first terminal and the second terminal. Path selection can be made by the first relay terminal or by the first terminal, as described below:
[0128] 1. The path selection is made by the first relay terminal.
[0129] Based on FIG7 , FIG8 shows a flowchart of a terminal discovery method provided by an exemplary embodiment of the present application, the method further comprising the following steps:
[0130] Step 3051: The first relay terminal determines the second relay terminal as a node on the communication path between the first relay terminal and the second terminal.
[0131] There may be n second relay terminals between the first relay terminal and the second terminal, where n is a positive integer greater than 0. After receiving the first discovery message sent by the n second relay terminals, the first relay terminal may determine one of the n second relay terminals as a node on the communication path between the first relay terminal and the second terminal.
[0132] Optionally, the path selection performed by the first relay terminal may be performed based on at least one of the following information:
[0133] The quality of the wireless signal;
[0134] Wireless signal strength;
[0135] distance information between any two terminals among the second terminal, the first terminal, the first relay terminal, and the second relay terminal;
[0136] User preferences corresponding to the terminal or relay terminal;
[0137] Authorization information corresponding to the terminal or relay terminal.
[0138] For example, the first terminal is UE1, the first relay terminal is relay terminal 1, the second relay terminal is relay terminal 2, and the second terminal is UE2:
[0139] Relay terminal 1 may receive a first discovery message from relay terminal 2, which carries the identifier of UE2. Alternatively, relay terminal 1 may receive the first discovery message from another relay terminal, such as relay terminal x. Alternatively, relay terminal 1 may receive a discovery announcement message or a discovery response message directly from UE2, which includes the identifier of UE2. Relay terminal x is one of the n second relay terminals, excluding relay terminal 2. Relay terminal 1 then selects a path. For example, relay terminal 1 may choose to interact directly with UE2, or relay terminal 1 may choose to use relay terminal 2 as the relay terminal for UE1 to reach UE2.
[0140] Step 3052: The first relay terminal stores the first path information, where the first path information includes the identifier of the second relay terminal.
[0141] After performing path selection, the first relay terminal may store the first path information, wherein the first path information may also be understood as a mapping relationship or an association relationship between the second relay terminal and the second terminal.
[0142] In some embodiments, after the second relay terminal is determined as a node on the communication path between the first relay terminal and the second terminal, the first relay terminal will directly store the following information: the identification of the second relay terminal and the identification of the second terminal, and / or the mapping relationship between the second relay terminal and the second terminal, and / or the association relationship between the second relay terminal and the second terminal.
[0143] Still taking the example where the first terminal is UE1, the first relay terminal is relay terminal 1, the second relay terminal is relay terminal 2, and the second terminal is UE2: when relay terminal 1 chooses to interact directly with UE2, relay terminal 1 saves the user identifier of UE2 and the layer 2 identifier corresponding to UE2; or, when relay terminal 1 chooses to use relay terminal 2 as the relay terminal to reach UE2, relay terminal 1 saves the user identifier of UE2, the user identifier of relay terminal 2, the layer 2 identifier of UE2, and the layer 2 identifier of relay terminal 2.
[0144] Step 3071: The first terminal sends a first request message to the first relay terminal.
[0145] Illustratively, the first request message is used by a first terminal to request to establish or modify a communication path with a second terminal through a first relay terminal, and the first request message carries an identifier of the second terminal.
[0146] According to steps 3051 and 3052, when n second relay terminals exist between the first relay terminal and the second terminal, the first relay terminal proactively selects a path and determines a communication path between the first relay terminal and the second terminal. Subsequently, when communication with the second terminal is required, the first terminal may send a first request message to the first relay terminal, so that the first relay terminal can establish or modify the communication path determined by the first relay terminal with the second terminal based on the stored first path information.
[0147] Step 3081: The first relay terminal sends a second request message to the second relay terminal according to the first path information.
[0148] Illustratively, the second request message is used by the first relay terminal to request the second relay terminal to establish or modify a communication path with the second terminal.
[0149] With reference to the foregoing, the first path information can also be understood as a mapping relationship or association relationship between the second relay terminal and the second terminal. In some embodiments, the first path information includes: an identifier of the second relay terminal and an identifier of the second terminal, and / or a mapping relationship between the second relay terminal and the second terminal, and / or an association relationship between the second relay terminal and the second terminal.
[0150] When n second relay terminals exist between the first relay terminal and the second terminal, a communication path between the first relay terminal and the second terminal can be determined based on the first path information. It should be understood that the first relay terminal can communicate directly with the second terminal, or the first relay terminal can communicate with the second terminal through one of the n second relay terminals.
[0151] Step 309: The second relay terminal and the second terminal establish or modify a communication path.
[0152] After receiving the second request message, the second relay terminal and the second terminal may establish or modify a communication path, so that the first terminal may communicate with the second terminal via the first relay terminal and the second relay terminal in sequence.
[0153] It should be understood that the embodiments of the present application merely illustrate an implementation in which a first terminal sequentially communicates with a second terminal via a first relay terminal and then a second relay terminal. In some embodiments, the first relay terminal may not determine the second relay terminal as a node on the communication path between the first and second terminals. In this case, the first relay terminal may store second path information, which includes an identifier of the second terminal.
[0154] At this time, the second path information can also be understood as a mapping relationship or association relationship between the first relay terminal and the second terminal. In some embodiments, the first path information includes: an identifier of the second terminal, and / or a mapping relationship between the first relay terminal and the second terminal, and / or an association relationship between the first relay terminal and the second terminal.
[0155] Subsequently, after receiving the first request message, the first relay terminal may directly establish or modify a communication path with the second terminal according to the second path information. In this case, step 3081 and step 309 will no longer be executed.
[0156] It should be understood that the steps on the second relay terminal side, the first relay terminal side and the first terminal side can all be implemented separately as an embodiment of the terminal discovery method. For specific explanations, please refer to the above content and will not be repeated here.
[0157] In summary, in the terminal discovery method provided in the embodiment of the present application, after receiving the first discovery message, the first relay terminal may also actively perform path selection and store the first path information for subsequent establishment or modification of the communication path.
[0158] Optionally, after discovering the second terminal through the first relay terminal, the first terminal may send a first request message to the first relay terminal, so that the first relay terminal can establish or modify a communication path with the second terminal based on the first path information, thereby enabling the first terminal to communicate with the second terminal through at least two relay terminals.
[0159] 2. The path selection is made by the first terminal.
[0160] With reference to the foregoing, there may be n second relay terminals between the first relay terminal and the second terminal, where n is a positive integer greater than 0. After receiving the first discovery message sent by n second relay terminals, the first relay terminal may generate a second discovery message based on the first discovery message. In some embodiments, the second discovery message carries, in addition to the identifier of the second terminal, or in addition to the identifier of the first relay terminal and the identifier of the second terminal, the identifier of the second relay terminal, and the identifier of the second relay terminal is used to indicate that the second relay terminal is a candidate node on the communication path between the first relay terminal and the second terminal.
[0161] That is, the second discovery message carries the identifiers of n second relay terminals, and the identifier of the i-th second relay terminal is used to indicate that the i-th second relay terminal is a candidate node on the communication path between the first relay terminal and the second terminal. After receiving the second discovery message, the first terminal may select a second relay terminal from the n second relay terminals as a node on the communication path between the first relay terminal and the second terminal, or may choose not to go through any second relay terminal and directly establish or modify the communication path between the first relay terminal and the second terminal.
[0162] The following describes how the first terminal selects one second relay terminal from n second relay terminals as a node on the communication path between the first relay terminal and the second terminal:
[0163] Based on FIG7 , FIG9 shows a flowchart of a terminal discovery method provided by an exemplary embodiment of the present application, the method further comprising the following steps:
[0164] Step 3072: The first terminal determines the second relay terminal as a node on the communication path between the first relay terminal and the second terminal.
[0165] After receiving the second discovery message, the first terminal can learn candidate nodes on the communication path between the first relay terminal and the second terminal. That is, the first terminal can learn that there are n second relay terminals between the first relay terminal and the second terminal, and each of the n second relay terminals can serve as a node in the communication connection between the first relay terminal and the second terminal. Subsequently, the first terminal can determine one of the n second relay terminals as a node on the communication path between the first relay terminal and the second terminal.
[0166] Optionally, the path selection performed by the first relay terminal may be based on at least one of the following information: the quality of the wireless signal; the strength of the wireless signal; the distance information between any two terminals among the second terminal, the first terminal, the first relay terminal and the second relay terminal; the user preference corresponding to the terminal or relay terminal; and the authorization information corresponding to the terminal or relay terminal.
[0167] For example, the first terminal is UE1, the first relay terminal is relay terminal 1, the second relay terminal is relay terminal 2, and the second terminal is UE2:
[0168] In this embodiment, the second discovery message sent by relay terminal 1 to UE1 may also carry information about multiple optional paths. For example, if path 1 is relay terminal 1 interacting directly with UE2, the second discovery message carries the identifier of relay terminal 1 and the identifier of UE2; if path 2 is relay terminal 1 interacting with UE2 through relay terminal 2, the second discovery message carries the identifier of relay terminal 1, the identifier of relay terminal 2, and the identifier of UE2; if path 3 is relay terminal 1 interacting with UE2 through relay terminal x, the second discovery message carries the identifier of relay terminal 1, the identifier of relay terminal x, and the identifier of UE2. Relay terminal x is any of the n second relay terminals other than relay terminal 2.
[0169] Step 3073: The first terminal sends a third request message to the first relay terminal.
[0170] Illustratively, the third request message is used by the first terminal to instruct the first relay terminal to establish or modify a communication path with the second terminal through the second relay terminal. The third request message carries the identifier of the second terminal and the identifier of the second relay terminal.
[0171] According to step 3072, if n second relay terminals exist between the first relay terminal and the second terminal, the first terminal performs path selection and determines a communication path between the first relay terminal and the second terminal. Subsequently, when communication with the second terminal is required, the first terminal may send a third request message to the first relay terminal, so that the first relay terminal can establish or modify the communication path determined by the first terminal with the second terminal based on the third request message.
[0172] Step 3082: The first relay terminal sends a fourth request message to the second relay terminal.
[0173] Illustratively, the fourth request message is used by the first relay terminal to request the second relay terminal to establish or modify a communication path with the second terminal.
[0174] It should be understood that the first terminal may not determine the second relay terminal as a node on the communication path between the first terminal and the second terminal. In this case, the first terminal sends a fifth request message to the first relay terminal, which is used to instruct the first relay terminal to establish or modify a communication connection with the second terminal via the first relay terminal. Based on this, the first relay terminal can directly establish or modify the communication path with the second terminal.
[0175] Step 309: The second relay terminal and the second terminal establish or modify a communication path.
[0176] After receiving the fourth request message, the second relay terminal and the second terminal may establish or modify a communication path, so that the first terminal may communicate with the second terminal via the first relay terminal and the second relay terminal in sequence.
[0177] It should be understood that the embodiment of the present application only shows an implementation method in which the first terminal communicates with the second terminal through the first relay terminal and the second relay terminal in sequence. In some embodiments, the first terminal may not determine the second relay terminal as a node on the communication path between the first terminal and the second terminal. The first terminal sends the fifth request message to the first relay terminal, and steps 3082 and 309 will no longer be executed.
[0178] It should be understood that the steps on the second relay terminal side, the first relay terminal side and the first terminal side can all be implemented separately as an embodiment of the terminal discovery method. For specific explanations, please refer to the above content and will not be repeated here.
[0179] In summary, in the terminal discovery method provided in the embodiment of the present application, when the second discovery message also carries the identifier of the second relay terminal, the first terminal can perform path selection to determine the communication path between the first terminal and the second terminal.
[0180] Optionally, after discovering the second terminal through the first relay terminal, the first terminal may send a third request message to the first relay terminal, instructing the first relay terminal to establish or modify a communication path with the second terminal through the second relay terminal, so that the first terminal can communicate with the second terminal through at least two relay terminals.
[0181] It should be understood that the aforementioned embodiments illustrate only the case where a first terminal and a second terminal communicate via two relay terminals. In some embodiments, the first terminal discovers the second terminal via two or more relay terminals, and the first terminal establishes or modifies a communication path with the second terminal via two or more relay terminals. These are all within the scope of protection of this application, and the specific implementation methods are similar to those described above and can be used for reference only, so they will not be further described.
[0182] For example, taking the case where the first terminal is UE1, the first relay terminal is relay terminal 1, the second relay terminal is relay terminal 2, the second terminal is UE2, and the relay terminal x is a second relay terminal different from the relay terminal 2, the terminal discovery method provided in the embodiment of the present application can be implemented in any one of the following two ways:
[0183] (1) Relay terminal 1 performs path selection.
[0184] Step 1: UE2 sends a discovery announcement message 1 or a discovery response message 1.
[0185] Among them, Discovery Announcement Message 1 is actively sent by UE2 in broadcast form, and Discovery Response Message 1 is UE2's response to Relay Terminal 2 after previously receiving Discovery Request Message 1 from Relay Terminal 2. Optionally, Discovery Announcement Message 1 or Discovery Response Message 1 carries UE2's identifier, such as UE2's user identifier at the application layer. Optionally, the link layer packet structure of Discovery Announcement Message 1 or Discovery Response Message 1 carries UE2's Layer-2 ID.
[0186] Step 2: Relay terminal 2 generates a discovery announcement message 2 or a discovery response message 2.
[0187] In addition to carrying the identifier of UE2, the discovery announcement message 2 or the discovery response message 2 also carries the identifier of relay terminal 2, such as the user identifier of relay terminal 2 at the application layer. Optionally, the link layer packet structure of the discovery announcement message 2 or the discovery response message 2 carries the Layer-2 ID of relay terminal 2.
[0188] Step 3-1: Relay terminal 1 performs path selection.
[0189] Among them, relay terminal 1 may receive discovery declaration message 2 or discovery response message 2 from relay terminal 2, or may receive discovery declaration message 2 or discovery response message 2 from other relay terminals (such as relay terminal x), or may directly receive a discovery declaration message or discovery response message including the identifier of UE2 from UE2.
[0190] Based on this, relay terminal 1 performs path selection. For example, relay terminal 1 chooses to interact directly with UE2; or relay terminal 1 chooses relay terminal 2 as a relay terminal to reach UE2. The selection criteria include but are not limited to the quality of the wireless signal.
[0191] Relay terminal 1 then stores the selected path information. For example, if relay terminal 1 chooses to interact directly with UE2, it stores UE2's user identifier and UE2's corresponding Layer-2 ID. Alternatively, if relay terminal 1 chooses to use relay terminal 2 as the relay terminal to reach UE2, relay terminal 1 stores UE2's user identifier, relay terminal 2's user identifier, UE1's Layer-2 ID, and relay terminal 2's Layer-2 ID.
[0192] Step 4-1: The relay terminal 1 generates a discovery announcement message 3 or a discovery response message 3.
[0193] In addition to carrying the identifier of UE2, the discovery announcement message 3 or the discovery response message 3 also carries the identifier of relay terminal 1, such as the user identifier of relay terminal 1 at the application layer. Optionally, the link layer packet structure of the discovery announcement message 3 or the discovery response message 3 carries the Layer-2 ID of relay terminal 1.
[0194] After UE1 receives the discovery announcement message 3 or the discovery response message 3 from the relay terminal 1, it can select a path. In an exemplary example, if UE1 determines that it can communicate with UE2 through the relay terminal 1, UE1 can send a request message for link establishment / modification to the relay terminal 1. The request message carries the identifier of the target UE (i.e., UE2), so that the relay terminal 1 sends the request message for link establishment / modification to the relay terminal 2 based on the path information saved in step 3-1.
[0195] (2) UE1 performs path selection.
[0196] Step 1: UE2 sends a discovery announcement message 1 or a discovery response message 1.
[0197] Among them, Discovery Announcement Message 1 is actively sent by UE2 in broadcast form, and Discovery Response Message 1 is UE2's response to Relay Terminal 2 after previously receiving Discovery Request Message 1 from Relay Terminal 2. Optionally, Discovery Announcement Message 1 or Discovery Response Message 1 carries UE2's identifier, such as UE2's user identifier at the application layer. Optionally, the link layer packet structure of Discovery Announcement Message 1 or Discovery Response Message 1 carries UE2's Layer-2 ID.
[0198] Step 2: Relay terminal 2 generates a discovery announcement message 2 or a discovery response message 2.
[0199] In addition to carrying the identifier of UE2, the discovery announcement message 2 or the discovery response message 2 also carries the identifier of relay terminal 2, such as the user identifier of relay terminal 2 at the application layer. Optionally, the link layer packet structure of the discovery announcement message 2 or the discovery response message 2 carries the Layer-2 ID of relay terminal 2.
[0200] Step 3-2: The relay terminal 1 generates a discovery announcement message 3 or a discovery response message 3.
[0201] Similar to step 3-1, relay terminal 1 may receive a discovery declaration message 2 or a discovery response message 2 from relay terminal 2, or may receive a discovery declaration message 2 or a discovery response message 2 from other relay terminals (such as relay terminal x), or may receive a discovery declaration message or a discovery response message including the identifier of UE2 directly from UE2.
[0202] Based on this, the relay terminal 1 generates a discovery announcement message 3 or a discovery response message 3 .
[0203] Among them, the discovery announcement message 3 or the discovery response message 3 carries multiple optional path information. For example, if path 1 is relay terminal 1 interacting directly with UE2, then the discovery announcement message 3 or the discovery response message 3 carries the identifier of relay terminal 1 and the identifier of UE2; if path 2 is relay terminal 1 interacting with UE2 through relay terminal 2, then the discovery announcement message 3 or the discovery response message 3 carries the identifier of relay terminal 1, the identifier of relay terminal 2, and the identifier of UE2; if path 3 is relay terminal 1 interacting with UE2 through relay terminal x, then the discovery announcement message 3 or the discovery response message 3 carries the identifier of relay terminal 1, the identifier of relay terminal x, and the identifier of UE2.
[0204] After receiving the discovery announcement message 3 or the discovery response message 3 from the relay terminal 1, UE1 can select a path and inform the relay terminal 1 of the selected path. For example, UE1 sends a request message to the relay terminal 1 for link establishment / modification. The request message carries the identifier of the target UE (i.e., UE2) and the selected path information (e.g., the identifier of the relay terminal 2). Subsequently, the relay terminal 1 sends a request message to the relay terminal 2 for link establishment / modification based on the request message.
[0205] The following is an embodiment of the device of the present application. For details not described in detail in the embodiment of the device, reference can be made to the corresponding records in the above method embodiment, and no further details will be given herein.
[0206] FIG10 is a schematic diagram of a terminal discovery device provided by an exemplary embodiment of the present application, the device comprising:
[0207] The receiving module 1020 is configured to receive a first discovery message sent by the second relay terminal;
[0208] The first discovery message is used by the first relay terminal to instruct the first terminal to discover the second terminal through the first relay terminal.
[0209] Optionally, the device also includes: a sending module 1040, used to send a second discovery message to the first terminal; wherein the second discovery message is determined based on the first discovery message, and the second discovery message carries the identifier of the second terminal, or the second discovery message carries the identifier of the first relay terminal and the identifier of the second terminal.
[0210] Optionally, the device further includes: a storage module 1060, configured to determine the second relay terminal as a node on the communication path between the first relay terminal and the second terminal; and store first path information, wherein the first path information includes an identifier of the second relay terminal.
[0211] Optionally, the first path information further includes an identifier of the second terminal, and the identifier of the second terminal is used to indicate that the end point of the communication path is the second terminal.
[0212] Optionally, the receiving module 1020 is further used to receive a first request message sent by the first terminal; wherein the first request message is used by the first terminal to request to establish or modify a communication path with the second terminal through the first relay terminal, and the first request message carries an identifier of the second terminal.
[0213] Optionally, the device also includes: a sending module 1040, used to send a second request message to the second relay terminal based on the first path information; wherein the second request message is used by the first relay terminal to request to establish or modify a communication path between the first relay terminal and the second terminal through the second relay terminal.
[0214] Optionally, the second discovery message further carries an identifier of the second relay terminal, where the identifier of the second relay terminal is used to indicate that the second relay terminal is a candidate node on the communication path between the first relay terminal and the second terminal.
[0215] Optionally, the receiving module 1020 is also used to receive a third request message sent by the first terminal; wherein the third request message is used by the first terminal to instruct the first relay terminal to establish or modify the communication path between the first terminal and the second terminal through the second relay terminal, and the third request message carries the identifier of the second terminal and the identifier of the second relay terminal.
[0216] Optionally, the device further includes: a sending module 1040, configured to send a fourth request message to the second relay terminal; wherein the fourth request message is used by the first relay terminal to request the first relay terminal to establish or modify a communication path with the second terminal through the second relay terminal.
[0217] Optionally, the identifier of the terminal and / or relay terminal includes at least one of the following identifiers: a user identifier; a layer 2 identifier.
[0218] Optionally, the discovery message is one of the following messages: a discovery announcement message; a discovery response message.
[0219] FIG11 is a schematic diagram of a terminal discovery device provided by an exemplary embodiment of the present application, the device comprising:
[0220] The receiving module 1120 is configured to receive a second discovery message sent by the first relay terminal;
[0221] The second discovery message is used to instruct the first terminal to discover the second terminal through the first relay terminal.
[0222] Optionally, the second discovery message carries the identifier of the second terminal, or the second discovery message carries the identifier of the first relay terminal and the identifier of the second terminal.
[0223] Optionally, the device also includes: a sending module 1140, used to send a first request message to the first relay terminal; wherein the first request message is used by the first terminal to request to establish or modify a communication path with the second terminal through the first relay terminal, and the first request message carries the identifier of the second terminal.
[0224] Optionally, the second discovery message further carries an identifier of the second relay terminal, where the identifier of the second relay terminal is used to indicate that the second relay terminal is a candidate node on the communication path between the first relay terminal and the second terminal.
[0225] Optionally, the device also includes: a sending module 1140, used to send a third request message to the first relay terminal; wherein the third request message is used by the first terminal to instruct the first relay terminal to establish or modify the communication path between the first relay terminal and the second terminal through the second relay terminal, and the third request message carries the identifier of the second terminal and the identifier of the second relay terminal.
[0226] Optionally, the apparatus further includes: a determination module 1160, configured to determine the second relay terminal as a node on the communication path between the first relay terminal and the second terminal.
[0227] Optionally, the identifier of the terminal and / or relay terminal includes at least one of the following identifiers: a user identifier; a layer 2 identifier.
[0228] Optionally, the second discovery message is one of the following messages: a discovery announcement message; a discovery response message.
[0229] Figure 12 shows a schematic structural diagram of a communication device (first relay terminal or terminal) provided by an exemplary embodiment of the present application. The communication device includes: a processor 1201, a receiver 1202, a transmitter 1203, a memory 1204 and a bus 1205.
[0230] The processor 1201 includes one or more processing cores. The processor 1201 executes various functional applications and information processing by running software programs and modules.
[0231] The receiver 1202 and the transmitter 1203 may be implemented as a communication component, which may be a communication chip.
[0232] The memory 1204 is connected to the processor 1201 via a bus 1205 .
[0233] The memory 1204 may be used to store at least one instruction, and the processor 1201 may be used to execute the at least one instruction to implement the various steps of the terminal discovery method mentioned in the above method embodiment.
[0234] In addition, the memory 1204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof. Volatile or non-volatile storage devices include but are not limited to: magnetic disks or optical disks, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), read-only memory (ROM), magnetic memory, flash memory, and programmable read-only memory (PROM).
[0235] The present application also provides a first relay terminal, which includes a memory and a processor; at least one program code is stored in the memory, and the program code is loaded and executed by the processor to implement the aforementioned terminal discovery method.
[0236] The present application also provides a first terminal, which includes a memory and a processor; at least one program code is stored in the memory, and the program code is loaded and executed by the processor to implement the aforementioned terminal discovery method.
[0237] The present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be executed by a processor to implement the aforementioned terminal discovery method.
[0238] The present application also provides a chip, which includes a programmable logic circuit and / or program instructions, and is used to implement the aforementioned terminal discovery method when an electronic device equipped with the chip is running.
[0239] The present application also provides a computer program product, which includes computer instructions. The computer instructions are stored in a computer-readable storage medium. A processor reads and executes the computer instructions from the computer-readable storage medium to implement the aforementioned terminal discovery method.
[0240] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A terminal discovery method, characterized in that: The method is performed by a first relay terminal, and includes: receiving a first discovery message sent by a second relay terminal; The first discovery message is used by the first relay terminal to instruct the first terminal to discover the second terminal through the first relay terminal.
2. The method according to claim 1, characterized in that The method further comprises: Sending a second discovery message to the first terminal; The second discovery message is determined according to the first discovery message, and the second discovery message carries the identifier of the second terminal, or the second discovery message carries the identifier of the first relay terminal and the identifier of the second terminal.
3. The method according to claim 1 or 2, characterized in that The method further comprises: determining the second relay terminal as a node on a communication path between the first relay terminal and the second terminal; The first path information is stored, where the first path information includes an identifier of the second relay terminal.
4. The method according to claim 3, characterized in that The first path information also includes an identifier of the second terminal, and the identifier of the second terminal is used to indicate that the end point of the communication path is the second terminal.
5. The method according to claim 3, characterized in that The method further comprises: receiving a first request message sent by the first terminal; The first request message is used by the first terminal to request the first relay terminal to establish or modify a communication path with the second terminal, and the first request message carries an identifier of the second terminal.
6. The method according to claim 5, characterized in that The method further comprises: Sending a second request message to the second relay terminal according to the first path information; The second request message is used by the first relay terminal to request the second relay terminal to establish or modify a communication path with the second terminal.
7. The method according to claim 2, characterized in that The second discovery message also carries the identifier of the second relay terminal, where the identifier of the second relay terminal is used to indicate that the second relay terminal is a candidate node on the communication path between the first relay terminal and the second terminal.
8. The method according to claim 7, characterized in that The method further comprises: receiving a third request message sent by the first terminal; The third request message is used by the first terminal to instruct the first relay terminal to establish or modify a communication path with the second terminal through the second relay terminal, and the third request message carries the identifier of the second terminal and the identifier of the second relay terminal.
9. The method according to claim 8, characterized in that The method further comprises: Sending a fourth request message to the second relay terminal; The fourth request message is used by the first relay terminal to request the second relay terminal to establish or modify a communication path with the second terminal through the second relay terminal.
10. The method according to any one of claims 2 to 9, characterized in that: The identifier of the terminal and / or relay terminal includes at least one of the following identifiers: User identification; Layer 2 identification.
11. The method according to any one of claims 1 to 10, characterized in that: A discovery message is one of the following: Discovery announcement message; Found a response message.
12. A terminal discovery method, characterized in that: The method is performed by a first terminal, and includes: receiving a second discovery message sent by the first relay terminal; The second discovery message is used to instruct the first terminal to discover the second terminal through the first relay terminal.
13. The method according to claim 12, characterized in that The second discovery message carries the identifier of the second terminal, or the second discovery message carries the identifier of the first relay terminal and the identifier of the second terminal.
14. The method according to claim 12 or 13, characterized in that The method further comprises: Sending a first request message to the first relay terminal; The first request message is used by the first terminal to request the first relay terminal to establish or modify a communication path with the second terminal, and the first request message carries an identifier of the second terminal.
15. The method according to claim 13, characterized in that The second discovery message also carries the identifier of the second relay terminal, where the identifier of the second relay terminal is used to indicate that the second relay terminal is a candidate node on the communication path between the first relay terminal and the second terminal.
16. The method according to claim 15, characterized in that The method further comprises: Sending a third request message to the first relay terminal; The third request message is used by the first terminal to instruct the first relay terminal to establish or modify a communication path with the second terminal through the second relay terminal, and the third request message carries the identifier of the second terminal and the identifier of the second relay terminal.
17. The method according to claim 16, characterized in that The method further comprises: The second relay terminal is determined as a node on a communication path between the first relay terminal and the second terminal.
18. The method according to any one of claims 13 to 17, characterized in that: The identifier of the terminal and / or relay terminal includes at least one of the following identifiers: User identification; Layer 2 identification.
19. The method according to any one of claims 12 to 18, characterized in that: The second discovery message is one of the following messages: Discovery announcement message; Found a response message.
20. A terminal discovery device, characterized in that: The device comprises: A receiving module, configured to receive a first discovery message sent by a second relay terminal; The first discovery message is used by the first relay terminal to instruct the first terminal to discover the second terminal through the first relay terminal.
21. The device according to claim 20, characterized in that The device further comprises: A sending module, configured to send a second discovery message to the first terminal; The second discovery message is determined according to the first discovery message, and the second discovery message carries the identifier of the second terminal, or the second discovery message carries the identifier of the first relay terminal and the identifier of the second terminal.
22. The device according to claim 20 or 21, characterized in that The device further comprises: The storage module is configured to determine the second relay terminal as a node on the communication path between the first relay terminal and the second terminal; and store first path information, wherein the first path information includes an identifier of the second relay terminal.
23. The device according to claim 22, characterized in that The first path information also includes an identifier of the second terminal, and the identifier of the second terminal is used to indicate that the end point of the communication path is the second terminal.
24. The device according to claim 22, characterized in that The receiving module is further configured to receive a first request message sent by the first terminal; The first request message is used by the first terminal to request the first relay terminal to establish or modify a communication path with the second terminal, and the first request message carries an identifier of the second terminal.
25. The device according to claim 24, characterized in that The device further comprises: a sending module, configured to send a second request message to the second relay terminal according to the first path information; The second request message is used by the first relay terminal to request the second relay terminal to establish or modify a communication path with the second terminal.
26. The device according to claim 21, characterized in that The second discovery message also carries the identifier of the second relay terminal, where the identifier of the second relay terminal is used to indicate that the second relay terminal is a candidate node on the communication path between the first relay terminal and the second terminal.
27. The device according to claim 26, characterized in that The receiving module is further configured to receive a third request message sent by the first terminal; The third request message is used by the first terminal to instruct the first relay terminal to establish or modify a communication path with the second terminal through the second relay terminal, and the third request message carries the identifier of the second terminal and the identifier of the second relay terminal.
28. The device according to claim 27, characterized in that The device further comprises: A sending module, configured to send a fourth request message to the second relay terminal; The fourth request message is used by the first relay terminal to request the second relay terminal to establish or modify a communication path with the second terminal through the second relay terminal.
29. The device according to any one of claims 21 to 28, characterized in that The identifier of the terminal and / or relay terminal includes at least one of the following identifiers: User identification; Layer 2 identification.
30. The device according to any one of claims 20 to 29, characterized in that A discovery message is one of the following: Discovery announcement message; Found a response message.
31. A terminal discovery device, characterized in that: The device comprises: A receiving module, configured to receive a second discovery message sent by the first relay terminal; The second discovery message is used to instruct the first terminal to discover the second terminal through the first relay terminal.
32. The device according to claim 31, characterized in that The second discovery message carries the identifier of the second terminal, or the second discovery message carries the identifier of the first relay terminal and the identifier of the second terminal.
33. The device according to claim 31 or 32, characterized in that The device further comprises: A sending module, configured to send a first request message to the first relay terminal; The first request message is used by the first terminal to request the first relay terminal to establish or modify a communication path with the second terminal, and the first request message carries an identifier of the second terminal.
34. The device according to claim 32, characterized in that The second discovery message also carries the identifier of the second relay terminal, where the identifier of the second relay terminal is used to indicate that the second relay terminal is a candidate node on the communication path between the first relay terminal and the second terminal.
35. The device according to claim 34, characterized in that The device further comprises: A sending module, configured to send a third request message to the first relay terminal; The third request message is used by the first terminal to instruct the first relay terminal to establish or modify a communication path with the second terminal through the second relay terminal, and the third request message carries the identifier of the second terminal and the identifier of the second relay terminal.
36. The device according to claim 35, characterized in that The device further comprises: A determination module is configured to determine the second relay terminal as a node on a communication path between the first relay terminal and the second terminal.
37. The device according to any one of claims 32 to 36, characterized in that The identifier of the terminal and / or relay terminal includes at least one of the following identifiers: User identification; Layer 2 identification.
38. The device according to any one of claims 31 to 37, characterized in that The second discovery message is one of the following messages: Discovery announcement message; Found a response message.
39. A first relay terminal, characterized in that: The first relay terminal includes a memory and a processor; At least one program code is stored in the memory, and the program code is loaded and executed by the processor to implement the terminal discovery method according to any one of claims 1 to 11.
40. A first terminal, characterized in that: The first terminal includes a memory and a processor; At least one program code is stored in the memory, and the program code is loaded and executed by the processor to implement the terminal discovery method according to any one of claims 12 to 19.
41. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and the computer program is configured to be executed by a processor to implement the terminal discovery method according to any one of claims 1 to 19.
42. A chip, characterized in that: The chip includes a programmable logic circuit and / or program instructions, and is used to implement the terminal discovery method according to any one of claims 1 to 19 when an electronic device equipped with the chip is running.
43. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor reads and executes the computer instructions from the computer-readable storage medium to implement the terminal discovery method according to any one of claims 1 to 19.