Patent Description:
The device-to-device (D2D) technology refers to that terminal devices in vicinity may transmit data through a direct link within a short distance range.

Data transmission between a network device and a remote terminal device may be assisted by a D2D relay. In such a situation, a D2D communication mode may be used between a terminal device used for a D2D relay and the remote terminal device, while a cellular communication mode is used between the terminal device used for the D2D relay and the network device. Herein, a terminal device used for assisting the network device to communicate with the terminal device may be called as a relay terminal device, and the relay terminal device may also directly communicate with the network device without assisting other terminal devices.

How to determine whether two terminal devices are in a same network is an urgent problem to be solved.

The documents <CIT>, <CIT>, <CIT>, <CIT> and <CIT> have disclosed the related art of the present disclosure.

Embodiments of the present application provide a communication method and a terminal device, and whether two terminal devices are in a same network may be determined.

Embodiments of the invention are those whose scope is within that of the appended claims. Other passages stating embodiments which do not fall under the scope of the appended claims are to be considered as examples.

Hereinafter, technical solutions in embodiments of the present application will be described with reference to the accompanying drawings.

It should be understood that the terms "system" and "network" are often used interchangeably herein. The term "and/or" in this document is merely an association relationship describing associated objects, indicating that there may be three relationships, for example, A and/or B, which may indicate three situations: A alone, A and B, and B alone. In addition, the character "/" in this document generally indicates that the objects before and after the character have an "or" relationship.

<FIG> is a schematic diagram of a wireless communication system <NUM> to which embodiments of the present application are applicable. The wireless communication system <NUM> includes at least one network device <NUM>. The network device <NUM> may be a device that communicates with a terminal device. Each network device <NUM> may provide communication coverage for a specific geographic area, and may communicate with terminal devices located within the coverage area. The network device <NUM> may be a Base Transceiver Station (BTS) in a GSM system or CDMA (Code Division Multiple Access) system, a NodeB (NB) in a WCDMA system, an Evolutional Node B (eNB or eNodeB) in an LTE system, or a radio controller in a Cloud Radio Access Network (CRAN). Or, the network device may be a relay station, an access point, an on-board device, or a wearable device, a network device in a future <NUM> network, or a network device in a future evolved Public Land Mobile Network (PLMN), etc..

The wireless communication system <NUM> also includes multiple terminal devices, for example, terminal devices <NUM>, <NUM>, <NUM>, <NUM>, <NUM> and <NUM> as shown in <FIG>. The terminal devices may be mobile or fixed. The terminal device may be referred to an access terminal, User Equipment (UE), a subscriber unit, a subscriber station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent, or a user device. The access terminal may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), a handheld device with a wireless communication function, a computing device, or other processing devices connected to a wireless modem, an on-board device, a wearable device, a terminal device in a future <NUM> network, or a terminal device in a future evolved PLMN, or the like.

<FIG> schematically illustrates a network device and six terminal devices. Optionally, the wireless communication system <NUM> may include multiple network devices and other quantity of terminal devices, and embodiments of the present application are not limited thereto. In addition, the wireless communication system <NUM> may also include other network entities, such as a Mobile Management Entity (MME), a Serving Gateway (S-GW), a Packet Data Network Gateway (P-GW), and embodiments of the present application are not limited thereto.

Specifically, the terminal device may communicate in a cellular communication mode or a D2D communication mode. In the cellular communication mode, the terminal device may communicate with other terminal devices through the network device. In the D2D communication mode, the terminal device may directly communicate with other terminal devices through D2D links.

Among the multiple terminal devices shown in <FIG>, the terminal device <NUM> and the terminal device <NUM> may be referred to as remote terminal devices. The terminal device <NUM> and the terminal device <NUM> may communicate with the network device <NUM> through relay terminal devices <NUM> and <NUM>, respectively. The terminal device <NUM> and the terminal device <NUM> may respectively relay data between the remote terminal device <NUM> and the network device <NUM> and relay data between and the remote terminal device <NUM> and the network device <NUM>. In this case, the terminal device <NUM> and the terminal device <NUM> may be referred to as relay terminal devices. The relay terminal devices <NUM> and <NUM> may directly communicate with the network device without assisting other terminal devices. The terminal device <NUM> may communicate with the network device <NUM> neither through the relay terminal device, nor relaying communication between other terminal devices and the network <NUM>.

The terminal devices <NUM>, <NUM>, <NUM> and <NUM> have Uu interfaces with the network device <NUM>, and may communicate with the network device <NUM> by using a cellular communication technology. There is a PC5 interface between the relay terminal device and the remote terminal device, and a D2D communication technology is used for communication between the relay terminal device and the remote terminal device. The D2D communication technology may be specifically a SideLink (SL) technology in the LTE, a WiFi or Bluetooth technology etc., in the WLAN, or other D2D communication technologies, and the embodiments of the present application are not limited thereto. The terminal device <NUM> and the terminal device <NUM> may directly communicate with the network device <NUM> without the relay terminal device, and in this case, the terminal device <NUM> and the terminal device <NUM> have Uu interfaces with the network device, and may communicate with the network device <NUM> by using the cellular communication technology.

In an embodiment of the present application, when a relay terminal device relays data communication, a remote terminal device and the relay terminal device need to reside on a same cell or a same base station, so that the relay terminal device may submit data of the remote terminal device to a corresponding network device. Therefore, an embodiment of the present application provide a communication method, by which the remote terminal device may submit data to an appropriate relay terminal device, so that the data may be submitted to a corresponding network device.

<FIG> schematically illustrates a communication method <NUM> provided by an embodiment of the present application. The method <NUM> may be applied to the wireless communication system <NUM> described above, but embodiments of the present application are not limited thereto.

As shown in <FIG>, the method <NUM> includes acts S210 and S220.

In S210, a first terminal receives indication information sent by a second terminal, wherein the indication information is used for indicating information of a network on which the second terminal currently resides.

In S220, the first terminal determines whether the first terminal and the second terminal reside on a same network according to the indication information.

