Communication method and device

By implementing a communication method to determine the type of data forwarding in the terminal device, the message storm and network congestion problems in U2U communication in the 5G system are solved, and the efficiency of data forwarding is achieved.

CN119922496APending Publication Date: 2025-05-02HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311444660.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

In fifth generation (5G) communication systems, message storm problems in user-to-user (U2U) communications lead to network congestion, especially when a large number of terminal devices serve as relay devices.

Method used

By implementing a communication method in the terminal device, the method allows the terminal device to determine whether to forward data as a first type device or a second type device after receiving a message. The first type of device forwards data, while the second type of device does not forward data, thereby avoiding duplicate forwarding of data.

Benefits of technology

It effectively avoids duplicate forwarding of data, reduces data storm problems, and thus reduces network congestion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119922496A_ABST
    Figure CN119922496A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a communication method and device, and relates to the technical field of communication. The communication method comprises: a first terminal device can receive a first message from a second terminal device, the first message indicating that the second terminal device is a first type device of a first service or a source device of the first service, the first service is a multicast or broadcast service, and the first type device is used for receiving and forwarding data of the first service; the source device of the first service is used for generating and sending data of the first service. The first terminal device can determine a first type of device or a second type of device of the first service according to the first message, and the second type of device is used for receiving data of the first service. Through the method, the first terminal device can determine whether to become the first type device of the first service according to the first message, and further determine whether the first terminal device forwards the data of the first service, so that repeated forwarding of the data can be effectively avoided, and a data storm problem is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a communication method and device. Background Art

[0002] With the rapid development of the 3rd Generation Partnership Project (3GPP) system in the fifth generation (5G), the application scope of user-to-user (UE-to-UE, U2U) communication technology is becoming more and more extensive.

[0003] In a possible U2U communication scenario, a terminal device (user equipment, UE) can send service data to other terminal devices by multicast or broadcast. If other terminal devices have relay capabilities, they can continue to multicast / broadcast service messages as relay devices (relay UE) after receiving the service data. If a large number of terminal devices act as relay devices to multicast / broadcast service messages, service messages will be forwarded non-directionally between multiple relay devices, resulting in message storm problems, which in turn cause network congestion problems. Summary of the invention

[0004] The present application provides a communication method and device for solving message storms and reducing network congestion problems.

[0005] In a first aspect, a communication method is provided, which can be executed by a first terminal device or a module (such as a chip) applied to the first terminal device. Taking the first terminal device executing the method as an example, the method includes: the first terminal device can receive a first message from a second terminal device, wherein the first message indicates that the second terminal device is a first type device of a first service or a source device of the first service, the first service is a multicast or broadcast service, the first type device is used to receive and forward data of the first service, and the source device of the first service is used to generate and send data of the first service. The first terminal device can be determined as a first type device or a second type device of the first service based on the first message, wherein the second type device is used to receive data of the first service.

[0006] In the above method, the first terminal device can determine whether to become the first type of device of the first service based on the first message, and then determine whether the first terminal device forwards the data of the first service, which can effectively avoid repeated forwarding of data and reduce data storm problems.

[0007] In one possible design, the first terminal device receives the first message from the second terminal device, which may include: the first terminal device can apply an identifier of the first service, and receive the first message from the second terminal device.

[0008] In a possible design, the above method may also include: the first terminal device may determine a first identifier based on the first message, wherein the first identifier is an identifier used by the second terminal device to send the first message.

[0009] In one possible design, the above method may also include: the first terminal device can receive data of the first service.

[0010] In one possible design, the first terminal device receives data of the first service, which may include: the first terminal device may apply an identifier of the first service to receive data of the first service.

[0011] In a possible design, the above method may also include: the first terminal device may determine the identifier of the source device of the first service based on the data of the first service.

[0012] In one possible design, the first message includes second location information of the second terminal device; the first terminal device is determined to be a first type device or a second type device of the first service based on the first message, which may include: the first location information of the first terminal device does not match the second location information, and the first terminal device is determined to be a first type device of the first service.

[0013] In a possible design, the above method may further include: the first terminal device may send a second message, wherein the second message includes the first location information, and the second message indicates that the first terminal device is a first type device of the first service.

[0014] In a possible design, the first terminal device sends the second message, which may include: the first terminal device can apply the identifier of the first service to send the second message.

[0015] In a possible design, the first terminal device applies the identifier of the first service to send the second message, which may include: the first terminal device may apply the first identifier and the identifier of the first service to send the second message.

[0016] In one possible design, the above method may also include: the first terminal device may forward data of the first service.

[0017] In one possible design, the first terminal device forwarding the data of the first service may include: the first terminal device may apply the identifier of the source device of the first service and the identifier of the first service to forward the data of the first service.

[0018] In one possible design, the first message includes second location information of the second terminal device; the first terminal device is determined to be a first type device or a second type device of the first service based on the first message, which may include: the first location information of the first terminal device is matched with the second location information, and the first terminal device is determined to be a second type device of the first service.

[0019] In one possible design, the second location information indicates a second location area where the second terminal device is located, and the first location information indicates a first location area where the first terminal device is located.

[0020] In one possible design, the first location information and the second location information of the first terminal device do not match, which may include: the first location area indicated by the first location information is different from the second location area indicated by the second location information.

[0021] The first location information of the first terminal device matches the second location information, which may include: a first location area indicated by the first location information is the same as a second location area indicated by the second location information.

[0022] In one possible design, the first location information is determined based on the geographical location of the first terminal device; and the second location information is determined based on the geographical location of the second terminal device.

[0023] In one possible design, the first terminal device receives data of the first service, which may include: the first terminal device can receive the data of the first service and location information of a source device of the first service.

[0024] In one possible design, the first terminal device forwards data of the first service, which may include: the first terminal device may forward the data of the first service, the first location information, and the location information of the source device of the first service.

[0025] In a possible design, the first terminal device receives data of the first service, which may include: the first terminal device can receive the data of the first service, the second location information, and the location information of the source device of the first service.

[0026] In a possible design, the first terminal device forwarding the data of the first service may include: the first terminal device may determine to forward the data of the first service, the first location information, and the location information of the source device of the first service based on the first location information, the second location information, and the location information of the source device of the first service. With this design, repeated forwarding of data can be effectively avoided, reducing the data storm problem.

[0027] In a second aspect, a communication method is provided, which can be performed by a first terminal device or a module (such as a chip) applied to the first terminal device. Taking the first terminal device performing the method as an example, the method includes: the first terminal device can receive a first message from a second terminal device, wherein the first message indicates that the second terminal device is a first type device, and the first type device is used to receive and forward data of at least one service, and at least one service is a multicast or broadcast service. The first terminal device can be determined as a first type device or a second type device according to the first message, and the second type device is used to receive data of at least one service.

[0028] In the above method, the first terminal device can determine whether to become the first type of device of the first service based on the first message, and then determine whether the first terminal device forwards the data of the first service, which can effectively avoid repeated forwarding of data and reduce data storm problems.

[0029] In one possible design, a first terminal device receives a first message from a second terminal device, which may include: the first terminal device applies a first identifier to receive the first message from the second terminal device, where the first identifier is used to identify an indication type of the first message.

[0030] In one possible design, the method may further include: the first terminal device may receive data of at least one service.

[0031] In one possible design, the first terminal device receives data from at least one service, which may include: the first terminal device may apply an identifier of at least one service to receive data of the at least one service.

[0032] In a possible design, the above method may also include: the first terminal device may determine the identifier of the source device corresponding to at least one service based on data of at least one service.

[0033] In one possible design, the first message includes second location information of the second terminal device; the first terminal device is determined to be a first type device or a second type device based on the first message, which may include: the first location information of the first terminal device does not match the second location information, and the first terminal device is determined to be a first type device.

[0034] In a possible design, the above method may also include: the first terminal device sends a second message, wherein the second message includes first location information of the first terminal device, and the second message indicates that the first terminal device is a first type of device.

[0035] In one possible design, the first terminal device sends the second message, which may include: the first terminal device may apply the first identifier to send the second message.

[0036] In one possible design, the first terminal device sends the second message, which may include: the first terminal device may use the identifier of the first terminal device and the first identifier to send the second message.

[0037] In a possible design, the above method may also include: the first terminal device can forward data of at least one service.

[0038] In one possible design, the first terminal device forwards data of at least one service, which may include: the first terminal device may apply an identifier of a source device corresponding to at least one service and an identifier corresponding to at least one service to forward data of at least one service.

[0039] In one possible design, the first message includes second location information of the second terminal device; the first terminal device is determined to be a first type of device or a second type of device based on the first message, which may include: the first location information of the first terminal device matches the second location information and is determined to be a second type of device.

[0040] In one possible design, the second location information indicates a second location area where the second terminal device is located, and the first location information indicates a first location area where the first terminal device is located.

[0041] In one possible design, the first location information and the second location information of the first terminal device do not match, which may include: the first location area indicated by the first location information is different from the second location area indicated by the second location information.

[0042] In one possible design, the first location information of the first terminal device matches the second location information, which may include: a first location area indicated by the first location information is the same as the second location area indicated by the second location information.

[0043] In one possible design, the first location information is determined based on the geographical location of the first terminal device; and the second location information is determined based on the geographical location of the second terminal device.

[0044] In one possible design, the first terminal device receives data of at least one service, which may include: the first terminal device can receive data of at least one service and location information of a source device of at least one service.

[0045] In one possible design, the first terminal device forwards data of at least one service, which may include: the first terminal device can forward data of at least one service, first location information, and location information of a source device corresponding to at least one service.

[0046] In one possible design, the first terminal device receives data of at least one service, which may include: the first terminal device can receive data of at least one service, second location information, and location information of a source device of at least one service.

[0047] In a possible design, the first terminal device forwarding the data of the first service may include: the first terminal device may determine to forward the data of at least one service, the first location information, and the location information of the source device corresponding to the at least one service based on the first location information, the second location information, and the location information of the source device of the at least one service. Through this design, repeated forwarding of data can be effectively avoided and the data storm problem can be reduced.

[0048] In a third aspect, a communication method is provided, which can be executed by a first terminal device or a module (such as a chip) applied to the first terminal device. Taking the first terminal device executing the method as an example, the method includes: the first terminal device can send a first discovery message, wherein the first discovery message is used to request a first type of device for a first service, the first service is a multicast or broadcast service, and the first type of device for the first service is used to receive and forward data of the first service. The first terminal device can receive a first confirmation message from the second terminal device, wherein the first confirmation message indicates that the second terminal device is a candidate relay device for the first service. The first terminal device can determine that the second terminal device is a first type of device for the first service based on the first confirmation message.

[0049] In the above method, the first terminal device can determine whether the second terminal device becomes the first type device of the first service based on the first confirmation message. After the second terminal device receives the data of the first service, if the second terminal device is the first type device of the first service, the second terminal device forwards the data of the first service; otherwise, the data of the first service is not forwarded. Therefore, repeated forwarding of data can be effectively avoided and the data storm problem can be reduced.

