WO2016115669A1 - 一种数据通信方法及终端 - Google Patents
一种数据通信方法及终端 Download PDFInfo
- Publication number
- WO2016115669A1 WO2016115669A1 PCT/CN2015/071034 CN2015071034W WO2016115669A1 WO 2016115669 A1 WO2016115669 A1 WO 2016115669A1 CN 2015071034 W CN2015071034 W CN 2015071034W WO 2016115669 A1 WO2016115669 A1 WO 2016115669A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- address
- group
- data
- message
- group data
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W88/00—Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
- H04W88/02—Terminal devices
- H04W88/04—Terminal devices adapted for relaying to or from another terminal or user
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5069—Address allocation for group communication, multicast communication or broadcast communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/06—Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/622—Layer-2 addresses, e.g. medium access control [MAC] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/663—Transport layer addresses, e.g. aspects of transmission control protocol [TCP] or user datagram protocol [UDP] ports
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/256—NAT traversal
- H04L61/2585—NAT traversal through application level gateway [ALG]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/40—Connection management for selective distribution or broadcast
Definitions
- the present invention relates to the field of communications technologies, and in particular, to a data communication method and a terminal.
- a user equipment In a traditional mobile network, when a user equipment (User Equipment, UE) loses network coverage (such as an emergency such as an earthquake), a user equipment with network coverage may be used as a relay to implement a user equipment that has lost network coverage. Communication with the network side.
- UE User Equipment
- FIG. 1a is a schematic diagram of one of the network architectures provided by the prior art.
- the Remote UE is a user equipment that loses network coverage (for convenience, referred to as a remote terminal for short)
- the Relay UE is a user equipment with network coverage (for convenience, simply referred to as a relay terminal), where The terminal can relay multiple remote terminals at the same time.
- each remote terminal needs to separately establish a request and receive a unicast communication connection with the server, and the server is respectively based on the single The broadcast communication connection sends the requested group data to each remote terminal. Since the information exchange between the server and the remote terminal needs to be relayed through the relay terminal, the same group data is repeatedly transmitted on the Uu interface, which undoubtedly reduces Data transmission efficiency.
- the invention provides a data communication method and device, which can improve data transmission efficiency.
- an embodiment of the present invention provides a data communication method, including:
- the first device receives a request message sent by the at least one second device, where the request message is used to request the first device to forward group data, where the request message carries a group identifier;
- the first device returns a response message to the at least one second device, where the response message carries a layer 2 address and an IP address corresponding to the group identifier;
- the first device transmits the group data using the layer 2 address when receiving the group data sent by the third device to the IP address.
- the IP address is The IP address allocated by the first device for the at least one second device to request the group data from the third device.
- the response message further carries a port number corresponding to the group identifier, where the port number is allocated by the first device At least one second device requests a port number of the group data from the third device.
- the method further includes:
- the first device allocates the layer 2 address and the IP address corresponding to the group identifier
- the first device returns a response message to the at least one second device, where the response message carries a layer 2 address and an IP address corresponding to the group identifier, including:
- the first device returns a response message to the at least one second device, where the response message carries the allocated layer 2 address and the IP address.
- the method further includes:
- the first device acquires the layer 2 address and the IP address corresponding to the group identifier;
- the first device returns a response message to the at least one second device, where the response message carries a layer 2 address and an IP address corresponding to the group identifier, including:
- the first device returns a response message to the at least one second device, where the response message carries the acquired layer 2 address and the IP address.
- the method further includes:
- the response message further carries a unicast indication identifier, so that the at least one second device requests the group data from the third device by using the IP address.
- the method further includes:
- the first device If the first device belongs to the first message, the first device returns a second message to the target second device, so that the target second device remains used with the third device. Receiving a communication connection of the group data.
- the method further includes:
- the first device If the first device does not belong to the first message, the first device returns a third message to the target second device, so that the target second device is released with the third device. And receiving a communication connection of the group data.
- the method after the first device returns the second message to the target second device, the method also includes:
- the first device broadcasts the group identifier or broadcasts information corresponding to the group identifier.
- an embodiment of the present invention provides a data communication method, including:
- the second device sends a request message to the first device, where the request message is used to request the first device to forward group data, where the request message carries a group identifier;
- the second device receives the response message returned by the first device, where the response message carries the layer 2 address and the IP address corresponding to the group identifier, where the first device is configured to receive the at least one second device to send Request message, and when receiving the group data sent by the third device to the IP address, using the layer 2 address to send the group data;
- the second device receives the set of data from the layer 2 address.
- the response message further carries a port number corresponding to the group identifier, where the IP address and the port number are the first The IP address and port number assigned by the device for the second device to request the group data.
- the method also includes:
- the second device requests the group data from the third device by using the IP address; or
- the second device requests the group data from the third device using the IP address and the port number.
- the requesting, by the second device, the group data to the third device includes:
- the second device If the second device does not listen to the information corresponding to the group identifier or the group identifier, the second device requests the group data from the third device; or
- the second device requests the group data from the third device.
- the method further includes:
- the second device if receiving the second message returned by the first device, the second device maintains a communication connection with the third device for receiving the group data;
- the second device releases a communication connection with the third device for receiving the group data.
- the second device requesting the group data from the third device including:
- IP address and/or the port number as a source IP address and/or a source port number of a data packet for transmitting application signaling, and transmitting the data packet to the third device to Three devices request the group data; or,
- the group data is requested from the third device.
- an embodiment of the present invention provides an apparatus, including:
- a first receiving module configured to receive a request message sent by the at least one second device, where the request message is used to request the device to forward group data, where the request message carries a group identifier;
- a first returning module configured to return a response message to the at least one second device, where the response is Carrying the layer 2 address and the IP address corresponding to the group identifier;
- a first sending module configured to send the group data by using the layer 2 address when receiving the group data sent by the third device to the IP address.
- the IP address that is allocated by the device for the at least one second device to request the group data from the third device IP address.
- the response message further carries a port number corresponding to the group identifier, where the port number is allocated by the first device At least one second device requests a port number of the group data from the third device.
- the device further includes:
- a determining module after the first receiving module receives the request message sent by the at least one second device, determining whether the context corresponding to the group identifier exists
- An allocation module configured to allocate the layer 2 address and the IP address corresponding to the group identifier if the context does not exist;
- the response message returned by the first returning module carries the layer 2 address and the IP address allocated by the allocating module.
- the device further includes:
- An acquiring module configured to acquire the layer 2 address and the IP address corresponding to the group identifier if the context exists
- the response message returned by the first returning module carries the layer 2 address and the IP address obtained by the acquiring module.
- the response message returned by the first returning module further carries a unicast indication identifier So that the at least one second device requests the group of data from the third device using the IP address.
- the first receiving module is further configured to: After the at least one second device returns a response message, receiving the first message sent by the target second device;
- the target second device is a second device that does not listen to the information corresponding to the group identifier or the group identifier in the at least one second device, where the first message is that the target second device succeeds. a message sent after requesting the group data from the third device;
- the first returning module is further configured to: if the first device belongs to the first message, return a second message to the target second device, so that the target second device maintains the first
- the three devices are configured to receive a communication connection of the group of data.
- the first returning module is further configured to: if the first device does not belong to the first receiving a message returning a third message to the target second device to cause the target second device to release a communication connection with the third device for receiving the group data.
- the device further includes:
- a broadcast module configured to broadcast the group identifier or broadcast information corresponding to the group identifier after the first returning module returns the second message to the target second device.
- an embodiment of the present invention provides an apparatus, including:
- a second sending module configured to send a request message to the first device, where the request message is used to request the first device to forward group data, where the request message carries a group identifier;
- a second receiving module configured to receive a response message returned by the first device, where the response message carries a layer 2 address and an IP address corresponding to the group identifier, where the first device is configured to receive at least one of the a request message sent by the device, and when receiving the group data sent by the third device to the IP address, sending the group data by using the layer 2 address;
- a third receiving module configured to receive the group data from the layer 2 address.
- the response message further carries a port number corresponding to the group identifier, where the IP address and the port number are the first The IP address and port number assigned by the device for the device to request the group of data.
- the device further includes:
- a requesting module after the second receiving module receives the response message returned by the first device, requesting, by using the IP address, the group data to the third device; or using the IP address The address and the port number request the group data from the third device.
- the request if the device does not listen to the group identifier or the information corresponding to the group identifier, the request The module requests the group data from the third device; or
- the requesting module requests the group data from the third device.
- the second sending module is further configured to: After the three devices request the group data, send the first message to the first device;
- the device further includes:
- a holding module configured to: maintain a communication connection with the third device for receiving the group data if receiving the second message returned by the first device;
- a releasing module configured to release a communication connection with the third device for receiving the group data, if receiving the third message returned by the first device.
- the requesting module is specifically configured to:
- IP address and/or the port number as a source IP address and/or a source port number of a data packet for transmitting application signaling, and transmitting the data packet to the third device to Three devices request the group data; or,
- the group data is requested from the third device.
- an embodiment of the present invention provides an apparatus, including a memory and a processor, where the memory and the processor are connected by a bus, where the memory stores an instruction for implementing the data communication method according to the first aspect.
- the processor retrieves and executes instructions in the memory to implement the data communication method of the first aspect.
- an embodiment of the present invention provides an apparatus, including a memory and a processor, where the memory and the processor are connected by a bus, where the memory stores an instruction for implementing the data communication method according to the second aspect. Retrieving and executing the instructions in the memory, the processor implementing the second The data communication method described in the aspect.
- the first device receives a request message sent by the at least one second device, where the request message is used to request the first device to forward group data, where the request message carries a group identifier;
- the at least one second device returns a response message, where the response message carries a layer 2 address and an IP address corresponding to the group identifier; when receiving the group data sent by the third device to the IP address,
- the first device transmits the set of data using the layer 2 address.
- the first device sends the group data by using the layer 2 address, so that one or more second devices that have requested the group data from the first device may be from the layer 2
- the group data is received at the address to improve data transmission efficiency.
- FIG. 1a is a schematic diagram of one of the network architectures provided by the prior art
- FIG. 1 is a schematic flowchart of a data communication method according to an embodiment of the present invention.
- FIG. 2 is another schematic flowchart of a data communication method according to an embodiment of the present invention.
- 2a is another schematic flowchart of a data communication method according to an embodiment of the present invention.
- FIG. 3 is still another schematic flowchart of a data communication method according to an embodiment of the present disclosure.
- FIG. 4 is a schematic flowchart of still another method of data communication according to an embodiment of the present invention.
- FIG. 4a is a schematic flow chart of one of the data communication methods provided in FIG. 4;
- FIG. 5 is a schematic diagram of interaction of a data communication method according to an embodiment of the present invention.
- FIG. 6 is another schematic diagram of interaction of a data communication method according to an embodiment of the present invention.
- FIG. 7 is a schematic structural diagram of a device according to an embodiment of the present disclosure.
- FIG. 8 is another schematic structural diagram of an apparatus according to an embodiment of the present disclosure.
- FIG. 9 is still another schematic structural diagram of an apparatus according to an embodiment of the present disclosure.
- FIG. 10 is a schematic structural diagram of still another device according to an embodiment of the present disclosure.
- FIG. 11 is a schematic structural diagram of still another device according to an embodiment of the present disclosure.
- FIG. 12 is a schematic structural diagram of still another apparatus according to an embodiment of the present invention.
- the present invention provides a data communication method and device, the first device receives a request message sent by at least one second device, and the request message is used to request the first device to forward group data, where the request message carries a group identifier; Returning, by the first device, a response message to the at least one second device, where the response message carries a layer 2 address and an IP address corresponding to the group identifier; when the third device is sent to the IP address, When the data is grouped, the first device transmits the group data using the layer 2 address.
- the first device forwarding the group data sent by the third device to the second device to the at least one second device that needs to obtain the group of data, thereby improving data transmission efficiency.
- first device is a device that needs to acquire data, such as The second device may be a remote terminal that loses network coverage; the “first device” is a device for transferring data, such as the first device may be a relay terminal; and the “third device” is a device that provides data, such as a third device.
- second device is a device that needs to acquire data
- first device is a device for transferring data, such as the first device may be a relay terminal
- third device is a device that provides data, such as a third device.
- the first device is a device that has network coverage
- the second device may be a device that has lost network coverage, or may be a device that has network coverage.
- the embodiment of the present invention does not impose any limitation, as long as it is based on the present invention.
- the processing flow of the embodiment performs the data communication method, which belongs to the protection scope of the embodiment of the present invention.
- a data communication method and a terminal provided by an embodiment of the present invention are separately described in detail below with reference to FIG.
- FIG. 1 is a schematic flowchart of a data communication method according to an embodiment of the present invention.
- the data communication method may include the following steps.
- the first device receives a request message sent by at least one second device, where the request message is used by And requesting, by the first device, forwarding group data, where the request message carries a group identifier.
- the second device may be a device that has lost network coverage.
- the specific implementation is not limited to the device, and may be a device with network coverage.
- the embodiment of the present invention is not limited, but is worthy of explanation.
- the first device is a device with network coverage.
- the second device performs data communication with the network side through the first device, such as acquiring a certain group of data from the third device.
- the second device when the second device needs to acquire a certain set of data from the third device, the second device sends a request message to the first device, and the request message carries the group identifier corresponding to the group data to be acquired. Therefore, the first device receives the request message sent by the at least one second device, where the request message carries the group identifier corresponding to the group data that the second device needs to obtain, so that the first device receives the Group data is forwarded.
- one or more second devices requesting the same group of data are referred to as a group of second devices.
- the at least one second device is a group of second devices, first.
- the device receives the request message of the second device of the group, where the request message carries the same group identifier.
- the at least one second device may be a second device, or may be multiple second devices, and the third device may be a group server (Application Server, AS) or other device that can send group data.
- AS Application Server
- the at least two second devices are used as an example, and the group identifiers carried in the request messages sent by the at least two second devices are the same, that is, the at least two second devices request the same group of data.
- the group identifier is used to uniquely identify a group of data.
- the group identifier may be other information such as a TMG (Temporary Mobile Group Identity) and an application layer identifier that can identify the group data.
- TMG Temporary Mobile Group Identity
- application layer identifier that can identify the group data.
- the embodiment of the invention is not limited.
- the third device can provide three groups of data, namely, "Group Data One", “Group Data Two", and “Group Data Three”, and the corresponding group identifiers are respectively "A”, “B”, “C”, if the group identifier carried in the request message sent by a second device is "A”, it indicates that the second device wishes to listen to the "group data one" sent by the third device; If the group identifier carried in the request message sent by the second device is “B”, the second device may be configured to listen to the “group data 2” sent by the third device; if the request message sent by the second device is If the carried group identifier is “C”, it indicates that the second device wants to listen to the “group data three” sent by the third device. It is to be understood that the specific examples are for illustrative purposes only and are not intended to limit the scope of the invention.
- the first device returns a response message to the at least one second device, where the response message carries a layer 2 address and an IP address corresponding to the group identifier.
- the first device may automatically return a response message corresponding to the group identifier according to the group identifier carried in the request message, where the response message carries the layer 2 address corresponding to the group identifier. And IP address.
- the first device may further obtain the related parameter corresponding to the group identifier according to the group identifier carried in the request message, for example, the related parameters include The layer 2 address and the IP address are returned to the second device that sends the request message, where the response message carries the layer 2 address and the IP address.
- the embodiment of the present invention is not limited.
- the layer 2 address is used to forward the group data to the second device, so that the second device receives the group data from the link related to the layer 2 address, where the IP address is allocated by the first device.
- the second device is configured to request an IP address of the group data from the third device. After receiving the response message returned by the first device, the second device may request the third device to use the group data corresponding to the group identifier by using the IP address carried in the response message.
- the first device may pre-store the parameter information corresponding to each group identifier and the group identifier, where the parameter information corresponding to the group identifier includes a layer 2 address and an IP address corresponding to the group identifier.
- the first device After receiving the request message sent by the second device, the first device directly obtains the layer 2 address and the IP address corresponding to the group identifier according to the group identifier carried in the request message, and returns a response message to the second device.
- the layer 2 address and the IP address are carried in the second device to know that the group data to be acquired can be received or monitored at the layer 2 address.
- the second device may further request the group data corresponding to the group identifier by using the IP address, where at least one second device in the at least one second device successfully requests the group identifier from the third device by using the IP address.
- Corresponding group data so that the first device can receive the group data sent by the third device to the IP address, and the third device does not need to separately send the group data to each second device.
- the first device determines whether it is the first time to receive the request message carrying the group identifier, and if yes, assigns the layer 2 address and the IP address to the group identifier. If not, directly obtain the layer 2 address and the IP address corresponding to the group identifier, where the layer 2 address and the IP address are the layer 2 address and IP allocated by the first device for the first time the request message is received. After obtaining the layer 2 address and the IP address corresponding to the group identifier, the first device returns a response message to the second device, where the returned response message carries the layer 2 address and IP address.
- the first device after receiving the request message sent by the second device, if the first device receives the request message carrying the group identifier for the first time, the first device does not have the layer 2 address and the IP address corresponding to the group identifier. Otherwise, There is a layer 2 address and an IP address corresponding to the group identifier. Therefore, in an optional embodiment, it may be determined whether the request message is received for the first time by checking whether the context corresponding to the group identifier exists.
- the context corresponding to the group identifier may be the layer 2 corresponding to the group identifier.
- the information of the address, the IP address, and the like are not limited in the embodiment of the present invention.
- the first device belongs to the first time to receive the request message carrying the group identifier. Therefore, the layer 2 address and the IP address are assigned to the group identifier; if the context corresponding to the group identifier exists, The first device does not belong to the request message for the first time. Therefore, the information such as the layer 2 address and the IP address allocated when the request message is received for the first time is directly obtained. It is to be noted that, in a specific implementation, whether the first device belongs to the request message for the first time is determined by setting a preset identifier. For example, suppose the expressions “False” and “Ture” are used to indicate “first time” and “not first time” respectively.
- the default identifier can be set to “False” by default, when the first device receives the request. After the message is obtained, the preset identifier corresponding to the group identifier of the request message is obtained. If the preset identifier is "False”, the first device belongs to the request message corresponding to the group identifier for the first time, and the preset identifier is False is updated to "Ture”; if the preset identifier is "Ture", the first device does not belong to the request message corresponding to the group identifier for the first time. It should be noted that, in the specific implementation, other methods may be used to determine whether the request message is received for the first time, which is not limited by the embodiment of the present invention.
- the information about the layer 2 address, the IP address, and the like is allocated for the group identifier, and the first device allocates the layer 2 after receiving the request message of the second device.
- the address, the IP address, and the like; or the first device presets the layer 2 address, the IP address, and the like, and after receiving the request message of the second device, selects a group of layer 2 addresses, IP addresses, and the like from the preset information. information.
- the embodiment of the present invention is not limited.
- the response message may further carry a port number corresponding to the group identifier, where the port number is configured by the first device for the second device to request from a third device or The port number of the group data is received. Therefore, the second device may request the third device to use the group data corresponding to the group identifier by using the IP address and port number assigned by the first device. It is to be noted that the port number of the second device requesting or receiving the group data may be specified by the first device in the response message, or may be preset by the second device or the third device, and the embodiment of the present invention does not do this. limit.
- the port number X1 is used by default; when the group identifier carried in the request message sent by the second device to the first device is "A”, if the first device returns a response message, If the port number is not carried, the second device uses the IP address and the port number X1 to request the group data one from the third device. If the response message returned by the first device carries the port number, the second device uses the IP address and port. The number requests "Group Data One" from the third device.
- the second device may request the third device to use the group data corresponding to the group identifier by using the IP address carried in the response message, so that the third device sends the group data to the IP address. address.
- the group data is sent to the at least one second device by using the layer 2 address, and therefore, the group data is requested from the first device. All the second devices can receive the group of data from the link corresponding to the layer 2 address, and the third device does not need to separately transmit the group data to each second device, thereby improving data transmission efficiency.
- a second device in the at least one second device successfully receives the group data from the third device by using the IP address after receiving the response message returned by the first device, and thus, the third device
- the requested group data is sent to the IP address.
- the group data is sent by using the layer 2 address, so that all the second devices that send the request message and receive the response message can
- the group data corresponding to the group identifier is monitored and received from the layer 2 address included in the response message.
- the first device receives a request message that is sent by the at least one second device, where the request message is used to request the first device to forward group data, where the request message carries a group identifier; Returning, by the first device, a response message to the at least one second device, where the response message carries a layer 2 address and an IP address corresponding to the group identifier; when the third device is sent to the IP address, When the data is grouped, the first device transmits the group data using the layer 2 address.
- the first device sends the group data sent by the third device to the IP address to one or more second devices that request the group of data from the first device, which can improve data transmission efficiency.
- FIG. 2 is another schematic flowchart of a data communication method according to an embodiment of the present invention.
- the data communication method may include the following steps.
- the first device receives a request message sent by the at least one second device, where the request message is used to request the first device to forward group data, where the request message carries a group identifier.
- the group data requested by the at least one second device to the first device is the same, that is, the group identifiers carried in the request messages sent by the second devices are the same.
- the second device may be a device that has lost network coverage.
- the specific implementation is not limited to the device, and may be a device with network coverage.
- the embodiment of the present invention is not limited, but is worthy of explanation.
- the first device is a device with network coverage.
- the second device is a device that has lost network coverage
- the device may be selected as the first device, where the device that is the first device is attached to the network or A PDN (Packet Data Network) connection for relaying data transmission has been established, so that the second device establishes a communication connection with the first device, and therefore, the second device can communicate with the network side through the first device.
- the second device may also request the first device to obtain an IP address, and the first device may serve as an IPV6 router or a DHCP (Dynamic Host Configuration Protocol).
- the server assigns an IP address to the second device, so that the first device assigns an IP address to the second device. Further, after the second device acquires the IP address, it can communicate with the third device, such as registering with the third device. Optionally, after the second device registers with the third device, the related parameters required for the multicast group data, such as the TMGI, the group multicast address, the group identifier, and the like, may be obtained from the third device.
- the related parameters required for the multicast group data such as the TMGI, the group multicast address, the group identifier, and the like, may be obtained from the third device.
- the embodiment of the invention is not limited.
- the second device When the second device needs to acquire the group data, the second device loses the network coverage, and the first device performs data communication with the network side. Therefore, when the second device needs to obtain data from the network side, the second device sends a request message to the first device. And requesting the first device to forward the group data, where the request message carries group identification information corresponding to the group data to be requested.
- the second device may request the same group of data from the first device. After receiving the request message sent by any second device, the first device returns a response message to each second device.
- S202 The first device determines whether a context corresponding to the group identifier already exists.
- the context corresponding to the group identifier may be a layer 2 address, an IP address, or the like.
- the information of the group of data is forwarded.
- the port number can also be included.
- the first device After receiving the request message sent by the second device, the first device parses the carried group identifier from the request message, and determines whether the context corresponding to the group identifier exists.
- S203 The first device allocates the layer 2 address and the IP address corresponding to the group identifier.
- the group data corresponding to the group identifier is requested for the first time, that is, the first device receives the request message requesting the group data for the first time, so that the first device allocates the group identifier for forwarding.
- the layer 2 address and IP address of the group data optionally, the port number can also be assigned.
- the IP address is an IP address allocated by the first device for the second device to request or receive the group data to the third device; the port number is allocated by the first device for the second The device requests or receives a port number of the group data from the third device.
- the second device when the second device requests the group of data, the second device requests the third device by using the IP address or the port number, and when the second device receives the group of data, the received group data is the IP.
- the address or port number is the destination IP address or destination port number.
- the parameter is associated with the group identifier, so that if another second device subsequently sends a request message carrying the group identifier, After receiving the request message, a device may directly obtain a parameter associated with the group identifier, where the parameter includes a layer 2 address and an IP address, and optionally, a port number.
- the information that the first device allocates the layer 2 address, the IP address, and the like for the group identifier includes: the first device allocates the layer 2 address, the IP address, and the like after receiving the request message of the second device; or the first device
- the layer 2 address, IP address and other information are preset, and after receiving the request message of the second device, a set of layer 2 address, IP address and the like are selected from the preset information.
- the embodiment of the present invention is not limited.
- S204 The first device acquires a layer 2 address and an IP address corresponding to the group identifier.
- the group data corresponding to the group identifier is not requested for the first time, that is, before the second device requests, another second device has requested the group data from the first device, thereby
- the first device directly obtains the layer 2 address and the IP address corresponding to the group identifier, and optionally includes a port number.
- the layer 2 address, IP address, and port number are the layer 2 address, IP address, and port number assigned by the first device for the first time the request message is received.
- the first device returns a response message to the second device, where the response message carries The layer 2 address and IP address corresponding to the group identifier.
- the first device After acquiring the parameter corresponding to the group identifier, the first device returns a response message to the second device, where the response message carries a parameter corresponding to the group identifier, where the parameter corresponding to the group identifier includes the layer 2 corresponding to the group identifier.
- the address and IP address optionally, may also include the port number corresponding to the group identifier.
- the first device when the first device receives the request message sent by one of the at least one second device, if it is determined that the context corresponding to the group identifier does not exist, the first device allocates the group identifier.
- the group identifier corresponds to the layer 2 address and the IP address, so that the response message returned to the second device carries the allocated layer 2 address and the IP address; if it is determined that the context corresponding to the group identifier already exists, the The device obtains the layer 2 address and the IP address corresponding to the group identifier according to the group identifier, so that the response message returned to the second device carries the acquired layer 2 address and IP address.
- the response message may further carry a unicast indication identifier, so that the second device requests the group from the third device by using an IP address. data.
- the response message further carries a port number
- the second device requests the group data from the third device by using an IP address and a port number. Therefore, the first device may receive the group data that is sent by the third device to the second device by using the unicast mode. If the unicast indication information is not carried, the second device may not request the group data from the third device.
- the third device may be a server or another device that sends group data. Specifically, the embodiment of the present invention is not limited.
- the first device may also broadcast the group identifier or broadcast the information corresponding to the group identifier, so that if there is another second device,
- the first device may forward the group of data, and therefore, the second device that subsequently requests the group of data
- the group data is requested from the third device without using the IP address (optionally including the port number) carried in the response message.
- the information corresponding to the broadcast group identifier may be other forms of the group identifier, such as the encoded group identifier, or other information of the group corresponding to the group identifier, such as the group address information, etc., specifically, The embodiment of the invention is not limited.
- the response message may further include an update timer corresponding to the group identifier, and the newly set update timers each have a preset duration, so that the update timer may be used to indicate the broadcast station. The remaining duration of the group ID.
- the second device When the remaining duration corresponding to the update timer is 0, if the second device still wants to continue to listen to the group of data, the second device needs to resend the request message to the first device, the first setting The step S201 is performed; otherwise, the first device stops transferring the group of data, and at the same time, deletes the context and the like in the request, thereby effectively reducing the power consumption of the terminal and improving the service life.
- the relay device when the relay device receives the group data that is sent by the third device to the IP address and the port number, the first device uses the layer 2 address to The at least one second device transmits the group data.
- the sending may be a multicast mode or a broadcast mode.
- the embodiment of the present invention is not limited. Therefore, all the second devices that have requested the group of data from the first device can receive the group of data from the link corresponding to the layer 2 address, and the third device does not need to separately transmit the group data to each second device. Improve data transfer efficiency.
- the first device determines the corresponding layer 2 address and the IP address according to the group identifier carried in the request message sent by the second device, so that as long as the group data requested by the second device is the same, the first The parameters (including the layer 2 address and IP address) carried in the response message returned by the device are the same.
- the first device After receiving the group data sent by the third device to the IP address, the first device forwards the group data by using the layer 2 address, so that the request message carrying the group identifier is sent to the first device and received. All the second devices to the response message can listen to and receive the group data corresponding to the group identifier.
- the first device receives a request message that is sent by the at least one second device, where the request message is used to request the first device to forward group data, where the request message carries a group identifier; Returning, by the first device, a response message to the at least one second device, where the response message carries a layer 2 address and an IP address corresponding to the group identifier; when the third device is sent to the IP address, When the data is grouped, the first device sends the group data to the at least one second device using the layer 2 address. According to the embodiment of the present invention, the first device sends the group data sent by the third device to the IP address to one or more second devices that request the group of data from the first device, which can improve data transmission efficiency.
- the second device may use the IP address carried in the response message or use the IP address carried in the response message.
- the address and the port number request the third device to request the group data corresponding to the group identifier.
- the second device may automatically request the group data corresponding to the group identifier from the third device according to the response message.
- the second device requests the third device to correspond to the group identifier according to the response message if the group identifier or the information corresponding to the group identifier is not monitored.
- Group data if the group identifier or the information corresponding to the group identifier can be monitored, it indicates that a second device successfully requests the group data from the third device, and the first device can transfer the group data, thereby The second device does not need to request the group data from the third device after receiving the response message.
- the second device after receiving the response message, the second device, if the response message carries the unicast indication identifier, indicates that the request for forwarding the group data is received for the first time, and the second device needs to go to the third device.
- the data communication method may further include steps S205a to S205d, as shown in FIG. 2a, and FIG. 2a is a data communication according to an embodiment of the present invention.
- FIG. 2a is a data communication according to an embodiment of the present invention.
- the first device receives a first message sent by the target second device, where the first message is a message that is sent after the target second device successfully requests the group of data from the third device.
- the first device After the second device sends the request message to the first device, the first device returns a response message. If the response message does not carry the port number, the second device may request the group data from the third device by using the IP address carried in the response message. Optionally, if the response message carries the port number, the second device may request the group data from the third device by using the IP address and the port number carried in the response message. After the second device successfully requests the group data from the third device, the first message is sent to the first device.
- At least one second device (referred to as the target second device in the embodiment of the present invention) successfully requests the group data from the third device, and the target second device succeeds in the third After requesting the group data, the device sends a first message to the first device, to notify the first device that the communication connection for transmitting the group data is successfully established to the third device.
- the first device receives the first message sent by the target second device, where the first message is a message that is sent after the target second device successfully requests the group of data from the third device.
- the second device after receiving the response message returned by the first device, uses the IP address carried in the response message if the group identifier or the information corresponding to the group identifier is not monitored. Or requesting, by using the IP address and the port number carried in the response message, the group data, and after successfully requesting the group data from the third device, sending the first message to the first device.
- the first device receives the first message sent by the target second device in the at least one second device, where the target second device refers to the information in the second device that does not detect the group identifier or the group identifier, and Successfully requesting, by the third device, any second device of the group data, where the first message is a message that is sent by the target second device after successfully requesting the group data from the third device, to notify the first device A communication connection for transmitting the group data has been successfully established to the third device.
- S205b The first device determines whether it belongs to the first message received for the first time.
- the at least one second device includes one or more second devices, and the at least one second device only needs one second device to remain with the third device, no matter how many second devices exist.
- the communication connection for transmitting the group data is sufficient. Therefore, after the first device receives the first message corresponding to the group identifier sent by the target second device in the at least one second device, the first device determines whether it belongs to the first message, and if yes, indicates The first device selects a communication connection between the second device and the third device to transmit group data, so that the first device returns a second message to the second device, so that the target second device remains the third
- the device is configured to receive the communication connection of the group data; if not, it indicates that before the target second device returns the first message, the other target second device has successfully requested the group data from the third device, thereby The first device returns a third message to the target second device to cause the target second device to release a communication connection with the third device for receiving the group data.
- the 2 address sends the group data to the at least one second device to implement data relay from unicast to multicast, thereby improving data transmission efficiency.
- S205c The first device returns a second message to the target second device, so that the target second device maintains a communication connection with the third device for receiving the group data.
- the first device may further broadcast the group identifier or broadcast information corresponding to the group identifier, so that when there are other second devices, the second device is required to obtain the corresponding group identifier. Number of groups According to the information, if the group identifier or the information corresponding to the group identifier can be monitored, the group data is not required to be requested from the third device; if the group identifier is not detected, the group is requested from the third device.
- the information corresponding to the broadcast group identifier may be other forms of the group identifier, such as the encoded group identifier, or other information of the group corresponding to the group identifier, such as the group address information, etc., specifically, the present invention
- the embodiment is not limited.
- S205d The first device returns a third message to the target second device, so that the target second device releases a communication connection with the third device for receiving the group data.
- the first message If the first message is not received for the first time, it indicates that a second device in the at least one second device has successfully requested the group data from the third device and remains in the receiving device with the third device.
- the communication connection of the group data therefore, the first device returns a third message to the current target second device, so that the target second device releases the communication connection with the third device for receiving the group data.
- the “first message”, the “second message”, and the “third message” are only used for description purposes, and the message name used to facilitate the description of the solution is specifically implemented.
- the embodiment of the invention does not impose any limitation on the name of the message, and therefore, the scope of protection of the present invention is not limited thereby.
- the at least one second device only has one second device and the third device has a communication connection for receiving the group data, and when the first device receives the third device and sends the second device
- the set of data of the device the group data is sent to the at least one second device by using a layer 2 address, and correspondingly, the at least one second device can listen to and receive the layer 2 address Group data.
- data transmission efficiency can be improved.
- FIG. 3 is a schematic flowchart of a data communication method according to an embodiment of the present invention.
- the data communication method may include the following steps.
- the second device sends a request message to the first device, where the request message is used to request the first device to forward group data, where the request message carries a group identifier.
- the first device receives a request message that the at least one second device requests the group data, where the group identifier carried in the request message sent by the at least one second device is the same, that is, the The group data to be requested by at least one second device is the same.
- the first device receives the third device When the set of data sent to one of the at least one second device is transmitted, the set of data is forwarded using a layer 2 address.
- the first device After receiving the request message of the at least one second device requesting the group of data, the first device returns a response message to each second device, where the response message carries the layer 2 address, so that the first device is The one or more second devices requesting the set of data and receiving the response message can listen to and receive the group data from the layer 2 address, thereby implementing the method of multicasting the received unicast data. Send to a plurality of the second devices.
- the group identifier may be other information that can identify the group data, such as a TMG (Temporary Mobile Group Identity), an application layer identifier, and the like.
- TMG Temporal Mobile Group Identity
- application layer identifier an application layer identifier
- the second device receives a response message returned by the first device, where the response message carries a layer 2 address and an IP address corresponding to the group identifier, where the first device is configured to receive at least one second And the request message sent by the device, and when receiving the group data sent by the third device to the IP address, sending the group data by using the layer 2 address.
- the first device After the second device sends a request message requesting a certain group of data to the first device, the first device returns a response message according to the group identifier carried in the request message, so that the second device receives the response message returned by the first device,
- the response message carries the layer 2 address and the IP address corresponding to the group identifier; the IP address is an IP address allocated by the first device for the second device to request the group data from the third device.
- the layer 2 address is used by the second device to send the received group data to the at least one second device, so that the second device can receive the group data from the layer 2 address.
- the second device requests the group data from the third device by using the IP address, thereby establishing a communication connection with the third device for receiving the group data distributed in a unicast format. .
- the response message may further carry a port number corresponding to the group identifier, where the port number is configured by the first device, and the second device requests the group data. Port number.
- the second device requests the group data from the third device by using the IP address and the port number, thereby establishing the manner for receiving the unicast distribution between the third device and the third device. Communication connection for group data.
- S303 The second device receives the group data from the layer 2 address.
- the first device If the first device receives the group data sent by the third device to the IP address, the first device sends the group data to the at least one second device by using a layer 2 address, thereby The at least one second device requesting the group data and receiving the response message may receive the group data from the layer 2 address.
- the second device sends a request message to the first device, where the request message carries the group identifier, and the second device receives the response message returned by the first device, where the response message carries the group identifier.
- the request message carries the group identifier
- the response message returns by the first device, where the response message carries the group identifier.
- Corresponding layer 2 address and IP address wherein, when the first device receives the group data sent by the third device to the IP address, the group device sends the group data using a layer 2 address; the second device receives the layer 2 address The group data is received on.
- the first device forwards the group data sent by the third device to the IP address by using the layer 2 address, so that one or more second devices that have requested the group data from the first device are The group data can be received from the layer 2 address, which can improve data transmission efficiency.
- FIG. 4 is a schematic flowchart of a data communication method according to an embodiment of the present invention.
- the data communication method may include the following steps.
- the second device sends a request message to the first device, where the request message is used to request the first device to forward group data, where the request message carries a group identifier.
- the second device sends a request message to the first device, where the request message carries the group identifier, so that the first device receives the request message sent by the at least one second device, where the at least one second device sends
- the first device requests to forward the same group data, that is, the request message sent by each second device carries the same group identifier.
- the same group identifier refers to the identifier information that can identify the same group.
- the different identification forms of the same group also belong to the same group identification category.
- the embodiments of the present invention are not limited to the consistent identification information.
- the second device receives a response message returned by the first device, where the response message carries a layer 2 address and an IP address corresponding to the group identifier.
- the IP address is an IP address allocated by the first device for the second device to request the group data from the third device, that is, at least the request message is sent to the first device.
- a second device can use the IP address to establish a unicast channel for receiving the set of data to the third device.
- the layer 2 address is used by the second device to send the received group data to the at least one The second device, whereby the second device can receive the set of data from the layer 2 address.
- the response message further carries a port number corresponding to the group identifier, where the port number is allocated by the first device for the second device to request the third device The port number of the group data, whereby at least one second device that sends the request message to the first device can use the IP address and the port number to establish a unicast session channel for receiving the group of data to the third device.
- the IP address and the port number may also be used by the second device to receive the group data, and when the second device receives the group of data, the received group data is obtained by using the IP address and
- the port number is the destination IP address or destination port number. It is worth noting that in the specific implementation, the port number is optional.
- the first device after receiving the request message sent by the second device, parses the group identifier from the request message, obtains the layer 2 address and the IP address corresponding to the group identifier, and optionally includes a port number, and Returning a response message to the second device, where the response message carries the acquired layer 2 address, IP address, and optionally, a port number.
- the request message sent by the second device carries the same group identifier
- the layer 2 address, IP address, or port number carried in the response message received from the first device is also the same.
- S403 The second device requests the group data from the third device by using the IP address.
- the second device may request the group data from the third device by using an IP address carried in the response message.
- the response message further carries a port number
- the second device requests the group data from the group third device by using the IP address and the port number.
- the requesting, by the second device, the group data to the third device may be performed by the second device establishing a communication connection for receiving the group data to the third device, so as to receive the group data of the unicast distribution from the third device.
- the manner of establishing the communication connection may include two implementation manners according to whether the first device supports the ALG-NAT (Application Layer Gateways-Network Address Translation) function.
- the second device performs media negotiation with the third device to establish an application layer session, and the IP address and port number used by the second device to transmit data are sent through the application layer message. And to the third device, and receiving an IP address or a port number of the third device used by the third device to send data, thereby establishing a communication connection between the second device and the third device for transmitting unicast data.
- the IP address is used as a session initiation protocol (Session).
- SDP Session Description Protocol
- SIP Initiation Protocol
- SIP Session Description Protocol
- SIP Session Description Protocol
- SIP Initiation Protocol
- SIP is a text-based application layer control protocol for creating, modifying, and releasing sessions of one or more participants; SDP provides multimedia session descriptions for purposes such as session notification, session invitation, and other forms of multimedia session initialization.
- the response message further carries the port number
- the second device performs media negotiation with the third device to establish an application layer session.
- the IP address and the port number are used as the session in the session initiation protocol SIP message. Describe the IP address and port number in the protocol SDP message body, and send the SIP message to the third device to request the group data from the third device.
- the second device uses the IP address as a source IP address of a data packet for transmitting application signaling, and sends the data packet to the third device.
- the application signaling indicates that the second device is configured to transmit an IP address of the unicast distribution data, so as to request the third device to request the group data, and the second device and the third device are configured to receive the unicast.
- a communication connection that distributes data in the form.
- the second device uses the IP address and the port number as a source IP address and a source port number of the data packet for transmitting the application signaling, and sends the data packet Giving the third device to request the group data from the third device.
- the response message carries the port number as an example
- the second device requests the group data from the third device by using the IP address and the port number, and the second device needs to communicate with the network side through the first device
- the IP address and The port number is an IP address and a port number that the first device allocates to the second device for transmitting the unicast distribution data
- the first device has a Network Address Translation (NAT) function
- NAT Network Address Translation
- the third device goes to the first device.
- the second device sends the group data
- the group data that should be sent to the IP address and the port number is sent to the first device.
- the IP address of the group data is the IP address and The port number is forwarded by the first device.
- the second device after receiving the response message returned by the first device, the second device automatically requests the group data from the third device by using the IP address carried in the response message.
- the second device automatically sends the group data to the third device by using the IP address and the port number carried in the response message after receiving the response message returned by the first device.
- the second device after the second device receives the response message returned by the first device, if the group identifier or the related information of the group identifier can be currently monitored, the second device does not need to The third device requests the group data; if the second device does not listen to the group identifier or the group identifier related information, after the second device receives the response message returned by the first device, the The second device requests the group data from the third device according to the response message.
- the second device after receiving the response message returned by the first device, if the second device receives the unicast indication identifier, the second device requests the third device according to the response message.
- the group data is obtained; if it is known that the response message does not carry the unicast indication identifier, the second device does not need to request the group data from the third device after receiving the response message.
- the requesting, by the second device, the group data to the third device according to the response message includes: if the response message does not carry the port number, requesting, by using the IP address carried in the response message, the group data to the third device; The response message carries the port number, and the group device data is requested from the third device by using the IP address and the port number carried in the response message.
- FIG. 4a is a schematic flowchart of one of the data communication methods provided in FIG.
- S403a The second device sends a first message to the first device.
- the second device may further send the first message to the first device, so that the second device will successfully request the third device.
- the event describing the group data informs the first device.
- the first device receives the first message sent by the target second device in the at least one second device, where the first message is that the target second device successfully requests the group from the third device The message sent after the data.
- the unicast communication connection is established with the third device.
- the first device receives the foregoing After not listening to the information corresponding to the group identifier or the group identifier, and successfully requesting the first message sent by any second device in the unicast group data, it is further determined whether it is the first time to receive the first message, and if so, Returning to the second device a second message, wherein the second device maintains a communication connection with the third device to receive the group data; otherwise, returns a third message to the second device, so that the second device releases and the third device receives the A communication connection of group data, wherein the communication connection refers to a communication connection in which the second device receives data in a unicast form from the third device.
- the first device After the second device returns the first message to the first device, if the second message returned by the first device is received, the first device selects a communication connection between the second device and the third device to transmit the group data, thereby The second device maintains a communication connection with the third device for receiving the group of data such that the first device can receive the group of data transmitted by the server.
- the second device After the second device returns the first message to the first device, if the third message returned by the first device is received, it indicates that the second device already exists before the second device successfully requests the group device from the third device. A communication connection is established with the third device to receive the group of data, thereby releasing a communication connection with the third device for receiving the group of data. Therefore, when the plurality of second devices need to acquire the same group data from the third device, the third device only needs to transmit the group of data based on the established communication connection, and the same group data is avoided in the third device and the first device. Repeat transmission.
- S404 The second device receives the group data from the layer 2 address.
- the first device forwards the group data by using the layer 2 address, so that one or more of the group data has been requested from the first device.
- the second device can both listen to and receive the group data from the layer 2 address.
- the response message further carries a port number
- the first device uses the layer 2 address forwarding.
- the set of data such that the second device that has requested the set of data from the first device can listen to and receive the set of data from the layer 2 address.
- the second device sends a request message to the first device, where the request message carries the group identifier, and the second device receives the response message returned by the first device, where the response message carries the group identifier.
- the request message carries the group identifier
- the second device receives the response message returned by the first device, where the response message carries the group identifier.
- the group data is transmitted using a layer 2 address; the second device receives the group data from the layer 2 address.
- the first device forwards the group data sent by the third device to the IP address by using the layer 2 address, so that one or more second devices that have requested the group data from the first device are The group data can be received from the layer 2 address, which can improve data transmission efficiency.
- FIG. 5 is a schematic diagram of interaction of a data communication method according to an embodiment of the present invention.
- the data communication method may include the following steps.
- the first device may receive the request message of the one or more second devices, where the group identifiers carried in the request message sent by the multiple second devices to the first device are the same.
- the requesting terminal corresponding to the group data when it is first requested is referred to as “second device UE2-1”, and the requesting terminal corresponding to the group data is not called when first requested.
- the second device UE2-2 it is worth noting that the second device UE2-1 and the second device UE2-2 are used for description purposes only.
- the second device UE2-2 It may be a substitute for one or more second devices.
- the embodiment of the present invention is not limited.
- S500 The second device registers with the third device by using the first device.
- the second device is a device that loses network coverage
- the first device may be selected as the relay terminal, where the second device is used as the relay terminal.
- a device is attached to the network or has a PDN (Packet Data Network) connection established for relaying data transmission, and the second device establishes a communication connection with the first device. Therefore, the second device can communicate with the network through the first device. Side communication.
- the second device may also request the first device to obtain an IP address, and the first device may serve as an IPV6 router or a DHCP (Dynamic Host Configuration Protocol).
- the configuration protocol the server assigns an IP address to the second device, so that the first device assigns an IP address to the second device. Further, after the second device acquires the IP address, it can communicate with the third device, such as registering with the third device, or transmitting other application layer signaling messages, and the like. Optionally, after the second device registers with the third device, the related parameters required for the multicast group data, such as the TMGI, the group multicast address, the group identifier, and the like, may be obtained from the third device.
- the second device includes “second device UE2-1” and “second device UE2-2”.
- the second device UE2-1 sends a request message to the first device, where the request message carries a group identifier.
- the second device UE2-1 When the second device UE2-1 needs to acquire a certain group of data on the third device, it sends a request message to the first device, and at the same time, the request message carries the group identifier corresponding to the group data to be acquired.
- the request message is used to request the first device to forward the group data.
- the first device returns a response message to the second device UE2-1, where the response message carries a layer 2 address, an IP address, and a port number corresponding to the group identifier.
- the first device After receiving the request message sent by the second device UE2-1, the first device parses the group identifier from the request message, and directly obtains or allocates the layer 2 address, the IP address, and the port number corresponding to the group identifier according to the group identifier. .
- the port number is optional.
- the second device can receive the group data by using a port that is set by default.
- the layer 2 address is used by the first device to send group data to the second device when the group device receives the group data corresponding to the group identifier, so that the second device UE2-1 monitors and receives the address from the layer 2 address.
- the group identifier corresponds to group data
- the IP address and the port number are IP addresses and port numbers allocated by the first device to the at least one second device for requesting or receiving the group data.
- the at least one second device is all devices that have sent the request message to the first device, where the request message carries the same group identifier, and it is worth mentioning that the request may also be
- the group data of the group identifier carried by the message is the same. Specifically, the embodiment of the present invention is not limited.
- the unicast indication identifier may be carried in the response message sent by the first device to the second device UE2-1, so that the second device UE2-1 receives the response message. Then, according to the unicast indication identifier, the third device is requested to establish a communication connection for transmitting the group data.
- the second device UE2-1 requests the group data from the third device by using the IP address and the port number.
- the second device UE2-1 After the second device UE2-1 receives the response message returned by the first device, if the information corresponding to the group identifier and the group identifier is not monitored, the information is used to indicate that the first device can forward the third device to send The group identifiers the corresponding group data, and the second device UE2-1 requests the third device to use the group data corresponding to the group identifier by using the IP address and the port number carried in the response message, that is, establish a communication connection with the third device.
- the communication connection is configured to receive group data corresponding to the group identifier.
- the second device UE2-1 uses the IP address and port number carried in the response message and the third device if the unicast indication identifier is carried in the response message. Establishing a communication connection for receiving group data distributed in a unicast form corresponding to the group identifier.
- the second device UE2-1 may use the IP address carried in the response message or use the IP address and the default port number carried in the response message.
- the third device establishes a communication connection for receiving the group data corresponding to the group identifier, where the default port number is a port number preset by the second device or the third device for requesting group data corresponding to the group identifier.
- S504 The second device UE2-1 sends the first message to the first device.
- the first message is sent to the first device, so that the first device learns that the second device UE2-1 has successfully requested the group from the third device.
- Data so that the first device can receive the group data sent by the third device to the second device UE2-1, where the destination IP address of the group data is the IP address returned in step S502, optionally, The destination port number of the group data is the port number returned in step S502.
- the first device may further determine whether the first message is received for the first time. If yes, the first device returns a second message to the any second device, so that the any second device keeps receiving the group data from the third device; if not, the first device A device returns a third message to the any second device to cause the any second device to release a communication connection with the third device for receiving the group of data.
- the first device may further determine whether the first message is received for the first time. If yes, the first device returns a second message to the any second device, so that the any second device keeps receiving the group data from the third device; if not, the first device A device returns a third message to the any second device to cause the any second device to release a communication connection with the third device for receiving the group of data.
- S505 The first device broadcasts information about the group identifier or the group identifier.
- the first device After receiving the first message sent by the second device UE2-1, the first device learns that the second device UE2-1 has successfully requested the group data from the third device, and returns a second message. Therefore, the first device broadcasts the device.
- the group identifier or the information corresponding to the group identifier is configured to enable all the second devices to learn that the first device can forward the group data sent by the third device. Therefore, when there are other second devices that also need to receive the group data, the request message can be directly sent to the first device without establishing a communication connection for receiving the group data to the third device.
- the first device when the first device receives the group data that is sent by the third device to the IP address, the first device sends the group data by using the layer 2 address, Thus, all of the second devices that have learned from the first device that the layer 2 address can listen to and receive the group data.
- the second device UE2-2 listens to the group identifier or the information corresponding to the group identifier.
- the second device may listen to the group identifier or the information corresponding to the group identifier, so that the other second device can learn the first A device can forward the group data corresponding to the group identifier sent by the third device. Therefore, if the second device UE2-2 also needs to receive the group of data, the request message may be sent to the first device, and the group identifier is carried in the request message.
- the second device UE2-2 sends a request message to the first device, where the request message carries the group identifier.
- the group identifier carried in the request message sent by the second device UE2-2 and the second device UE2-1 is the same.
- step S501 the group identifier carried in the request message sent by the second device UE2-2 and the second device UE2-1 is the same.
- the first device returns a response message to the second device UE2-2, where the response message carries a layer 2 address, an IP address, and a port number corresponding to the group identifier.
- the first device After receiving the request message sent by the second device UE2-2, the first device parses the group identifier from the request message, so that the group identifier and the group identifier carried in the request message sent by the second device UE2-1 are known. the same. In the embodiment of the present invention, after the first device has allocated the parameter corresponding to the group identifier according to the group identifier, the first device directly obtains the group identifier after receiving the request message sent by the second device UE2-2. Corresponding layer 2 address, IP address, and port number. It is worth noting that the port number is optional.
- the second device UE2-1 receives the response, because the group message corresponding to the group identifier is not the first request, the response message sent by the first device to the second device UE2-1 does not carry the unicast indication identifier, and the second device UE2-1 receives the response. After the message, there is no need to establish a communication connection with the third device for receiving the group data.
- the group identifier or the information corresponding to the group identifier may be monitored, so that it is known that another second device has been established to the server. A communication connection for receiving group data corresponding to the group identification, and therefore, there is no need to establish a communication connection with the third device for receiving the group data.
- the second device UE2-1 After receiving the response message returned by the first device, the second device UE2-1 successfully requests the third device to respond to the group identifier by using the IP address carried in the response message or using the IP address and port number carried in the response message.
- the group data so that the third device sends the group data to the IP address.
- the third device sends the group data to the IP address and the port number.
- all the second devices (such as the second device UE2-1 and the second device UE2-2) that have requested the first device from the first device can receive the group data from the link corresponding to the layer 2 address.
- the third device does not need to separately send the group data to each second device, which improves data transmission efficiency.
- the first device receives a request message sent by at least one second device, where the request message carries a group identifier, and the first device returns a response message to the at least one second device.
- the response message carries a layer 2 address and an IP address corresponding to the group identifier; when receiving the group data sent by the third device to the IP address, the first device sends the layer 2 address The group data, such that the at least one second device can receive the group data from the layer 2 address.
- the first device sends the group data sent by the third device to the IP address to one or more second devices that request the group of data from the first device, which can improve data transmission efficiency.
- FIG. 6 is another schematic diagram of a data communication method according to an embodiment of the present invention.
- the data communication method may include the following steps.
- the first device may receive the request message of the one or more second devices, where the group identifiers carried in the request message sent by the multiple second devices to the first device are the same.
- the requesting terminal corresponding to the group data when it is first requested is referred to as “second device UE2-1”, and the requesting terminal corresponding to the group data is not called when first requested.
- the second device UE2-2 it is worth noting that the second device UE2-1 and the second device UE2-2 are used for description purposes only.
- the second device UE2-2 It may be a substitute for one or more second devices.
- the embodiment of the present invention is not limited.
- S600 The second device registers with the third device by using the first device.
- step S500 For specific technical details, refer to step S500 in the foregoing embodiment, and details are not described herein again.
- the IP address assigned by the first device to the second device UE2-1 is “first IP address”, and the second device UE2-1 is used for
- the port number of the group data to be requested is "first port number”.
- the second device UE2-1 requests the group data from the third device by using the first IP address and the first port number.
- the second device UE2-1 when the second device UE2-1 needs to acquire a certain group of data from the third device, if the group data is not requested by the other second device, if the group identifier corresponding to the group data is not monitored, Or the information corresponding to the group identifier, that is, the first device does not have the function of forwarding the group data before the second device UE2-1 establishes a communication connection for receiving the group data with the third device. Therefore, the second device UE2-1 establishes a communication connection for receiving the group data with the third device using the first IP address and the first port number, and the second device (including the second device UE2-1 and the second device UE2) -2) The group data distributed in unicast form can be received from the third device through the communication connection.
- the manner in which the second device UE2-1 and the third device establish the communication connection may be based on whether the first device supports ALG-NAT (Application Layer Gateways-Network Address Translation).
- ALG-NAT Application Layer Gateways-Network Address Translation
- the second device UE2-1 performs media negotiation with the third device to establish an application layer session, and the second device uses the IP address and port number for transmitting data through the application.
- the layer message is sent to the third device, and receives an application layer message of the IP address and the port number of the third device used by the third device to send data, so as to establish a second device and the third device for transmitting the unicast data.
- Communication connection Specifically, when the SIP message is used, the first IP address and the first port number are used as the IP address in the Session Description Protocol (SDP) message body in the Session Initiation Protocol (SIP) message.
- SDP Session Description Protocol
- SIP Session Initiation Protocol
- the port number, and the SIP message is sent to the third device to request the group data from the third device, and the second device UE2-1 establishes a communication connection with the third device for receiving the unicast distribution data.
- the second device UE2-1 and the third device can mutually exchange an IP address and a port number for receiving or transmitting the set of data by negotiation.
- the second device UE2-1 Using the first IP address and the first port number as a source IP address and a source port number of a data packet for transmitting application signaling, and sending the data packet to a third device, where the application signaling indicates the third device
- the second device is configured to transmit the IP address and the port number of the unicast data, request the third group device to request the group data, and establish a communication connection for transmitting the group data.
- the second device UE2-1 and the third device mutually exchange an IP address and a port number for receiving or transmitting the set of data by transmitting data packets.
- the second device UE2-1 may use the same IP address and different port numbers to transmit the group data and the application layer signaling message corresponding to the group identifier, and correspondingly, the same IP address and the same IP address may be used.
- the port number is used to transmit the group data and the application layer signaling message corresponding to the group identifier, wherein the transmission includes sending and/or receiving.
- the third device may use the same IP address and different port numbers to transmit the group data and the application layer signaling message corresponding to the group identifier, and correspondingly, the same IP address and the same port number may be used to transmit the
- the group identifies corresponding group data and application layer signaling messages, wherein the transmissions include transmission and/or reception.
- the embodiment of the present invention is not limited.
- the second device (such as UE2-1, UE2-2) needs to communicate with the network side through the first device, for example, acquiring a certain group of data from the third device, and therefore, the second device UE2-1 and the third device
- the first device converts the first IP address and the first port number used by the second device UE2-1 to request the group data to a third IP address and a first device used by the first device to receive the group of data.
- the three-port number wherein the first IP address may be a private network IP address, and the third IP address may be a public network IP address.
- the destination address of the data is converted into the first IP address and the first port number by NAT address translation. Further, the data can be transmitted to the second device UE2-1.
- the second device UE2-1 is used to receive the foregoing, regardless of whether the second device UE2-1 receives the group data and the application layer signaling message sent by the third device by using different port numbers.
- the IP address and the port number of the group data are respectively referred to as the first IP address and the first port number.
- the third device sends the group data and the application layer signaling message by using different port numbers.
- the IP address and port number used by the third device to transmit the group data are referred to as a fourth IP address and a fourth port number, respectively. It should be noted that “first”, “second”, “third” and “fourth” in the embodiments of the present invention are for the purpose of description only.
- the second device UE2-1 sends a first request message to the first device, where the first request message carries a group identifier.
- the second device UE2-1 sends a request message to the first device after the first device and the third device establish a communication connection for receiving the group data, so as to facilitate the description of the subsequent part, the present invention
- the embodiment is referred to as the first request message, and the group identifier carried in the first request message is used to identify the group data in step S601, where the first request message is used to request the first device to forward the The group identifies the corresponding group data.
- S603 The first device determines whether a context corresponding to the group identifier already exists.
- the first device determines whether the context corresponding to the group identifier exists, such as whether the layer 2 address and the second IP corresponding to the group identifier exist.
- the context corresponding to the group identifier exists, such as whether the layer 2 address and the second IP corresponding to the group identifier exist.
- the first device sends a second request message to the second device UE2-1, where the second request message carries the group identifier.
- the first device may determine that the second device UE2-1 sends the request message, and the context corresponding to the group identifier carried in the request message does not exist. Therefore, the first device sends the second device to the second device UE2. And a second request message, and carrying the group identifier in the second request message, so that the second device UE2-1 returns a first IP address and a first port number, where the first IP address and the first The port number is an IP address and port number used when the second device UE2-1 requests the group data from the third device.
- the second device UE2-1 sends a second response message to the first device, where the second response message carries the first IP address and the first port number.
- the second device separately transmits the group data and the application layer signaling message corresponding to the group identifier by using the same IP address and different port numbers (for example, receiving by using the IP address XX1 and the port number YY1)
- the group data corresponding to the group identifier is used to transmit the application layer signaling message corresponding to the group identifier by using the IP address XX1 and the port number ZZ1, where the transmission includes sending and receiving, and the specific embodiment of the present invention is not limited.
- the second device UE2-1 After receiving the second request message sent by the first device, the second device UE2-1 parses the group identifier carried by the second request message from the second request message, and obtains the first IP address corresponding to the group identifier.
- the address and the first port number, wherein the first IP address and the first port number are IP addresses and port numbers used by the second device UE2-1 to request the group data corresponding to the group identifier from the third device.
- the second device UE2-1 sends a second response message to the first device, where the The second response message carries the first IP address and the first port number. Therefore, when the first device receives the address-converted data packet, and the destination address of the data packet is the first IP address and the destination port number is the first port number, the packet is sent to one or more. Second device.
- the third device separately transmits the group data and the application layer signaling message corresponding to the group identifier by using the same IP address and different port numbers (for example, by using the IP address XX3 and the port number YY3) Sending the group data corresponding to the group identifier, and transmitting the application layer signaling message corresponding to the group identifier by using the IP address XX3 and the port number ZZ3, where the transmission includes sending and receiving, and specifically, the embodiment of the present invention does not limit
- the second device UE2-1 parses the group identifier carried by the second request message from the second request message, and obtains the first corresponding to the group identifier.
- An IP address, a first port number, a fourth IP address, and a fourth port number are when the second device UE2-1 requests the third device to the group data corresponding to the group identifier.
- the used IP address and port number, the fourth IP address and the fourth port number are the IP addresses and port numbers used by the third device to send the group data to the second device.
- the second device UE2-1 sends a second response message to the first device, where the second response message carries a first IP address, a first port number, a fourth IP address, and a fourth port number.
- the subsequent first device can receive the address-converted data packet, and the source address of the data packet is the fourth IP address, the source port number is the fourth port number, and the destination address is the first IP address and the destination port number.
- the packet is the first port number, it is sent to one or more second devices.
- the first device sends a first response message to the second device UE2-1, where the first response message carries a layer 2 address, a second IP address, and a second port number corresponding to the group identifier.
- the first device After receiving the second response message sent by the second device UE2-1, the first device allocates the layer 2 address, the second IP address, and the second port number corresponding to the group identifier according to the group identifier.
- the information that the first device allocates the layer 2 address, the IP address, the port number, and the like may include: the first device allocates the layer 2 address and the second IP address after receiving the second response message of the second device UE2-1 And information such as the second port number, or the first device presets some layer 2 address, IP address, port number, and the like, and after receiving the second response message of the second device UE2-1, from the preset information
- the information such as the layer 2 address, the IP address, and the port number is selected as the layer 2 address, the second IP address, and the second port number corresponding to the group identifier.
- the layer 2 address is used by the first device to use the layer 2 address to send the received data sent to the second device UE2-1 to all the second devices requesting to forward the group of data, thereby
- the second device UE2-1 monitors and receives the group data from the layer 2 address.
- the second device may set a default port number for receiving the group data, and therefore, the first response.
- the second port number in the message is optional.
- the first device After receiving the group data sent by the third device, the first device routes the group data to the second IP address and the second port number, so that the second IP address and the second port number are the first device. Destination IP address and destination port number used when sending the group data.
- the second IP address may be an IP multicast address, and the second IP address and the second port number are destination IP addresses and destination port numbers allocated by the first device to indicate the group data.
- the first response message sent by the first device to the second device UE2-1 may further carry the unicast hold identifier, so that the second device UE2-1 receives the first response message returned by the first device.
- the communication connection established in step S601 is maintained, whereby the second device UE2-1 keeps receiving the communication connection of the group data distributed in the unicast form from the third device.
- the first device In order for the first device to send the group data sent to the second device UE2-1 to all the second devices that send the first request message to the first device, and cause the second device to receive at the second IP address and the second port number. Group data.
- the first device when the first device receives the group data sent by the third device to the second device UE2-1, after the step, the first device should modify the NAT translation table or the routing table, specifically:
- the first device uses the NAT function to use the second device UE2-1 to request the group.
- the first IP address and the first port number of the data are converted into a third IP address and a third port number that the first device uses to receive the set of data. Therefore, when the first device receives the data sent to the third IP address and the third port number, it converts to the first IP address and the first port number by using the NAT address, and returns according to the second device UE2-1.
- the second response message modifies the destination address and the destination port number of the first IP address and the first port number of the data after the address conversion to the second IP address and the second port number; If the first response message does not include the port number, the port number of the data is not changed, that is, the first port number is still used, so that the data is routed to the second IP address and the second port number, or the second IP address and the first port number. .
- the first device may also modify the NAT translation table to achieve the foregoing purpose, and directly convert the address of the data sent to the third IP address and the third port number into a second IP address and a second port number. Forwarding, if the port number is not included in the first response message, the port number of the data is not changed, that is, converted into the second IP address and the first port number.
- the first device uses the NAT function to use the second device UE2-1 to request the group data.
- the first IP address and the first port number are converted into a third IP address and a third port number that the first device uses to receive the set of data. Therefore, when the first device receives the data sent to the third IP address and the third port number, it converts to the first IP address and the first port number by using the NAT address, and returns according to the second device UE2-1.
- the second response message, the data of the destination address and the destination port after the address conversion is changed to the first IP address and the first port number, and the source address and the source port number are the data of the fourth IP address and the fourth port number.
- the first device broadcasts information about the group identifier or the group identifier.
- the first device may forward the group data to be requested by the second device, and therefore, the first device may broadcast the group identifier. Or the information corresponding to the group identifier. Therefore, if there is another group device (such as the UE 2-2) that needs to request the group data corresponding to the group identifier from the first device, if the information corresponding to the group identifier or the group identifier is already monitored, The first device may forward the group of data, so the second device that subsequently requests the group of data may directly send the first request message to the first device to receive the group data without establishing a connection with the third device for receiving The communication connection of the group data.
- another group device such as the UE 2-2
- the first response message may further include an update timer corresponding to the group identifier, and the newly set update timers each have a preset duration, so that the update timer may be used to indicate The remaining duration of the broadcast of the group identifier.
- the second device needs to resend the request message to the first device, and the first device performs step S601; otherwise, the first device Stop transferring the data of the group, and delete the context and other information in the request, thereby effectively reducing the power consumption of the terminal and improving the service life.
- the second device monitors information about the group identifier or the group identifier.
- the second device may listen to the group identifier or the information corresponding to the group identifier, so that the first device can be forwarded.
- the group data corresponding to the group identifier sent by the three devices.
- the second device UE2-2 sends a first request message to the first device, where the first request message carries the group identifier.
- the second device UE2-2 has listened to the group identifier or the information corresponding to the group identifier that is broadcast by the first device when the second device UE2-2 needs to request the group data. Therefore, the second device UE2-2 Before the first request message is sent to the first device, there is no need to establish a communication connection with the third device for receiving the group data. It is to be noted that the group identifier carried in the first request message sent by the second device UE2-2 and the second device UE2-1 is the same. For specific technical details, refer to step S602, and details are not described herein again.
- the first device determines whether a context corresponding to the group identifier exists.
- the first device determines whether the context corresponding to the group identifier exists, such as whether the layer 2 address and the second IP corresponding to the group identifier exist.
- the context corresponding to the group identifier exists, such as whether the layer 2 address and the second IP corresponding to the group identifier exist.
- the first device sends a first response message to the second device UE2-2, where the first response message carries a layer 2 address, a second IP address, and a second port number corresponding to the group identifier.
- the second device UE2-1 before the second device UE2-2 sends the first request message to the first device, the second device UE2-1 sends the first request message to the first device, and the first The device has been allocated information such as the layer 2 address and the second IP address corresponding to the group identifier in the first request message. Therefore, after receiving the first request message sent by the second device UE2-2, the first device may determine The context corresponding to the group ID already exists.
- the first device after the first device receives the first request message sent by the second device, if it is determined that the context corresponding to the group identifier carried in the first request message exists, the first device directly obtains the corresponding group identifier. a layer 2 address, a second IP address, and a second port number, and returning a first response message to the second device, where the first response message carries the acquired layer 2 address, the second IP address, and the second port number .
- the second port number is optional.
- the first device receives the group data that is sent by the third device to the second device UE2-1.
- the first device when the first device receives the address translated IP address and the destination end When the slogan is the data of the first IP address and the first port number respectively, or when the first device receives the address translated, the destination IP address and the destination port number are respectively the first IP address, the first port number, and the source IP address.
- the first device routes the data packet to the second IP according to the setting of the first device after returning the first response message in step S606.
- the address and the second port number if the first response message does not include the second port number, only the destination IP address of the received data is modified to be the second IP address.
- the first device sends the group data by using the layer 2 address.
- the second device UE2-1 and the second device UE2-2 request the first device to obtain the group data, where the second device UE2-2 may be one or more second devices.
- the embodiment of the present invention is not limited.
- the data link layer transmits the group data.
- one or more second devices that have received the first response message from the first device can listen to and receive the group data from the layer 2 address, and the first device implements unicast data to multicast. Relay of data.
- the first device receives a first request message sent by the at least one second device, where the first request message is used to request the first device to forward group data, where the request message is Carrying a group identifier; the first device returns a first response message to the at least one second device, where the first response message carries a layer 2 address and an IP address corresponding to the group identifier; The first device transmits the group data using the layer 2 address to the group of data of one of the at least one second device.
- the first device sends the group data sent by the third device to one of the second devices to one or more second devices that request the group of data from the first device, which can improve data transmission efficiency.
- the embodiment does not limit the order in which the second device UE2-1 and the third device establish a communication connection for receiving group data, that is, the second device UE2-1 may establish and third before issuing the first request message.
- the communication connection of the device for transmitting the group data when receiving the second request message sent by the first device, returning the second response message according to the established communication connection; or after receiving the second request message Establishing a communication connection with the third device for transmitting the group data, and returning the second response message after completing the communication establishment.
- the embodiment of the present invention is not limited.
- the device embodiment of the present invention is the same as the method embodiment of the present invention, and is used to perform the method described in the method embodiment of the present invention.
- the device embodiment of the present invention only shows a part related to the device embodiment of the present invention.
- details of the technical details please refer to the description of the method embodiment of the present invention, and details are not described herein again.
- FIG. 7 , FIG. 8 and FIG. 9 correspond to the first device in the foregoing embodiment.
- FIG. 1 , FIG. 2 , FIG. 2 a The described method embodiment; the device referred to in the embodiment described in FIG. 10, FIG. 11 and FIG. 12 corresponds to the second device in the above embodiment.
- FIG. 3, FIG. 4, FIG. 4a The described method embodiments are not described herein again.
- FIG. 7 is a schematic structural diagram of a device according to an embodiment of the present invention.
- the device may include: a first receiving module 101, a first returning module 102, and a first sending module 103. .
- the first receiving module 101 is configured to receive a request message sent by the at least one second device, where the request message is used to request the device to forward group data, where the request message carries a group identifier.
- the first returning module 102 is configured to return a response message to the at least one second device, where the response message carries a layer 2 address and an IP address corresponding to the group identifier.
- the first sending module 103 is configured to send the group data by using the layer 2 address when receiving the group data sent by the third device to the IP address.
- the first device receives a request message sent by the at least one second device, where the request message is used to request the first device to forward group data, where the request message carries a group identifier;
- the first device returns a response message to the at least one second device, where the response message carries a layer 2 address and an IP address corresponding to the group identifier; when receiving the group data sent by the third device to the IP address
- the first device transmits the group data using the layer 2 address.
- the first device sends the group data by using the layer 2 address, so that one or more second devices that have requested the group data from the first device may be from the layer 2
- the group data is received at the address to improve data transmission efficiency.
- FIG. 8 is another schematic structural diagram of an apparatus according to an embodiment of the present invention.
- the device may include: a determining module 201, an allocating module 202, and an obtaining module, in addition to the first receiving module 101, the first returning module 102, and the first sending module 103, which are described in the foregoing embodiments. 203 and broadcast module 204.
- the IP address is an IP address allocated by the device for the at least one second device to request the group data from the third device.
- the response message further carries a port number corresponding to the group identifier, where the port number is allocated by the first device for the at least one second device to the first The three devices request the port number of the group data.
- the device may further include a determining module 201 and an allocating module 202, where the determining module 201 is configured to determine whether the first receiving module 101 receives the request message sent by the at least one second device, The context corresponding to the group identifier already exists.
- the allocating module 202 is configured to allocate the layer 2 address and the IP address corresponding to the group identifier if the context does not exist, where the response message returned by the first returning module carries the allocation by the allocation module The layer 2 address and the IP address.
- the device may further include: an obtaining module 203, configured to acquire the layer 2 address and the IP address corresponding to the group identifier if the context exists; wherein, the first The response message returned by the returning module 102 carries the layer 2 address and the IP address obtained by the acquiring module.
- an obtaining module 203 configured to acquire the layer 2 address and the IP address corresponding to the group identifier if the context exists; wherein, the first The response message returned by the returning module 102 carries the layer 2 address and the IP address obtained by the acquiring module.
- the response message returned by the first returning module 102 further carries a unicast indication identifier, so that the at least one second device uses the IP address to the The third device requests the group of data.
- the first receiving module 101 is further configured to: after the first returning module 102 returns a response message to the at least one second device, receive the first message sent by the target second device, where The target second device is a second device that does not listen to the information corresponding to the group identifier or the group identifier in the at least one second device, where the first message is that the target second device succeeds in The message that is sent after the third device requests the group of data; the determining module 201 is further configured to: determine whether the first message is received for the first time; the first returning module 102 is further configured to: if the first device belongs to the first time Receiving the first message, returning a second message to the target second device, so that the any second device maintains a communication connection with the third device for receiving the group data.
- the first returning module 102 is further configured to: if the first device does not belong to the first message, return a third message to the target second device, so that The target second device releases a communication connection with the third device for receiving the group of data.
- the device may further include a broadcast module 204, configured to broadcast the group identifier or broadcast after the first return module returns the second message to the target second device.
- the group identifies corresponding information.
- the first device receives a request message sent by the at least one second device, where the request message is used to request the first device to forward group data, where the request message carries a group identifier;
- the first device returns a response message to the at least one second device, where the response message carries a layer 2 address and an IP address corresponding to the group identifier; when receiving the group data sent by the third device to the IP address
- the first device transmits the group data using the layer 2 address.
- the first device sends the group data by using the layer 2 address, so that one or more second devices that have requested the group data from the first device may be from the layer 2
- the group data is received at the address to improve data transmission efficiency.
- FIG. 9 is another schematic structural diagram of an apparatus according to an embodiment of the present invention.
- the apparatus includes a memory 10 and a processor 20.
- the memory 10 and the processor 20 are connected by a bus 12. .
- the memory 10 stores instructions for implementing the data communication method by the first device, and the processor 20 retrieves and executes the instructions in the memory 10 to implement the data communication method processed by the first device.
- the technical principles and technical effects of the device may be referred to the related descriptions of the first device in the embodiments shown in FIG. 1 , FIG. 2 , FIG. 2 , FIG. 7 , and FIG. 8 , and details are not described herein again.
- FIG. 10 is a schematic structural diagram of another apparatus according to an embodiment of the present invention.
- the device may include: a second sending module 301, a second receiving module 302, and a third receiving. Module 303.
- the second sending module 301 is configured to send a request message to the first device, where the request message is used to request the first device to forward group data, where the request message carries a group identifier.
- a second receiving module 302 configured to receive a response message returned by the first device, where the response is And carrying the layer 2 address and the IP address corresponding to the group identifier, where the first device is configured to receive the request message sent by the at least one device, and send the third device to the IP address.
- the group data is transmitted using the layer 2 address.
- the third receiving module 303 is configured to receive the group data from the layer 2 address.
- the second device sends a request message to the first device, where the request message carries a group identifier, and the second device receives a response message returned by the first device, where the response message carries a group identifier corresponding to a layer 2 address and an IP address; wherein, when the first device receives the group data sent by the third device to the IP address, the group device sends the group data using a layer 2 address; the second device receives the layer 2 address The group data.
- the first device forwards the group data sent by the third device to the IP address by using the layer 2 address, so that one or more second devices that have requested the group data from the first device are The group data can be received from the layer 2 address, which can improve data transmission efficiency.
- FIG. 11 is a schematic structural diagram of another apparatus according to an embodiment of the present invention.
- the device includes the second sending module 301 and the second receiving, which are described in the foregoing embodiments.
- the module 302 and the third receiving module 303 may further include: a requesting module 401, a holding module 402, and a releasing module 403.
- the response message further carries a port number corresponding to the group identifier, where the IP address and the port number are allocated by the first device for the device request The IP address and port number of the group data.
- the device may further include a requesting module 401, after the second receiving module 302 receives the response message returned by the first device, using the IP address to the third device. Requesting the group data; or requesting the group data from the third device using the IP address and the port number.
- the requesting module 401 requests the group data from the third device; or, if The response message also carries a unicast indication identifier, and the requesting module 401 requests the group data from the third device.
- the second sending module 301 is further configured to: after requesting the module 401 to successfully request the group data from the third device, send the first message to the first device; 402.
- the method is configured to: if receiving the second message returned by the first device, maintaining a communication connection with the third device for receiving the group data; and releasing the module 403, if the first device is received The returned third message releases a communication connection with the third device for receiving the group of data.
- the requesting module 401 is specifically configured to:
- IP address and/or the port number as a source IP address and/or a source port number of a data packet for transmitting application signaling, and transmitting the data packet to the third device to Three devices request the group data; or,
- the group data is requested from the third device.
- the second device sends a request message to the first device, where the request message carries a group identifier, and the second device receives a response message returned by the first device, where the response message carries a group identifier corresponding to a layer 2 address and an IP address; wherein, when the first device receives the group data sent by the third device to the IP address, the group device sends the group data using a layer 2 address; the second device receives the layer 2 address The group data.
- the first device forwards the group data sent by the third device to the IP address by using the layer 2 address, so that one or more second devices that have requested the group data from the first device are The group data can be received from the layer 2 address, which can improve data transmission efficiency.
- FIG. 12 is a schematic structural diagram of another apparatus according to an embodiment of the present invention.
- the device includes a memory 30 and a processor 40.
- the memory 30 and the processor 40 are connected by a bus 34. .
- the memory 30 stores instructions for implementing the data communication method by the second device, and the processor 40 retrieves and executes the instructions in the memory 30 to implement the data communication method processed by the second device.
- the technical principles and technical effects of the device may be referred to the related descriptions of the second device in the embodiments shown in FIG. 3, FIG. 4, FIG. 4a, FIG. 10, and FIG.
- the program may be stored in a computer readable storage medium, and the storage medium may include: Flash disk, Read-Only Memory (ROM), Random Access Memory (RAM), disk or optical disk.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Mobile Radio Communication Systems (AREA)
- Small-Scale Networks (AREA)
Abstract
本发明实施例提供了一种数据通信方法,第一设备接收至少一个第二设备发送的请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;当接收到第三设备发送至所述IP地址的所述组数据时,所述第一设备使用所述层2地址发送所述组数据。相应的,本发明实施例还提供了一种设备。采用本发明实施例,第一设备将第三设备发送给所述IP地址的所述组数据发送给向第一设备请求了该组数据的一个或多个第二设备,可以提高数据传输效率。
Description
本发明涉及通信技术领域,尤其涉及一种数据通信方法及终端。
在传统的移动网络中,当某用户设备(User Equipment,UE)失去网络覆盖时(如发生地震等紧急情况),可以采用存在网络覆盖的用户设备作为中继,实现已失去网络覆盖的用户设备与网络侧的通信。
为方便理解,请参见图1a,图1a是现有技术提供的其中一种网络架构示意图。在该示意图中,Remote UE为失去网络覆盖的用户设备(为方便说明,简称为远程终端),Relay UE为存在网络覆盖的用户设备(为方便说明,简称为中继终端),其中,中继终端可以同时为多个远程终端做中继。现有方法中,当存在多个远程终端需要向服务器请求获取某个相同的组数据时,每个远程终端需分别与服务器建立请求和接收该组数据的单播通信连接,服务器分别基于该单播通信连接向每个远程终端发送所请求的组数据,由于服务器与远程终端之间进行信息交互时需通过中继终端中转,从而,相同的组数据在Uu接口上重复传输,这无疑降低了数据传输效率。
发明内容
本发明提供了一种数据通信方法及设备,可以提高数据传输效率。
第一方面,本发明实施例提供一种数据通信方法,包括:
第一设备接收至少一个第二设备发送的请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;
所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;
当接收到第三设备发送至所述IP地址的所述组数据时,所述第一设备使用所述层2地址发送所述组数据。
结合第一方面,在第一方面的第一种可能的实现方式中,所述IP地址为
所述第一设备分配的用于所述至少一个第二设备向所述第三设备请求所述组数据的IP地址。
结合第一方面,在第一方面的第二种可能的实现方式中,所述响应消息还携带所述组标识对应的端口号;所述端口号为所述第一设备分配的用于所述至少一个第二设备向所述第三设备请求所述组数据的端口号。
结合第一方面,在第一方面的第三种可能的实现方式中,所述第一设备接收至少一个第二设备发送的请求消息之后,所述方法还包括:
所述第一设备判断是否已存在所述组标识对应的上下文;
若否,所述第一设备分配所述组标识对应的所述层2地址和所述IP地址;
所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址,包括:
所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所分配的所述层2地址和所述IP地址。
结合第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,所述方法还包括:
若存在所述上下文,所述第一设备获取所述组标识对应的所述层2地址和所述IP地址;
所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址,包括:
所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所获取的所述层2地址和所述IP地址。
结合第一方面的第三种可能的实现方式,在第一方面的第五种可能的实现方式中,所述方法还包括:
若不存在所述上下文,所述响应消息还携带单播指示标识,以使所述至少一个第二设备使用所述IP地址向所述第三设备请求所述组数据。
结合第一方面或第一方面的上述任意一种可能的实现方式,在第一方面的第六种可能的实现方式中,所述第一设备向所述至少一个第二设备返回响应消息之后,所述方法还包括:
所述第一设备接收目标第二设备发送的第一消息;其中,所述目标第二设
备为所述至少一个第二设备中未监听到所述组标识或所述组标识对应的信息的第二设备,所述第一消息为所述目标第二设备成功向所述第三设备请求所述组数据后发送的消息;
若所述第一设备属于首次接收所述第一消息,则所述第一设备向所述目标第二设备返回第二消息,以使所述目标第二设备保持与所述第三设备用于接收所述组数据的通信连接。
结合第一方面的第六种可能的实现方式,在第一方面的第七种可能的实现方式中,所述方法还包括:
若所述第一设备不属于首次接收所述第一消息,则所述第一设备向所述目标第二设备返回第三消息,以使所述目标第二设备释放与所述第三设备用于接收所述组数据的通信连接。
结合第一方面的第六种可能的实现方式,在第一方面的第八种可能的实现方式中,所述第一设备向所述目标第二设备返回所述第二消息之后,所述方法还包括:
所述第一设备广播所述组标识或广播所述组标识对应的信息。
第二方面,本发明实施例提供一种数据通信方法,包括:
第二设备向第一设备发送请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;
所述第二设备接收所述第一设备返回的响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;其中,所述第一设备用于接收至少一个第二设备发送的请求消息,并在接收到第三设备发送至所述IP地址的所述组数据时,使用所述层2地址发送所述组数据;
所述第二设备从所述层2地址上接收所述组数据。
结合第二方面,在第二方面的第一种可能的实现方式中,所述响应消息还携带所述组标识对应的端口号;其中,所述IP地址和所述端口号为所述第一设备分配的用于所述第二设备请求所述组数据的IP地址和端口号。
结合第二方面或第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述第二设备接收所述第一设备返回的响应消息之后,所述方法还包括:
所述第二设备使用所述IP地址向所述第三设备请求所述组数据;或者,
所述第二设备使用所述IP地址和所述端口号向所述第三设备请求所述组数据。
结合第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述第二设备向所述第三设备请求所述组数据,包括:
若所述第二设备未监听到所述组标识或所述组标识对应的信息,所述第二设备向所述第三设备请求所述组数据;或者,
若所述响应消息还携带单播指示标识,所述第二设备向所述第三设备请求所述组数据。
结合第二方面的第二种或第三种可能的实现方式,在第二方面的第四种可能的实现方式中,所述第二设备成功向所述第三设备请求所述组数据之后,所述方法还包括:
所述第二设备向所述第一设备发送第一消息;
若接收到所述第一设备返回的第二消息,所述第二设备保持与所述第三设备用于接收所述组数据的通信连接;
若接收到所述第一设备返回的第三消息,所述第二设备释放与所述第三设备用于接收所述组数据的通信连接。
结合第二方面的第二种或第三种可能的实现方式,在第二方面的第五种可能的实现方式中,所述第二设备向所述第三设备请求所述组数据,包括:
将所述IP地址和/或所述端口号作为传输应用信令的数据包的源IP地址和/或源端口号,并将所述数据包发送给所述第三设备,以向所述第三设备请求所述组数据;或者,
将所述IP地址和/或所述端口号作为会话初始协议SIP消息中的会话描述协议SDP消息体中的IP地址和/或端口号,并将所述SIP消息发送给所述第三设备,以向所述第三设备请求所述组数据。
第三方面,本发明实施例提供一种设备,包括:
第一接收模块,用于接收至少一个第二设备发送的请求消息,所述请求消息用于请求所述设备转发组数据,所述请求消息携带组标识;
第一返回模块,用于向所述至少一个第二设备返回响应消息,所述响应消
息携带所述组标识对应的层2地址和IP地址;
第一发送模块,用于当接收到第三设备发送至所述IP地址的所述组数据时,使用所述层2地址发送所述组数据。
结合第三方面,在第三方面的第一种可能的实现方式中,所述IP地址为所述设备分配的用于所述至少一个第二设备向所述第三设备请求所述组数据的IP地址。
结合第三方面,在第三方面的第二种可能的实现方式中,所述响应消息还携带所述组标识对应的端口号;所述端口号为所述第一设备分配的用于所述至少一个第二设备向所述第三设备请求所述组数据的端口号。
结合第三方面,在第三方面的第三种可能的实现方式中,所述设备还包括:
判断模块,用于所述第一接收模块接收至少一个第二设备发送的请求消息之后,判断是否已存在所述组标识对应的上下文;
分配模块,用于若不存在所述上下文,分配所述组标识对应的所述层2地址和所述IP地址;
其中,所述第一返回模块返回的响应消息携带所述分配模块所分配的所述层2地址和所述IP地址。
结合第三方面的第三种可能的实现方式,在第三方面的第四种可能的实现方式中,所述设备还包括:
获取模块,用于若存在所述上下文,获取所述组标识对应的所述层2地址和所述IP地址;
其中,所述第一返回模块返回的响应消息携带所述获取模块所获取的所述层2地址和所述IP地址。
结合第三方面的第三种可能的实现方式,在第三方面的第五种可能的实现方式中,若不存在所述上下文,所述第一返回模块返回的响应消息还携带单播指示标识,以使所述至少一个第二设备使用所述IP地址向所述第三设备请求所述组数据。
结合第三方面或第三方面的上述任意一种可能的实现方式,在第三方面的第六种可能的实现方式中,所述第一接收模块还用于,所述第一返回模块向所述至少一个第二设备返回响应消息之后,接收目标第二设备发送的第一消息;
其中,所述目标第二设备为所述至少一个第二设备中未监听到所述组标识或所述组标识对应的信息的第二设备,所述第一消息为所述目标第二设备成功向所述第三设备请求所述组数据后发送的消息;
所述第一返回模块还用于,若所述第一设备属于首次接收所述第一消息,向所述目标第二设备返回第二消息,以使所述目标第二设备保持与所述第三设备用于接收所述组数据的通信连接。
结合第三方面的第六种可能的实现方式,在第三方面的第七种可能的实现方式中,所述第一返回模块还用于,若所述第一设备不属于首次接收所述第一消息,向所述目标第二设备返回第三消息,以使所述目标第二设备释放与所述第三设备用于接收所述组数据的通信连接。
结合第三方面的第六种可能的实现方式,在第三方面的第八种可能的实现方式中,所述设备还包括:
广播模块,用于所述第一返回模块向所述目标第二设备返回所述第二消息之后,广播所述组标识或广播所述组标识对应的信息。
第四方面,本发明实施例提供一种设备,包括:
第二发送模块,用于向第一设备发送请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;
第二接收模块,用于接收所述第一设备返回的响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;其中,所述第一设备用于接收至少一个所述设备发送的请求消息,并在接收到第三设备发送至所述IP地址的所述组数据时,使用所述层2地址发送所述组数据;
第三接收模块,用于从所述层2地址上接收所述组数据。
结合第四方面,在第四方面的第一种可能的实现方式中,所述响应消息还携带所述组标识对应的端口号;其中,所述IP地址和所述端口号为所述第一设备分配的用于所述设备请求所述组数据的IP地址和端口号。
结合第四方面或第四方面的第一种可能的实现方式,在第四方面的第二种可能的实现方式中,所述设备还包括:
请求模块,用于所述第二接收模块接收所述第一设备返回的响应消息之后,使用所述IP地址向所述第三设备请求所述组数据;或者,使用所述IP地
址和所述端口号向所述第三设备请求所述组数据。
结合第四方面的第二种可能的实现方式,在第四方面的第三种可能的实现方式中,若所述设备未监听到所述组标识或所述组标识对应的信息,所述请求模块向所述第三设备请求所述组数据;或者,
若所述响应消息还携带单播指示标识,所述请求模块向所述第三设备请求所述组数据。
结合第四方面的第二种或第三种可能的实现方式,在第四方面的第四种可能的实现方式中,所述第二发送模块,还用于所述请求模块成功向所述第三设备请求所述组数据之后,向所述第一设备发送第一消息;
所述设备还包括:
保持模块,用于若接收到所述第一设备返回的第二消息,保持与所述第三设备用于接收所述组数据的通信连接;
释放模块,用于若接收到所述第一设备返回的第三消息,释放与所述第三设备用于接收所述组数据的通信连接。
结合第四方面的第二种或第三种可能的实现方式,在第四方面的第五种可能的实现方式中,所述请求模块具体用于:
将所述IP地址和/或所述端口号作为传输应用信令的数据包的源IP地址和/或源端口号,并将所述数据包发送给所述第三设备,以向所述第三设备请求所述组数据;或者,
将所述IP地址和/或所述端口号作为会话初始协议SIP消息中的会话描述协议SDP消息体中的IP地址和/或端口号,并将所述SIP消息发送给所述第三设备,以向所述第三设备请求所述组数据。
第五方面,本发明实施例提供一种设备,包括存储器和处理器,所述存储器和所述处理器通过总线连接,所述存储器中保存有实现如第一方面所述的数据通信方法的指令,所述处理器调取并执行所述存储器中的指令,实现如第一方面所述的数据通信方法。
第六方面,本发明实施例提供一种设备,包括存储器和处理器,所述存储器和所述处理器通过总线连接,所述存储器中保存有实现如第二方面所述的数据通信方法的指令,所述处理器调取并执行所述存储器中的指令,实现如第二
方面所述的数据通信方法。
实施本发明实施例,第一设备接收至少一个第二设备发送的请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;当接收到第三设备发送至所述IP地址的所述组数据时,所述第一设备使用所述层2地址发送所述组数据。采用本发明实施例,第一设备使用所述层2地址发送所述组数据,从而,已向所述第一设备请求了该组数据的一个或多个第二设备均可以从所述层2地址上接收所述组数据,提高数据传输效率。
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1a是现有技术提供的其中一种网络架构示意图;
图1是本发明实施例提供的一种数据通信方法的流程示意图;
图2是本发明实施例提供的一种数据通信方法的另一流程示意图;
图2a是本发明实施例提供的一种数据通信方法的另一流程示意图;
图3是本发明实施例提供的一种数据通信方法的又一流程示意图;
图4是本发明实施例提供的一种数据通信方法的再一流程示意图;
图4a是图4提供的其中一种数据通信方法的流程示意图;
图5是本发明实施例提供的一种数据通信方法的交互示意图;
图6是本发明实施例提供的一种数据通信方法的另一交互示意图;
图7是本发明实施例提供的一种设备的结构示意图;
图8是本发明实施例提供的一种设备的另一结构示意图;
图9是本发明实施例提供的一种设备的又一结构示意图;
图10是本发明实施例提供的一种设备的再一结构示意图;
图11是本发明实施例提供的一种设备的再一结构示意图;
图12是本发明实施例提供的一种设备的再一结构示意图。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明提供了一种数据通信方法及设备,第一设备接收至少一个第二设备发送的请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;当接收到第三设备发送至所述IP地址的所述组数据时,所述第一设备使用所述层2地址发送所述组数据。采用本发明实施例,当存在至少一个第二设备需要从第三设备上获取相同的组数据时,只需所述至少一个第二设备中的其中一个第二设备与第三设备存在用于接收该组数据的单播通信连接,第一设备将第三设备发送给该第二设备的组数据转发给需要获取该组数据的至少一个第二设备,从而,可以提高数据传输效率。
值得说明的是,本发明实施例中的术语“第一设备”、“第二设备”和“第三设备”仅用于描述目的,其中,“第二设备”为需要获取数据的设备,如第二设备可以是失去网络覆盖的远程终端;“第一设备”为用于中转数据的设备,如第一设备可以是中继终端;“第三设备”为提供数据的设备,如第三设备可以是服务器。具体实现中,第一设备为存在网络覆盖的设备,第二设备可以是失去网络覆盖的设备,也可以是存在网络覆盖的设备,具体的,本发明实施例不作任何限制,只要是基于本发明实施例的处理流程进行数据通信的方法均属于本发明实施例的保护范围。下面将结合附图1-附图12对本发明实施例提供的一种数据通信方法及终端分别进行详细介绍。
请参见图1,图1是本发明实施例提供的一种数据通信方法的流程示意图,本发明实施例中,该数据通信方法可以包括以下步骤。
S101:第一设备接收至少一个第二设备发送的请求消息,所述请求消息用
于请求所述第一设备转发组数据,所述请求消息携带组标识。
具体实现中,第二设备可以是失去网络覆盖的设备,当然,具体实现中并不限于该类设备,也可以是存在网络覆盖的设备,具体的,本发明实施例不作限制,但值得说明的是,第一设备是存在网络覆盖的设备。
本发明实施例中,第二设备通过第一设备与网络侧进行数据通信,如从第三设备上获取某一组数据等。具体实现中,第二设备需要从第三设备上获取某一组数据时,会向第一设备发送请求消息,且在该请求消息中携带所要获取的组数据对应的组标识。从而,第一设备接收至少一个第二设备发送的请求消息,所述请求消息携带所述第二设备需要获取的组数据对应的组标识,以使第一设备接收到第三设备发送的所述组数据进行转发。为方便描述,本发明实施例中将请求同一组数据的一个或多个第二设备称作一组第二设备,换句话说,所述至少一个第二设备为一组第二设备,第一设备接收该组第二设备的请求消息,该请求消息中携带相同的组标识。值得说明的是,所述至少一个第二设备可以是一个第二设备,也可以是多个第二设备,第三设备可以是组服务器(Application Server,AS)或其他可以发送组数据的设备,具体的,本发明实施例不作限制。
为方便理解,以至少两个第二设备为例,则这至少两个第二设备所发送的请求消息中所携带的组标识相同,即该至少两个第二设备请求同一组数据。其中,组标识是用来唯一标识一个组数据的,具体实现中,该组标识可以是TMGI(Temporary Mobile Group Identity,临时移动组标识)、应用层标识等能够标识组数据的其它信息,具体的,本发明实施例不作限制。为方便理解,特举例如,假设第三设备可以提供3个组数据,分别为“组数据一”、“组数据二”和“组数据三”,其对应的组标识分别为“A”、“B”、“C”,若某第二设备发送的请求消息中携带的组标识为“A”,则说明该第二设备希望可以监听到第三设备发送过来的“组数据一”;若某第二设备发送的请求消息中携带的组标识为“B”,则说明该第二设备希望可以监听到第三设备发送过来的“组数据二”;若某第二设备发送的请求消息中携带的组标识为“C”,则说明该第二设备希望可以监听到第三设备发送过来的“组数据三”。值得说明的是,该特定举例仅用于描述目的,并不能用于限定本发明之保护范围。
S102:所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址。
第一设备接收到第二设备发送的请求消息后,可以根据该请求消息中携带的组标识自动返回该组标识对应的响应消息,其中,响应消息中携带有与该组标识对应的层2地址和IP地址。在可选实施例中,第一设备接收到第二设备发送的请求消息后,还可以是根据该请求消息中携带的组标识去获取与该组标识对应的相关参数之后,例如,相关参数包括层2地址和IP地址,再向发送该请求消息的第二设备返回响应消息,其中,响应消息中携带了该层2地址和IP地址。具体的,本发明实施例不作限制。本发明实施例中,层2地址用于向第二设备转发组数据,以使得第二设备从该层2地址相关的链路上接收所述组数据,IP地址为所述第一设备分配的用于所述第二设备向所述第三设备请求所述组数据的IP地址。第二设备接收到第一设备返回的响应消息后,可以使用该响应消息中携带的IP地址向第三设备请求该组标识对应的组数据。
作为一种可行的实施方式,第一设备可以预先保存各组标识及组标识对应的参数信息,其中,所述组标识对应的参数信息包括组标识对应的层2地址和IP地址。当第一设备接收到第二设备发送的请求消息后,根据该请求消息中携带的组标识直接获取与该组标识对应的层2地址和IP地址,并在返回给该第二设备的响应消息中携带该层2地址和IP地址,以使第二设备获知可以在该层2地址上接收或监听所要获取的组数据。同时,第二设备还可以使用IP地址向第三设备请求该组标识对应的组数据,其中,至少一个第二设备中至少存在一个第二设备使用该IP地址成功向第三设备请求该组标识对应的组数据,从而,第一设备可以接收到第三设备发送给IP地址的组数据,同时,第三设备无需分别向每个第二设备均发送所述组数据。
作为另一种可行的实施方式,第一设备接收到第二设备发送的请求消息后,判断是否属于首次接收携带该组标识的请求消息,若是,则为该组标识分配层2地址和IP地址;若否,则直接去获取该组标识对应的层2地址和IP地址,其中,该层2地址和IP地址为第一设备针对首次接收到所述请求消息时所分配的层2地址和IP地址;获取到组标识对应的层2地址和IP地址后,第一设备向第二设备返回响应消息,其中,所返回的响应消息携带该层2地址和
IP地址。本发明实施例中,第一设备接收到第二设备发送的请求消息后,若属于是首次接收携带该组标识的请求消息,则不存在该组标识对应的层2地址和IP地址,否则,存在该组标识对应的层2地址和IP地址。因此,在可选实施例中,可以通过查看是否已存在该组标识对应的上下文的方式来判断是否属于首次接收所述请求消息,其中,该组标识对应的上下文可以是组标识对应的层2地址、IP地址等信息,具体的,本发明实施例不作限制。若不存在该组标识对应的上下文,则说明第一设备属于首次接收携带该组标识的请求消息,因此,为该组标识分配层2地址和IP地址等信息;若存在该组标识对应的上下文,则说明第一设备不属于首次接收所述请求消息,因此,直接获取首次接收该请求消息时所分配的层2地址和IP地址等信息。值得说明的是,具体实现中,还可以通过设置预设标识的方式来判断第一设备是否属于首次接收所述请求消息。例如,假设采用“False”和“Ture”的表达方式来分别表示“首次”和“非首次”,则具体实现中,可以将预设标识默认设置为“False”,当第一设备接收到请求消息后,获取该请求消息的组标识所对应的预设标识,若预设标识为“False”,则说明第一设备属于首次接收该组标识对应的请求消息,同时,将预设标识从“False”更新为“Ture”;若获取到预设标识为“Ture”,则说明第一设备不属于首次接收该组标识对应的请求消息。值得说明的是,具体实现中还可以是其它方式来判断是否属于首次接收所述请求消息,本发明实施例对此不做限制。本发明实施例中,第一设备判断出属于首次接收所述请求消息之后,为组标识分配层2地址、IP地址等信息包括:第一设备在收到第二设备的请求消息后分配层2地址、IP地址等信息;或第一设备预置了层2地址、IP地址等信息,当收到第二设备的请求消息后,从预置的信息中选择一组层2地址、IP地址等信息。具体的,本发明实施例不作限制。
在可选实施例中,所述响应消息还可以携带所述组标识对应的端口号;其中,所述端口号为所述第一设备分配的用于所述第二设备向第三设备请求或接收所述组数据的端口号。从而,第二设备可以使用第一设备分配的IP地址和端口号向第三设备请求该组标识对应的组数据。值得说明的是,第二设备请求或接收所述组数据的端口号可以由第一设备在响应消息中指定,也可以由第二设备或第三设备预先设置,本发明实施例对此不做限制。为方便理解,例如,
假设第二设备请求“组数据一”时会默认使用端口号X1;当第二设备向第一设备发送的请求消息中携带的组标识为“A”时,若第一设备返回的响应消息中未携带端口号,则第二设备使用IP地址和端口号X1向第三设备请求“组数据一”;若第一设备返回的响应消息中携带了端口号,则第二设备使用IP地址和端口号向第三设备请求“组数据一”。
S103:当接收到第三设备发送至所述IP地址的所述组数据时,所述第一设备使用所述层2地址发送所述组数据。
第二设备接收到第一设备返回的响应消息后,可以使用响应消息中携带的IP地址向第三设备请求所述组标识对应的组数据,从而,第三设备将所述组数据发送给IP地址。当第一设备接收到第三设备发送至所述IP地址的组数据时,使用层2地址向所述至少一个第二设备发送所述组数据,因此,已向第一设备请求该组数据的全部第二设备均可以从层2地址对应的链路上接收到该组数据,第三设备无需分别向每个第二设备传输所述组数据,提高了数据传输效率。
在可选实施方式中,所述至少一个第二设备中存在一个第二设备接收到第一设备返回的响应消息后使用IP地址成功向第三设备请求了所述组数据,从而,第三设备向该IP地址发送所请求的组数据。第一设备接收到第三设备发送给该IP地址的组数据时,使用所述层2地址发送所述组数据,以使发送了该请求消息、且接收到响应消息的全部第二设备均可以从响应消息中所包含的层2地址上监听并接收到该组标识对应的组数据。
在本发明实施例描述的数据通信方法中,第一设备接收至少一个第二设备发送的请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;当接收到第三设备发送至所述IP地址的所述组数据时,所述第一设备使用所述层2地址发送所述组数据。采用本发明实施例,第一设备将第三设备发送给所述IP地址的组数据发送给向第一设备请求了该组数据的一个或多个第二设备,可以提高数据传输效率。
请参见图2,图2是本发明实施例提供的一种数据通信方法的另一流程示意图,本发明实施例中,该数据通信方法可以包括以下步骤。
S201:第一设备接收至少一个第二设备发送的请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识。
本发明实施例中,所述至少一个第二设备向第一设备请求的组数据相同,即各第二设备所发送的请求消息中所携带的组标识相同。具体实现中,第二设备可以是失去网络覆盖的设备,当然,具体实现中并不限于该类设备,也可以是存在网络覆盖的设备,具体的,本发明实施例不作限制,但值得说明的是,第一设备是存在网络覆盖的设备。
为方便描述,假设第二设备为失去网络覆盖的设备,则当第二设备发现存在网络覆盖的设备时,可以选择该设备作为第一设备,其中,被作为第一设备的设备附着到网络或者已建立用于中继数据传输的PDN(Packet Data Network,分组数据网络)连接,从而,第二设备与第一设备建立通信连接,因此,第二设备通过第一设备可以与网络侧通信。在可选实施例中,第二设备与第一设备建立通信连接后,第二设备还可以向第一设备请求获取IP地址,第一设备可以作为IPV6路由器或DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)服务器为第二设备分配IP地址,从而,第一设备给该第二设备分配一个IP地址。进而,第二设备获取IP地址后,便可以与第三设备进行通信,如向第三设备注册。可选的,第二设备向第三设备注册成功后,还可以从第三设备处获取多播组数据所需的相关参数,如TMGI、组多播地址、组标识等等,具体的,本发明实施例不作限制。
第二设备需要获取组数据时,由于第二设备失去网络覆盖,而通过第一设备与网络侧进行数据通信,因此,第二设备需要从网络侧获取数据时,向第一设备发送请求消息,以请求第一设备转发所述组数据,请求消息中携带所要请求的组数据所对应的组标识信息。具体实现中,可以存在多个第二设备向第一设备请求同一组数据的情形,第一设备接收到任一第二设备发送的请求消息后,分别向每个第二设备返回响应消息。
S202:所述第一设备判断是否已存在所述组标识对应的上下文。
本发明实施例中,组标识对应的上下文可以是层2地址、IP地址等用于
转发该组数据的信息,可选的,还可以包含端口号。第一设备接收到第二设备发送的请求消息后,从请求消息中解析出所携带的组标识,并判断是否已存在该组标识对应的上下文。
S203:所述第一设备分配所述组标识对应的所述层2地址和所述IP地址。
若不存在该组标识对应的上下文,说明该组标识对应的组数据首次被请求,即第一设备首次接收到请求该组数据的请求消息,从而,第一设备为组标识分配用于转发该组数据的层2地址和IP地址,可选的,还可以分配端口号。其中,IP地址为所述第一设备分配的用于所述第二设备向第三设备请求或接收所述组数据的IP地址;端口号为所述第一设备分配的用于所述第二设备向第三设备请求或接收所述组数据的端口号。具体的,当第二设备请求该组数据时,第二设备使用该IP地址或端口号向第三设备请求数据,当第二设备接收该组数据时,所接收到的组数据是以该IP地址或端口号为目的IP地址或目的端口号。
在可选实施例中,第一设备为该组标识分配参数后,将所分配的参数与该组标识关联起来,从而,若后续存在其它第二设备发送携带该组标识的请求消息时,第一设备接收到所述请求消息后,直接去获取与该组标识相关联的参数即可,其中,所述参数包括层2地址和IP地址,可选的,还可以包括端口号。
本发明实施例中,第一设备为组标识分配层2地址、IP地址等信息包括:第一设备在收到第二设备的请求消息后分配层2地址、IP地址等信息;或第一设备预置了层2地址、IP地址等信息,当收到第二设备的请求消息后,从预置的信息中选择一组层2地址、IP地址等信息。具体的,本发明实施例不作限制。
S204:所述第一设备获取所述组标识对应的层2地址和IP地址。
若存在该组标识对应的上下文,则该组标识对应的组数据不是首次被请求,即在该第二设备请求之前,已存在其它的第二设备向第一设备请求过该组数据,从而,第一设备直接获取该组标识对应的层2地址和IP地址,可选的,还包括端口号。值得说明的是,该层2地址、IP地址和端口号为第一设备针对首次接收到所述请求消息时所分配的层2地址、IP地址和端口号。
S205:所述第一设备向所述第二设备返回响应消息,所述响应消息携带所
述组标识对应的层2地址和IP地址。
第一设备获取到所述组标识对应的参数后,向第二设备返回响应消息,所述响应消息携带该组标识对应的参数,其中,该组标识对应的参数包括该组标识对应的层2地址和IP地址,可选的,还可以包括该组标识对应的端口号。具体实现中,第一设备接收到所述至少一个第二设备中的其中一个第二设备发送的请求消息时,若判断出不存在所述组标识对应的上下文,则第一设备为组标识分配该组标识对应的层2地址和IP地址,从而,给该第二设备返回的响应消息中携带所分配的层2地址和IP地址;若判断出已存在所述组标识对应的上下文,则第一设备根据组标识获取该组标识对应的层2地址和IP地址,从而,给该第二设备返回的响应消息中携带所获取到的层2地址和IP地址。
作为一种可行的实施方式,若不存在该组标识对应的上下文,所述响应消息还可以携带单播指示标识,以使所述第二设备使用IP地址向所述第三设备请求所述组数据。可选的,若所述响应消息还携带有端口号,则第二设备使用IP地址和端口号向所述第三设备请求所述组数据。从而,第一设备可以接收第三设备通过单播方式发送给该第二设备的组数据,若不携带单播指示信息,则第二设备可以不必向第三设备请求组数据。其中,第三设备可以是服务器或其它发送组数据的设备,具体的,本发明实施例不作限制。在可选实施例中,第一设备向该第二设备返回响应消息之后,还可以广播所述组标识或广播所述组标识对应的信息,从而,后续如果存在其它的第二设备需要向第一设备请求该组标识对应的数据时,若已监听到所述组标识或所述组标识对应的信息,则说明第一设备可以转发该组数据,因此,后续请求该组数据的第二设备接收到第一设备返回的响应消息后,无需使用响应消息中携带的IP地址(可选的,还包括端口号)向第三设备请求所述组数据。本发明实施例中,所述广播组标识对应的信息可以是组标识的其他形式,如经过编码的组标识,或组标识对应的组的其他信息,如组的地址信息等等,具体的,本发明实施例不作限制。在可选实施例中,所述响应消息中还可以携带与该组标识对应的更新定时器,新设置的更新定时器均存在一个预设时长,从而,该更新定时器可以用于指示广播所述组标识的剩余时长。当更新定时器对应的剩余时长为0时,若第二设备仍想继续监听该组数据,则第二设备需重新向第一设备发送请求消息,第一设
备执行步骤S201;否则,第一设备停止中转该组数据,同时,删除该请求中的上下文等信息,从而,可以有效降低终端功耗,提高使用寿命。
S206:当接收到第三设备发送至所述IP地址的所述组数据时,所述第一设备使用所述层2地址发送所述组数据。
在可选实施例中,若响应消息中还携带有端口号,则当中继设备接收到第三设备发送至IP地址和端口号的所述组数据时,第一设备使用所述层2地址向所述至少一个第二设备发送所述组数据。值得说明的是,所述发送可以是组播方式也可以是广播方式,具体的,本发明实施例不做限制。因此,已向第一设备请求该组数据的全部第二设备均可以从层2地址对应的链路上接收到该组数据,第三设备无需分别向每个第二设备传输所述组数据,提高了数据传输效率。
本发明实施例中,第一设备根据第二设备发送的请求消息中所携带的组标识确定相应的层2地址和IP地址,从而,只要第二设备所期望请求的组数据相同,则第一设备返回的响应消息中携带的参数(包括层2地址和IP地址)相同。第一设备一旦接收到第三设备发送给该IP地址的所述组数据,则使用该层2地址转发所述组数据,从而,已向第一设备发送了携带该组标识的请求消息并接收到所述响应消息的全部第二设备均可以监听并接收到该组标识对应的组数据。
在本发明实施例描述的数据通信方法中,第一设备接收至少一个第二设备发送的请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;当接收到第三设备发送至所述IP地址的所述组数据时,所述第一设备使用所述层2地址向所述至少一个第二设备发送所述组数据。采用本发明实施例,第一设备将第三设备发送给所述IP地址的组数据发送给向第一设备请求了该组数据的一个或多个第二设备,可以提高数据传输效率。
值得说明的是,在上述实施例中,第一设备向第二设备返回响应消息之后,第二设备可以使用响应消息中携带的IP地址或者使用响应消息中携带的IP地
址和端口号向第三设备请求所述组标识对应的组数据。在可选实施例中,第二设备接收到响应消息后,可以自动根据响应消息向第三设备请求所述组标识对应的组数据。在另一可选实施例中,第二设备接收到响应消息后,若未监听到所述组标识或所述组标识对应的信息,则根据响应消息向第三设备请求所述组标识对应的组数据;若可以监听到所述组标识或所述组标识对应的信息,说明已存在一个第二设备成功向第三设备请求了所述组数据,第一设备可以中转该组数据,从而,该第二设备接收到响应消息后不需要向第三设备请求所述组数据。在另一可选实施例中,第二设备接收到响应消息后,若响应消息中携带有单播指示标识,说明首次接收到转发所述组数据的请求,该第二设备需向第三设备建立传输所述组数据的通信连接,从而,根据响应消息向第三设备请求所述组标识对应的组数据;若未携带有单播指示标识,则不向第三设备请求所述组标识对应的组数据。本发明实施例中,第一设备向第二设备返回响应消息之后,所述数据通信方法还可以包括步骤S205a~S205d,如图2a所示,图2a是本发明实施例提供的一种数据通信方法的另一流程示意图。
S205a:所述第一设备接收目标第二设备发送的第一消息;所述第一消息为所述目标第二设备成功向所述第三设备请求所述组数据后发送的消息。
第二设备向第一设备发送请求消息后,第一设备返回响应消息,若响应消息中未携带端口号,第二设备可以使用响应消息中携带的IP地址向第三设备请求所述组数据。可选的,若响应消息中携带有端口号,第二设备可以使用响应消息中携带的IP地址和端口号向第三设备请求所述组数据。第二设备成功向第三设备请求所述组数据后,向第一设备发送第一消息。本发明实施例中,至少存在一个第二设备(为方便描述,本发明实施例将其称为目标第二设备)向第三设备成功请求了所述组数据,目标第二设备成功向第三设备请求所述组数据后,向第一设备发送第一消息,告知第一设备已成功向第三设备建立传输所述组数据的通信连接。第一设备接收所述目标第二设备发送的第一消息,其中,所述第一消息为所述目标第二设备成功向所述第三设备请求所述组数据后发送的消息。
在可选实施例中,第二设备接收到第一设备返回的响应消息后,若未监听到所述组标识或所述组标识对应的信息,使用所述响应消息中携带的IP地址
或者使用所述响应消息中携带的IP地址和端口号向第三设备请求所述组数据,并在成功向第三设备请求所述组数据后,向第一设备发送第一消息。第一设备接收至少一个第二设备中的目标第二设备发送的第一消息,其中,目标第二设备是指第二设备中未监听到所述组标识或所述组标识对应的信息,并成功向第三设备请求所述组数据的任一第二设备,所述第一消息为所述目标第二设备成功向所述第三设备请求所述组数据后发送的消息,告知第一设备已成功向第三设备建立传输所述组数据的通信连接。
S205b:所述第一设备判断是否属于首次接收所述第一消息。
本发明实施例中,所述至少一个第二设备包括一个或多个第二设备,不管存在多少个第二设备,所述至少一个第二设备均只需一个第二设备保持有与第三设备传输所述组数据的通信连接即可。因此,第一设备接收到所述至少一个第二设备中的目标第二设备发送的所述组标识对应的第一消息之后,第一设备判断是否属于首次接收所述第一消息,若是,表示第一设备选择该第二设备与第三设备的通信连接,用以传输组数据,从而,第一设备向该任一第二设备返回第二消息,以使该目标第二设备保持与第三设备用于接收所述组数据的通信连接;若否,说明在该目标第二设备返回第一消息之前,已存在其它的目标第二设备成功向第三设备请求了所述组数据,从而,第一设备向该目标第二设备返回第三消息,以使该目标第二设备释放与第三设备用于接收所述组数据的通信连接。从而,保证至少一个第二设备中只有一个第二设备存在与第三设备传输所述组数据的通信连接,第一设备接收到第三设备基于该通信连接发送的所述组数据后,使用层2地址将所述组数据发送给所述至少一个第二设备,实现单播到多播的数据中继,提高数据传输效率。
S205c:所述第一设备向该目标第二设备返回第二消息,以使该目标第二设备保持与所述第三设备用于接收所述组数据的通信连接。
若第一设备判断出属于首次接收所述第一消息,则向该目标第二设备返回第二消息,以使该目标第二设备保持与所述第三设备用于接收所述组数据的通信连接,从而,该目标第二设备可以保持从第三设备接收所述组数据。在可选实施例中,在返回第二消息后,所述第一设备还可以广播所述组标识或广播所述组标识对应的信息,从而当存在其它第二设备希望获取该组标识对应的组数
据时,若可以监听到所述组标识或所述组标识对应的信息,则无需向第三设备请求所述组数据;若未监听到所述组标识,则向第三设备请求所述组数据,以与第三设备间建立传输所述组数据的通信连接。值得说明的是,此处广播组标识对应的信息可以指组标识的其他形式,如经过编码的组标识,或组标识对应的组的其他信息,如组的地址信息等,具体的,本发明实施例不作限制。
S205d:所述第一设备向该目标第二设备返回第三消息,以使该目标第二设备释放与所述第三设备用于接收所述组数据的通信连接。
若不属于首次接收所述第一消息,则说明所述至少一个第二设备中已存在一个第二设备成功向第三设备请求了所述组数据并保持了与第三设备间用于接收所述组数据的通信连接,因此,第一设备向当前的该目标第二设备返回第三消息,以使该目标第二设备释放与所述第三设备用于接收所述组数据的通信连接。
值得说明的是,本发明实施例中,“第一消息”、“第二消息”及“第三消息”仅用于描述目的,为方便说明本方案而采用的消息名称,具体实现中,本发明实施例对所述消息名称不做任何限制,因此,并不能以此来限制本发明之保护范围。
本发明实施例中,保证所述至少一个第二设备只存在一个第二设备与第三设备存在用于接收所述组数据的通信连接,当第一设备接收到第三设备发送给该第二设备的所述组数据时,使用层2地址将所述组数据发送给所述至少一个第二设备,相应的,所述至少一个第二设备可以在该层2地址上监听并接收到所述组数据。采用本发明实施例,可以提高数据传输效率。
请参见图3,图3是本发明实施例提供的一种数据通信方法的又一流程示意图,本发明实施例中,该数据通信方法可以包括以下步骤。
S301:第二设备向第一设备发送请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识。
本发明实施例中,所述第一设备接收至少一个第二设备请求所述组数据的请求消息,其中,所述至少一个第二设备发送的请求消息中所携带的组标识相同,即所述至少一个第二设备所要请求的组数据相同。第一设备接收第三设备
发送给所述至少一个第二设备中的其中一个第二设备的所述组数据时,使用层2地址转发所述组数据。因此,第一设备接收到请求该组数据的至少一个第二设备的请求消息后,给每个第二设备返回响应消息,其中,响应消息中携带该层2地址,以使已向第一设备请求该组数据且接收到所述响应消息的一个或多个第二设备均可以从该层2地址上监听并接收所述组数据,从而,实现将接收到的单播数据通过多播的方式发送给多个所述第二设备。
具体实现中,组标识可以是TMGI(Temporary Mobile Group Identity,临时移动组标识)、应用层标识等能够标识组数据的其它信息,具体的,本发明实施例不作限制。值得说明的是,本发明实施例中,与上述实施例相关的部分技术细节可以参照上述实施例,此处不再赘述。
S302:所述第二设备接收所述第一设备返回的响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;其中,所述第一设备用于接收至少一个第二设备发送的请求消息,并在接收到第三设备发送至所述IP地址的所述组数据时,使用所述层2地址发送所述组数据。
第二设备向第一设备发送请求某一组数据的请求消息后,第一设备根据该请求消息中携带的组标识返回响应消息,从而,第二设备接收所述第一设备返回的响应消息,其中,所述响应消息携带所述组标识对应的层2地址和IP地址;所述IP地址为所述第一设备分配的用于所述第二设备向第三设备请求所述组数据的IP地址;所述层2地址用于第二设备将接收到的所述组数据发送给所述至少一个第二设备,从而,第二设备可以从该层2地址上接收所述组数据。在可选实施例中,所述第二设备使用所述IP地址向第三设备请求所述组数据,从而,建立与第三设备间用于接收单播形式分发的所述组数据的通信连接。
作为一种可行的实施方式,所述响应消息还可以携带所述组标识对应的端口号;其中,所述端口号为所述第一设备分配的用于所述第二设备请求所述组数据的端口号。在可选实施例中,所述第二设备使用所述IP地址和所述端口号向第三设备请求所述组数据,从而,建立与第三设备间用于接收单播形式分发的所述组数据的通信连接。
S303:所述第二设备从所述层2地址上接收所述组数据。
若第一设备接收到第三设备发送给所述IP地址的所述组数据,则第一设备使用层2地址向所述至少一个第二设备发送所述组数据,从而,已向第一设备请求所述组数据并接收到所述响应消息的至少一个第二设备均可以从该层2地址上接收到所述组数据。
在本发明实施例描述的数据通信方法中,第二设备向第一设备发送请求消息,所述请求消息携带组标识;第二设备接收第一设备返回的响应消息,所述响应消息携带组标识对应的层2地址和IP地址;其中,第一设备接收到第三设备发送至该IP地址的所述组数据时,使用层2地址发送所述组数据;第二设备从所述层2地址上接收所述组数据。采用本发明实施例,第一设备使用层2地址转发第三设备发送给所述IP地址的所述组数据,从而,已向第一设备请求了该组数据的一个或多个第二设备均可以从该层2地址上接收所述组数据,可以提高数据传输效率。
请参见图4,图4是本发明实施例提供的一种数据通信方法的再一流程示意图,本发明实施例中,该数据通信方法可以包括以下步骤。
S401:第二设备向第一设备发送请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识。
本发明实施例中,第二设备向第一设备发送请求消息,请求消息携带有组标识,从而,第一设备接收至少一个第二设备发送的请求消息,其中,所述至少一个第二设备向第一设备请求转发相同的组数据,即各第二设备所发送的请求消息中携带相同的组标识,值得说明的是,所述相同的组标识是指能够标识相同的组的标识信息,标识同一组的不同标识形式也属于相同的组标识范畴,本发明实施例,并不局限于一致的标识信息。
S402:所述第二设备接收所述第一设备返回的响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址。
本发明实施例中,所述IP地址为所述第一设备分配的用于所述第二设备向第三设备请求所述组数据的IP地址,即向第一设备发送所述请求消息的至少一个第二设备可以使用该IP地址向第三设备建立接收该组数据的单播通道。所述层2地址用于第二设备将接收到的所述组数据发送给所述至少一个第
二设备,从而,第二设备可以从该层2地址上接收所述组数据。在可选实施例中,所述响应消息还携带所述组标识对应的端口号;其中,所述端口号为所述第一设备分配的用于所述第二设备向第三设备请求所述组数据的端口号,从而,向第一设备发送所述请求消息的至少一个第二设备可以使用该IP地址和该端口号向第三设备建立接收该组数据的单播会话通道。值得说明的是,所述IP地址和所述端口号还可以用于所述第二设备接收所述组数据,当第二设备接收该组数据时,所接收到的组数据以该IP地址和该端口号为目的IP地址或目的端口号。值得说明的是,具体实现中,端口号为可选项。
具体实现中,第一设备接收到第二设备发送的请求消息后,从请求消息中解析出组标识,获取该组标识对应的层2地址和IP地址,可选的,还包括端口号,并向第二设备返回响应消息,其中,响应消息中携带所获取到的层2地址、IP地址,可选的,还包括端口号。本发明实施例中,若第二设备发送的请求消息中携带相同的组标识,则从第一设备上接收到的响应消息中所携带的层2地址、IP地址或端口号也相同。
S403:所述第二设备使用所述IP地址向所述第三设备请求所述组数据。
第二设备接收到第一设备返回的响应消息之后,可以使用响应消息中携带的IP地址向所述第三设备请求所述组数据。在可选实施例中,若响应消息还携带有端口号,所述第二设备使用所述IP地址和所述端口号向所述组第三设备请求所述组数据。
具体实现中,第二设备向第三设备请求组数据可以表现为第二设备向第三设备建立用于接收所述组数据的通信连接,以便从第三设备接收单播分发的所述组数据,其中,建立所述通信连接的方式可以根据第一设备是否支持ALG-NAT(Application Layer Gateways-Network Address Translation,应用层网关-网络地址转换)功能包括两种实现方式。
作为其中一种实现方式,若第一设备支持ALG-NAT,则第二设备与第三设备进行媒体协商建立应用层会话,第二设备用于传输数据的IP地址及端口号通过应用层消息发送至第三设备,并接收第三设备用于发送数据的第三设备的IP地址或端口号,以此建立第二设备与第三设备之间用于传输单播数据的通信连接。具体的,当使用SIP消息时,将IP地址作为会话初始协议(Session
Initiation Protocol,SIP)消息中的会话描述协议(Session Description Protocol,SDP)消息体中的IP地址,并将所述SIP消息发送给第三设备,以向第三设备请求所述组数据,从而,与第三设备建立用于接收单播形式分发数据的通信连接。其中,SIP是一个基于文本的应用层控制协议,用于创建、修改和释放一个或多个参与者的会话;SDP为会话通知、会话邀请和其它形式的多媒体会话初始化等目的提供的多媒体会话描述。可选的,若响应消息还携带端口号,则第二设备与第三设备进行媒体协商建立应用层会话,具体的,将所述IP地址和所述端口号作为会话初始协议SIP消息中的会话描述协议SDP消息体中的IP地址和端口号,并将所述SIP消息发送给第三设备,以向第三设备请求所述组数据。
作为另一种实现方式,若第一设备不支持ALG-NAT,则第二设备将所述IP地址作为传输应用信令的数据包的源IP地址,并将所述数据包发送给第三设备,该应用信令指示第三设备该第二设备用于传输单播形式分发数据的IP地址,从而实现向第三设备请求所述组数据,第二设备与第三设备建立用于接收单播形式分发数据的通信连接。可选的,若响应消息还携带端口号,则第二设备将所述IP地址和所述端口号作为传输应用信令的数据包的源IP地址和源端口号,并将所述数据包发送给第三设备,以向第三设备请求所述组数据。
为方便理解,以响应消息携带有端口号为例,则第二设备使用IP地址和端口号向第三设备请求组数据,由于第二设备需通过第一设备与网络侧通信,上述IP地址和端口号为第一设备分配给第二设备用于传输单播形式分发数据的IP地址和端口号,且第一设备具备NAT(Network Address Translation,网络地址转换)功能,则第三设备向该第二设备发送组数据时,本应发给该IP地址和该端口号的所述组数据会发送给第一设备,第一设备经过NAT转换后,所述组数据的IP地址为上述IP地址和端口号,第一设备再进行转发。
作为一种可行的实施方式,第二设备接收到第一设备返回的响应消息后,使用响应消息中携带的IP地址自动向第三设备请求所述组数据。可选的,若响应消息还携带有端口号,则第二设备接收到第一设备返回的响应消息后,使用响应消息中携带的IP地址和端口号自动向第三设备请求所述组数据,以建立用于接收所述组数据的通信连接。
作为另一种可行的实施方式,第二设备接收到第一设备返回的响应消息后,若当前可以监听到所述组标识或者所述组标识的相关信息,则所述第二设备不需要向第三设备请求所述组数据;若所述第二设备未监听到所述组标识或所述组标识的相关信息,则在第二设备接收到第一设备返回的响应消息后,所述第二设备根据该响应消息向第三设备请求所述组数据。
作为另一种可行的实施方式,第二设备接收到第一设备返回的响应消息后,若获知该响应消息还携带有单播指示标识,则第二设备根据该响应消息向第三设备请求所述组数据;若获知该响应消息未携带有单播指示标识,则第二设备接收到响应消息后无需向第三设备请求所述组数据。具体实现中,第二设备根据该响应消息向第三设备请求所述组数据包括:若响应消息未携带端口号,则使用响应消息中携带的IP地址向第三设备请求所述组数据;若响应消息携带有端口号,则使用响应消息中携带的IP地址和端口号向第三设备请求所述组数据。
值得说明的是,所述第二设备使用响应消息中携带的IP地址或者使用响应消息中携带的IP地址和端口号成功向第三设备请求所述组数据之后,还可以包括步骤S403a~S403c,如图4a所示,图4a是图4提供的其中一种数据通信方法的流程示意图。
S403a:所述第二设备向所述第一设备发送第一消息。
本发明实施例中,第二设备成功向第三设备请求所述组数据后,第二设备还可以向第一设备发送第一消息,从而,该第二设备将已成功向第三设备请求所述组数据的事件告知第一设备。具体实现中,第一设备接收至少一个第二设备中的目标第二设备发送的第一消息,其中,所述第一消息为所述目标第二设备成功向所述第三设备请求所述组数据后发送的消息。在可选实施例中,若存在多个第二设备未监听到上述组标识或组标识对应的信息,并成功向第三设备请求所述组数据,即与第三设备建立了单播通信连接,只需所述多个第二设备中的其中一个第二设备保持与第三设备间用于接收单播形式分发的所述组数据的通信连接即可,因此,第一设备接收到上述多个未监听到上述组标识或组标识对应的信息、并成功请求单播组数据中的任一第二设备发送的第一消息后,会进而判断是否属于首次接收所述第一消息,若是,则向该第二设备返回
第二消息,以使该第二设备保持与第三设备接收所述组数据的通信连接;否则,向该第二设备返回第三消息,以使该第二设备释放与第三设备接收所述组数据的通信连接,上述通信连接是指第二设备从第三设备接收单播形式分发数据的通信连接。
S403b:若接收到所述第一设备返回的第二消息,所述第二设备保持与所述第三设备用于接收所述组数据的通信连接。
第二设备向第一设备返回第一消息后,若接收到第一设备返回的第二消息,表示第一设备选择该第二设备与第三设备的通信连接,用以传输组数据,从而,该第二设备保持与所述第三设备用于接收所述组数据的通信连接,以使第一设备可以接收服务器发送的所述组数据。
S403c:若接收到所述第一设备返回的第三消息,所述第二设备释放与所述第三设备用于接收所述组数据的通信连接。
第二设备向第一设备返回第一消息后,若接收到第一设备返回的第三消息,说明在本第二设备成功向第三设备请求所述组数据之前,已存在其它的第二设备建立了与所述第三设备接收所述组数据的通信连接,从而,释放与所述第三设备用于接收所述组数据的通信连接。因此,多个第二设备需要从第三设备获取相同组数据时,第三设备只需基于已建立的通信连接传输该组数据即可,避免相同的组数据在第三设备与第一设备之间重复传输。
S404:所述第二设备从所述层2地址上接收所述组数据。
若第一设备接收到第三设备发送给该IP地址的组数据,则第一设备使用层2地址转发所述组数据,从而,已向第一设备请求所述组数据的1个或多个第二设备均可以从该层2地址上监听并接收所述组数据。在可选实施例中,若响应消息中还携带有端口号,则第一设备接收到第三设备发送给所述IP地址和所述端口号的组数据时,第一设备使用层2地址转发所述组数据,从而,已向第一设备请求所述组数据的第二设备均可以从该层2地址上监听并接收所述组数据。
在本发明实施例描述的数据通信方法中,第二设备向第一设备发送请求消息,所述请求消息携带组标识;第二设备接收第一设备返回的响应消息,所述响应消息携带组标识对应的层2地址和IP地址;其中,第一设备接收到第三
设备发送至该IP地址的所述组数据时,使用层2地址发送所述组数据;第二设备从所述层2地址上接收所述组数据。采用本发明实施例,第一设备使用层2地址转发第三设备发送给所述IP地址的所述组数据,从而,已向第一设备请求了该组数据的一个或多个第二设备均可以从该层2地址上接收所述组数据,可以提高数据传输效率。
请参见图5,图5是本发明实施例提供的一种数据通信方法的交互示意图,本发明实施例中,该数据通信方法可以包括以下步骤。
本发明实施例中,第一设备可以接收1个或多个第二设备的请求消息,其中,所述多个第二设备向第一设备发送的请求消息中所携带的组标识相同。为方便描述,本发明实施例中将所述组数据首次被请求时所对应的请求终端称为“第二设备UE2-1”,将所述组数据不是首次被请求时所对应的请求终端称为“第二设备UE2-2”,值得说明的是,“第二设备UE2-1”、“第二设备UE2-2”仅用于描述目的,具体实现中,“第二设备UE2-2”可以是一个或多个第二设备的代称,具体的,本发明实施例不作限制。
S500:第二设备通过第一设备向第三设备注册。
为方便描述,假设第二设备为失去网络覆盖的设备,则当第二设备发现存在网络覆盖的第一设备时,可以选择该第一设备作为中继终端,其中,被作为中继终端的第一设备附着到网络或者已建立用于中继数据传输的PDN(Packet Data Network,分组数据网络)连接,第二设备与第一设备建立通信连接,因此,第二设备通过第一设备可以与网络侧通信。在可选实施例中,第二设备与第一设备建立通信连接后,第二设备还可以向第一设备请求获取IP地址,第一设备可以作为IPV6路由器或DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)服务器为第二设备分配IP地址,从而,第一设备给该第二设备分配一个IP地址。进而,第二设备获取IP地址后,便可以与第三设备进行通信,如向第三设备注册,或传输其它应用层信令消息等等。可选的,第二设备向第三设备注册成功后,还可以从第三设备处获取多播组数据所需的相关参数,如TMGI、组多播地址、组标识等等,具体的,本发明实施例不作限制。值得说明的是,所述第二设备包括“第二设备UE2-1”和“第二设备UE2-2”。
S501:第二设备UE2-1向第一设备发送请求消息,所述请求消息携带组标识。
第二设备UE2-1需要获取第三设备上的某一组数据时,向第一设备发送请求消息,同时,在该请求消息中携带所要获取的组数据对应的组标识。本发明实施例中,所述请求消息用于请求第一设备转发组数据。
S502:第一设备向第二设备UE2-1返回响应消息,所述响应消息携带所述组标识对应的层2地址、IP地址和端口号。
第一设备接收到第二设备UE2-1发送的请求消息后,从该请求消息中解析出组标识,并根据该组标识直接获取或分配该组标识对应的层2地址、IP地址和端口号。其中,所述端口号为可选项,具体实现中,第二设备可以使用默认设置的端口接收所述组数据。所述层2地址用于第一设备从第三设备上接收到该组标识对应的组数据时向第二设备发送组数据,从而第二设备UE2-1从该层2地址上监听并接收所述组标识对应的组数据,所述IP地址和所述端口号为第一设备分配给所述至少一个第二设备用于请求或接收所述组数据的IP地址和端口号。值得说明的是,所述至少一个第二设备为已向第一设备发送所述请求消息的所有设备,其中,所述请求消息携带的组标识相同,值得说明的是,也可以是所述请求消息携带的组标识所标识的组数据相同,具体的,本发明实施例不作限制。
可选的,由于所述组数据被首次请求,因此,第一设备返回给第二设备UE2-1的响应消息中还可以携带单播指示标识,以使第二设备UE2-1接收到响应消息后,根据该单播指示标识向第三设备请求建立传输所述组数据的通信连接。
S503:第二设备UE2-1使用所述IP地址和所述端口号向第三设备请求所述组数据。
第二设备UE2-1接收到第一设备返回的响应消息后,若未监听到所述组标识和/所述组标识对应的信息,所述信息用于指示第一设备可以转发第三设备发送的该组标识对应的组数据,第二设备UE2-1使用响应消息中所携带的IP地址和端口号向第三设备请求所述组标识对应的组数据,即与第三设备建立通信连接,所述通信连接用于接收所述组标识对应的组数据。
可选的,第二设备UE2-1接收到第一设备返回的响应消息后,若获知响应消息中携带有单播指示标识,则使用响应消息中所携带的IP地址和端口号与第三设备建立用于接收该组标识对应的单播形式分发的组数据的通信连接。
值得说明的是,若步骤S502返回的响应消息中不包括端口号,则第二设备UE2-1可以使用响应消息中所携带的IP地址或者使用响应消息中所携带的IP地址和默认端口号与第三设备建立用于接收该组标识对应的组数据的通信连接,其中,所述默认端口号为第二设备或第三设备预设的用于请求该组标识对应的组数据的端口号。
S504:第二设备UE2-1向第一设备发送第一消息。
第二设备UE2-1成功向第三设备请求所述组数据后,向第一设备发送第一消息,以使第一设备获知第二设备UE2-1已成功向第三设备请求了所述组数据,从而,第一设备可以接收第三设备发送给第二设备UE2-1的所述组数据,其中,所述组数据的目的IP地址为步骤S502中返回的IP地址,可选的,所述组数据的目的端口号为步骤S502中返回的端口号。
值得说明的是,具体实现中,第一设备接收到所述至少一个第二设备中的任一第二设备发送的所述第一消息后,还可以判断是否属于首次接收所述第一消息,若是,则所述第一设备向所述任一第二设备返回第二消息,以使所述任一第二设备保持从所述第三设备接收所述组数据;若否,则所述第一设备向所述任一第二设备返回第三消息,以使所述任一第二设备释放与所述第三设备用于接收所述组数据的通信连接。具体的技术细节请参照上述实施例中图4a所对应的描述部分,此处不再赘述。
S505:第一设备广播所述组标识或所述组标识对应的信息。
第一设备接收到第二设备UE2-1发送的第一消息后,获知第二设备UE2-1已成功向第三设备请求了所述组数据,返回第二消息,因此,第一设备广播所述组标识或所述组标识对应的信息,以使全部第二设备获知第一设备可以转发第三设备发送的所述组数据。从而,当存在其它的第二设备也需要接收所述组数据时,直接向第一设备发送请求消息即可,而无需再向第三设备建立用于接收所述组数据的通信连接。具体实现中,当第一设备接收到第三设备发送至所述IP地址的所述组数据时,所述第一设备使用所述层2地址发送所述组数据,
从而,已向第一设备获知该层2地址的全部第二设备均可以监听并接收所述组数据。
S506:第二设备UE2-2监听所述组标识或所述组标识对应的信息。
具体实现中,第一设备广播所述组标识或所述组标识对应的信息后,第二设备均可以监听到该组标识或该组标识对应的信息,从而,其它的第二设备可以获知第一设备当前可以转发第三设备发送的该组标识对应的组数据。于是,若第二设备UE2-2也需要接收该组数据,则可以向第一设备发送请求消息,并在请求消息中携带该组标识。
S507:第二设备UE2-2向第一设备发送请求消息,所述请求消息携带所述组标识。
本发明实施例中,第二设备UE2-2与第二设备UE2-1发送的请求消息中,所携带的组标识相同。其它的具体细节可以参照步骤S501,此处不再赘述。
S508:第一设备向第二设备UE2-2返回响应消息,所述响应消息携带所述组标识对应的层2地址、IP地址和端口号。
第一设备接收到第二设备UE2-2发送的请求消息后,从该请求消息中解析出组标识,于是可知,该组标识与第二设备UE2-1发送的请求消息中所携带的组标识相同。本发明实施例中,由于第一设备已根据该组标识分配过该组标识对应的参数,因此,第一设备接收到第二设备UE2-2发送的所述请求消息后,直接获取该组标识对应的层2地址、IP地址和端口号。值得说明的是,端口号是可选项。
可选的,由于该组标识对应的组数据不是被首次请求,因此,第一设备返回给第二设备UE2-1的响应消息中不用携带单播指示标识,第二设备UE2-1接收到响应消息后,不需要与第三设备建立用于接收所述组数据的通信连接。或者是,由于第二设备UE2-1接收第一设备返回的响应消息时,可以监听到所述组标识或所述组标识对应的信息,从而,获知已存在其它的第二设备向服务器建立了用于接收该组标识对应的组数据的通信连接,因此,不需要与第三设备建立用于接收所述组数据的通信连接。
S509:当所述第一设备接收到第三设备发送至所述IP地址的所述组数据时,使用所述层2地址发送所述组数据。
由于第二设备UE2-1接收到第一设备返回的响应消息后,使用响应消息中携带的IP地址或者使用响应消息中携带的IP地址和端口号向第三设备成功请求了所述组标识对应的组数据,从而,第三设备将所述组数据发送给该IP地址,可选的,第三设备将所述组数据发送给该IP地址和该端口号。当第一设备接收到第三设备发送至所述IP地址的组数据时,具体的,当第一设备接收到目的地址为所述IP地址的组数据时,或者当第一设备接收到目的地址为所述IP地址、目的端口号为所述端口号的组数据时,使用该层2地址向所述至少一个第二设备发送所述组数据。因此,已向第一设备请求该组数据的全部第二设备(如第二设备UE2-1何第二设备UE2-2)均可以从该层2地址对应的链路上接收到该组数据,第三设备无需分别向每个第二设备发送所述组数据,提高了数据传输效率。
在本发明实施例描述的数据通信方法中,第一设备接收至少一个第二设备发送的请求消息,所述请求消息携带组标识;所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;当接收到第三设备发送至所述IP地址的所述组数据时,所述第一设备使用所述层2地址发送所述组数据,从而,所述至少一个第二设备从该层2地址上可以接收到所述组数据。采用本发明实施例,第一设备将第三设备发送给所述IP地址的组数据发送给向第一设备请求了该组数据的一个或多个第二设备,可以提高数据传输效率。
请参见图6,图6是本发明实施例提供的一种数据通信方法的另一交互示意图,本发明实施例中,该数据通信方法可以包括以下步骤。
本发明实施例中,第一设备可以接收1个或多个第二设备的请求消息,其中,所述多个第二设备向第一设备发送的请求消息中所携带的组标识相同。为方便描述,本发明实施例中将所述组数据首次被请求时所对应的请求终端称为“第二设备UE2-1”,将所述组数据不是首次被请求时所对应的请求终端称为“第二设备UE2-2”,值得说明的是,“第二设备UE2-1”、“第二设备UE2-2”仅用于描述目的,具体实现中,“第二设备UE2-2”可以是一个或多个第二设备的代称,具体的,本发明实施例不作限制。
S600:第二设备通过第一设备向第三设备注册。
具体技术细节可参照上述实施例中的步骤S500,此处不再赘述。为方便描述,假设第一设备和第二设备UE2-1建立通信连接后,第一设备分配给第二设备UE2-1的IP地址为“第一IP地址”,第二设备UE2-1用于接收所要请求的组数据的端口号为“第一端口号”。
S601:第二设备UE2-1使用第一IP地址和第一端口号向第三设备请求组数据。
本发明实施例中,第二设备UE2-1需要从第三设备上获取某一组数据时,若该组数据未被其它的第二设备请求过,如未监听到该组数据对应的组标识或该组标识对应的信息,即第二设备UE2-1与第三设备建立用于接收该组数据的通信连接之前第一设备未具备转发该组数据的功能。因此,第二设备UE2-1使用第一IP地址和第一端口号与第三设备建立用于接收所述组数据的通信连接,第二设备(包括第二设备UE2-1和第二设备UE2-2)通过该通信连接可以从第三设备接收单播形式分发的组数据。
本发明实施例中,第二设备UE2-1与第三设备建立所述通信连接的方式可以根据第一设备是否支持ALG-NAT(Application Layer Gateways-Network Address Translation,应用层网关-网络地址转换)功能包括两种实现方式。
作为其中一种实现方式,若第一设备支持ALG-NAT,则第二设备UE2-1与第三设备进行媒体协商建立应用层会话,第二设备用于传输数据的IP地址及端口号通过应用层消息发送至第三设备,并接收第三设备用于发送数据的第三设备的IP地址及端口号的应用层消息,以此建立第二设备与第三设备之间用于传输单播数据的通信连接。具体的,当使用SIP消息时,将第一IP地址和第一端口号作为会话初始协议(Session Initiation Protocol,SIP)消息中的会话描述协议(Session Description Protocol,SDP)消息体中的IP地址和端口号,并将所述SIP消息发送给第三设备,以向第三设备请求所述组数据,第二设备UE2-1与第三设备建立用于接收单播分发数据的通信连接。从而,第二设备UE2-1与第三设备通过协商可以互相交换用于接收或发送该组数据的IP地址和端口号。
作为另一种实现方式,若第一设备不支持ALG-NAT,则第二设备UE2-1
将所述第一IP地址和第一端口号作为传输应用信令的数据包的源IP地址和源端口号,并将所述数据包发送给第三设备,该应用信令指示第三设备该第二设备用于传输单播数据的IP地址和端口号,实现向第三设备请求所述组数据,建立用于传输所述组数据的通信连接。从而,第二设备UE2-1与第三设备通过传输数据包互相交换用于接收或发送该组数据的IP地址和端口号。具体实现中,第二设备UE2-1可以采用相同的IP地址、不同的端口号来传输所述组标识对应的组数据和应用层信令消息,相应的,也可以采用相同的IP地址、相同的端口号来传输所述组标识对应的组数据和应用层信令消息,其中,所述传输包括发送和/或接收。第三设备可以采用相同的IP地址、不同的端口号来传输所述组标识对应的组数据和应用层信令消息,相应的,也可以采用相同的IP地址、相同的端口号来传输所述组标识对应的组数据和应用层信令消息,其中,所述传输包括发送和/或接收。具体的,本发明实施例不作限制。
具体实现中,由于第二设备(如UE2-1、UE2-2)需通过第一设备与网络侧通信,如从第三设备获取某组数据,因此,第二设备UE2-1与第三设备建立通信连接时,第一设备将第二设备UE2-1用于请求所述组数据的第一IP地址和第一端口号转换为第一设备用于接收该组数据的第三IP地址和第三端口号,其中,第一IP地址可以是私网IP地址,第三IP地址可以是公网IP地址。后续当第一设备接收到目的IP地址和目的端口号为第三IP地址和第三端口号的数据时,通过NAT地址转换,将数据的目的地址转换为第一IP地址和第一端口号,进而,可以将数据发送到第二设备UE2-1。
为方便描述,不论第二设备UE2-1是否采用不同的端口号接收第三设备发送的组数据和应用层信令消息,本发明实施例中,将第二设备UE2-1用于接收所述组数据的IP地址和端口号分别称为第一IP地址和第一端口号,相应的,不论第三设备是否采用不同的端口号发送所述组数据和应用层信令消息,本发明实施例中,将第三设备用于发送所述组数据的IP地址和端口号分别称为第四IP地址和第四端口号。值得说明的是,本发明实施例中的“第一”、“第二”、“第三”、“第四”仅用于描述目的。
S602:第二设备UE2-1向第一设备发送第一请求消息,所述第一请求消息携带组标识。
本发明实施例中,第二设备UE2-1通过第一设备与第三设备建立用于接收所述组数据的通信连接之后,向第一设备发送请求消息,为方便后续部分的描述,本发明实施例将该请求消息称为第一请求消息,所述第一请求消息中携带的组标识用于标识步骤S601中的组数据,其中,所述第一请求消息用于请求第一设备转发该组标识对应的组数据。
S603:第一设备判断是否已存在所述组标识对应的上下文。
具体实现中,第一设备接收到第二设备发送的第一请求消息后,第一设备判断是否已存在所述组标识对应的上下文,如是否存在该组标识对应的层2地址、第二IP地址等信息,具体的技术细节可参照上述实施例,如步骤S102,此处不再赘述。
S604:若不存在所述上下文,第一设备向第二设备UE2-1发送第二请求消息,所述第二请求消息携带所述组标识。
本发明实施例中,第一设备可以判断出第二设备UE2-1发送所述请求消息后,不存在该请求消息中所携带的组标识对应的上下文,因此,第一设备向第二设备UE2-1第二请求消息,并在所述第二请求消息中携带所述组标识,以使第二设备UE2-1返回第一IP地址和第一端口号,其中,第一IP地址和第一端口号为第二设备UE2-1向第三设备请求所述组数据时使用的IP地址和端口号。
S605:第二设备UE2-1向第一设备发送第二响应消息,所述第二响应消息携带第一IP地址和第一端口号。
作为一种可行的实施方式,若第二设备分别通过相同的IP地址、不同的端口号传输所述组标识对应的组数据和应用层信令消息(例如,通过IP地址XX1、端口号YY1接收所述组标识对应的组数据,通过IP地址XX1、端口号ZZ1传输所述组标识对应的应用层信令消息,其中,所述传输包括发送和接收,具体的,本发明实施例不作限制),则第二设备UE2-1接收到第一设备发送的第二请求消息后,从第二请求消息中解析出该第二请求消息所携带的组标识,并获取该组标识对应的第一IP地址和第一端口号,其中,第一IP地址和第一端口号为第二设备UE2-1向第三设备请求所述组标识对应的组数据时所使用的IP地址和端口号。第二设备UE2-1向第一设备发送第二响应消息,所述第
二响应消息携带第一IP地址和第一端口号。从而,能够实现后续第一设备接收到经过地址转换后的数据包,且数据包的目的地址为第一IP地址、目的端口号为第一端口号的数据包时,将其发送到一个或多个第二设备。
作为另一种可行的实施方式,若第三设备分别通过相同的IP地址、不同的端口号传输所述组标识对应的组数据和应用层信令消息(例如,通过IP地址XX3、端口号YY3发送所述组标识对应的组数据,通过IP地址XX3、端口号ZZ3传输所述组标识对应的应用层信令消息,其中,所述传输包括发送和接收,具体的,本发明实施例不作限制),则第二设备UE2-1接收到第一设备发送的第二请求消息后,从第二请求消息中解析出该第二请求消息所携带的组标识,并获取该组标识对应的第一IP地址、第一端口号和第四IP地址、第四端口号;其中,第一IP地址和第一端口号为第二设备UE2-1向第三设备请求所述组标识对应的组数据时所使用的IP地址和端口号,第四IP地址和第四端口号为第三设备所使用的向第二设备发送所述组数据时所使用的IP地址和端口号。第二设备UE2-1向第一设备发送第二响应消息,所述第二响应消息携带第一IP地址、第一端口号、第四IP地址和第四端口号。从而,能够实现后续第一设备接收到经过地址转换后的数据包,且数据包的源地址为第四IP地址、源端口号为第四端口号、目的地址为第一IP地址、目的端口号为第一端口号的数据包时,将其发送到一个或多个第二设备。
S606:第一设备向第二设备UE2-1发送第一响应消息,所述第一响应消息携带所述组标识对应的层2地址、第二IP地址和第二端口号。
第一设备接收到第二设备UE2-1发送的第二响应消息后,根据组标识分配所述组标识对应的层2地址、第二IP地址和第二端口号。本实施例中,第一设备分配层2地址、IP地址、端口号等信息可以包括:第一设备在收到第二设备UE2-1的第二响应消息后分配层2地址、第二IP地址和第二端口号等信息,或第一设备预置了一些层2地址、IP地址、端口号等信息,当收到第二设备UE2-1的第二响应消息后,从预置的信息中选择一组层2地址、IP地址、端口号等信息作为该组标识对应的层2地址、第二IP地址、第二端口号。本发明实施例中,所述层2地址用于后续第一设备使用该层二地址将收到的发送至第二设备UE2-1的数据发送至所有请求转发该组数据的第二设备,从而
第二设备UE2-1从该层2地址上监听并接收所述组数据,具体实现中,第二设备可以设置默认的用于接收所述组数据的端口号,因此,在所述第一响应消息中第二端口号为可选项。第一设备接收到第三设备发送的所述组数据后,将所述组数据路由至所述第二IP地址和第二端口号,从而,第二IP地址和第二端口号为第一设备发送所述组数据时所采用的目的IP地址和目的端口号。具体实现中,所述第二IP地址可以是IP组播地址,所述第二IP地址和第二端口号为第一设备分配的用于指示所述组数据的目的IP地址和目的端口号。
值得说明的是,第一设备发送给第二设备UE2-1的第一响应消息中还可以携带单播保持标识,以使第二设备UE2-1接收到第一设备返回的第一响应消息后保持步骤S601所建立的通信连接,从而,第二设备UE2-1保持从第三设备接收单播形式分发的所述组数据的通信连接。
为使第一设备将发送至第二设备UE2-1的组数据发送给所有向第一设备发出第一请求消息的第二设备,并使得第二设备在第二IP地址和第二端口号接收组数据。本发明实施例中,第一设备接收到第三设备发送给第二设备UE2-1的所述组数据时,本步骤后,第一设备应修改NAT转换表或路由表,具体的:
当第二设备UE2-1使用相同IP地址、不同端口号传输所述组标识对应的应用层信令和数据时,由于第一设备使用NAT功能将第二设备UE2-1用于请求所述组数据的第一IP地址和第一端口号转换为第一设备用于接收该组数据的第三IP地址和第三端口号。因此,当第一设备接收到发往所述第三IP地址和所述第三端口号的数据时,通过NAT地址转换为第一IP地址和第一端口号,根据第二设备UE2-1返回的第二响应消息,修改路由表将经过地址转化后的目的地址和目的端口号为第一IP地址和第一端口号的数据的目的地址修改为第二IP地址和第二端口号;若在第一响应消息中不包含端口号,则不改变数据的端口号,即仍为第一端口号,使得数据路由到第二IP地址和第二端口号,或第二IP地址和第一端口号。可选的,第一设备也可以修改NAT转化表实现上述目的,将发送至所述第三IP地址和所述第三端口号的数据的地址直接转换为第二IP地址和第二端口号,进行转发,若在第一响应消息中不包含端口号,则不改变数据的端口号,即转换为第二IP地址和第一端口号。
当第三设备使用相同IP地址、不同端口号传输所述组标识对应的应用层信令和数据时,同上,第一设备使用NAT功能将第二设备UE2-1用于请求所述组数据的第一IP地址和第一端口号转换为第一设备用于接收该组数据的第三IP地址和第三端口号。因此,当第一设备接收到发往所述第三IP地址和所述第三端口号的数据时,通过NAT地址转换为第一IP地址和第一端口号,根据第二设备UE2-1返回的第二响应消息,修改路由表将经过地址转化后的目的地址和目的端口为第一IP地址和第一端口号、且源地址和源端口号为第四IP地址和第四端口号的数据,修改其目的地址和目的端口号为第二IP地址和第二端口号;若在第一响应消息中不包含端口号,则不改变数据的端口号,即仍保持为第一端口号,使得数据重新路由到第二IP地址和第二端口,或重新路由到第二IP地址和第一端口。
S607、第一设备广播所述组标识或所述组标识对应的信息。
本发明实施例中,第一设备向第二设备UE2-1返回第一响应消息后,说明第一设备可以转发该第二设备所要请求的组数据,因此,第一设备可以广播所述组标识或所述组标识对应的信息。从而,后续如果存在其它的第二设备(如UE2-2)需要向第一设备请求该组标识对应的组数据时,若已监听到所述组标识或所述组标识对应的信息,则说明第一设备可以中转该组数据,因此,后续请求该组数据的第二设备可以直接向第一设备发送第一请求消息,以接收所述组数据,而无需与第三设备建立用于接收所述组数据的通信连接。在可选实施例中,所述第一响应消息中还可以携带与该组标识对应的更新定时器,新设置的更新定时器均存在一个预设时长,从而,该更新定时器可以用于指示广播所述组标识的剩余时长。当更新定时器对应的剩余时长为0时,若第二设备仍想继续监听该组数据,则第二设备需重新向第一设备发送请求消息,第一设备执行步骤S601;否则,第一设备停止中转该组数据,同时,删除该请求中的上下文等信息,从而,可以有效降低终端功耗,提高使用寿命。
S608、第二设备监听所述组标识或所述组标识对应的信息。
具体实现中,第一设备广播所述组标识或所述组标识对应的信息后,第二设备可以监听到该组标识或该组标识对应的信息,从而,可以获知第一设备当前可以转发第三设备发送的该组标识对应的组数据。于是,若第二设备UE2-2
也需要接收该组数据,则可以向第一设备发送第一请求消息,并在第一请求消息中携带该组标识。
S609、第二设备UE2-2向第一设备发送第一请求消息,所述第一请求消息携带所述组标识。
本发明实施例中,由于第二设备UE2-2在需要请求所述组数据时已监听到第一设备广播的所述组标识或所述组标识对应的信息,因此,第二设备UE2-2向第一设备发送第一请求消息之前,无需与第三设备建立用于接收所述组数据的通信连接。值得说明的是,第二设备UE2-2与第二设备UE2-1发送的第一请求消息中所携带的组标识相同。具体的技术细节可以参照步骤S602,此处不再赘述。
S610、第一设备判断是否存在该组标识对应的上下文。
具体实现中,第一设备接收到第二设备发送的第一请求消息后,第一设备判断是否已存在所述组标识对应的上下文,如是否存在该组标识对应的层2地址、第二IP地址等信息,具体的技术细节可参照上述实施例,如步骤S102,此处不再赘述。
S611:第一设备向第二设备UE2-2发送第一响应消息,所述第一响应消息携带所述组标识对应的层2地址、第二IP地址和第二端口号。
本发明实施例中,由于第二设备UE2-2向第一设备发送所述第一请求消息之前,已存在第二设备UE2-1向第一设备发送过所述第一请求消息,且第一设备已分配该第一请求消息中的组标识对应的层2地址、第二IP地址等信息,因此,第一设备接收到第二设备UE2-2发送的所述第一请求消息之后,可以判断出已存在该组标识对应的上下文。
本发明实施例中,第一设备接收到第二设备发送的第一请求消息之后,若判断出已存在该第一请求消息中所携带的组标识对应的上下文,则直接获取该组标识对应的层2地址、第二IP地址和第二端口号,并向该第二设备返回第一响应消息,所述第一响应消息携带所获取到的层2地址、第二IP地址和第二端口号。值得说明的是,具体实现中,同步骤S606,第二端口号为可选项。
S612、第一设备接收第三设备发送给第二设备UE2-1的所述组数据。
具体实现中,当第一设备接收到经过地址转换后的目的IP地址和目的端
口号分别为第一IP地址和第一端口号的数据时,或者,当第一设备接收到经过地址转换后的目的IP地址和目的端口号分别为第一IP地址和第一端口号、源IP地址和源端口号分别为第四IP地址和第四端口号的数据时,则根据步骤S606中第一设备在返回第一响应消息后的设置,第一设备将该数据包路由到第二IP地址和第二端口号,若第一响应消息不包含第二端口号,则仅修改接收数据的目的IP地址为第二IP地址。
S613、第一设备使用所述层2地址发送所述组数据。
本发明实施例中,第二设备UE2-1和第二设备UE2-2均向第一设备请求了获取所述组数据,其中,第二设备UE2-2可以是一个或多个第二设备,具体的,本发明实施例不做限制。
当第一设备接收到第三设备发送给第二设备UE2-1的所述组数据时,将所述组数据发送至第二IP地址和第二端口号上,并使用所述层2地址在数据链路层发送所述组数据。从而,已从第一设备接收到第一响应消息的一个或多个第二设备均可以从所述层2地址上监听并接收到所述组数据,第一设备实现了单播数据到多播数据的中继。
在本发明实施例描述的数据通信方法中,第一设备接收至少一个第二设备发送的第一请求消息,所述第一请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;所述第一设备向所述至少一个第二设备返回第一响应消息,所述第一响应消息携带所述组标识对应的层2地址和IP地址;当接收到第三设备发送至所述至少一个第二设备中的其中一个第二设备的所述组数据时,所述第一设备使用所述层2地址发送所述组数据。采用本发明实施例,第一设备将第三设备发送给其中一个第二设备的组数据发送给向第一设备请求了该组数据的一个或多个第二设备,可以提高数据传输效率。
需要说明的是,本实施例不限制第二设备UE2-1与第三设备建立接收组数据的通信连接的顺序,即第二设备UE2-1可以是在发出第一请求消息之前建立与第三设备的用于传输所述组数据的通信连接,当接收到第一设备发送的第二请求消息时,根据所建立的通信连接返回第二响应消息;也可以是在接收到第二请求消息之后,建立与第三设备的用于传输所述组数据的通信连接,并在完成所述通信建立后,返回第二响应消息。具体的,本发明实施例不作限制。
下面为本发明装置实施例,本发明装置实施例与本发明方法实施例属于同一构思,用于执行本发明方法实施例中描述的方法。为了便于说明,本发明装置实施例仅示出与本发明装置实施例相关的部分,具体技术细节未揭示的,请参照本发明方法实施例的描述,此处不再一一赘述。
为方便理解,值得说明的是,图7、图8和图9所述实施例中提及的设备对应上述实施例中的第一设备,具体的技术细节可以参照图1、图2、图2a所描述的方法实施例;图10、图11和图12所描述的实施例中所提述的设备对应上述实施例中的第二设备,具体的技术细节可以参照图3、图4、图4a所描述的方法实施例,此处不再赘述。
请参见图7,图7是本发明实施例提供的一种设备的结构示意图,在本发明实施例中,该设备可以包括:第一接收模块101、第一返回模块102和第一发送模块103。
第一接收模块101,用于接收至少一个第二设备发送的请求消息,所述请求消息用于请求所述设备转发组数据,所述请求消息携带组标识。
第一返回模块102,用于向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址。
第一发送模块103,用于当接收到第三设备发送至所述IP地址的所述组数据时,使用所述层2地址发送所述组数据。
在本发明实施例描述的设备中,第一设备接收至少一个第二设备发送的请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;当接收到第三设备发送至所述IP地址的所述组数据时,所述第一设备使用所述层2地址发送所述组数据。采用本发明实施例,第一设备使用所述层2地址发送所述组数据,从而,已向所述第一设备请求了该组数据的一个或多个第二设备均可以从所述层2地址上接收所述组数据,提高数据传输效率。
请参见图8,图8是本发明实施例提供的一种设备的另一结构示意图,在
本发明实施例中,该设备除包括上述实施例中所描述的第一接收模块101、第一返回模块102和第一发送模块103外,还可以包括:判断模块201、分配模块202、获取模块203和广播模块204。
在可选的实现方式中,所述IP地址为所述设备分配的用于所述至少一个第二设备向所述第三设备请求所述组数据的IP地址。
在另一可选的实现方式中,所述响应消息还携带所述组标识对应的端口号;所述端口号为所述第一设备分配的用于所述至少一个第二设备向所述第三设备请求所述组数据的端口号。
在另一可选的实现方式中,所述设备还可以包括判断模块201和分配模块202,其中,判断模块201用于第一接收模块101接收至少一个第二设备发送的请求消息之后,判断是否已存在所述组标识对应的上下文。分配模块202,用于若不存在所述上下文,分配所述组标识对应的所述层2地址和所述IP地址;其中,所述第一返回模块返回的响应消息携带所述分配模块所分配的所述层2地址和所述IP地址。
在另一可选的实现方式中,所述设备还可以包括获取模块203,用于若存在所述上下文,获取所述组标识对应的所述层2地址和所述IP地址;其中,第一返回模块102返回的响应消息携带所述获取模块所获取的所述层2地址和所述IP地址。
在另一可选的实现方式中,若不存在所述上下文,第一返回模块102返回的响应消息还携带单播指示标识,以使所述至少一个第二设备使用所述IP地址向所述第三设备请求所述组数据。
在另一可选的实现方式中,第一接收模块101还用于,第一返回模块102向所述至少一个第二设备返回响应消息之后,接收目标第二设备发送的第一消息;其中,所述目标第二设备为所述至少一个第二设备中未监听到所述组标识或所述组标识对应的信息的第二设备,所述第一消息为所述目标第二设备成功向所述第三设备请求所述组数据后发送的消息;判断模块201还可以用于,判断是否属于首次接收所述第一消息;第一返回模块102还用于,若所述第一设备属于首次接收所述第一消息,向所述目标第二设备返回第二消息,以使所述任一第二设备保持与所述第三设备用于接收所述组数据的通信连接。
在另一可选的实现方式中,第一返回模块102还用于,若所述第一设备不属于首次接收所述第一消息,向所述目标第二设备返回第三消息,以使所述目标第二设备释放与所述第三设备用于接收所述组数据的通信连接。
在另一可选的实现方式中,所述设备还可以包括广播模块204,用于所述第一返回模块向所述目标第二设备返回所述第二消息之后,广播所述组标识或广播所述组标识对应的信息。
在本发明实施例描述的设备中,第一设备接收至少一个第二设备发送的请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;当接收到第三设备发送至所述IP地址的所述组数据时,所述第一设备使用所述层2地址发送所述组数据。采用本发明实施例,第一设备使用所述层2地址发送所述组数据,从而,已向所述第一设备请求了该组数据的一个或多个第二设备均可以从所述层2地址上接收所述组数据,提高数据传输效率。
请参见图9,图9是本发明实施例提供的一种设备的又一结构示意图,在本发明实施例中,该设备包括存储器10和处理器20,存储器10和处理器20通过总线12连接。
本发明实施例中,存储器10中保存有用于第一设备实现数据通信方法的指令,处理器20调取并执行存储器10中的指令,实现第一设备处理的数据通信方法。本发明实施例中,所述设备的技术原理和技术效果可以参考图1、图2、图2a、图7、图8所示实施例中关于第一设备的相关描述,此处不再赘述。
请参见图10,图10是本发明实施例提供的一种设备的再一结构示意图,在本发明实施例中,该设备可以包括:第二发送模块301、第二接收模块302和第三接收模块303。
第二发送模块301,用于向第一设备发送请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识。
第二接收模块302,用于接收所述第一设备返回的响应消息,所述响应消
息携带所述组标识对应的层2地址和IP地址;其中,所述第一设备用于接收至少一个所述设备发送的请求消息,并在接收到第三设备发送至所述IP地址的所述组数据时,使用所述层2地址发送所述组数据。
第三接收模块303,用于从所述层2地址上接收所述组数据。
在本发明实施例描述的设备中,第二设备向第一设备发送请求消息,所述请求消息携带组标识;第二设备接收第一设备返回的响应消息,所述响应消息携带组标识对应的层2地址和IP地址;其中,第一设备接收到第三设备发送至该IP地址的所述组数据时,使用层2地址发送所述组数据;第二设备从所述层2地址上接收所述组数据。采用本发明实施例,第一设备使用层2地址转发第三设备发送给所述IP地址的所述组数据,从而,已向第一设备请求了该组数据的一个或多个第二设备均可以从该层2地址上接收所述组数据,可以提高数据传输效率。
请参见图11,图11是本发明实施例提供的一种设备的再一结构示意图,在本发明实施例中,该设备除包括上述实施例中所描述的第二发送模块301、第二接收模块302和第三接收模块303外,还可以包括:请求模块401、保持模块402和释放模块403。
在可选的实现方式中,所述响应消息还携带所述组标识对应的端口号;其中,所述IP地址和所述端口号为所述第一设备分配的用于所述设备请求所述组数据的IP地址和端口号。
在另一可选的实现方式中,所述设备还可以包括请求模块401,用于第二接收模块302接收所述第一设备返回的响应消息之后,使用所述IP地址向所述第三设备请求所述组数据;或者,使用所述IP地址和所述端口号向所述第三设备请求所述组数据。
在另一可选的实现方式中,若所述设备未监听到所述组标识或所述组标识对应的信息,请求模块401向所述第三设备请求所述组数据;或者,若所述响应消息还携带单播指示标识,请求模块401向所述第三设备请求所述组数据。
在另一可选的实现方式中,第二发送模块301还用于请求模块401成功向所述第三设备请求所述组数据之后,向所述第一设备发送第一消息;保持模块
402,用于若接收到所述第一设备返回的第二消息,保持与所述第三设备用于接收所述组数据的通信连接;释放模块403,用于若接收到所述第一设备返回的第三消息,释放与所述第三设备用于接收所述组数据的通信连接。
在另一可选的实现方式中,请求模块401具体用于:
将所述IP地址和/或所述端口号作为传输应用信令的数据包的源IP地址和/或源端口号,并将所述数据包发送给所述第三设备,以向所述第三设备请求所述组数据;或者,
将所述IP地址和/或所述端口号作为会话初始协议SIP消息中的会话描述协议SDP消息体中的IP地址和/或端口号,并将所述SIP消息发送给所述第三设备,以向所述第三设备请求所述组数据。
在本发明实施例描述的设备中,第二设备向第一设备发送请求消息,所述请求消息携带组标识;第二设备接收第一设备返回的响应消息,所述响应消息携带组标识对应的层2地址和IP地址;其中,第一设备接收到第三设备发送至该IP地址的所述组数据时,使用层2地址发送所述组数据;第二设备从所述层2地址上接收所述组数据。采用本发明实施例,第一设备使用层2地址转发第三设备发送给所述IP地址的所述组数据,从而,已向第一设备请求了该组数据的一个或多个第二设备均可以从该层2地址上接收所述组数据,可以提高数据传输效率。
请参见图12,图12是本发明实施例提供的一种设备的再一结构示意图,在本发明实施例中,该设备包括存储器30和处理器40,存储器30和处理器40通过总线34连接。
本发明实施例中,存储器30中保存有用于第二设备实现数据通信方法的指令,处理器40调取并执行存储器30中的指令,实现第二设备处理的数据通信方法。本发明实施例中,所述设备的技术原理和技术效果可以参考图3、图4、图4a、图10、图11所示实施例中关于第二设备的相关描述,此处不再赘述。
需要说明的是,对于前述的各个方法实施例,为了简单描述,故将其都表
述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某一些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详细描述的部分,可以参见其他实施例的相关描述。此外,术语“第一”、“第二”、“第三”、“第四”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。
以上对本发明实施例所提供的内容下载方法及相关设备、系统进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。
Claims (32)
- 一种数据通信方法,其特征在于,包括:第一设备接收至少一个第二设备发送的请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;当接收到第三设备发送至所述IP地址的所述组数据时,所述第一设备使用所述层2地址发送所述组数据。
- 如权利要求1所述的方法,其特征在于,所述IP地址为所述第一设备分配的用于所述至少一个第二设备向所述第三设备请求所述组数据的IP地址。
- 如权利要求1所述的方法,其特征在于,所述响应消息还携带所述组标识对应的端口号;所述端口号为所述第一设备分配的用于所述至少一个第二设备向所述第三设备请求所述组数据的端口号。
- 如权利要求1所述的方法,其特征在于,所述第一设备接收至少一个第二设备发送的请求消息之后,所述方法还包括:所述第一设备判断是否已存在所述组标识对应的上下文;若否,所述第一设备分配所述组标识对应的所述层2地址和所述IP地址;所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址,包括:所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所分配的所述层2地址和所述IP地址。
- 如权利要求4所述的方法,其特征在于,所述方法还包括:若存在所述上下文,所述第一设备获取所述组标识对应的所述层2地址和所述IP地址;所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址,包括:所述第一设备向所述至少一个第二设备返回响应消息,所述响应消息携带所获取的所述层2地址和所述IP地址。
- 如权利要求4所述的方法,其特征在于,所述方法还包括:若不存在所述上下文,所述响应消息还携带单播指示标识,以使所述至少一个第二设备使用所述IP地址向所述第三设备请求所述组数据。
- 如权利要求1-6任一项所述的方法,其特征在于,所述第一设备向所述至少一个第二设备返回响应消息之后,所述方法还包括:所述第一设备接收目标第二设备发送的第一消息;其中,所述目标第二设备为所述至少一个第二设备中未监听到所述组标识或所述组标识对应的信息的第二设备,所述第一消息为所述目标第二设备成功向所述第三设备请求所述组数据后发送的消息;若所述第一设备属于首次接收所述第一消息,则所述第一设备向所述目标第二设备返回第二消息,以使所述目标第二设备保持与所述第三设备用于接收所述组数据的通信连接。
- 如权利要求7所述的方法,其特征在于,所述方法还包括:若所述第一设备不属于首次接收所述第一消息,则所述第一设备向所述目标第二设备返回第三消息,以使所述目标第二设备释放与所述第三设备用于接收所述组数据的通信连接。
- 如权利要求7所述的方法,其特征在于,所述第一设备向所述目标第二设备返回所述第二消息之后,所述方法还包括:所述第一设备广播所述组标识或广播所述组标识对应的信息。
- 一种数据通信方法,其特征在于,包括:第二设备向第一设备发送请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;所述第二设备接收所述第一设备返回的响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;其中,所述第一设备用于接收至少一个第二设备发送的请求消息,并在接收到第三设备发送至所述IP地址的所述组数据时,使用所述层2地址发送所述组数据;所述第二设备从所述层2地址上接收所述组数据。
- 如权利要求10所述的方法,其特征在于,所述响应消息还携带所述组标识对应的端口号;其中,所述IP地址和所述端口号为所述第一设备分配的用于所述第二设备请求所述组数据的IP地址和端口号。
- 如权利要求10或11所述的方法,其特征在于,所述第二设备接收所述第一设备返回的响应消息之后,所述方法还包括:所述第二设备使用所述IP地址向所述第三设备请求所述组数据;或者,所述第二设备使用所述IP地址和所述端口号向所述第三设备请求所述组数据。
- 如权利要求12所述的方法,其特征在于,所述第二设备向所述第三设备请求所述组数据,包括:若所述第二设备未监听到所述组标识或所述组标识对应的信息,所述第二设备向所述第三设备请求所述组数据;或者,若所述响应消息还携带单播指示标识,所述第二设备向所述第三设备请求所述组数据。
- 如权利要求12或13所述的方法,其特征在于,所述第二设备成功向所述第三设备请求所述组数据之后,所述方法还包括:所述第二设备向所述第一设备发送第一消息;若接收到所述第一设备返回的第二消息,所述第二设备保持与所述第三设 备用于接收所述组数据的通信连接;若接收到所述第一设备返回的第三消息,所述第二设备释放与所述第三设备用于接收所述组数据的通信连接。
- 如权利要求12或13所述的方法,其特征在于,所述第二设备向所述第三设备请求所述组数据,包括:将所述IP地址和/或所述端口号作为传输应用信令的数据包的源IP地址和/或源端口号,并将所述数据包发送给所述第三设备,以向所述第三设备请求所述组数据;或者,将所述IP地址和/或所述端口号作为会话初始协议SIP消息中的会话描述协议SDP消息体中的IP地址和/或端口号,并将所述SIP消息发送给所述第三设备,以向所述第三设备请求所述组数据。
- 一种设备,其特征在于,包括:第一接收模块,用于接收至少一个第二设备发送的请求消息,所述请求消息用于请求所述设备转发组数据,所述请求消息携带组标识;第一返回模块,用于向所述至少一个第二设备返回响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;第一发送模块,用于当接收到第三设备发送至所述IP地址的所述组数据时,使用所述层2地址发送所述组数据。
- 如权利要求16所述的设备,其特征在于,所述IP地址为所述设备分配的用于所述至少一个第二设备向所述第三设备请求所述组数据的IP地址。
- 如权利要求16所述的设备,其特征在于,所述响应消息还携带所述组标识对应的端口号;所述端口号为所述第一设备分配的用于所述至少一个第二设备向所述第三设备请求所述组数据的端口号。
- 如权利要求16所述的设备,其特征在于,所述设备还包括:判断模块,用于所述第一接收模块接收至少一个第二设备发送的请求消息之后,判断是否已存在所述组标识对应的上下文;分配模块,用于若不存在所述上下文,分配所述组标识对应的所述层2地址和所述IP地址;其中,所述第一返回模块返回的响应消息携带所述分配模块所分配的所述层2地址和所述IP地址。
- 如权利要求19所述的设备,其特征在于,所述设备还包括:获取模块,用于若存在所述上下文,获取所述组标识对应的所述层2地址和所述IP地址;其中,所述第一返回模块返回的响应消息携带所述获取模块所获取的所述层2地址和所述IP地址。
- 如权利要求19所述的设备,其特征在于,若不存在所述上下文,所述第一返回模块返回的响应消息还携带单播指示标识,以使所述至少一个第二设备使用所述IP地址向所述第三设备请求所述组数据。
- 如权利要求16-21任一项所述的设备,其特征在于,所述第一接收模块还用于,所述第一返回模块向所述至少一个第二设备返回响应消息之后,接收目标第二设备发送的第一消息;其中,所述目标第二设备为所述至少一个第二设备中未监听到所述组标识或所述组标识对应的信息的第二设备,所述第一消息为所述目标第二设备成功向所述第三设备请求所述组数据后发送的消息;所述第一返回模块还用于,若所述第一设备属于首次接收所述第一消息,向所述目标第二设备返回第二消息,以使所述目标第二设备保持与所述第三设备用于接收所述组数据的通信连接。
- 如权利要求22所述的设备,其特征在于,所述第一返回模块还用于,若所述第一设备不属于首次接收所述第一消息,向所述目标第二设备返回第三 消息,以使所述目标第二设备释放与所述第三设备用于接收所述组数据的通信连接。
- 如权利要求22所述的设备,其特征在于,所述设备还包括:广播模块,用于所述第一返回模块向所述目标第二设备返回所述第二消息之后,广播所述组标识或广播所述组标识对应的信息。
- 一种设备,其特征在于,包括:第二发送模块,用于向第一设备发送请求消息,所述请求消息用于请求所述第一设备转发组数据,所述请求消息携带组标识;第二接收模块,用于接收所述第一设备返回的响应消息,所述响应消息携带所述组标识对应的层2地址和IP地址;其中,所述第一设备用于接收至少一个所述设备发送的请求消息,并在接收到第三设备发送至所述IP地址的所述组数据时,使用所述层2地址发送所述组数据;第三接收模块,用于从所述层2地址上接收所述组数据。
- 如权利要求25所述的设备,其特征在于,所述响应消息还携带所述组标识对应的端口号;其中,所述IP地址和所述端口号为所述第一设备分配的用于所述设备请求所述组数据的IP地址和端口号。
- 如权利要求25或26所述的设备,其特征在于,所述设备还包括:请求模块,用于所述第二接收模块接收所述第一设备返回的响应消息之后,使用所述IP地址向所述第三设备请求所述组数据;或者,使用所述IP地址和所述端口号向所述第三设备请求所述组数据。
- 如权利要求27所述的设备,其特征在于,若所述设备未监听到所述组标识或所述组标识对应的信息,所述请求模块向所述第三设备请求所述组数据;或者,若所述响应消息还携带单播指示标识,所述请求模块向所述第三设备请求 所述组数据。
- 如权利要求27或28所述的设备,其特征在于,所述第二发送模块,还用于所述请求模块成功向所述第三设备请求所述组数据之后,向所述第一设备发送第一消息;所述设备还包括:保持模块,用于若接收到所述第一设备返回的第二消息,保持与所述第三设备用于接收所述组数据的通话连接;释放模块,用于若接收到所述第一设备返回的第三消息,释放与所述第三设备用于接收所述组数据的通信连接。
- 如权利要求27或28所述的设备,其特征在于,所述请求模块具体用于:将所述IP地址和/或所述端口号作为传输应用信令的数据包的源IP地址和/或源端口号,并将所述数据包发送给所述第三设备,以向所述第三设备请求所述组数据;或者,将所述IP地址和/或所述端口号作为会话初始协议SIP消息中的会话描述协议SDP消息体中的IP地址和/或端口号,并将所述SIP消息发送给所述第三设备,以向所述第三设备请求所述组数据。
- 一种设备,包括存储器和处理器,所述存储器和所述处理器通过总线连接,其特征在于:所述存储器中保存有实现如权利要求1-9任一项所述的数据通信方法的指令,所述处理器调取并执行所述存储器中的指令,实现如权利要求1-9任一项所述的数据通信方法。
- 一种设备,包括存储器和处理器,所述存储器和所述处理器通过总线连接,其特征在于:所述存储器中保存有实现如权利要求10-15任一项所述的数据通信方法的指令,所述处理器调取并执行所述存储器中的指令,实现如权利要求10-15任一项所述的数据通信方法。
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201580073957.1A CN107211483B (zh) | 2015-01-19 | 2015-01-19 | 一种数据通信方法及终端 |
PCT/CN2015/071034 WO2016115669A1 (zh) | 2015-01-19 | 2015-01-19 | 一种数据通信方法及终端 |
US15/654,284 US9967918B2 (en) | 2015-01-19 | 2017-07-19 | Data communication method and terminal |
US15/945,290 US10187927B2 (en) | 2015-01-19 | 2018-04-04 | Data communication method and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2015/071034 WO2016115669A1 (zh) | 2015-01-19 | 2015-01-19 | 一种数据通信方法及终端 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/654,284 Continuation US9967918B2 (en) | 2015-01-19 | 2017-07-19 | Data communication method and terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016115669A1 true WO2016115669A1 (zh) | 2016-07-28 |
Family
ID=56416255
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/071034 WO2016115669A1 (zh) | 2015-01-19 | 2015-01-19 | 一种数据通信方法及终端 |
Country Status (3)
Country | Link |
---|---|
US (2) | US9967918B2 (zh) |
CN (1) | CN107211483B (zh) |
WO (1) | WO2016115669A1 (zh) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111699750A (zh) * | 2018-02-07 | 2020-09-22 | 三星电子株式会社 | 基于连接信息与外部装置连接的电子装置及其操作方法 |
WO2021147778A1 (zh) * | 2020-01-22 | 2021-07-29 | 维沃移动通信有限公司 | 承载建立方法、配置方法、终端及网络侧设备 |
WO2023020465A1 (zh) * | 2021-08-20 | 2023-02-23 | 维沃移动通信有限公司 | 地址转换控制方法、装置、终端及网元 |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
SE538778C2 (en) * | 2014-11-07 | 2016-11-15 | Crunchfish Ab | Selective user interaction in a dynamic, proximity-based group of wireless communication devices |
WO2016158266A1 (ja) * | 2015-03-31 | 2016-10-06 | 株式会社Nttドコモ | ユーザ装置 |
JP7076544B2 (ja) * | 2018-05-29 | 2022-05-27 | 京セラ株式会社 | 移動通信システム及び無線端末 |
US20210385883A1 (en) * | 2018-09-27 | 2021-12-09 | Lenovo (Beijing) Limited | Method and apparatus for unicast connection establishment |
WO2020093328A1 (en) * | 2018-11-08 | 2020-05-14 | Lenovo (Beijing) Limited | Method and apparatus for groupcast connection establishment and transmission |
CA3121850A1 (en) | 2019-01-03 | 2020-07-09 | Avive Solutions, Inc. | Defibrillator communications architecture |
KR102257803B1 (ko) * | 2019-06-14 | 2021-05-28 | 엘지전자 주식회사 | 자율주행시스템에서 다른 자율주행차량을 이용한 원격주행 방법 |
CN114520965B (zh) * | 2020-11-19 | 2024-03-01 | 瑞昱半导体股份有限公司 | 无线中继装置及用于无线中继装置的配置方法 |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110238854A1 (en) * | 2010-03-29 | 2011-09-29 | Fang Tsan-Sen | Streaming data relay apparatus and related wireless gateway apparatus |
CN104283979A (zh) * | 2013-07-11 | 2015-01-14 | 华为技术有限公司 | 组播域名系统中报文传输的方法、装置及系统 |
Family Cites Families (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7457289B2 (en) * | 2002-12-16 | 2008-11-25 | Cisco Technology, Inc. | Inter-proxy communication protocol for mobile IP |
JP3714340B2 (ja) * | 2003-05-20 | 2005-11-09 | 日本電気株式会社 | プレゼンスサービスを応用したアクセスポイント高速接続方法 |
US20060007930A1 (en) * | 2004-07-09 | 2006-01-12 | Dorenbosch Jheroen P | Downlink multicast method in wireless internet protocol system |
KR100736933B1 (ko) * | 2004-09-14 | 2007-07-10 | 삼성전자주식회사 | 이동단말의 제어방법 |
JP4577222B2 (ja) * | 2006-01-20 | 2010-11-10 | 株式会社デンソー | 移動通信システム、無線基地局、および配信方法 |
JP4773387B2 (ja) * | 2007-03-19 | 2011-09-14 | 株式会社日立製作所 | ネットワークシステム |
US20090327434A1 (en) * | 2008-06-30 | 2009-12-31 | Nokia Corporation | Method, Apparatus, and Computer Program Product for Anonymous Polling |
JP4931888B2 (ja) * | 2008-09-29 | 2012-05-16 | アラクサラネットワークス株式会社 | 転送装置、転送方法、およびコンピュータプログラム |
US9131004B2 (en) * | 2009-04-26 | 2015-09-08 | Jeffrey Alan Carley | Method and apparatus for network address resolution |
EP2534789B1 (en) * | 2010-02-11 | 2015-10-28 | Nokia Solutions and Networks Oy | Device management |
US8582423B2 (en) * | 2010-08-04 | 2013-11-12 | Alcatel Lucent | Multi-chassis inter-process communication |
US9300540B2 (en) * | 2010-11-09 | 2016-03-29 | Avaya Inc. | Multicast network diagnostics |
EP2707969B1 (en) * | 2011-07-12 | 2018-11-28 | Huawei Technologies Co., Ltd. | System and method for direct multi-user transmission |
US8984606B2 (en) * | 2011-12-22 | 2015-03-17 | Hewlett-Packard Development Company, L.P. | Re-authentication |
WO2014077580A1 (en) | 2012-11-13 | 2014-05-22 | Lg Electronics Inc. | Method and apparatus of supporting ue relay functions |
US20140351445A1 (en) * | 2013-05-24 | 2014-11-27 | Qualcomm Incorporated | Mac layer transport for wi-fi direct services application service platform without internet protocol |
-
2015
- 2015-01-19 CN CN201580073957.1A patent/CN107211483B/zh active Active
- 2015-01-19 WO PCT/CN2015/071034 patent/WO2016115669A1/zh active Application Filing
-
2017
- 2017-07-19 US US15/654,284 patent/US9967918B2/en active Active
-
2018
- 2018-04-04 US US15/945,290 patent/US10187927B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110238854A1 (en) * | 2010-03-29 | 2011-09-29 | Fang Tsan-Sen | Streaming data relay apparatus and related wireless gateway apparatus |
CN104283979A (zh) * | 2013-07-11 | 2015-01-14 | 华为技术有限公司 | 组播域名系统中报文传输的方法、装置及系统 |
Non-Patent Citations (2)
Title |
---|
"3rd Generation Partnership Project: ''Proximity-based services (ProSe)'', ''Stage 2 (Release 12", TECHNICAL SPECIFICATION GROUP SERVICES AND SYSTEM ASPECTS, 17 December 2014 (2014-12-17) * |
TECHNICAL SPECIFICATION GROUP SERVICES AND SYSTEM ASPECTS: "3rd Generation Partnership Project: ''Study on extended architecture support for Proximity-based services (Release 13", 3GPP TR 23. 713 V0.3.0, 2 December 2014 (2014-12-02) * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111699750A (zh) * | 2018-02-07 | 2020-09-22 | 三星电子株式会社 | 基于连接信息与外部装置连接的电子装置及其操作方法 |
CN111699750B (zh) * | 2018-02-07 | 2023-05-26 | 三星电子株式会社 | 基于连接信息与外部装置连接的电子装置及其操作方法 |
WO2021147778A1 (zh) * | 2020-01-22 | 2021-07-29 | 维沃移动通信有限公司 | 承载建立方法、配置方法、终端及网络侧设备 |
WO2023020465A1 (zh) * | 2021-08-20 | 2023-02-23 | 维沃移动通信有限公司 | 地址转换控制方法、装置、终端及网元 |
Also Published As
Publication number | Publication date |
---|---|
US10187927B2 (en) | 2019-01-22 |
US9967918B2 (en) | 2018-05-08 |
CN107211483B (zh) | 2020-07-24 |
CN107211483A (zh) | 2017-09-26 |
US20170318622A1 (en) | 2017-11-02 |
US20180227984A1 (en) | 2018-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2016115669A1 (zh) | 一种数据通信方法及终端 | |
US10542415B2 (en) | Data transmission method for edge multimedia broadcast/multicast service (MBMS) service and related device | |
WO2019080690A1 (zh) | 一种通信系统、通信方法及其装置 | |
KR100951026B1 (ko) | 무선 원격통신 장치들 간의 그룹 통신들에 있어서 voip데이터 패킷들을 분배하기 위한 시스템 및 방법 | |
CN111526553B (zh) | Ue执行的方法及ue、以及smf实体执行的方法及smf实体 | |
CN101299671B (zh) | 用于组播数据包发送与接收的方法和装置 | |
WO2017051503A1 (ja) | 通信システム、リレー端末、リモート端末及び通信制御方法 | |
KR102318019B1 (ko) | 기기 간(d2d) 통신을 처리하는 방법 및 시스템 | |
TWI424712B (zh) | 用於多播樹狀管理之方法 | |
US10715968B2 (en) | Scheme for setting up PTT group call in a wireless communication network | |
WO2018086451A1 (zh) | 终端接入网络的方法及装置、下行数据投递方法及装置 | |
US8483114B2 (en) | Method and system for peer-to-peer communication among sites | |
RU2011117236A (ru) | Обработка трафика локального непосредственного соединения в домашней базовой станции | |
WO2008065531A4 (en) | COMMUNICATION SYSTEM | |
CN106888450B (zh) | 信息处理方法及装置 | |
RU2010105060A (ru) | Способ сокращения сигнализации управления в ситуациях передачи обслуживания | |
JP2017531385A (ja) | 進化型マルチメディアブロードキャスト/マルチキャストサービス処理ネットワーク要素及び進化型マルチメディアブロードキャスト/マルチキャストサービスブロードキャスト方法 | |
JP4940335B2 (ja) | 電話交換装置及び電話端末及び電話システムで使用される制御方法 | |
WO2017132971A1 (zh) | 一种组呼业务处理方法及系统、核心网设备 | |
US20070254645A1 (en) | Method and apparatus of avoiding audio truncation in trunked systems | |
JP6606193B2 (ja) | D2d通信におけるipアドレス割振り方法およびユーザ機器 | |
CN110809242B (zh) | 一种dect网络集群下的媒体交互方法 | |
CN107197446B (zh) | 一种ma配置方法、系统及设备 | |
WO2018010182A1 (zh) | 群组通信的传输方法、装置和设备 | |
CN102196599B (zh) | 一种使终端加入多播组的方法和基站 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15878347 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15878347 Country of ref document: EP Kind code of ref document: A1 |