In an embodiment of the present application, the first terminal and the second terminal may be any two terminal devices in networks, for example, the first terminal and the second terminal are both remote terminal devices, or the first terminal is a remote terminal device and the second terminal is a relay terminal device, or the first terminal is a relay terminal device and the second terminal is a remote terminal device, which is not restricted in embodiments of the present application. The first terminal and the second terminal may determine whether they are in the same network in a manner described in S210 and S220. Specifically, the first terminal may receive the indication information of the second terminal, wherein the indication information indicates information of the network on which the second terminal currently resides, so that the first terminal may determine whether the first terminal and the second terminal reside on the same network according to the indication information.

Optionally, in some embodiments, the first terminal may be a remote terminal device and the second terminal is a relay terminal device. The first terminal may decide whether to use the second terminal or other terminals as relay terminal devices between the first terminal and a network device according to situations of the networks on which the first terminal and the second terminal reside. Optionally, if the first terminal and the second terminal reside on the same network, the first terminal may directly send uplink data to a network device on the same network through the second terminal, or a network device on the same network may send downlink data to the first terminal through the second terminal, i.e., the second terminal may serve as a relay terminal device between the first terminal and the network device. Optionally, if the first terminal and the second terminal reside on different networks, therefore, the second terminal cannot be directly used as a relay terminal device between the first terminal and a network device. In such a situation, optionally, the first terminal may search for other terminal devices through the method described in S210 and S220 until a terminal device on the same network as the first terminal is found. Then, the first terminal may use the terminal device as a relay terminal device between the first terminal and the network device. Or, the first terminal may reside on the network on which the second terminal currently resides. In such a situation, the first terminal and the second terminal reside on the same network, so that the second terminal may be used as a relay terminal device between the first terminal and the network device, and thus the first terminal may communicate with the network device through the second terminal.

Optionally, receiving, by the first terminal, the indication information sent by the second terminal, includes: receiving, by the first terminal, a first message sent by the second terminal, wherein the first message includes the indication information.

Specifically, a D2D discovery process is a process in which a terminal device senses and identifies nearby terminal devices. D2D discovery is a prerequisite for a D2D connection establishment. If two devices wish to perform data communication in a form of D2D, the D2D discovery process will be triggered first. Therefore, the second terminal may carry the indication information in a discovery message by sending the discovery message. In other words, the second terminal may notify the first terminal of the information of the network on which the second terminal currently resides in the D2D discovery process. Optionally, the discovery message may be a Discovery Announcement message, a Discovery Solicitation message, or other messages in the discovery message.

Optionally, the second terminal may notify the first terminal of the information of the network on which the second terminal currently resides in a D2D connection establishment process. Or, the second terminal may send a direct communication message including the indication information. Alternatively, the direct communication message may be a direct communication establishment request (DIRECT_COMMUNICATION_REQUEST) message, a direct communication establishment acceptance (DIRECT_COMMUNICATION_ACCEPT) message, or other messages in the direct communication message.

Optionally, after the second terminal receives the first message of the first terminal, if it is determined that the networks on which the first terminal and the second terminal reside are the same according to the indication information, the first terminal may not reply with any response message or may reply with a second message, which is used for notifying the second terminal that the networks on which the first terminal and the second terminal currently reside are the same. For example, if the first message is a discovery request message, the second message may be a Discovery Response message, or if the first message is a direct communication establishment request message, the second message may be a direct communication establishment acceptance message, or if the first message is a direct communication establishment acceptance message, the second message may be a direct communication establishment success message or a direct communication establishment failure message, etc..

Optionally, in some embodiments, after the second terminal receives the first message of the first terminal, if it is determined that the networks on which the first terminal and the second terminal reside are different according to the indication information, the first terminal may not reply with any response message, or may try to reside on the network on which the second terminal currently resides. Optionally, if the resident is successful, the first terminal may reply with a third message, wherein the third message is used for notifying the second terminal that the first terminal has successfully resides on the network on which the second terminal currently resides. Optionally, if the residing fails, the first terminal may reply with a fourth message for notifying the second terminal that the first terminal fails to reside. Optionally, the fourth message may also include a failure reason, for example, channel quality of the network on which the second terminal currently resides does not meet a preset condition, or the network on which the second terminal currently resides does not allow the first terminal to access. Optionally, the fourth message may also include information of a network on which the first terminal currently resides. Optionally, if the first message is a discovery request message, the third message may be a discovery response message, or if the first message is a direct communication establishment request message, the third message may be a direct communication establishment acceptance message, or if the first message is a direct communication establishment acceptance message, the third message may be a direct communication establishment success message or a direct communication establishment failure message, etc. Optionally, if the first message is a discovery request message, the fourth message may be a discovery response message, or if the first message is a direct communication establishment request message, the fourth message may be a direct communication establishment reject (DIRECT_COMMUNICATION_REJECT) message, or if the first message is a direct communication establishment acceptance message, the fourth message may be a direct communication establishment failure message, etc..

Optionally, in some embodiments, after the second terminal receives the first message of the first terminal, if it is determined that the networks on which the first terminal and the second terminal reside are different according to the indication information, the first terminal may directly reply with a fifth message, wherein the fifth message is used for rejecting to reside on the network on which the second terminal currently resides. Optionally, the fifth message may also include a rejection reason, wherein the rejection reason may be that the networks on which the first terminal and the second terminal currently reside are different. Optionally, the fifth message may also include the information of the network on which the first terminal currently resides. Optionally, if the first message is a discovery request message, the fifth message may be a Discovery Response message, or if the first message is a direct communication establishment request message, the fifth message may be a direct communication establishment rejection message, or if the first message is a direct communication establishment acceptance message, the fifth message may be a direct communication establishment failure message, etc..

Optionally, in some embodiments, after the second terminal receives the first message of the first terminal, if it is determined that the networks on which the first terminal and the second terminal reside are different according to the indication information, the first terminal may directly reply with a sixth message, wherein the sixth message is used for rejecting the first message. Optionally, the sixth message may also include a rejection reason, wherein the rejection reason may be that the networks on which the first terminal and the second terminal currently reside are different. Optionally, the sixth message may also include the information of the network on which the first terminal currently resides. Optionally, if the first message is a discovery request message, the sixth message may be used for rejecting the discovery request message, or if the first message is a direct communication establishment request message, the sixth message may be used for rejecting the direct communication establishment request message.