[0050] In one possible design, the first terminal device determines, based on the first confirmation message, that the second terminal device is a first type device for the first service, which may include: the first confirmation message satisfies the first condition, and determines that the second terminal device is a first type device for the first service.

[0051] In one possible design, the above method may also include: the first terminal device may establish a first unicast link with the second terminal device.

[0052] In one possible design, the above method may also include: the first terminal device may forward data of the first service.

[0053] In one possible design, the first terminal device forwarding the data of the first service may include: the first terminal device may apply the identifier of the source device of the first service and the identifier of the first service to forward the data of the first service.

[0054] In one possible design, the first discovery message includes at least one of the following: relay indication information corresponding to the first service, an identifier corresponding to the first service, location information of a source device of the first service, an identifier of the source device of the first service, a maximum number of relay hops corresponding to the first service, and a number of relay hops corresponding to the first terminal device.

[0055] In one possible design, the first confirmation message includes at least one of the following: location information of the second terminal device, and the number of relay hops corresponding to the second terminal device.

[0056] In one possible design, the first condition includes at least one of the following: the signal quality of the first confirmation message is greater than a first preset value, or, the distance between the second terminal device and the first terminal device is less than a second preset value, the distance between the second terminal device and the first terminal device is determined based on the location information of the second terminal device and the location information of the first terminal device, or, the number of relay hops corresponding to the second terminal device is less than a third preset value.

[0057] In a fourth aspect, a communication method is provided, which can be performed by a first terminal device or a module (such as a chip) applied to the first terminal device. Taking the first terminal device performing the method as an example, the method includes: the first terminal device can receive a first discovery message from a second terminal device, wherein the first discovery message indicates that the second terminal device is a candidate relay device for the first service. The first terminal device can determine that the second terminal device is a first type device of the first service based on the first discovery message, wherein the first type device of the first service is used to receive and forward data of the first service.

[0058] In the above method, the first terminal device can determine whether the second terminal device becomes the first type device of the first service based on the first discovery message. After the second terminal device receives the data of the first service, if the second terminal device is the first type device of the first service, the second terminal device forwards the data of the first service; otherwise, the data of the first service is not forwarded. Therefore, repeated forwarding of data can be effectively avoided and the data storm problem can be reduced.

[0059] In one possible design, the first terminal device determines, based on the first discovery message, that the second terminal device is a first type device for the first service, which may include: the first discovery message satisfies the first condition, and determines that the second terminal device is a first type device for the first service.

[0060] In one possible design, the first discovery message includes at least one of the following: location information of the second terminal device, and the number of relay hops corresponding to the second terminal device.

[0061] In one possible design, the first condition includes at least one of the following: the signal quality of the first discovery message is greater than a first preset value, or, the distance between the second terminal device and the first terminal device is less than a second preset value, the distance between the second terminal device and the first terminal device is determined based on the location information of the second terminal device and the location information of the first terminal device, or, the number of relay hops corresponding to the second terminal device is less than a third preset value.

[0062] In one possible design, the first discovery message also includes first information of other terminal devices that can be monitored by the second terminal device, and the first information includes at least one of the following: an identifier of a service supported by the other terminal device; location information of the other terminal device; and relay capability information of the other terminal device.

[0063] In a fifth aspect, a communication method is provided, which can be performed by a first terminal device or a module (such as a chip) applied to the first terminal device. Taking the first terminal device performing the method as an example, the method includes: the first terminal device can receive data of a first service from a second terminal device. If a first forwarding probability corresponding to the first terminal device satisfies a first condition, the first terminal device can forward the data of the first service.

[0064] In the above method, after receiving the data of the first service, the first terminal device determines whether to forward the data of the first service according to the first forwarding probability corresponding to the first terminal device, which can effectively avoid repeated forwarding of data and reduce data storm problems.

[0065] In one possible design, the first terminal device sending data of the first service may include: the first terminal device may apply the identifier of the source device of the first service and the identifier of the first service to send the data of the first service.

[0066] In one possible design, the first terminal device also receives the maximum number of relay hops, the number of relay hops corresponding to the second terminal device, and the location information of the source device of the first service from the second terminal device.

[0067] In one possible design, the first forwarding probability corresponding to the first terminal device is determined based on at least one of the maximum number of relay hops, the number of relay hops corresponding to the second terminal device, the location information of the source terminal device, and the location information of the first terminal device.

[0068] In a sixth aspect, an embodiment of the present application provides a communication system, comprising a first terminal device for executing any implementation method in the first to fifth aspects.

[0069] In a seventh aspect, the present application further provides a communication device, which may be a first terminal device, having the function of implementing the first terminal device in each possible design example in the first to fifth aspects and any aspect. The function may be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the above functions.

[0070] In one possible design, the structure of the communication device may include a transceiver unit and a processing unit, which can perform the corresponding functions of the first terminal device in each possible design example in the first to fifth aspects above. Please refer to the detailed description in the method example for details, which will not be repeated here.

[0071] In one possible design, the structure of the communication device includes an interface circuit and one or more processors. Optionally, the communication device also includes a memory. The interface circuit is used to send and receive data, and to communicate and interact with other devices in the communication system. The one or more processors are configured to support the communication device to perform the corresponding functions of the first terminal device in each possible design example of the first to fifth aspects above. The memory is coupled to the one or more processors, which stores the necessary program instructions and data of the communication device.

[0072] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores program instructions. When the program instructions are executed on a computer, the computer implements the method described in any one of the first to fifth aspects of the embodiments of the present application, as well as any possible design of any aspect.

[0073] In the ninth aspect, the present application also provides a chip, which is coupled to a memory and is used to read and execute program instructions stored in the memory to implement the method described in any one of the first to fifth aspects above, and any possible design of any aspect.

[0074] In the tenth aspect, an embodiment of the present application provides a computer program product including computer program code or instructions, which, when executed on a computer, enables the computer to implement the method described in any one of the first to fifth aspects above, and any possible design of any one of the aspects.

[0075] For the technical effects that can be achieved by possible designs in the above-mentioned sixth to tenth aspects and each aspect, please refer to the above-mentioned technical effects that can be achieved by possible designs in the first to fifth aspects and each aspect, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] FIG. 1( a ) is a schematic diagram of the structure of a control plane protocol stack for sidelink communication provided in an embodiment of the present application;

[0077] FIG1( b ) is a schematic diagram of the structure of a user plane protocol stack for sidelink communication provided in an embodiment of the present application;

[0078] Figure 2 A schematic diagram of a UE-to-UE Relay communication architecture provided in an embodiment of the present application;

[0079] FIG3( a) is a schematic diagram of the structure of a user plane protocol stack of an L3 relay provided in an embodiment of the present application;

[0080] FIG3( b ) is a schematic diagram of the structure of a user plane protocol stack of an L2 relay provided in an embodiment of the present application;

[0081] Figure 4 A flow chart of a communication method provided in an embodiment of the present application;

[0082] Figure 5 A schematic diagram of a structure for determining a region identifier provided in an embodiment of the present application;

[0083] FIG6( a ) is a schematic diagram of the structure of a data packet provided in an embodiment of the present application;

[0084] FIG6( b ) is a schematic diagram of the structure of a data packet provided in an embodiment of the present application;

[0085] Figure 7 A flow chart of a communication method provided in an embodiment of the present application;

[0086] FIG8( a ) is a schematic diagram of the structure of a data packet provided in an embodiment of the present application;

[0087] FIG8( b ) is a schematic diagram of the structure of a data packet provided in an embodiment of the present application;

[0088] Fig. 9 A flow chart of a communication method provided in an embodiment of the present application;

[0089] Fig.10 A flow chart of a communication method provided in an embodiment of the present application;

[0090] Fig.11 A flow chart of a communication method provided in an embodiment of the present application;

[0091] Fig.12 A schematic diagram of the structure of a communication device provided in an embodiment of the present application;

[0092] Fig.13A schematic diagram of another structure of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0093] In order to make the purpose, technical solution and advantages of the present application more clear, the present application will be further described in detail below with reference to the accompanying drawings. The specific operation methods, functional descriptions, etc. in the method embodiments can also be applied to the device embodiments or system embodiments.

[0094] To facilitate understanding of the solutions of the embodiments of the present application, the nouns or terms involved in the embodiments of the present application are first explained below.

[0095] 1) Sidelink communication

[0096] In a wireless communication system, UEs can communicate data through the network, or they can communicate directly with each other without the help of the network. The interface between UEs is called the PC5 interface, which is similar to the Uu interface between UEs and access network equipment. The link between UEs is called sidelink. A typical application scenario of sidelink communication is vehicle-to-everything (V2X). In the vehicle network, each vehicle is a UE, and UEs can directly transmit data through sidelink without going through the network, which can effectively reduce communication delays. It can be understood that the sidelink can also be called a side link, an edge link, or a side link.

[0097] 2) The control plane protocol stack of sidelink communication is shown in Figure 1(a), which includes, from top to bottom, the radio resource control (RRC) layer, the packet data convergence protocol (PDCP) layer, the radio link control (RLC) layer, the media access control (MAC) layer and the physical layer (PHY) layer.

[0098] The user plane protocol stack of sidelink communication is shown in Figure 1(b), which includes the service data adaptation protocol (SDAP) layer, the packet data convergence protocol (PDCP) layer, the radio link control (RLC) layer, the media access control (MAC) layer and the physical layer (PHY layer) from top to bottom.

[0099] 3) Unicast, multicast, and broadcast on sidelink

[0100] Unicast communication on the sidelink is similar to data communication after a radio resource control (RRC) connection is established between the UE and the access network device, and requires a unicast connection to be established between the two UEs. After the unicast connection is established, the two UEs can communicate data based on the negotiated identifier, and the data can be encrypted or not.

[0101] Multicast communication on the sidelink refers to the communication between all UEs in a communication group. Any UE in the group can send and receive data of the multicast service.

[0102] Broadcast communication on the sidelink is similar to the access network equipment broadcasting system information, that is, the UE sends broadcast service data to the outside without encryption, and any other UE within the effective receiving range can receive the broadcast service data if it is interested in the broadcast service.

[0103] In the process of sidelink communication (including unicast, multicast, and broadcast), sidelink communication corresponds to a pair of source layer-2 identifier (source L2 ID) and destination layer-2 identifier (destination layer-2 identifier, destination L2 ID). The subheader of each sidelink media access control protocol data unit (MAC PDU) and the physical layer control signaling generally contain the source L2 ID and the destination L2 ID so that data can be transmitted from the sender to the correct receiver.

[0104] The source L2 ID is allocated by the transmitting UE (or source UE). Depending on the communication type (unicast, multicast or broadcast) and standard (LTE or NR), the transmitting UE will select different source L2 IDs. If the UE's sidelink service type requires privacy protection to avoid being tracked and identified by other UEs, the transmitting UE also needs to update the source L2 ID regularly.

[0105] The destination L2 ID depends on the service type. The correspondence between the destination L2 ID and the unicast / multicast / broadcast service is defined by pre-configuration, application layer server or core network configuration. During the multicast / broadcast communication process, the sending UE determines the corresponding destination L2 ID according to the multicast / broadcast service type. The destination L2 ID is predefined by the protocol. During the unicast communication process, the sending UE first needs to establish a unicast connection with the destination UE. During the unicast connection establishment process, the sending UE will first select a default destination L2 ID. The default destination L2 ID is related to the service type of the unicast communication. After the unicast connection is established, the sending UE continues to use the default destination L2 ID for unicast communication.

[0106] 4) Discovery procedure

[0107] A UE supporting proximity services searches for nearby UEs through the discovery process and establishes a unicast connection with them for subsequent sidelink communication. The UE's discovery protocol layer generates a discovery message, submits it to the PDCP layer, and sends it to the peer UE through the bottom layer.

[0108] There are two models in the discovery process: Model A and Model B. In Model A, UE can be divided into Announcing UE and Monitoring UE. Announcing UE broadcasts a discovery message, which is also called an announcement message. The announcement message can carry specific information of the Announcing UE, such as a relay service code (RSC) indicating the type of service that can be provided, which is used by surrounding UEs to determine whether they need the type of service that the Announcing UE can provide. After the neighboring Monitoring UE monitors and receives the announcement message, it determines whether to use the Announcing UE as the peer UE for sidelink communication based on the content carried in the announcement message.

[0109] In model B, UE can be divided into Discoverer UE and Discoveree UE. Discoverer UE broadcasts discovery message, which is also called solicitation message. The solicitation message carries information about the service type that the discoverer UE is interested in. After the discoveree UE monitors and receives the solicitation message, if it finds that it meets the service requirements of the discoverer UE, it will reply to the discoverer UE with another discovery message, which is also called response message.

[0110] Similar to sidelink communication, the discovery message carries the source L2 ID and the destination L2 ID, which are used by the UE to send or receive discovery messages. The source L2 ID is allocated by the sending UE, and the destination L2 ID is a predefined or preconfigured default destination L2 ID. It should be noted that the default destination L2 ID is different from the default destination L2 ID used in sidelink unicast communication and is dedicated to discovery messages.

[0111] 5) Radio Bearer (RB): Radio bearer is a general term for a series of protocol entities and configurations allocated by the base station to the UE, including packet data convergence protocol (PDCP) entity, radio link control (RLC) protocol entity, medium access control (MAC) protocol entity and a series of resources allocated by the physical layer (PHY). Radio bearers are divided into data radio bearers (DRB) and signaling radio bearers (SRB). The former is used to carry data and the latter is used to carry signaling messages. In the sidelink communication scenario, communication between UE and UE is through sidelink radio bearers (SLRB), including sidelink data radio bearers SL DRB and sidelink signaling radio bearers SL SRB. In the protocol text, the radio bearer configuration generally only includes the configuration of the PDCP layer and the SDAP layer. The protocol entity below the RLC layer is called the RLC bearer, and the corresponding configuration is given in the RLC bearer configuration.

[0112] 6) RLC Bearer: RLC bearer refers to the protocol entity and configuration below the RLC layer. It is the lower layer of the radio bearer, including a series of resources such as RLC protocol entity and logical channel. One RLC bearer is associated with one logical channel of the MAC layer. One RLC bearer is associated with one PDCP entity, that is, one RLC bearer serves one radio bearer. When the adaptation layer supports bearer multiplexing, one RLC bearer can also serve multiple radio bearers.

[0113] 7)Unicast connection establishment

[0114] After the discovery process, UEs establish unicast connections through the unicast connection establishment process. The UE that initiates the unicast connection establishment process is called the initiating UE, and the peer UE of the initiating UE is called the target UE. After the discovery process, the initiating UE sends a unicast connection establishment request (directcommunication request, DCR) message to the target UE, which carries the L2 ID of the initiating UE, the L2ID of the target UE and user information. The user information includes information related to the upper application layer. After receiving the unicast connection establishment request message, the target UE determines whether the unicast connection establishment request can be accepted based on the user information in the unicast connection establishment request message. If the unicast connection establishment request can be accepted, a unicast connection acceptance (directcommunication accept, DCA) message is replied to the initiating UE. Otherwise, a unicast connection rejection (directcommunication reject, DCR) message is replied to the initiation UE.

[0115] In the above model A, after the monitoring UE finds a suitable counterpart UE, it can actively initiate a unicast connection establishment process.

[0116] In the above model B, after the discoverer UE receives a reply message from the appropriate discoveree UE, it can initiate the unicast establishment process.

[0117] 8) UE to UE Relay (also known as UE-to-UE Relay)

[0118] When UEs communicate directly with each other through sidelink, the sidelink communication range between UEs will be limited due to insufficient hardware capabilities of the transmitting UE. In order to expand the sidelink communication range between UEs, UE-to-UE Relay is proposed. UE-to-UE Relay is a technology in which a relay UE helps the transmitting UE and the receiving UE to communicate, also known as relay technology, where the relay UE can be one or more.

[0119] Figure 2 The figure is a schematic diagram of the communication architecture of UE-to-UE Relay. UE1 communicates with UE2 through the cooperation of relay UE, where UE1 and relay UE communicate via sidelink, and the corresponding interface is called PC5; relay UE and UE2 communicate via sidelink, and the corresponding interface is called PC5.

[0120] Currently, there are two implementation methods of UE-2-UE Relay, namely, a relay method based on L3 (Layer 3 / Layer 3) and a relay method based on L2 (Layer 2 / Layer 2).

[0121] In the L3 relay mode, user plane data is relayed at the IP layer. The user plane protocol stack corresponding to L3 relay is shown in Figure 3(a). When the data packet sent from UE1 to UE2 is relayed by the relay UE, the relay UE needs to parse it to the IP layer and determine the forwarding destination UE2 based on information such as the IP address.

[0122] In the L2 relay mode, user plane data is relayed below the PDCP layer. The user plane protocol stack corresponding to the L2 relay is shown in Figure 3(b). The relay UE only maintains the relayed RLC bearer, including the RLC layer, MAC layer, and PHY layer. In addition, the protocol architecture adds an adaptation layer between the RLC layer and the PDCP layer. The main function of the adaptation layer is to multiplex and split the bearer, that is, to support different wireless bearers to be multiplexed on one RLC bearer or to split the wireless bearer data multiplexed on one RLC bearer.

[0123] Next, the communication method provided in the embodiment of the present application is introduced with reference to the accompanying drawings.

[0124]

Implementation method 1

[0125] Figure 4 A flow chart of a communication method provided in an embodiment of the present application is shown.

[0126] S401, the second terminal device sends a first message.

[0127] In a possible implementation, the second terminal device may be a source device of the first service, wherein the source device of the first service may be used to generate and send data of the first service. The second terminal device may also be a first type device of the first service, wherein the first type device is used to receive and forward data of the first service. It should be understood that the second terminal device may be any first type device, which is not limited here. The second terminal device does not forward data other than the first service. The first service may be any multicast or broadcast service, which is not limited here.

[0128] The first message may be used to indicate that the second terminal device is a first type device of the first service or a source device of the first service. When the second terminal device is a source device of the first service, the second terminal device may send the first message once; when the second terminal device is a first type device of the first service, the second terminal device may send the first message periodically.

[0129] In the case where the second terminal device is a source device of the first service, the second terminal device may first send the first message in a multicast / broadcast form before sending the data of the first service. In the case where the second terminal device is a first type device of the first service, the source device of the first service may first send the first message in a multicast / broadcast form before sending the data of the first service.

[0130] In a possible implementation, the second terminal device may use the identifier of the first service to send the first message. Alternatively, the second terminal device may use the first identifier and the identifier of the first service to send the first message. The first identifier may be the identifier of the source device of the first service or the identifier of the second terminal device, which is not limited here.

[0131] In an embodiment of the present application, the first message may include second location information of the second terminal device, wherein the second location information may be used to indicate a second location area where the second terminal device is located. The second location information may be determined based on the geographical location of the second terminal device, and may include the following two possible implementations.

[0132] In a first possible implementation, the geographical location information of the second terminal device may be directly used as the second location information, and the second location area where the second terminal device is located may be indicated by the geographical location information of the second terminal device.

[0133] Specifically, the geographic location information of the second terminal device includes the longitude and latitude of the location of the second terminal device. The longitude and latitude of the location of the second terminal device can be directly used as the second location information.

[0134] In a second possible implementation, the area identifier of the area where the second terminal device is located can be determined based on the geographic location information of the second terminal device, and the area identifier of the area where the second terminal device is located can be used as the second location information. The area identifier of the area where the second terminal device is located indicates the second location area where the second terminal device is located.

[0135] Specifically, the geographic location information of the second terminal device includes the longitude and latitude of the location of the second terminal device, and the area identifier of the area where the second terminal device is located can be determined based on the longitude and latitude of the location of the second terminal device.

[0136] In one possible implementation, a first reference identifier is determined based on the longitude coordinates of the location of the second terminal device and a first length; a second reference identifier is determined based on the latitude coordinates of the location of the second terminal device and a first width; finally, an area identifier of the area where the second terminal device is located is determined based on the first reference identifier and the second reference identifier.

[0137] Optionally, the difference between the longitude coordinate of the location of the second terminal device and the longitude reference coordinate is first taken as the longitude distance corresponding to the second terminal device, and then the third reference identifier is determined based on the ratio of the longitude distance corresponding to the second terminal device to the first length. Finally, the third reference identifier is modulo the first reference value to obtain the first reference identifier.

[0138] Similarly, the difference between the latitude coordinate of the location of the second terminal device and the latitude reference coordinate is first taken as the latitude distance corresponding to the second terminal device, and then the fourth reference identifier is determined based on the ratio of the latitude distance corresponding to the second terminal device to the first width. Finally, the fourth reference identifier is modulo the first reference value to obtain the second reference identifier.

[0139] Finally, the product of the second reference identifier and the first reference value is used as the first temporary value, and the sum of the first temporary value and the first reference identifier is used as the area identifier of the area where the second terminal device is located.

[0140] Accordingly, the area identifier of the area where the second terminal device is located can be determined by the following formula:

[0141] UE2_Zone ID=y1*B+x1

[0142]

[0143] Among them, UE2_Zone ID represents the area identifier of the area where the second terminal device is located, x1 represents the first reference identifier, y1 represents the second reference identifier, x represents the latitude distance corresponding to the second terminal device, XLength represents the first length, y represents the longitude distance corresponding to the second terminal device, YLength represents the first width, B represents the first reference value, Floor() represents rounding down, and Mod represents modulo operation.