In summary, the fourth message represents that the first terminal fails to reside, the fifth message represents that the first terminal rejects to reside on the network on which the second terminal currently resides, and the sixth message represents that the first message is rejected. Therefore, when the second terminal receives any one of the fourth message, the fifth message or the sixth message, it represents that the first terminal and the second terminal currently reside on different networks. Optionally, the fourth message, the fifth message or the sixth message may include the information of the network on which the first terminal currently resides, so that the second terminal may attempt to reside on the network on which the first terminal currently resides according to the information of the network on which the first terminal currently resides that may be included in the fourth message, the fifth message or the sixth message. If the residing is successful, the second terminal may not reply with any response message. Optionally, the second terminal may reply to the first terminal with a seventh message which is used for indicating that the second terminal resides successfully. If the residing fails, the second terminal may not reply with any response message. Optionally, the second terminal may reply to the first terminal with an eighth message, which is used for indicating that the second terminal fails to reside. Optionally, the eighth message may include a failure reason, wherein the failure reason may include that a channel quality of the network on which the first terminal currently resides does not meet a condition for residing by the second terminal, or the network on which the first terminal currently resides does not allow the second terminal to reside. Optionally, the second terminal may reject to reside on the network on which the first terminal currently resides. In this case, the second terminal may not reply with any response message or may reply with a ninth message, which is used for indicating rejecting to reside on the network on which the first terminal currently resides. Optionally, the second terminal may reply with a tenth message, which is used for rejecting the fourth message, the fifth message or the sixth message.

It should be understood that in an embodiment of the present application, messages used for communication between the first terminal and the second terminal, for example, the first message to the tenth message, may all be discovery messages or direct communication messages, or may be other interface messages used for communication between terminal devices, and this is not restricted in embodiments of the present application.

Alternatively, in an embodiment of the present application, the same network may refer to any one of the following, which is not restricted in embodiments of the present application: a same beam, a same cell, a same base station, a same core network, a same Public Land Mobile Network (PLMN), a same Tracking Area (TA), and a same paging area.

In the above, the communication methods of embodiments of the present application are introduced as a whole, and actions of the first terminal and the second terminal under each scenario are introduced in detail below.

Optionally, in some embodiments, determining, by the first terminal, whether the first terminal and the second terminal reside on the same network according to the indication information, includes: determining, by the first terminal, that networks on which the first terminal and the second terminal reside are the same according to the indication information.

Specifically, the first terminal currently resides on a first network. If the second terminal determines that the second terminal currently resides on a second network according to the indication information, and if the first network and the second network are the same, the first terminal determines that the first terminal and the second terminal reside on the same network.

Optionally, in some embodiments, the method <NUM> further includes: communicating, by the first terminal, with the network on which the first terminal and the second terminal currently reside through the second terminal.

Specifically, if the first terminal determines that the networks on which the first terminal and the second terminal currently reside are the same, in such a situation, the first terminal may communicate with a network device through the second terminal, that is, the second terminal may act as a relay terminal device between the first terminal and the network device.

Optionally, in some embodiments, the method <NUM> further includes: sending, by the first terminal, a second message to the second terminal, wherein the second message is used for indicating that the networks on which the first terminal and the second terminal currently reside are the same.

Specifically, if the first terminal determines that the networks on which the first terminal and the second terminal currently reside are the same, the first terminal may send a second message to the second terminal, informing the second terminal that the networks on which the first terminal and the second terminal currently reside are the same, so that the second terminal may receive uplink data sent by the first terminal to the network device and forward the uplink data to the network device, or the second terminal may receive downlink data sent by the network device to the first terminal and forward the downlink data to the first terminal.

Optionally, in some embodiments, the second message is a discovery message or a direct communication message.

In other words, the first terminal may notify the second terminal that the networks on which the first terminal and the second terminal currently reside are the same, by sending a discovery message or a direct communication message. Optionally, the discovery message may be a discovery announcement message or a discovery request message, and the direct communication message may be a direct communication establishment request message or a direct communication establishment acceptance message.

Optionally, after receiving the second message of the first terminal, the second terminal may not reply or may reply with a corresponding response message. For example, if the second message is a discovery request message, the second terminal may reply with a discovery response message, or if the second message is a direct communication establishment request message, the second terminal may reply with a direct communication establishment acceptance message, etc..

Optionally, in some embodiments, determining, by the first terminal, whether the first terminal and the second terminal reside on the same network according to the indication information, includes: determining, by the first terminal, that the networks on which the first terminal and the second terminal reside are different according to the indication information.

Optionally, in some embodiments, after the first terminal determines that the networks on which the first terminal and the second terminal reside are different according to the indication information, the method further includes: receiving, by the first terminal, indication information sent by other terminals, wherein the indication information is used for indicating information of networks on which the other terminals currently reside; and finding, by the first terminal, a terminal device on the same network as the first terminal according to the indication information sent by the other terminals.

Specifically, after the first terminal determines that the networks on which the first terminal and the second terminal reside are different according to the indication information, the first terminal may continue to receive the indication information of other terminals (e.g., a third terminal), determine whether the third terminal and the first terminal reside on a same network according to the indication information of the third terminal. Optionally, if the third terminal and the first terminal reside on the same network, the first terminal may send uplink data to a network device through the third terminal or receive uplink data from the network device through the third terminal. Optionally, if the third terminal and the first terminal reside on different networks, the first terminal may receive indication information of a fourth terminal, determine whether the fourth terminal and the first terminal reside on a same network, and if the fourth terminal and the first terminal reside on different networks, the first terminal may continue to execute the acts described above until a terminal device located in a same network is found, thereby communicating with a network device through the terminal device.