[0144] For example, if Figure 5 As shown, Figure 5 (a) in the figure gives an example of an area to be divided, where the area to be divided includes multiple terminal devices, wherein UE2 is a second terminal device, and the first reference value B is set to 64, the first length XLength is set to 20, and the first width YLength is set to 20. If the longitude and latitude coordinates of the location of UE2 are 30 and 30 respectively, the longitude reference coordinate is 0, and the latitude reference coordinate is 0, it can be determined that the longitude distance y corresponding to UE2 is 30 (i.e. 30-0=30), and the latitude distance x corresponding to UE2 is 30 (i.e. 30-0=30). Based on the above formula, it can be determined that the first reference identifier x1 of UE2 is 1 (i.e. ), the second reference identifier y1 of UE2 is 1 (i.e. ), finally, the area identifier of the area where UE2 is located is 65 (ie, 1*64+1=65). From the above, it can be seen that the terminal devices located in the same area have the same area identifier. The size of each area is determined by the first length and the first width.

[0145] In a possible implementation, the second terminal device sends the first message in a multicast / broadcast form, and at least one terminal device around the second terminal device can receive the first message. For ease of description, the following is an example of a first terminal device receiving a first message from a second terminal device, where the first terminal device is any terminal device around the second terminal device.

[0146] In a possible implementation, the first terminal device may use the identifier of the first service to receive the first message from the second terminal device.

[0147] Similarly, the first terminal device can also determine the first location information of the first terminal device, and the first location information can be used to indicate the first location area where the first terminal device is located. The first location information can be determined based on the geographical location of the first terminal device, and the method for determining the first location information is the same as the method for determining the second location information, which will not be repeated here.

[0148] S402: The first terminal device is determined to be a first type device or a second type device of the first service according to the first message.

[0149] In a possible implementation, the first terminal device obtains the second location information of the second terminal device from the first message, and determines whether the first terminal device is a first type device or a second type device of the first service based on the first location information of the first terminal device and the second location information of the second terminal device. The second type device is used to receive data of the first service and does not forward the data of the first service; or the second type device is used not to receive data of the first service.

[0150] The first terminal device may be determined to be a first type device of the first service through the following three possible implementations:

[0151] In a first possible implementation, if the first location information does not match the second location information, it is determined that the first terminal device is a first type device of the first service.

[0152] In a second possible implementation, if the first location information does not match the second location information, and the first terminal device does not receive a third message from the third terminal device, it is determined that the first terminal device is a first type device of the first service. The third message includes the third location information of the third terminal device, the third message indicates that the third terminal device is a first type device of the first service, and the third location information matches the first location information.

[0153] A third possible implementation is that if the first location information does not match the second location information, and the first terminal device does not receive a third message from a third terminal device within a first preset time period, it is determined that the first terminal device is a first type device of the first service.

[0154] It should be understood that the starting point of the first preset time period may be the time point corresponding to when the first terminal device receives the first message, or may be the time point corresponding to when the first terminal device determines that the first location information does not match the second location information, which is not limited here.

[0155] The first terminal device may be determined as a second type device of the first service through the following three possible implementations:

[0156] In a first possible implementation, if the first location information matches the second location information, it is determined that the first terminal device is a second type device of the first service.

[0157] A second possible implementation manner is to determine that the first terminal device is a second type device of the first service if the first location information does not match the second location information and the first terminal device receives a third message from a third terminal device.

[0158] A third possible implementation is that if the first location information does not match the second location information, and within a first preset time period, the first terminal device receives a third message from a third terminal device, then the first terminal device is determined to be a second type device of the first service.

[0159] In the above method, the first terminal device can determine whether to become the first type of device of the first service based on the first message, and then determine whether the first terminal device forwards the data of the first service, which can effectively avoid repeated forwarding of data and reduce data storm problems.

[0160] Optionally, the first terminal device may determine whether the first location information matches the second location information by the following possible implementations:

[0161] If the first location area indicated by the first location information is different from the second location area indicated by the second location information, the first location information does not match the second location information; if the first location area indicated by the first location information is the same as the second location area indicated by the second location information, the first location information matches the second location information.

[0162] Optionally, when the first location information is the area identifier of the area where the first terminal device is located, and the second location information is the area identifier of the area where the second terminal device is located, if the area identifier of the area where the first terminal device is located is different from the area identifier of the area where the second terminal device is located, the first location information does not match the second location information; if the area identifier of the area where the first terminal device is located is the same as the area identifier of the area where the second terminal device is located, the first location information matches the second location information.

[0163] Optionally, when the first location information is the geographic location information of the first terminal device and the second location information is the geographic location information of the second terminal device, the area identifier of the area where the first terminal device is located can be determined based on the geographic location information of the first terminal device, and the area identifier of the area where the second terminal device is located can be determined based on the geographic location information of the second terminal device. If the area identifier of the area where the first terminal device is located is different from the area identifier of the area where the second terminal device is located, the first location information of the first terminal device does not match the second location information; if the area identifier of the area where the first terminal device is located is the same as the area identifier of the area where the second terminal device is located, the first location information of the first terminal device matches the second location information.

[0164] In a possible implementation, after receiving the first message, the first terminal device may also determine the first identifier based on the first message. It should be understood that the first identifier is the identifier used by the second terminal device to send the first message, which has been described above and will not be repeated here.

[0165] After determining that the first terminal device is a second type device of the first service, the first terminal device does not send the second message. After determining that the first terminal device is a first type device of the first service, the first terminal device may send a second message. The second message includes the first location information of the first terminal device, and the second message indicates that the first terminal device is a first type device of the first service. The first terminal device sending the second message may include the following two possible implementations: the first terminal device may apply the identifier of the first service to send the second message. Alternatively, the first terminal device may apply the first identifier and the identifier of the first service to send the second message.

[0166] The first terminal device may send the second message in a multicast / broadcast format. The first terminal device may periodically send the second message in a multicast / broadcast format, and any terminal device around the first terminal device may receive the second message.

[0167] In a possible implementation, the first terminal device may also receive data of the first service, and determine the identifier of the source device of the first service based on the data of the first service. After determining that the first terminal device is a second-type device of the first service, the first terminal device may not forward the data of the first service. After determining that the first terminal device is a first-type device of the first service, the first terminal device may forward the data of the first service. Specifically, the first terminal device may apply the identifier of the source device of the first service and the identifier of the first service to forward the data of the first service. The data of the first service may come from any first-type device or the source device of the first service, and is not limited to the second terminal device.

[0168] It should be understood that when receiving data of the first service, the first terminal device can apply the identifier of the first service to receive the data of the first service.

[0169] In one possible implementation, if the data of the first service comes from a source device of the first service, the first terminal device can receive the data of the first service and the location information of the source device of the first service sent by the source device of the first service, wherein the data packet format corresponding to the data of the first service and the location information of the source device of the first service is as shown in Figure 6(a).

[0170] After determining that the first terminal device is a second type device of the first service, the first terminal device may not forward the data of the first service. After determining that the first terminal device is a first type device of the first service, the first terminal device may forward the data of the first service, the first location information of the first terminal device, and the location information of the source device of the first service.

[0171] In a possible implementation, if the data of the first service comes from any first type device, for ease of description, the data of the first service comes from the second terminal device as an example. The first terminal device can receive the data of the first service sent by the second terminal device, the second location information of the second terminal device, and the location information of the source device of the first service, wherein the data packet format corresponding to the data of the first service, the second location information of the second terminal device, and the location information of the source device of the first service is shown in FIG6(b). After determining that the first terminal device is a second type device of the first service, the first terminal device may not forward the data of the first service.

[0172] After determining that the first terminal device is a first type device of the first service, the first terminal device can determine whether to forward data of the first service, the first location information of the first terminal device, and the location information of the source device of the first service based on the first location information, the second location information, and the location information of the source device of the first service.

[0173] Specifically, if the second location information includes the longitude and latitude of the location of the second terminal device, the location information of the source device of the first service includes the longitude and latitude of the location of the source device of the first service, the first location information includes the longitude and latitude of the location of the first terminal device, the longitude of the location of the first terminal device is between the longitude of the location of the second terminal device and the longitude of the location of the source device of the first service, and the latitude of the location of the first terminal device is between the latitude of the location of the second terminal device and the latitude of the location of the source device of the first service, then the first terminal device forwards the data of the first service, the first location information of the first terminal device, and the location information of the source device of the first service; otherwise, the first terminal device does not forward the data of the first service.

[0174] If the second location information includes the area identifier of the area where the second terminal device is located, the location information of the source device of the first service includes the area identifier of the area where the source device of the first service is located, and the first location information includes the area identifier of the area where the first terminal device is located, and the first terminal device determines, based on the above area identifiers, that the area where the first terminal device is located is between the area where the second terminal device is located and the area where the source device of the first service is located, then the first terminal device forwards the data of the first service, the first location information of the first terminal device, and the location information of the source device of the first service; otherwise, the first terminal device does not forward the data of the first service.

[0175] For example, based on Figure 5In the area identifier of (b), the area identifier of the area where the second terminal device is located is 134, the area identifier of the area where the source device of the first service is located is 0, and the area identifier of the area where the first terminal device is located is 67. Based on the above area identifiers, the first terminal device can determine that the area where the first terminal device is located is between the area where the second terminal device is located and the area where the source device of the first service is located. Therefore, the first terminal device forwards the data of the first service, the first location information of the first terminal device, and the location information of the source device of the first service.

[0176] In the above method, the second terminal device forwards the data of the first service, the second location information of the second terminal device and the location information of the source device of the first service together, so that the first terminal device can determine whether to forward the data of the first service according to the first location information, the second location information and the location information of the source device of the first service, which can effectively avoid repeated forwarding of data and reduce data storm problems.

[0177] Optionally, after determining that the first terminal device is a first type device for the first service, the first terminal device may also determine whether to forward the second message and the data of the first service based on its own device parameters. The device parameters of the first terminal device may include at least one of the following: network load, remaining power, etc. If the first terminal device is determined to be a first type device for the first service, and the remaining power of the first terminal device is less than the first power threshold, the first terminal device may not forward the second message and the data of the first service. Alternatively, if the first terminal device is determined to be a first type device for the first service, and the network load of the first terminal device is greater than the first load threshold, the first terminal device may not forward the second message and the data of the first service.

[0178] In the above method, the first terminal device can dynamically adjust whether to be a first type of device according to its own device parameters, which can effectively improve flexibility.

[0179] It is assumed that the first terminal device is located in the first area, and the first terminal device is a first type device of the first service. After the first terminal device determines not to send the second message based on its own device parameters, there is no first type device of the first service in the first area. Other devices in the first area (i.e., second type devices of the first service) that do not receive the second message within the second preset time period will be determined to become first type devices of the first service. If there are multiple second type devices in the first area, in order to avoid all of the above multiple second type devices becoming first type devices of the first service in the first area, the second preset time period corresponding to each second type device can be a different time period determined randomly.