Optionally, in some embodiments, the method <NUM> further includes: performing, by the first terminal, a residing action, wherein the residing action is used for making the first terminal reside on the network on which the second terminal currently resides.

In this case, the method further includes: communicating, by the first terminal, with the same network through the second terminal, under a situation that the first terminal performs the residing action successfully.

Specifically, if networks on which the first terminal and the second terminal currently reside are different, by making the first terminal reside on the network on which the second terminal currently resides, the first terminal and the second terminal may reside on a same network. The first terminal may send uplink data to a network device or receive downlink data sent by the network device through the second terminal, under a situation that the first terminal resides successfully on the network on which the second terminal currently resides, that is, in case of performing the residing action successfully.

It should be understood that if the first terminal resides on a first network and the second terminal resides on a second network, making the first terminal and the second terminal reside on the same network may include making the first terminal reside on the second network, or making the second terminal reside on the first network, or making both the first terminal and the second terminal reside on a third network.

Optionally, in some embodiments, the method further includes: sending, by the first terminal, a third message to the second terminal, wherein the third message is used for indicating that the first terminal has successfully resided on the network on which the second terminal currently resides.

Optionally, if the first terminal successfully resides on the network on which the second terminal currently resides, that is, the residing action is successfully performed, the first terminal may send a third message to the second terminal, wherein the third message is used for notifying the second terminal that the first terminal has successfully resided on the network on which the second terminal currently resides, so that the second terminal may receive uplink data sent by the first terminal to a network device and forward the uplink data to the network device, or the second terminal may receive downlink data sent by the network device to the first terminal and forward the downlink data to the first terminal.

Optionally, the third message is a discovery message or a direct communication message.

That is to say, the first terminal may notify the second terminal that the first terminal has successfully resided on the network on which the second terminal currently resides by sending a discovery message or a direct communication message. Optionally, the discovery message may be a discovery announcement message or a discovery request message, and the direct communication message may be a direct communication establishment request message or a direct communication establishment acceptance message.

Optionally, after receiving the third message of the first terminal, the second terminal may not reply or may reply with a corresponding response message. For example, if the third message is a discovery request message, the second terminal may reply with a discovery response message, or if the third message is a direct communication establishment request message, the second terminal may reply with a direct communication establishment acceptance message.

Optionally, the method <NUM> further includes: sending, by the first terminal, a fourth message to the second terminal, wherein the fourth message is used for indicating that the first terminal fails in performing the residing action.

Specifically, if the first terminal fails in performing the residing action, the first terminal may send a fourth message to the second terminal, notifying the second terminal through the fourth message that the first terminal fails in performing the residing action. Optionally, the fourth message includes a failure reason and/or information of a network on which the first terminal currently resides, wherein the failure reason includes at least one of the following: a channel quality of the network on which the second terminal currently resides does not meet a preset condition, and the network on which the second terminal currently resides does not allow the first terminal to access. Therefore, the second terminal may attempt to reside on the network on which the first terminal currently resides according to the information of the network on which the first terminal currently resides included in the fourth message, so that the first terminal and the second terminal reside on a same network.

Optionally, similar to the first message, the second message and the third message described above, the fourth message may also be a discovery message or a direct communication message, which will not be repeated here for sake of conciseness.

Optionally, in some embodiments, the method <NUM> further includes: sending, by the first terminal, a fifth message to the second terminal, wherein the fifth message is used for rejecting to reside on the network on which the second terminal currently resides.

Specifically, if the networks on which the first terminal and the second terminal currently reside are different, the first terminal may reject to reside on the network on which the second terminal currently resides. In such a situation, the first terminal may not reply to the second terminal or may reply with a fifth message, wherein the fifth message is used for rejecting to reside on the network on which the second terminal currently resides. In this case, the first terminal may also use the method described in the aforementioned embodiment to continue to search for a terminal device on the same network as the first terminal. Or optionally, the fifth message may also include information of a network on which the first terminal currently resides and/or a rejection reason, so that the second terminal may reside on the network on which the first terminal currently resides according to the information of the network on which the first terminal currently resides included in the fifth message, thereby making the first terminal and the second terminal reside on a same network.

Optionally, the rejection reason may include that the networks on which the first terminal and the second terminal currently reside on are different.

Similar to the first message, the second message, the third message and the fourth message described above, the fifth message may also be a discovery message or a direct communication message, which will not be repeated here for sake of conciseness.

Optionally, in some embodiments, the method further includes: sending, by the first terminal, a sixth message to the second terminal, wherein the sixth message is used for rejecting the first message.

Optionally, the sixth message may also include a rejection reason, wherein the rejection reason may be that networks on which the first terminal and the second terminal currently reside are different.

That is, the first terminal may first attempt to access the network in which the second terminal locates. If the accessing fails, or if the first terminal rejects to access the network in which the second terminal locates, or rejects the first message, the first terminal may send a fourth message or a fifth message or a sixth message to the second terminal including the information of the network on which the first terminal resides, so that the second terminal resides on the network on which the first terminal currently resides, according to the information of the network on which the first terminal currently resides.

Optionally, in some embodiments, the information of the currently-resided network includes at least one of the following: identification information of the currently-resided network, spatial consistency information, and time consistency information, wherein the spatial consistency information indicates whether the currently-resided network is the same as the resided network of last time, and the time consistency information indicates whether the resided network changes within a specific time period.

Specifically, the information of the currently-resided network may include identification information of the currently-resided network, and a corresponding network may be determined through the identification information. Optionally, the information of the currently-resided network may also include spatial consistency information, wherein the spatial consistency information indicates whether the currently-resided network is the same as the resided network of last time. Optionally, the spatial consistency information may be <NUM>-bit information, for example, <NUM> may be set to represent that the currently-resided network is the same as the resided network of last time, and <NUM> may be set to represent that the currently-resided network is different from the resided network of last time. If the spatial consistency information indicates that the currently-resided network is the same as the resided network of last time, then the information of the network on which the second terminal currently resides on may only include spatial consistency information, thereby saving signaling overhead. The first terminal may determine the currently-resided network according to the network on which the second terminal resided last time (provided that the first terminal knows the network on which the second terminal resides last time), thereby determining whether the first terminal is in the same network as the second terminal. Optionally, the time consistency information may indicate whether the network on which the second terminal resides changes within a specific time period. Optionally, the time consistency information may also be <NUM>-bit information. <NUM> may be set to represent that the resided network does not change within a specific time period, <NUM> is set to represent that the resided network changes within a specific time period. If the time consistency information indicates that the network on which the second terminal resides does not change within a specific time period, the first terminal may directly determine, within the specific time period, the network on which the second terminal resides without receiving indication information sent by the second terminal, and determine the network on which the second terminal currently resides through the indication information, thereby saving signaling overhead.