[0180] Optionally, each terminal device can move freely, and as the terminal device moves, the geographical location information of each terminal device also changes accordingly, and thus, the area identifier of the area where each terminal device is located also changes accordingly.

[0181] It is assumed that the first terminal device is located in the first area, and the first terminal device is a first type device of the first service. After the first terminal device moves to the second area, there is no first type device of the first service in the first area. Other devices in the first area (i.e., second type devices of the first service) that do not receive the second message within the second preset time period will be determined to become first type devices of the first service. If there are multiple second type devices in the first area, in order to avoid all of the above multiple second type devices becoming first type devices of the first service in the first area, the second preset time period corresponding to each second type device can be a different time period determined randomly.

[0182] In addition, after the first terminal device moves to the second area, the first terminal device in the second area can be adjusted to a second type device for the first service.

[0183] In the above method, as each terminal device continues to move, it can still be ensured that there is a first type of device for the first service in each area, which can effectively ensure that the multicast / broadcast service is not interrupted.

[0184]

Implementation method 2

[0185] Figure 7 A flow chart of a communication method provided in an embodiment of the present application is shown.

[0186] S701, a first terminal device receives data of at least one service.

[0187] In a possible implementation, the first terminal device may receive data of at least one service sent by a source device, or may receive data of at least one service sent by a first type device. The source device of at least one service may generate and send data of at least one service, and the first type device is used to receive and forward data of at least one service. Each service in the at least one service may be any multicast or broadcast service, which is not limited here.

[0188] In a possible implementation, the first terminal device may respectively apply the identifier of each service in the at least one service to receive the data of each service in the at least one service.

[0189] After receiving data of at least one service, the first terminal device determines whether a first message from the second terminal device is received. Then, the first terminal device can determine whether the first terminal device is a first type device or a second type device according to the first message. The second type device is used to receive data of at least one service and does not forward data of at least one service; or the second type device is used not to receive data of at least one service. It should be understood that the second terminal device can be any first type device, which is not limited here.

[0190] In a possible implementation, when the second terminal device is a first type device, the second terminal device may periodically send a first message, and the second terminal device may periodically send the first message in a multicast / broadcast form, wherein the first message may be used to indicate that the second terminal device is a first type device. If the first terminal device does not receive the first message from the second terminal device, it is determined that the first terminal device is a first type device.

[0191] In a possible implementation, the second terminal device may use the first identifier to send the first message. Alternatively, the second terminal device may use the identifier of the second terminal device and the first identifier to send the first message. The first identifier is used to identify the indication type of the first message.

[0192] In an embodiment of the present application, the first message may include second location information of the second terminal device, wherein the second location information may be used to indicate a second location area where the second terminal device is located. The second location information may be determined based on the geographical location of the second terminal device, and may include the following two possible implementations.

[0193] In a first possible implementation, the geographical location information of the second terminal device may be directly used as the second location information. The geographical location information of the second terminal device may be used to indicate the second location area where the second terminal device is located.

[0194] In a second possible implementation, the area identifier of the area where the second terminal device is located can be determined based on the geographic location information of the second terminal device, and the area identifier of the area where the second terminal device is located can be used as the second location information. The area identifier of the area where the second terminal device is located can indicate the second location area where the second terminal device is located.

[0195] Specifically, the method for determining the second position information in implementation method 2 is the same as the method for determining the second position information in implementation method 1, and is not described in detail herein.

[0196] Similarly, the first terminal device can also determine the first location information of the first terminal device, and the first location information can be used to indicate the first location area where the first terminal device is located. The first location information can be determined based on the geographical location of the first terminal device, and the method for determining the first location information is the same as the method for determining the second location information, which will not be repeated here.

[0197] S702: The second terminal device sends a first message.

[0198] Correspondingly, the first terminal device receives the first message from the second terminal device.

[0199] In an embodiment of the present application, the first terminal device can use the first identifier to receive the first message from the second terminal device.

[0200] S703: The first terminal device is determined to be a first type device or a second type device according to the first message.

[0201] In a possible implementation, the first terminal device obtains the second location information of the second terminal device from the first message, and determines whether the first terminal device is a first type device or a second type device based on the first location information and the second location information of the first terminal device.

[0202] The first terminal device may be determined to be a first type device through the following three possible implementations:

[0203] In a first possible implementation, if the first location information does not match the second location information, it is determined that the first terminal device is a first type of device.

[0204] In a second possible implementation, if the first location information does not match the second location information, and the first terminal device does not receive a third message from the third terminal device, the first terminal device is determined to be a first type device. The third message includes the third location information of the third terminal device, the third message indicates that the third terminal device is a first type device, and the third location information matches the first location information.

[0205] A third possible implementation is that if the first location information does not match the second location information, and the first terminal device does not receive a third message from a third terminal device within a first preset time period, it is determined that the first terminal device is a first type of device.

[0206] It should be understood that the starting point of the first preset time period may be the time point corresponding to when the first terminal device receives the first message, or may be the time point corresponding to when the first terminal device determines that the first location information does not match the second location information, which is not limited here.

[0207] The first terminal device may be determined to be a second type device through the following three possible implementations:

[0208] In a first possible implementation, if the first location information matches the second location information, it is determined that the first terminal device is a second type of device.

[0209] In a second possible implementation, if the first location information does not match the second location information, and the first terminal device receives a third message from a third terminal device, it is determined that the first terminal device is a second type of device.

[0210] A third possible implementation manner is that if the first location information does not match the second location information, and within a first preset time period, the first terminal device receives a third message from a third terminal device, it is determined that the first terminal device is a second type of device.

[0211] In the above method, the first terminal device can determine whether to become the first type of device of the first service based on the first message, and then determine whether the first terminal device forwards the data of the first service, which can effectively avoid repeated forwarding of data and reduce data storm problems.

[0212] Optionally, the first terminal device may determine whether the first location information matches the second location information by the following possible implementations:

[0213] If the first location area indicated by the first location information is different from the second location area indicated by the second location information, the first location information and the second location information do not match; if the first location area indicated by the first location information and the second location area indicated by the second location information are the same, the first location information of the first terminal device matches the second location information.

[0214] Optionally, when the first location information is the area identifier of the area where the first terminal device is located, and the second location information is the area identifier of the area where the second terminal device is located, if the area identifier of the area where the first terminal device is located is different from the area identifier of the area where the second terminal device is located, the first location information of the first terminal device does not match the second location information; if the area identifier of the area where the first terminal device is located is the same as the area identifier of the area where the second terminal device is located, the first location information of the first terminal device matches the second location information.

[0215] Optionally, when the first location information is the geographic location information of the first terminal device and the second location information is the geographic location information of the second terminal device, the area identifier of the area where the first terminal device is located can be determined based on the geographic location information of the first terminal device, and the area identifier of the area where the second terminal device is located can be determined based on the geographic location information of the second terminal device. If the area identifier of the area where the first terminal device is located is different from the area identifier of the area where the second terminal device is located, the first location information of the first terminal device does not match the second location information; if the area identifier of the area where the first terminal device is located is the same as the area identifier of the area where the second terminal device is located, the first location information of the first terminal device matches the second location information.

[0216] In a possible implementation, after determining that the first terminal device is a second type device, the first terminal device does not send a second message. After determining that the first terminal device is a first type device, the first terminal device may send a second message. The second message includes the first location information of the first terminal device, and the second message indicates that the first terminal device is a first type device. The first terminal device sending the second message may include the following two possible implementations: the first terminal device may apply the first identifier to send the second message. Alternatively, the first terminal device may apply the identifier of the first terminal device and the first identifier to send the second message.

[0217] The first terminal device may send the second message in a multicast / broadcast format. The first terminal device may periodically send the second message in a multicast / broadcast format, and any terminal device around the first terminal device may receive the second message.

[0218] In a possible implementation, after receiving data of at least one service, the first terminal device may determine the identifier of the source device corresponding to the at least one service based on the data of the at least one service. After determining that the first terminal device is a second-type device for the first service, the first terminal device may not forward the data of the first service. After determining that the first terminal device is a first-type device, the first terminal device may forward the data of at least one service. Specifically, the first terminal device may apply the identifier of the source device corresponding to the at least one service and the identifier corresponding to the at least one service to forward the data of the at least one service. The data of the at least one service may come from any first-type device or source device, and is not limited to the second terminal device.

[0219] It should be understood that when receiving data of the first service, the first terminal device may apply the identifier of at least one service to receive data of the at least one service.

[0220] In one possible implementation, if data of at least one service comes from a source device, the first terminal device can receive data of at least one service and location information of the source device sent by the source device of the at least one service, wherein the data packet format corresponding to the data of at least one service and the location information of the source device is shown in Figure 8(a).

[0221] After determining that the first terminal device is a second type device, the first terminal device may not forward data of at least one service. After determining that the first terminal device is a first type device, the first terminal device may forward data of at least one service, first location information of the first terminal device, and location information of the source device.

[0222] In a possible implementation, if the data of at least one service comes from any first type of device, for ease of description, the data of at least one service comes from the second terminal device as an example. The first terminal device can receive the data of at least one service sent by the second terminal device, the second location information of the second terminal device, and the location information of the source device, wherein the data packet format corresponding to the data of at least one service, the second location information of the second terminal device, and the location information of the source device is shown in FIG8(b).

[0223] After determining that the first terminal device is a second type device, the first terminal device may not forward data of at least one service. After determining that the first terminal device is a first type device, the first terminal device may determine whether to forward data of at least one service, the first location information of the first terminal device, and the location information of the source device based on the first location information, the second location information, and the location information of the source device.

[0224] Specifically, if the second location information includes the longitude and latitude of the location of the second terminal device, the location information of the source device includes the longitude and latitude of the location of the source device, the first location information includes the longitude and latitude of the location of the first terminal device, the longitude of the location of the first terminal device is between the longitude of the location of the second terminal device and the longitude of the location of the source device, and the latitude of the location of the first terminal device is between the latitude of the location of the second terminal device and the latitude of the location of the source device, then the first terminal device forwards data of at least one service, the first location information of the first terminal device, and the location information of the source device; otherwise, the first terminal device does not forward data of at least one service.

[0225] If the second location information includes the area identifier of the area where the second terminal device is located, the location information of the source device includes the area identifier of the area where the source device is located, and the first location information includes the area identifier of the area where the first terminal device is located, and the first terminal device determines, based on the above area identifiers, that the area where the first terminal device is located is between the area where the second terminal device is located and the area where the source device is located, then the first terminal device forwards data of at least one service, the first location information of the first terminal device, and the location information of the source device; otherwise, the first terminal device does not forward data of at least one service.