Optionally, in some embodiments, receiving, by the first terminal, the indication information sent by the second terminal, includes: receiving, by the first terminal, the indication information sent by the second terminal, under a situation that the second terminal is powered on, or the resided network changes, or a relay service needs to be transmitted.

Specifically, the second terminal may send indication information to the first terminal when being powered on, so that the first terminal finds the second terminal according to the indication information, thereby determining the second terminal as a relay terminal device between the first terminal and a network terminal in case of determining that the first terminal and the second terminal reside on the same network. Or the second terminal may send the indication information to the first terminal when the network on which the second terminal resides changes, so that the first terminal may choose to search for a relay terminal device again, or the first terminal may choose to reside on the network on which the second terminal resides after the network on which the second terminal resides changes. Optionally, the second terminal may send the indication information when there is a service (which may be a relay service from the first terminal or a relay service from other terminals) that needs to be relayed, so that the first terminal may determine whether the first terminal is in the same network as the second terminal according to the indication information. If the first terminal is in the same network as the second terminal, the first terminal may send the relay service to the second terminal. If the first terminal is in a different network from the second terminal, the first terminal may choose to search for other relay terminal devices or reside on the network on which the second terminal currently resides.

The communication method according to an embodiment of the present application is described in detail from the perspective of a first terminal above with reference to <FIG>, and the communication method according to another embodiment of the present application is described in detail from the perspective of a second terminal below with reference to <FIG>. It should be understood that the description on the first terminal side and the description on the second terminal side correspond to each other, and similar descriptions may refer to the above description, which will not be repeated here to avoid repetition.

<FIG> is a schematic flowchart of a communication method <NUM> according to another embodiment of the present application, and as shown in <FIG>, the method <NUM> includes acts S310 and S320.

In S310, a second terminal sends indication information to a first terminal, wherein the indication information is used for indicating information of a network on which the second terminal currently resides.

In S320, the second terminal determines whether the first terminal and the second terminal currently reside on a same network according to a reception time and/or a content of a first message.

That is to say, the second terminal may send the indication information to the first terminal so that the first terminal may determine the information of the network on which the second terminal currently resides according to the indication information <NUM>, so that the first terminal may reply to the second terminal with the first message or not reply with the first message, and the second terminal may determine whether the first terminal and the second terminal reside on the same network according to the content or the reception time of the first message.

Optionally, in some embodiments, sending, by the second terminal, the indication information to the first terminal, includes: sending, by the second terminal, a second message to the first terminal, wherein the second message includes the indication information.

Optionally, in some embodiments, the method further includes: under a situation that it is determined that the first terminal and the second terminal reside on a same network, relaying, by the second terminal, data between the first terminal and the same network.

That is, the first terminal may communicate with a network device through the second terminal, under a situation that the first terminal and the second terminal reside on the same network.

Optionally, in some embodiments, determining that the first terminal and the second terminal reside on the same network, includes: determining, by the second terminal, that the first terminal and the second terminal currently reside on the same network, under a situation that the content of the first message indicates that networks on which the first terminal and the second terminal currently reside are the same.

Optionally, in some embodiments, determining that the first terminal and the second terminal reside on the same network, includes: determining, by the second terminal, that the first terminal and the second terminal currently reside on the same network, under a situation that the content of the first message indicates that the first terminal has successfully accessed the network on which the second terminal currently resides.

That is to say, that the first terminal and the second terminal reside on the same network may be that the first terminal and the second terminal reside on the same network originally, or that the first terminal and the second terminal currently reside on the same network by making the first terminal reside on the network of the second terminal.

Optionally, in some embodiments, determining, by the second terminal, whether the first terminal and the second terminal currently reside on the same network according to the reception time and/or the content of the first message, includes: determining, by the second terminal, that the first terminal and the second terminal currently reside on different networks, if the content of the first message indicates that the first terminal rejects to access the network on which the second terminal currently resides.

Optionally, in some embodiments, the first message also includes a rejection reason and/or information of a network on which the first terminal currently resides, wherein the rejection reason includes that networks on which the first terminal and the second terminal currently reside are different.

Optionally, in some embodiments, the method further includes: performing, by the second terminal, a residing action according to the information of a network on which the first terminal currently resides contained in the first message, wherein the residing action is used for making the second terminal reside on the network on which the first terminal currently resides.

Optionally, in some embodiments, the method further includes: sending, by the second terminal, a third message to the first terminal, wherein the third message is used for indicating that the second terminal has successfully resides on a network on which the first terminal currently resides.

Optionally, in some embodiments, the third message is a discovery message or a direct communication message.

Optionally, in some embodiments, the method further includes: sending, by the second terminal, a fourth message to the first terminal, wherein the fourth message is used for indicating that the second terminal fails in performing the residing action.

Optionally, in some embodiments, the fourth message includes a failure reason, wherein the failure reason includes at least one of the following: a channel quality of a network on which the first terminal currently resides does not meet a preset condition, and the network on which the first terminal currently resides does not allow the second terminal to access.

Optionally, in some embodiments, the fourth message is a discovery message or a direct communication message.

Optionally, in some embodiments, the method further includes: receiving, by the second terminal, a fifth message sent by the first terminal, wherein the fifth message is used for rejecting the second message.