[0226] For example, based on Figure 5 In (b), the area identifier of the area where the second terminal device is located is 134, the area identifier of the area where the source device is located is 0, and the area identifier of the area where the first terminal device is located is 67. Based on the above area identifiers, the first terminal device can determine that the area where the first terminal device is located is between the area where the second terminal device is located and the area where the source device is located. Therefore, the first terminal device forwards data of at least one service, the first location information of the first terminal device, and the location information of the source device.

[0227] In the above method, the second terminal device forwards the data of at least one service, the second location information of the second terminal device and the location information of the source device together, so that the first terminal device can determine whether to forward the data of at least one service according to the first location information, the second location information and the location information of the source device, which can effectively avoid repeated forwarding of data and reduce data storm problems.

[0228] Optionally, after determining that the first terminal device is a first type device, the first terminal device may also determine whether to forward the second message and the data of at least one service based on its own device parameters. The device parameters of the first terminal device may include at least one of the following: network load, remaining power, etc. If the first terminal device is determined to be a first type device, and the remaining power of the first terminal device is less than the first power threshold, the first terminal device may not forward the second message and the data of at least one service. Alternatively, if the first terminal device is determined to be a first type device for the first service, and the network load of the first terminal device is greater than the first load threshold, the first terminal device may not forward the second message and the data of the first service.

[0229] In the above method, the first terminal device can dynamically adjust whether to be a first type of device according to its own device parameters, which can effectively improve flexibility.

[0230] Assuming that the first terminal device is located in the first area, the first terminal device is a first type device. After the first terminal device determines not to send the second message based on its own device parameters, there is no first type device in the first area. Other devices in the first area (i.e., second type devices) that do not receive the second message within the second preset time period will be determined to be first type devices. If there are multiple second type devices in the first area, in order to avoid all of the above multiple second type devices becoming first type devices in the first area, the second preset time period corresponding to each second type device can be a different time period determined randomly.

[0231] Optionally, each terminal device can move freely, and as the terminal device moves, the geographical location information of each terminal device also changes accordingly, and thus, the area identifier of the area where each terminal device is located also changes accordingly.

[0232] Assume that the first terminal device is located in the first area and is a first type device. After the first terminal device moves to the second area, there is no first type device in the first area. Other devices in the first area (i.e., second type devices) that do not receive the second message within the second preset time period will be determined to be first type devices. If there are multiple second type devices in the first area, in order to avoid all of the above multiple second type devices becoming first type devices in the first area, the second preset time period corresponding to each second type device can be a different time period determined randomly.

[0233] In addition, after the first terminal device moves to the second area, the first terminal device located in the second area can be adjusted to a second type of device.

[0234] In the above method, as each terminal device continues to move, it can still be ensured that there is a first type of device for the first service in each area, which can effectively ensure that the multicast / broadcast service is not interrupted.

[0235]

Implementation method three

[0236] Fig. 9 A flow chart of a communication method provided in an embodiment of the present application is shown.

[0237] S901, the first terminal device sends a first discovery message.

[0238] In an embodiment of the present application, the first terminal device may be a source device of the first service, wherein the source device of the first service may be used to generate and send data of the first service. The first terminal device may also be a first type device of the first service, wherein the first type device of the first service is used to receive and forward data of the first service. The first service may be any multicast or broadcast service, which is not limited here.

[0239] The first discovery message is used for a first type of device requesting a first service. The first terminal device may send the first discovery message in a multicast / broadcast form, and at least one terminal device around the first terminal device may receive the first discovery message.

[0240] Optionally, the first discovery message includes at least one of the following: relay indication information corresponding to the first service, an identifier corresponding to the first service, location information of a source device of the first service, an identifier of the source device of the first service, a maximum number of relay hops corresponding to the first service, and a number of relay hops corresponding to the first terminal device.

[0241] Among them, the relay indication information corresponding to the first service in the first discovery message can be used to request the terminal device receiving the first discovery message to provide a relay service.

[0242] S902: The second terminal device sends a first confirmation message to the first terminal device.

[0243] In the embodiment of the present application, at least one terminal device around the first terminal device may send a first confirmation message after receiving the first discovery message. For ease of description, the second terminal device is taken as any terminal device around the first terminal device for example.

[0244] After receiving the first discovery message, the second terminal device can determine whether to send a first confirmation message to the first terminal device based on its own device parameters. If the second terminal device determines that it can be a candidate relay device for the first service based on its own device parameters, the second terminal device sends a first confirmation message to the first terminal device, wherein the first confirmation message can be used to indicate that the second terminal device is a candidate relay device for the first service.

[0245] The device parameters of the second terminal device may include at least one of the following: network load, remaining power, etc.

[0246] Specifically, if the network load of the second terminal device is greater than the first load threshold, or the remaining power of the second terminal device is less than the first power threshold, the second terminal device is determined as a candidate relay device for the first service, and the second terminal device sends a first confirmation message to the first terminal device.

[0247] The first confirmation message may include at least one of the following: location information of the second terminal device, and the number of relay hops corresponding to the second terminal device.

[0248] S903: The first terminal device determines, based on the first confirmation message, that the second terminal device is a first type device of the first service.

[0249] In an embodiment of the present application, the first terminal device may receive a first confirmation message sent by at least one terminal device in the surrounding area, and determine whether at least one terminal device in the surrounding area is a first type device of the first service according to the first confirmation message. The first terminal device may determine one or more first type devices of the first service from at least one terminal device in the surrounding area.

[0250] For the convenience of description, the second terminal device is taken as any terminal device around the first terminal device for illustration.

[0251] If the first confirmation message meets the first condition, the second terminal device is determined to be a first type device of the first service; otherwise, the second terminal device is determined to be a second type device of the first service, wherein the second type device of the first service is used to receive data of the first service and does not forward data of the first service; or, the second type device of the first service is used not to receive data of the first service.

[0252] Optionally, the first condition may include at least one of the following:

[0253] In a first possible implementation manner, a signal quality of the first confirmation message is greater than a first preset value.

[0254] In a second possible implementation, the distance between the second terminal device and the first terminal device is less than a second preset value, wherein the distance between the second terminal device and the first terminal device is determined based on location information of the second terminal device and location information of the first terminal device.

[0255] A third possible implementation manner is that the number of relay hops corresponding to the second terminal device is less than a third preset value.

[0256] After the first terminal device determines that the second terminal device is a first type device of the first service, the first terminal device establishes a first unicast link with the second terminal device, wherein the first unicast link can be used to transmit interaction information between the first terminal device and the second terminal device.

[0257] The first terminal device may also send data of the first service. Specifically, the first terminal device may use the identifier of the source device of the first service and the identifier of the first service to send the data of the first service. The first terminal device may send the data of the first service in a multicast / broadcast form.

[0258] If the second terminal device successfully receives the data of the first service, it sends a confirmation response message to the first terminal device; if the second terminal device fails to receive the data of the first service, it sends a negative response message to the first terminal device; if the second terminal device does not receive the data of the first service, it does not provide any feedback.

[0259] In the above method, the first terminal device can determine whether the second terminal device becomes the first type device of the first service based on the first confirmation message. After the second terminal device receives the data of the first service, if the second terminal device is the first type device of the first service, the second terminal device forwards the data of the first service; otherwise, the data of the first service is not forwarded. Therefore, repeated forwarding of data can be effectively avoided and the data storm problem can be reduced.

[0260]

Implementation method 4

[0261] Fig.10 A flow chart of a communication method provided in an embodiment of the present application is shown.

[0262] S1001, the second terminal device sends a first discovery message.

[0263] In an embodiment of the present application, the second terminal device sends the first discovery message in a multicast / broadcast form, and at least one terminal device around the second terminal device can receive the first discovery message. For ease of description, the following description is taken as an example, and the first terminal device is any terminal device around the second terminal device.

[0264] The first discovery message indicates that the second terminal device is a candidate relay device for the first service, and the first service is a multicast or broadcast service.

[0265] The first discovery message includes the location information of the second terminal device, the number of relay hops corresponding to the second terminal device, and the first information of other terminal devices that the second terminal device can monitor. The first information includes at least one of the following: the identification of the services supported by other terminal devices; the location information of other terminal devices; and the relay capability information of other terminal devices.

[0266] S1002: The first terminal device determines, based on the first discovery message, that the second terminal device is a first type device of the first service, wherein the first type device of the first service is used to receive and forward data of the first service.

[0267] If the first confirmation message satisfies the first condition, the second terminal device is determined to be a first type device of the first service; otherwise, the second terminal device is determined to be a second type device of the first service, wherein the first type device of the first service is used to receive and forward data of the first service. The second type device of the first service is used to receive data of the first service and not forward data of the first service; or, the second type device of the first service is used not to receive data of the first service.

[0268] Optionally, the first condition includes at least one of the following:

[0269] In a first possible implementation manner, a signal quality of the first discovery message is greater than a first preset value.

[0270] In a second possible implementation, the distance between the second terminal device and the first terminal device is less than a second preset value, wherein the distance between the second terminal device and the first terminal device is determined based on location information of the second terminal device and location information of the first terminal device.

[0271] A third possible implementation manner is that the number of relay hops corresponding to the second terminal device is less than a third preset value.

[0272] Optionally, the first terminal device may also determine whether the second terminal device is a first type device of the first service based on the first information in the first discovery message, which is not elaborated here.

[0273] After the first terminal device determines that the second terminal device is a first type device of the first service, the first terminal device establishes a first unicast link with the second terminal device, wherein the first unicast link can be used to transmit interaction information between the first terminal device and the second terminal device.

[0274] The first terminal device may also send data of the first service. Specifically, the first terminal device may use the identifier of the source device of the first service and the identifier of the first service to send the data of the first service. The first terminal device may send the data of the first service in a multicast / broadcast form.

[0275] If the second terminal device successfully receives the data of the first service, it sends a confirmation response message to the first terminal device; if the second terminal device fails to receive the data of the first service, it sends a negative response message to the first terminal device; if the second terminal device does not receive the data of the first service, it does not provide any feedback.

[0276] In the above method, the first terminal device can determine whether the second terminal device becomes the first type device of the first service based on the first discovery message. After the second terminal device receives the data of the first service, if the second terminal device is the first type device of the first service, the second terminal device forwards the data of the first service; otherwise, the data of the first service is not forwarded. Therefore, repeated forwarding of data can be effectively avoided and the data storm problem can be reduced.

[0277]

Implementation method 5

[0278] Fig.11 A flow chart of a communication method provided in an embodiment of the present application is shown.

[0279] S1101, a second terminal device sends data of a first service. Correspondingly, a first terminal device receives data of the first service.

[0280] In an embodiment of the present application, the second terminal device may send the data of the first service in a multicast / broadcast form. The second terminal device may use the identifier of the source device of the first service and the identifier of the first service to send the data of the first service. The first service is a multicast or broadcast service.

[0281] At least one terminal device around the second terminal device can receive the first discovery message. For ease of description, the following description is made by taking the first terminal device as an example, and the first terminal device is any terminal device around the second terminal device.

[0282] In addition, the second terminal device may also send the maximum number of relay hops, the number of relay hops corresponding to the second terminal device, and the location information of the source device of the first service in the form of multicast / broadcast.

[0283] S1102: The first forwarding probability corresponding to the first terminal device meets the first condition, and the first terminal device forwards data of the first service.

[0284] In an embodiment of the present application, if the first forwarding probability corresponding to the first terminal device is greater than a first preset value, the first terminal device sends data of the first service; otherwise, the first terminal device does not send data of the first service.

[0285] The first forwarding probability corresponding to the first terminal device can be determined based on at least one of the maximum number of relay hops, the number of relay hops corresponding to the second terminal device, the location information of the source terminal device, and the location information of the first terminal device.

[0286] In a possible implementation, the first terminal device determines a first distance between the first terminal device and the source terminal device based on the location information of the first terminal device and the location information of the source terminal device. The larger the first distance, the smaller the first forwarding probability.

[0287] In a possible implementation, the first terminal device first determines the relay hop number corresponding to the first terminal device based on the relay hop number corresponding to the second terminal device, that is, the relay hop number corresponding to the first terminal device is equal to the sum of the relay hop number corresponding to the second terminal device and 1. The first terminal device uses the difference between the maximum relay hop number and the relay hop number corresponding to the first terminal device as the first remaining hop number. The larger the first remaining hop number, the greater the first forwarding probability.

[0288] In the above method, after receiving the data of the first service, the first terminal device determines whether to forward the data of the first service according to the first forwarding probability corresponding to the first terminal device, which can effectively avoid repeated forwarding of data and reduce data storm problems.

[0289] Regarding the above implementation methods 1 to 5, it should be noted that:

[0290] (1) The above implementation modes 1 to 5 can be implemented separately or in combination, without any specific limitation.

[0291] (2) The above description focuses on the differences between implementation modes 1 to 5. Except for the differences, implementation modes 1 to 5 can refer to each other.

[0292] (3) The step numbers of the flowcharts described in Implementations 1 to 5 are only examples of the execution process and do not constitute a limitation on the order of execution of the steps. There is no time dependency between the steps in the embodiments of the present application, and there is no strict execution order between them. In addition, not all the steps shown in the flowcharts are steps that must be executed, and some steps can be added or deleted based on the actual needs of each flowchart.

[0293] The embodiment of the present application can divide the functional units of the device according to the above method example, for example, each functional unit can be divided according to each function, or two or more functions can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0294] In the case of an integrated unit, Fig.12 A possible exemplary block diagram of a communication device involved in an embodiment of the present application is shown. Fig.12 As shown, the communication device 1200 may include: a transceiver unit 1201 and a processing unit 1202. The processing unit 1202 is used to control and manage the actions of the communication device 1200. The transceiver unit 1201 is used to support the communication between the communication device 1200 and other devices. Optionally, the communication device 1200 may also include a storage unit 1203 for storing program code and / or data of the communication device 1200.

[0295] The processing unit 1202 may support the communication device 1200 to perform the actions of the first terminal device in each method example above. Alternatively, the processing unit 1202 mainly performs the internal actions of the first terminal device in the method example. The transceiver unit 1201 may support the communication between the communication device 1200 and other devices.

[0296] For example, the communication device 1200 may be the first terminal device in each of the above embodiments, or may also be a component (such as a chip) of the first terminal device in each of the above embodiments.

[0297] The transceiver unit 1201 is used to receive a first message from a second terminal device, where the first message indicates that the second terminal device is a first type device of a first service or a source device of the first service; the first service is a multicast or broadcast service; the first type device is used to receive and forward data of the first service, and the source device of the first service is used to generate and send data of the first service;

[0298] The processing unit 1202 is used to determine, according to the first message, a first type device or a second type device of the first service, where the second type device is used to receive data of the first service.

[0299] In a possible implementation, the transceiver unit 1201 is configured to apply an identifier of the first service to receive a first message from the second terminal device.

[0300] In a possible implementation, the processing unit 1202 is configured to determine a first identifier based on the first message, where the first identifier is an identifier used by the second terminal device to send the first message.

[0301] In a possible implementation manner, the transceiver unit 1201 is further configured to receive data of the first service.

[0302] In a possible implementation, the transceiver unit 1201 is configured to apply an identifier of the first service to receive data of the first service.

[0303] In a possible implementation, the processing unit 1202 is further configured to determine an identifier of a source device of the first service based on the data of the first service.

[0304] In a possible implementation, the first message includes second location information of the second terminal device; the first location information of the first terminal device does not match the second location information, and the processing unit 1202 is used to determine that the first terminal device is a first type device of the first service.

[0305] In a possible implementation, the transceiver unit 1201 is further configured to send a second message, where the second message includes the first location information, and the second message indicates that the first terminal device is a first type device of the first service.

[0306] In a possible implementation, the transceiver unit 1201 is configured to apply the identifier of the first service to send the second message.

[0307] In a possible implementation, the processing unit 1202 is configured to apply the first identifier and the identifier of the first service to send the second message.

[0308] In a possible implementation manner, the transceiver unit 1201 is further configured to forward data of the first service.

[0309] In a possible implementation manner, the transceiver unit 1201 is further configured to apply an identifier of a source device of the first service and an identifier of the first service to forward data of the first service.

[0310] In a possible implementation, the first message includes second location information of the second terminal device; the first location information of the first terminal device matches the second location information, and the processing unit 1202 is used to determine that the first terminal device is a second type device of the first service.

[0311] In a possible implementation, the second location information indicates a second location area where the second terminal device is located, and the first location information indicates a first location area where the first terminal device is located.

[0312] In a possible implementation manner, the first location area indicated by the first location information is different from the second location area indicated by the second location information. The first location area indicated by the first location information is the same as the second location area indicated by the second location information.

[0313] In a possible implementation, the first location information is determined based on the geographical location of the first terminal device; and the second location information is determined based on the geographical location of the second terminal device.

[0314] In a possible implementation manner, the transceiver unit 1201 is configured to receive data of a first service and location information of a source device of the first service.

[0315] In a possible implementation, the transceiver unit 1201 is configured to forward data of the first service, the first location information, and location information of a source device of the first service.

[0316] In a possible implementation manner, the transceiver unit 1201 is configured to receive data of a first service, second location information, and location information of a source device of the first service.

[0317] In a possible implementation, the processing unit 1202 is configured to determine to forward data of the first service, the first location information, and the location information of the source device of the first service based on the first location information, the second location information, and the location information of the source device of the first service.

[0318] For another example, the communication device 1200 may be the first terminal device in each of the above embodiments, or may also be a component (such as a chip) of the first terminal device in each of the above embodiments.

[0319] The transceiver unit 1201 is used to receive a first message from a second terminal device, where the first message indicates that the second terminal device is a first type device; the first type device is used to receive and forward data of at least one service; at least one service is a multicast or broadcast service.

[0320] The processing unit 1202 is used to determine, according to the first message, that it is a first type device or a second type device, where the second type device is used to receive data of at least one service.

[0321] In a possible implementation, the first message includes second location information of the second terminal device; the first location information of the first terminal device does not match the second location information, and the processing unit 1202 is used to determine that the first terminal device is a first type of device.

[0322] In a possible implementation, the transceiver unit 1201 is further configured to send a second message, where the second message includes first location information of the first terminal device, and the second message indicates that the first terminal device is a first type of device.

[0323] In a possible implementation, the first message includes second location information of the second terminal device; the first location information of the first terminal device matches the second location information, and the processing unit 1202 is used to determine that the first terminal device is a second type of device.

[0324] For another example, the communication device 1200 may be the first terminal device in each of the above embodiments, or may also be a component (such as a chip) of the first terminal device in each of the above embodiments.

[0325] The transceiver unit 1201 is used to send a first discovery message, where the first discovery message is used to request a first type of device for a first service, where the first service is a multicast or broadcast service; the first type of device for the first service is used to receive and forward data of the first service.

[0326] The processing unit 1202 is configured to receive a first confirmation message from a second terminal device, where the first confirmation message indicates that the second terminal device is a candidate relay device for the first service;

[0327] The processing unit 1202 is used to determine, according to the first confirmation message, that the second terminal device is a first type device of the first service.

[0328] In a possible implementation, the first confirmation message satisfies the first condition, and the processing unit 1202 is configured to determine that the second terminal device is a first type device of the first service.

[0329] In a possible implementation, the first discovery message includes at least one of the following: relay indication information corresponding to the first service, an identifier corresponding to the first service, location information of a source device of the first service, an identifier of a source device of the first service, a maximum number of relay hops corresponding to the first service, and a number of relay hops corresponding to the first terminal device.

[0330] In a possible implementation, the first confirmation message includes at least one of the following: location information of the second terminal device, and the number of relay hops corresponding to the second terminal device.

[0331] In one possible implementation, the first condition includes at least one of the following: the signal quality of the first confirmation message is greater than a first preset value, or, the distance between the second terminal device and the first terminal device is less than a second preset value, the distance between the second terminal device and the first terminal device is determined based on the location information of the second terminal device and the location information of the first terminal device, or, the number of relay hops corresponding to the second terminal device is less than a third preset value.

[0332] For another example, the communication device 1200 may be the first terminal device in each of the above embodiments, or may also be a component (such as a chip) of the first terminal device in each of the above embodiments.

[0333] The transceiver unit 1201 is configured to receive a first discovery message from a second terminal device, where the first discovery message indicates that the second terminal device is a candidate relay device for a first service.

[0334] The processing unit 1202 is used to determine, based on the first discovery message, that the second terminal device is a first type device of the first service, and the first type device of the first service is used to receive and forward data of the first service.

[0335] In a possible implementation, the first discovery message satisfies the first condition, and the processing unit 1202 is configured to determine that the second terminal device is a first type device of the first service.

[0336] In a possible implementation, the first discovery message includes at least one of the following: location information of the second terminal device, and the number of relay hops corresponding to the second terminal device.

[0337] In one possible implementation, the first condition includes at least one of the following: the signal quality of the first discovery message is greater than a first preset value, or, the distance between the second terminal device and the first terminal device is less than a second preset value, the distance between the second terminal device and the first terminal device is determined based on the location information of the second terminal device and the location information of the first terminal device, or, the number of relay hops corresponding to the second terminal device is less than a third preset value.

[0338] In a possible implementation, the first discovery message also includes first information of other terminal devices that can be monitored by the second terminal device, and the first information includes at least one of the following: identification of services supported by other terminal devices; location information of other terminal devices; and relay capability information of other terminal devices.

[0339] For another example, the communication device 1200 may be the first terminal device in each of the above embodiments, or may also be a component (such as a chip) of the first terminal device in each of the above embodiments.

[0340] The transceiver unit 1201 is configured to receive data of a first service from a second terminal device;