Optionally, in some embodiments, determining, by the second terminal, whether the first terminal and the second terminal currently reside on the same network according to the reception time and/or the content of the first message, includes: determining, by the second terminal, that the first terminal and the second terminal currently reside on different networks, if the reception time of the first message is not within a preset time range.

Specifically, the second terminal may preset a time range, and if the first message is not received within the preset time range, the second terminal may determine that the first terminal and the second terminal are in different networks.

Optionally, in some embodiments, the first message is a discovery message or a direct communication message.

Optionally, in some embodiments, the same network is any one of the following: a same beam, a cell, a base station, a core network, a Public Land Mobile Network (PLMN), a Tracking Area (TA), a paging area.

Optionally, in some embodiments, sending, by the second terminal, the indication information to the first terminal, includes: sending the indication information to the first terminal, under a situation that the second terminal is powered on, or the resided network changes, or a relay service needs to be transmitted.

Hereinafter, a communication method of an embodiment of the present application will be described from the perspective of device interaction with reference to <FIG>, and as shown in <FIG>, the method includes acts <NUM>-<NUM>.

In <NUM>, the first terminal receives a first message of the second terminal, wherein the first message includes indication information indicating information of a network on which the second terminal currently resides.

Optionally, the first message may be a discovery announcement message, a discovery request message, a direct communication establishment request message, or a direct establishment request acceptance message, etc..

In <NUM>, the first terminal determines whether networks on which the first terminal and the second terminal reside are the same according to the indication information.

If the networks on which the first terminal and the second terminal reside are the same, the first terminal may not reply with any response message, or in <NUM>, the first terminal may reply to the second terminal with a second message, wherein the second message indicates that the networks on which the first terminal and the second terminal reside are the same.

Optionally, the second message may be a discovery announcement message, a discovery request message, a direct communication establishment request message or a direct establishment request acceptance message, etc..

If the networks on which the first terminal and the second terminal reside are different, in <NUM>, the first terminal may perform a residing action according to the indication information for residing on the network on which the second terminal currently resides.

If the resident is successful, the first terminal may not reply with any response message, or in <NUM>, the first terminal may reply to the second terminal with a third message, wherein the third message indicates that the first terminal resides on the network of the second terminal successfully.

Optionally, the third message may be a discovery response message, a direct communication establishment request acceptance message, or the like.

If the resident fails, the first terminal may not reply with any response message, or in <NUM>, the first terminal may reply to the second terminal with a fourth message, wherein the fourth message indicates that the first terminal fails to reside on the network of the second terminal. Optionally, the fourth message may include a failure reason and/or information of a network on which the first terminal currently resides, wherein the failure reason may be that a channel quality of the network on which the second terminal currently resides does not meet a preset condition or the network on which the second terminal currently resides does not allow the terminal device to access. The fourth message may include information of the network on which the first terminal currently resides, so that the second terminal reside on the network on which the first terminal currently resides according to the information of the network on which the first terminal currently resides included in the fourth message.

Optionally, if the first message is a discovery request message, the fourth message may be a discovery response message, and if the first message is a direct connection establishment request message, the fourth message may be a direct communication establishment request rejection message, etc..

Optionally, if the networks on which the first terminal and the second terminal currently reside are different, in <NUM>, the first terminal may reply to the second terminal with a fifth message for indicating the first terminal rejects to reside on the network on which the first terminal currently resides.

Optionally, the fifth message may also include a rejection reason and/or information of a network on which the terminal device currently resides, wherein the rejection reason includes that the networks on which the first terminal and the second terminal currently reside are different.

Optionally, if the first message is a discovery request message, the fifth message may be a discovery response message, and if the first message is a direct connection establishment request message, the fifth message may be a direct communication establishment request rejection message, etc..

Optionally, if the networks on which the first terminal and the second terminal currently reside are different, in <NUM>, the first terminal may reply to the second terminal with a sixth message for indicating rejecting the first message.

Optionally, the sixth message may also include a rejection reason and/or information of a network on which the first terminal currently resides, wherein the rejection reason includes that the networks on which the first terminal and the second terminal currently reside are different.

Optionally, if the first message is a discovery request message, the sixth message may be a discovery response message, and if the first message is a direct connection establishment request message, the sixth message may be a direct communication establishment request rejection message, etc..

In <NUM>, the second terminal may attempt to reside on a network on which the first terminal currently resides, according to information of the network on which the first terminal currently resides included in the fourth message, the fifth message, or the sixth message.

Optionally, if the resident is successful, in <NUM>, the second terminal may send a seventh message to the first terminal, wherein the seventh message may indicate that the second terminal successfully resides on the network on which the first terminal currently resides.

Optionally, the seventh message may be a discovery announcement message, a discovery request message, a direct communication establishment request message or a direct establishment request acceptance message, etc..

Optionally, if the resident fails, in <NUM>, the second terminal may send an eighth message to the first terminal, wherein the eighth message may indicate that the second terminal fails to reside on the network on which the first terminal currently resides.

Optionally, the eighth message may be a discovery announcement message, a discovery request message, a direct communication establishment request message or a direct establishment request acceptance message, etc..

Or, after the second terminal receives the fourth message, the fifth message, or the sixth message of the first terminal, the second terminal may not reply with a response message, or in <NUM>, the second terminal may reply to the first terminal with a ninth message, indicating rejecting to reside on the network on which the first terminal currently resides. Optionally, the ninth message may also include a rejection reason, wherein the rejection reason may be that the networks on which the first terminal and the second terminal currently reside are different.

Optionally, the ninth message may be a discovery response message or a direct establishment request rejection message, etc..

Or, after the second terminal receives the fourth message, the fifth message, or the sixth message of the first terminal, the second terminal may not reply with the response message, or in <NUM>, the second terminal may reply to the first terminal with a tenth message, indicating rejecting the fourth message, the fifth message, or the sixth message. Optionally, the tenth message may also include a rejection reason, wherein the rejection reason may be that the networks on which the first terminal and the second terminal currently reside are different.

Method embodiments of the present application are described in detail above with reference to <FIG>, apparatus embodiments of the present application are described in detail below with reference to <FIG>. It should be understood that the apparatus embodiments and the method embodiments correspond to each other, and description of the method embodiments may be referred to for similar description of the apparatus embodiments.

<FIG> is a schematic block diagram of a terminal device <NUM> according to an embodiment of the present application. As shown in <FIG>, the terminal device <NUM> includes a communication module <NUM> and a determination module <NUM>.

The communication module <NUM> is used for receiving indication information sent by a second terminal, wherein the indication information is used for indicating information of a network on which the second terminal currently resides.

The determination module <NUM> is used for determining whether the terminal device and the second terminal reside on a same network according to the indication information.

Optionally, in some embodiments, the communication module <NUM> is specifically used for: receiving a first message sent by the second terminal, wherein the first message includes the indication information.

Optionally, in some embodiments, the determination module <NUM> is specifically used for: determining that networks on which the terminal device and the second terminal reside are the same, according to the indication information.

Optionally, in some embodiments, the communication module <NUM> is specifically used for: communicating with the network on which the terminal device and the second terminal currently reside through the second terminal.

Optionally, in some embodiments, the communication module <NUM> is specifically used for: sending a second message to the second terminal, wherein the second message is used for indicating that networks on which the terminal device and the second terminal currently reside are the same.

Optionally, in some embodiments, the determination module <NUM> is specifically used for: determining that networks on which the terminal device and the second terminal reside are different, according to the indication information.

Optionally, in some embodiments, the communication module <NUM> is specifically used for: receiving indication information sent by other terminals, wherein the indication information is used for indicating information of networks on which the other terminals currently reside.

The determination module <NUM> is specifically used for: finding a terminal device on the same network as the terminal device, according to the indication information sent by the other terminals.

Optionally, in some embodiments, the terminal device also includes: a residing module, used for performing a residing action, wherein the residing action is used for making the terminal device reside on the network on which the second terminal currently resides.

Optionally, in some embodiments, the communication module <NUM> is further used for: communicating with the same network through the second terminal, under a situation that the terminal device performs the residing action successfully.

Optionally, in some embodiments, the communication module <NUM> is further used for: sending a third message to the second terminal, wherein the third message is used for indicating that the terminal device has successfully resided on the network on which the second terminal currently resides.

Optionally, in some embodiments, the communication module <NUM> is further used for: sending a fourth message to the second terminal, wherein the fourth message is used for indicating that the terminal device fails in performing the residing action.

Optionally, in some embodiments, the fourth message includes a failure reason and/or information of a network on which the terminal device currently resides, wherein the failure reason includes at least one of the following: a channel quality of the network on which the second terminal currently resides does not meet a preset condition, and the network on which the second terminal currently resides does not allow the terminal device to access.

Optionally, in some embodiments, the communication module <NUM> is further used for: sending a fifth message to the second terminal, wherein the fifth message is used for rejecting to reside on the network on which the second terminal currently resides.

Optionally, in some embodiments, the fifth message also includes a rejection reason and/or information of a network on which the terminal device currently resides, wherein the rejection reason includes that the networks on which the terminal device and the second terminal currently reside are different.

Optionally, in some embodiments, the fifth message is a discovery message or a direct communication message.

Optionally, in some embodiments, the communication module <NUM> is further used for: sending a sixth message to the second terminal, wherein the sixth message is used for rejecting the first message.

Optionally, in some embodiments, the sixth message includes a rejection reason, wherein the rejection reason includes that the networks on which the terminal device and the second terminal currently reside are different.

Optionally, in some embodiments, the communication module <NUM> is specifically used for: receiving the indication information sent by the second terminal, under a situation that the second terminal is powered on, or the resided network changes, or a relay service needs to be transmitted.

Specifically, the terminal device <NUM> may correspond to the first terminal of the communication method <NUM> or the method described in <FIG> according to embodiments of the present application, and the device <NUM> may include an entity unit for performing the method <NUM> in <FIG> or the method performed by the first terminal in <FIG>. Moreover, various entity units in the device <NUM> and other operations and/or functions described above are for implementing the corresponding flows of the method <NUM> in <FIG> or the method described in <FIG>, respectively, and will not be repeated here for sake of conciseness.

<FIG> is a schematic block diagram of a terminal device <NUM> according to another embodiment of the present application. As shown in <FIG>, the terminal device <NUM> includes a communication module <NUM> and a determination module <NUM>.

The communication module <NUM> is used for sending indication information to a first terminal, wherein the indication information is used for indicating information of a network on which the terminal device currently resides.

The determination module <NUM> is used for determining whether the first terminal and the terminal device currently reside on the same network according to a reception time and/or a content of the first message.

Optionally, in some embodiments, the communication module <NUM> is specifically used for: sending a second message to the first terminal, wherein the second message includes the indication information.

Optionally, in some embodiments, the communication module <NUM> is further used for: relaying data between the first terminal and the same network, under a situation that it is determined that the first terminal and the terminal device reside on the same network.

Optionally, in some embodiments, the determination module <NUM> is specifically used for: determining that the first terminal and the terminal device currently reside on the same network, under a situation that the content of the first message indicates that the networks on which the first terminal and the terminal device currently reside are the same.

Optionally, in some embodiments, the determination module <NUM> is specifically used for: determining that the first terminal and the terminal device currently reside on the same network, under a situation that the content of the first message indicates that the first terminal has successfully accessed the network on which the terminal device currently resides.

Optionally, in some embodiments, the determination module <NUM> is specifically used for:
determining that the first terminal and the terminal device currently reside on different networks, if the content of the first message indicates that the first terminal rejects to access the network on which the terminal device currently resides.

Optionally, in some embodiments, the first message also includes a rejection reason and/or information of a network on which the first terminal currently resides, wherein the rejection reason includes that the networks on which the first terminal and the terminal device currently reside are different.

Optionally, in some embodiments, the terminal device also includes: a residing module, used for performing a residing action according to the information of the network on which the first terminal currently resides contained in the first message, wherein the residing action is used for making the terminal device reside on the network on which the first terminal currently resides.