[0341] The first forwarding probability corresponding to the first terminal device meets the first condition, and the processing unit 1202 is used to forward data of the first service.

[0342] In a possible implementation, the first terminal device also receives the maximum number of relay hops, the number of relay hops corresponding to the second terminal device, and the location information of the source device of the first service from the second terminal device.

[0343] In a possible implementation, the first forwarding probability corresponding to the first terminal device is determined based on at least one of the maximum number of relay hops, the number of relay hops corresponding to the second terminal device, the location information of the source terminal device, and the location information of the first terminal device.

[0344] It should be understood that the division of the units in the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And the units in the device can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some units can also be implemented in the form of software calling through processing elements, and some units can be implemented in the form of hardware. For example, each unit can be a separately established processing element, or it can be integrated in a certain chip of the device. In addition, it can also be stored in the memory in the form of a program, and called and executed by a certain processing element of the device. The function of the unit. In addition, all or part of these units can be integrated together, or they can be implemented independently. The processing element here can also be a processor, which can be an integrated circuit with signal processing capabilities. In the implementation process, each operation of the above method or each unit above can be implemented by an integrated logic circuit of hardware in the processor element or in the form of software calling through a processing element.

[0345] In one example, the unit in any of the above devices may be one or more integrated circuits configured to implement the above method, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA), or a combination of at least two of these integrated circuit forms. For another example, when the unit in the device can be implemented in the form of a processing element scheduler, the processing element can be a processor, such as a general-purpose central processing unit (CPU), or other processors that can call programs. For another example, these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0346] The above unit for receiving is an interface circuit of the device, which is used to receive signals from other devices. For example, when the device is implemented in the form of a chip, the receiving unit is an interface circuit of the chip used to receive signals from other chips or devices. The above unit for sending is an interface circuit of the device, which is used to send signals to other devices. For example, when the device is implemented in the form of a chip, the sending unit is an interface circuit of the chip used to send signals to other chips or devices.

[0347] Please refer to Fig.13 , is a schematic diagram of a communication device provided in an embodiment of the present application, which is used to implement the operation of the first terminal device, the second terminal device or the access network device in each of the above embodiments. The communication device 1300 includes: a processor 1310 and an interface 1330. Optionally, the communication device 1300 also includes a memory 1320. The interface 1330 is used to implement communication with other devices.

[0348] In the above embodiments, the method executed by the first terminal device can be implemented by the processor 1310 calling a program stored in a memory (which can be the memory 1320 in the first terminal device or an external memory). That is, the communication device 1300 for implementing the function of the first terminal device may include a processor 1310, and the processor 1310 executes the method executed by the first terminal device in the above method embodiment by calling the program in the memory. The processor here can be an integrated circuit with signal processing capability, such as a CPU.

[0349] When the communication device 1300 is used for the above method, the processor 1310 is used to implement the function of the above processing unit 1202 , and the interface 1330 is used to implement the function of the above transceiver unit 1201 .

[0350] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that includes one or more available media integrated. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.

[0351] The various illustrative logic units and circuits described in the embodiments of the present application can be implemented or operated by a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of the above. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any traditional processor, controller, microcontroller or state machine. The processor can also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration to achieve.

[0352] The steps of the method or algorithm described in the embodiments of the present application can be directly embedded in hardware, a software unit executed by a processor, or a combination of the two. The software unit can be stored in a random access memory (RAM), a flash memory, a read-only memory (ROM), an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and the storage medium can be arranged in an ASIC.

[0353] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0354] In one or more exemplary implementations, the above functions described in the embodiments of the present application can be implemented in hardware, software, firmware or any combination of the three. If implemented in software, these functions can be stored on a computer-readable medium, or transmitted in the form of one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media that facilitate the transfer of computer programs from one place to another. Storage media can be available media that any general or special computer can access. For example, such computer-readable media can include but are not limited to RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that can be used to carry or store program codes in the form of instructions or data structures and other programs that can be read by general or special computers, or general or special processors. In addition, any connection can be appropriately defined as a computer-readable medium, for example, if the software is transmitted from a website site, server or other remote resource through a coaxial cable, fiber optic computer, twisted pair, digital subscriber line (DSL) or wirelessly transmitted in a wireless manner such as infrared, wireless and microwave, it is also included in the defined computer-readable medium. The disk and disc include compact disk, laser disk, optical disk, digital versatile disc (DVD), floppy disk and Blu-ray disc. Disks usually reproduce data magnetically, while discs usually reproduce data optically with lasers. Combinations of the above may also be included in computer readable media.

[0355] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0356] The specific implementation methods described above further describe the purpose, technical solutions and beneficial effects of the embodiments of the present application in detail. It should be understood that the above is only the specific implementation methods of the embodiments of the present application, and is not intended to limit the protection scope of the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the embodiments of the present application should be included in the protection scope of the embodiments of the present application. The above description of the specification of the application can make any technical content of the present application embodiment that can be utilized or implemented in the art, and any modification based on the disclosed content should be considered obvious in the art. The basic principles described in the embodiments of the present application can be applied to other variations without departing from the inventive essence and scope of the present application. Therefore, the content disclosed in the embodiments of the present application is not only limited to the described embodiments and implementations, but can also be extended to the maximum scope consistent with the principles of the present application and the disclosed new features.

[0357] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the embodiments of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalent technologies, the embodiments of the present application are also intended to include these changes and variations.

Claims

1. A communication method, characterized in that: The method is applied to a first terminal device, and the method includes: receiving a first message from a second terminal device, wherein the first message indicates that the second terminal device is a first type device of a first service or a source device of the first service; the first service is a multicast or broadcast service; the first type device is used to receive and forward data of the first service, and the source device of the first service is used to generate and send data of the first service; According to the first message, a first type device or a second type device of the first service is determined, and the second type device is used to receive data of the first service.

2. The method according to claim 1, characterized in that The receiving a first message from a second terminal device includes: Apply the identifier of the first service and receive the first message from the second terminal device.

3. The method according to claim 1 or 2, characterized in that Also includes: Based on the first message, the first identifier is determined, where the first identifier is the identifier used by the second terminal device to send the first message.

4. The method according to any one of claims 1 to 3, characterized in that: Also includes: Receive data of the first service.

5. The method according to claim 4, characterized in that The receiving the data of the first service includes: The identifier of the first service is applied, and data of the first service is received.

6. The method according to claim 5, characterized in that Also includes: An identifier of a source device of the first service is determined based on the data of the first service.

7. The method according to claim 1, characterized in that The first message includes second location information of the second terminal device; The determining, according to the first message, that the first type of device or the second type of device for the first service includes: The first location information of the first terminal device does not match the second location information, and is determined to be a first type device for the first service.

8. The method according to claim 7, characterized in that Also includes: A second message is sent, where the second message includes the first location information, and the second message indicates that the first terminal device is a first type device of the first service.

9. The method according to claim 8, characterized in that The sending of the second message comprises: Apply the identifier of the first service and send the second message.

10. The method according to claim 9, characterized in that The applying the identifier of the first service and sending the second message includes: The second message is sent by using the first identifier and the identifier of the first service.

11. The method according to any one of claims 7 to 10, characterized in that: Also includes: Forwarding data of the first service.

12. The method according to claim 11, characterized in that The forwarding of the data of the first service includes: The identifier of the source device of the first service and the identifier of the first service are applied to forward the data of the first service.

13. The method according to claim 1, characterized in that The first message includes second location information of the second terminal device; The determining, according to the first message, that the first type of device or the second type of device for the first service includes: The first location information of the first terminal device matches the second location information and is determined to be a second type device of the first service.

14. The method according to any one of claims 7 to 13, characterized in that: The second location information indicates a second location area where the second terminal device is located, and the first location information indicates a first location area where the first terminal device is located.

15. The method according to claim 7 or 13, characterized in that The first location information of the first terminal device does not match the second location information, including: The first location area indicated by the first location information is different from the second location area indicated by the second location information; The first location information of the first terminal device matches the second location information, including: The first location area indicated by the first location information is the same as the second location area indicated by the second location information.

16. The method according to any one of claims 7 to 13, characterized in that: The first location information is determined based on the geographical location of the first terminal device; the second location information is determined based on the geographical location of the second terminal device.

17. The method according to claim 4, characterized in that The receiving the data of the first service includes: Receive data of the first service and location information of a source device of the first service.

18. The method according to claim 11, characterized in that The forwarding of the data of the first service includes: Forward the data of the first service, the first location information, and the location information of the source device of the first service.

19. The method according to claim 4, characterized in that The receiving the data of the first service includes: Receive data of the first service, the second location information, and location information of a source device of the first service.

20. The method of claim 11, wherein: The forwarding of the data of the first service includes: Based on the first location information, the second location information, and the location information of the source device of the first service, it is determined to forward the data of the first service, the first location information, and the location information of the source device of the first service.

21. A communication method, characterized in that: The method is applied to a first terminal device, and the method includes: Receiving a first discovery message from a second terminal device, where the first discovery message indicates that the second terminal device is a candidate relay device for a first service; According to the first discovery message, it is determined that the second terminal device is a first type device of the first service, and the first type device of the first service is used to receive and forward data of the first service.

22. The method according to claim 21, characterized in that The determining, according to the first discovery message, that the second terminal device is a first type device of the first service includes: The first discovery message satisfies a first condition, determining that the second terminal device is a first type device of the first service.

23. The method according to claim 21 or 22, characterized in that The first discovery message includes at least one of the following: The location information of the second terminal device and the number of relay hops corresponding to the second terminal device.

24. The method of claim 22, wherein: The first condition includes at least one of the following: The signal quality of the first discovery message is greater than a first preset value, or, The distance between the second terminal device and the first terminal device is less than a second preset value, and the distance between the second terminal device and the first terminal device is determined based on location information of the second terminal device and location information of the first terminal device, or, The number of relay hops corresponding to the second terminal device is less than the third preset value.

25. The method according to any one of claims 21 to 24, characterized in that: The first discovery message also includes first information of other terminal devices that can be monitored by the second terminal device, and the first information includes at least one of the following: Identification of the services supported by the other terminal devices; The location information of the other terminal devices; The relay capability information of the other terminal devices.

26. A communication device, characterized in that: comprising a memory, and one or more processors, the memory being coupled to the one or more processors; The memory is used to store a computer program or an instruction. When the computer program or the instruction is executed by the one or more processors, the communication device executes the method according to any one of claims 1 to 25.

27. A chip, characterized in that: The chip comprises a processor, which is coupled to a memory and is used to execute a computer program or instruction stored in the memory, so that the chip executes the method according to any one of claims 1 to 25.

28. A computer-readable storage medium, characterized in that: The method comprises computer program instructions, and when the computer program instructions are executed by a computer, the processor performs the method according to any one of claims 1 to 25.

29. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is run on a computer, the computer is caused to perform the method according to any one of claims 1 to 25.