Optionally, in some embodiments, the communication module <NUM> is further used for: sending a third message to the first terminal, wherein the third message is used for indicating that the terminal device has successfully resides on the network on which the first terminal currently resides.

Optionally, in some embodiments, the communication module <NUM> is further used for: sending a fourth message to the first terminal, wherein the fourth message is used for indicating that the terminal device fails in performing the residing action.

Optionally, in some embodiments, the fourth message includes a failure reason, wherein the failure reason includes at least one of the following: a channel quality of the network on which the first terminal currently resides does not meet a preset condition, and the network on which the first terminal currently resides does not allow the terminal device to access.

Optionally, in some embodiments, the communication module <NUM> is further used for: receiving a fifth message sent by the first terminal, wherein the fifth message is used for rejecting the second message.

Optionally, in some embodiments, the determination module <NUM> is further used for: determining that the first terminal and the terminal device currently reside on different networks, if the reception time of the first message is not within a preset time range.

Optionally, in some embodiments, the communication module <NUM> is specifically used for: sending the indication information to the first terminal, under a situation that the terminal device is powered on, or the resided network changes, or a relay service needs to be transmitted.

Specifically, the terminal device <NUM> may correspond to the second terminal in the communication method <NUM> or the second terminal in <FIG> according to an embodiment of the present application, and the device <NUM> may include an entity unit for performing the method <NUM> in <FIG> or the method performed by the second terminal in <FIG>. Moreover, various entity units in the device <NUM> and other operations and/or functions described above are for implementing the corresponding flows of the method <NUM> in <FIG> or the method described in <FIG>, respectively, and will not be repeated here for sake of conciseness.

<FIG> is a schematic block diagram of a terminal device according to yet another embodiment of the present application. The terminal device <NUM> shown in <FIG> includes a memory <NUM>, a transceiver <NUM> and a processor <NUM>, wherein the memory <NUM> is used for storing programs, the processor <NUM> is used for executing program codes stored in the memory <NUM>, and the processor <NUM> may achieve external communication through the transceiver <NUM>.

Optionally, the processor <NUM> may call the program codes stored in the memory <NUM> to execute corresponding operations in the method <NUM> shown in <FIG>, which will not be described here repeatedly for sake of conciseness.

It should be understood that, in an embodiment of the present application, the processor <NUM> may be a central processing unit (CPU), or the processor <NUM> may be another general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic device, a discrete gate or a transistor logic device, or a discrete hardware component, etc. The general purpose processor may be a microprocessor, or the processor may be any conventional processor or the like.

The memory <NUM> may include a read only memory and a random access memory and provide instructions and data to the processor <NUM>. A portion of memory <NUM> may also include a non-volatile random access memory. For example, the memory <NUM> may also store device type information.

In an implementation process, acts of the methods described above may be accomplished by integrated logic circuits of hardware in the processor <NUM> or instructions in a form of software. The acts of the method disclosed in connection with the embodiment of the present application may be directly embodied to be completed by an execution of a hardware processor or by a combination of hardware and software modules in a processor. The software modules may be located in typical storage medium in the art, such as a random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, or register. The storage medium is located in the memory, and the processor <NUM> reads the information in the memory and accomplishes the acts of the method in combination with its hardware. In order to avoid repetition, it will not be described in detail here.

In a specific implementation mode, the determination module <NUM> in <FIG> may be implemented with the processor <NUM> of <FIG>, and the communication module <NUM> in <FIG> may be implemented with the transceiver <NUM> of <FIG>.

Optionally, the processor <NUM> may call the program codes stored in the storage <NUM> to perform corresponding operations in the method <NUM> shown in <FIG>, which will not be described here repeatedly for sake of conciseness.

Those of ordinary skill in the art will recognize that the example elements and algorithm acts described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

Those skilled in the art can clearly understand that for convenience and conciseness of description, the specific working processes of the system, apparatus and unit described above may refer to the corresponding processes in the aforementioned method embodiments and will not be described here.

In several embodiments provided by the present application, it should be understood that the disclosed systems, apparatuses and methods may be implemented in other ways. For example, the apparatus embodiments described above are only illustrative, for example, the division of the units is only a logical function division, and there may be other division manners in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. On the other hand, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interface, apparatus or unit, and may be in electrical, mechanical or other forms.

The unit described as a separate component may or may not be physically separated, and the component shown as a unit may or may not be a physical unit, i.e., it may be located in one place or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments.

In addition, various functional units in various embodiments of the present application may be integrated in one processing unit, or the various units may be physically present separately, or two or more units may be integrated in one unit.

The functions may be stored in a computer readable storage medium if realized in a form of software functional units and sold or used as a separate product. Based on this understanding, the technical solution of the present application, in essence, or the part contributing to the prior art, or the part of the technical solution, may be embodied in the form of a software product stored in a storage medium, including a number of instructions for causing a computer device (which may be a personal computer, a server, or a network device and the like) to perform all or part of the acts of the method described in various embodiments of the present application. The storage medium includes various mediums capable of storing program codes such as U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk.

What are described above are merely example embodiments of the present application, but the protection scope of the present application is not limited thereto.

Claim 1:
A device-to-device, D2D, relay communication method, comprising:
receiving (<NUM>), by a first terminal, indication information sent by a second terminal, wherein the indication information is used for indicating information of a network on which the second terminal currently resides; and
determining (<NUM>), by the first terminal, whether the first terminal and the second terminal reside on a same network according to the indication information,
receiving (<NUM>), by the first terminal, the indication information sent by the second terminal, comprises:
receiving (<NUM>), by the first terminal, a first message sent by the second terminal, wherein the first message comprises the indication information, and the first message is a Discovery Announcement message or a direct communication message,
wherein the information of the network on which the second terminal currently resides comprises time consistency information,
if the time consistency information indicates that the network on which the second terminal resides does not change within a specific time period, the first terminal directly determines, within the specific time period, the network on which the second terminal resides without receiving indication information sent by the second terminal any more within the specific time period, and determines the network on which the second terminal currently resides through the indication information.