WO2015070810A1 - 文件传输的方法和装置 - Google Patents

文件传输的方法和装置 Download PDF

Info

Publication number
WO2015070810A1
WO2015070810A1 PCT/CN2014/091261 CN2014091261W WO2015070810A1 WO 2015070810 A1 WO2015070810 A1 WO 2015070810A1 CN 2014091261 W CN2014091261 W CN 2014091261W WO 2015070810 A1 WO2015070810 A1 WO 2015070810A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
sent
message
file
sending
Prior art date
Application number
PCT/CN2014/091261
Other languages
English (en)
French (fr)
Inventor
陈济
丁志明
杜振国
方平
Original Assignee
华为终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为终端有限公司 filed Critical 华为终端有限公司
Publication of WO2015070810A1 publication Critical patent/WO2015070810A1/zh
Priority to US15/152,957 priority Critical patent/US20160261678A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/23Reliability checks, e.g. acknowledgments or fault reporting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5069Address allocation for group communication, multicast communication or broadcast communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1051Group master selection mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and apparatus for file transmission.
  • WiFi Wireless Fidelity
  • PDA Personal Digital Assistants
  • the existing WiFi technology provides MFTP (Multicast File Transfer Protocol) for implementing one-to-many multicast.
  • MFTP Multicast File Transfer Protocol
  • the function of MFTP is to transfer a file from one device to multiple devices.
  • the sending device divides the file into a number of packets of a specified length, and the sending device multicasts the RRQ (Ready Request) to the multicast group.
  • the receiving device in the multicast group After receiving the RRQ, the receiving device in the multicast group sends an RDY (Ready, Ready Complete message) to the sending device, and the transmitting device selects the first receiving device that returns RDY as the master receiver.
  • the sending device sends the file content to the receiving device in multicast mode.
  • the primary receiving device needs to reply an ACK (Acknowledgment) to the sending device, and the sending device receives the ACK returned by the primary receiving device. , continue to multicast to send the next packet.
  • the method for selecting the primary receiving device is repeated, and the next primary receiving device is selected from the receiving devices that have not completed receiving, and the multicast data packet is continued until all receiving devices receive the completion.
  • the receiving device needs to respond to the RRQ broadcasted by the sending device before it can start receiving multicast content. Once some receiving devices (such as devices newly joining the multicast group) miss the transmission start. When the RRQ broadcasted by the device is sent, there is no way to start receiving multicast content in time, thereby reducing transmission efficiency.
  • embodiments of the present invention provide a method and apparatus for file transmission.
  • the technical solution is as follows:
  • a method of file transfer comprising:
  • the sending device sends a preparation request message to the multicast group multicast, where the preparation request message carries at least a file name and a number of blocks of the file to be sent, and the multicast group includes at least one device;
  • the sending device When the sending device receives the first preparation completion message returned by the first device in the multicast group, sending, by the first device, a first primary receiving device determining message, where the first primary receiving device determines that the message is used for notification The first device has been selected as the primary receiving device, and multicasts the data packet of the file to be sent to the multicast group;
  • the first message is sent to the second device, where the first message carries at least the file name, the number of blocks, and the first data packet identifier of the file to be sent, the first The data packet identifier is used to indicate a data packet to be transmitted by the sending device, where the first message is used to notify the second device of the information about the data packet to be transmitted by the sending device, so that the second device receives the sending according to the first message.
  • the method further includes:
  • the first message is sent to the second device, so that the second device receives the transmitting device according to the first message
  • the method further includes:
  • a second primary receiving device determining message Sending, to the second device, a second primary receiving device determining message, where the second primary receiving device determining message is used to notify the second device that it has been selected as the primary receiving device, and when receiving the second device, carrying the second And receiving, according to the second data packet identifier, a data packet of the to-be-sent file that has not been received by the second device, the second data packet identifier is used to indicate the The data packet that the second device should receive next time is determined by the second device according to the data packet of the file to be sent that it has received; or
  • the sending device receives the first receiving acknowledgement message sent by the current primary receiving device in the multicast group, and the first When the receiving confirmation message carries the fourth data packet identifier, it is determined that the current primary receiving device of the multicast group has received all the data packets of the file to be sent, and the fourth data packet identifier is used to indicate the last data of the file to be sent. package.
  • a method of file transfer comprising:
  • the second device joins the multicast group in the process of the multicast device transmitting the data packet of the file to be sent to the device in the multicast group, where the multicast group includes at least one device;
  • the sending device Receiving, by the sending device, the first message sent by the sending device to the second device, where the first message carries at least a file name, a number of blocks, and a first data packet identifier of the file to be sent, where the first data packet identifier is used to indicate the sending a data packet to be transmitted by the device, the first message is used to notify the second device of the information of the data packet to be transmitted by the sending device;
  • the method further includes:
  • the second device sends a preparation completion message to the transmitting device.
  • the method further includes: the second device receiving a second primary receiving device determining message, where the second primary receiving device determines that the message is by the sending device When the current primary receiving device of the multicast group has received all the data packets of the file to be sent, the second primary receiving device determines that the message is used to notify the second device that it has been selected as the primary receiving device. device;
  • the second device sends a receiving confirmation message carrying the second data packet identifier to the sending device according to the data packet of the to-be-sent file that is received by the second device, where the second data packet identifier is used to indicate the second device
  • the data packet to be received next time so that the sending device multicasts the data packet of the to-be-sent file that has not been received by the second device to the current multicast group according to the second data packet identifier;
  • a device for file transmission comprising: a sending module and a receiving module,
  • the sending module is configured to send a preparation request message to the multicast group multicast, where the preparation request is The message carries at least a file name and a number of blocks of the file to be sent, and the multicast group includes at least one device;
  • the receiving module is configured to receive a preparation completion message returned by the device in the multicast group
  • the sending module is further configured to: when the receiving module receives the first preparation completion message returned by the first device in the multicast group, send a first primary receiving device determining message to the first device, where the first primary receiving The device determining message is used to notify the first device that it has been selected as the primary receiving device, and multicast the data packet of the file to be sent to the multicast group;
  • the sending module is further configured to send a first message to the second device when the second device is newly added to the multicast group, where the first message carries at least the file name, the number of blocks, and the first data of the file to be sent.
  • a packet identifier the first data packet identifier is used to indicate a data packet to be transmitted by the sending device, and the first message is used to notify the second device of the information about the data packet to be transmitted by the sending device, so that the second device is configured according to the The first message receives a data packet of the file to be sent that is to be transmitted by the sending device.
  • the receiving module is further configured to: after the sending module sends the first message to the second device, receive the preparation completion message sent by the second device.
  • the sending module is further configured to: when the current primary receiving device of the multicast group has received all the data packets of the file to be sent, The second device sends a second primary receiving device determining message, and the second primary receiving device determines that the message is used to notify the second device that it has been selected as the primary receiving device,
  • the receiving module is further configured to receive a receiving confirmation message that is sent by the second device and that carries the second data packet identifier.
  • the sending module is further configured to: when the receiving module receives the receiving confirmation message that carries the second data packet identifier sent by the second device, according to the second data packet identifier, multicast to the current multicast group And sending, by the second device, a data packet of the to-be-sent file that is not received by the second device, where the second data packet identifier is used to indicate that the second device should receive the data packet next time, and the second device is configured to receive the Send a packet of the file to determine;
  • the sending module is further configured to: when the current primary receiving device of the multicast group has received all the data packets of the file to be sent, send the preparation request message to the current multicast group multicast,
  • the receiving module is further configured to receive a preparation completion message sent by the device in the current multicast group.
  • the sending module is further configured to: when the receiving module receives the first preparation completion message returned by the third device in the current multicast group, send a third primary receiving device determining message to the third device, where the third primary Receiving a device determining message for notifying the third device that it has been selected as the primary receiving device,
  • the receiving module is further configured to receive a receiving confirmation message that is sent by the third device and that carries the third data packet identifier.
  • the sending module is further configured to: when the receiving module receives the receiving confirmation message that is sent by the third device and carries the third data packet identifier, send the third device to the current multicast group according to the third data packet identifier.
  • a data packet of the file to be sent that has not been received the third data packet identifier is used to indicate that the third device should receive the data packet next time, and is a data packet of the file to be sent that the third device has received according to To determine.
  • the apparatus further includes an acknowledgment module, configured to send, by the receiving module, the current primary receiving device in the multicast group
  • the first receiving acknowledgement message and the first receiving acknowledgement message carries the fourth data packet identifier, determining that the current primary receiving device of the multicast group has received all the data packets of the file to be sent, the fourth data packet identifier Indicates the last packet of the file to be sent.
  • a device for file transmission comprising: a receiving module and Into the module,
  • the joining module is configured to join the multicast group, where the multicast group includes at least one device, in the process of the multicast device transmitting the data packet of the file to be sent to the device in the multicast group.
  • the receiving module is configured to receive a first message that is sent by the sending device to the local device, where the first message carries at least a file name, a number of blocks, and a first data packet identifier of the file to be sent, where the first data packet identifier is used for Instructing the sending device to transmit a data packet, where the first message is used to notify the local end of the information about the data packet to be transmitted by the sending device;
  • the receiving module is further configured to receive, according to the first message, a data packet of the file to be sent that is to be transmitted by the sending device.
  • the device further includes a sending module, where the sending module is configured to send, after the receiving module receives the first message sent by the sending device, the sending device Prepare to complete the message.
  • the receiving module is further configured to receive a second primary receiving device determining message, where the second primary receiving device determines that the sending device is in the multicast group by the sending device When the current primary receiving device has received all the data packets of the file to be sent, the second primary receiving device determines that the message is used to select the local terminal as the primary receiving device;
  • the sending module is further configured to send, according to the data packet of the to-be-sent file received by the local end, a receiving confirmation message carrying the second data packet identifier, where the second data packet identifier is used to indicate the local end next time The data packet to be received, so that the sending device multicasts the data packet of the to-be-sent file that has not been received by the local end to the current multicast group according to the second data packet identifier;
  • the receiving module is further configured to receive a data packet of the to-be-sent file that is not received by the local end and sent by the sending device.
  • the file information currently being transmitted is notified to the newly added device in time, so that the newly added device can timely understand the currently transmitted file content in the MFTP process that has already been performed, and immediately start receiving. Improve transmission efficiency.
  • FIG. 1 is a flowchart of a method for file transmission according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for file transmission according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for file transmission according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of an apparatus for file transmission according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of an apparatus for file transmission according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a device 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 invention.
  • FIG. 1 is a flowchart of a method for file transmission according to an embodiment of the present invention. Referring to Figure 1, the method includes:
  • the sending device sends a preparation request message to the multicast group, where the preparation request message carries at least a file name and a number of blocks of the file to be sent, and the multicast group includes at least one device.
  • the sending device receives the first preparation completion message returned by the first device in the multicast group, sending, by the first device, a first primary receiving device determining message, where the first primary receiving device The standby determination message is used to notify the first device that it has been selected as the primary receiving device, and multicast the data packet of the file to be sent to the multicast group.
  • the first message is sent to the second device, where the first message carries at least the file name, the number of blocks, and the first data packet identifier of the file to be sent.
  • the first data packet identifier is used to indicate a data packet to be transmitted by the sending device, where the first message is used to notify the second device of the information about the data packet to be transmitted by the sending device, so that the second device receives the data according to the first message.
  • the method provided by the embodiment of the present invention notifies the newly added device to the newly added device in time when a new device joins the multicast group, so that the newly added device can timely understand the current transmission during the MFTP process.
  • the contents of the file will be received immediately, improving transmission efficiency.
  • FIG. 2 is a flowchart of a method for file transmission according to an embodiment of the present invention. Referring to Figure 2, the method includes:
  • the second device joins the multicast group in the process of the multicast device transmitting the data packet of the file to be sent to the device in the multicast group.
  • the multicast group includes at least one device.
  • the 202 Receive a first message sent by the sending device to the second device, where the first message carries at least a file name, a number of blocks, and a first data packet identifier of the file to be sent, where the first data packet identifier is used to indicate
  • the data packet to be transmitted by the sending device the first message is used to notify the second device of the information of the data packet to be transmitted by the sending device.
  • the method provided by the embodiment of the present invention notifies the newly added device to the newly added device in time when a new device joins the multicast group, so that the newly added device can timely understand the current transmission during the MFTP process.
  • the contents of the file will be received immediately, improving transmission efficiency.
  • FIG. 3 is a flowchart of a method for file transmission according to an embodiment of the present invention.
  • the interaction entity in the embodiment of the invention is the sending device STA_S, and the receiving device in the multicast group includes the first device STA_1 and the third device STA_3, and the newly added second device is represented by STA_2.
  • the method includes:
  • the sending device STA_S sends a preparation request message for sending a file to the multicast group.
  • the preparation request message carries at least a file name and a number of blocks of the file to be sent, where the multicast group includes at least one device.
  • the multiple devices in the multicast group establish an IP layer connection between the devices.
  • the preparation request message may be an RRQ, and the preparation request message may further carry the file size on the basis of the file name and the number of blocks of the file to be sent.
  • STA_1 When STA_1 receives the preparation request message, it sends a preparation completion message to STA_S.
  • the STA_1 user may select whether to accept the transmission of the to-be-sent file. When it is determined to accept, it may be determined by the function button of STA_1, so that STA_1 sends a preparation completion message to STA_S.
  • the STA_S selects the STA_1 as the primary receiving device.
  • the first primary receiving device determining message is sent to STA_1, and the first primary receiving device determines that the message is used to notify the STA_1 that it has been selected as the primary receiving device.
  • the STA_S when the STA_S receives the preparation completion message sent by another receiving device, such as STA_2, after receiving the first preparation completion message, the STA_S sends the non-primary connection to the other receiving device.
  • the receiving device determines the message, so that when receiving the message, the other receiving device knows that it is not the primary receiving device, that is, when receiving the data packet sent by the STA_S, it does not need to return a receiving acknowledgement message.
  • first primary receiving device determining message, the second primary receiving device determining message, and the like in the step 303 and the subsequent steps are only used to distinguish the determined primary device, and in fact, the first primary receiving device determines the message.
  • the specific format, the carried information, and the like of the second primary receiving device determining the message may be the same, which is not limited in the embodiment of the present invention.
  • the STA_1 After receiving the first primary receiving device determining message, the STA_1 sends a receiving acknowledgement message carrying the first data packet identifier to the STA_S, where the first data packet identifier is used to indicate the data packet to be transmitted by the sending device, and the receiving acknowledgement The message is used to determine which packet should be received next time.
  • the STA_S When receiving the acknowledgment message sent by the STA_1, the STA_S multicasts the data packet of the to-be-sent file to the multicast group according to the received acknowledgment message carrying the first data packet identifier.
  • the first primary receiving device determines that the message is an MRQ (Master Request, the primary receiving device determines a message), and the first primary receiving device determines that the message is used to notify that the first device has been selected as the primary receiving device.
  • the device when receiving the data packet sent by the STA_S multicast, the primary receiving device needs to feed back a confirmation message to the STA_S, where the receiving acknowledgement message is used to determine the identifier of the data packet to be received next, so that the STA_S receives the received packet.
  • the packet identifier continues to send packets.
  • the data packet identifier that can be carried in the receiving acknowledgement message is (k-1)
  • the STA_S receives the (k-1) the data packet with the data packet identifier k is sent, where k is a positive integer, and That is, if the data packet identifier carried by the receiving acknowledgement message is 3, the next data packet that the STA_1 should receive is a data packet with the data packet identifier 4.
  • the foregoing step 303-305 is a process of sending the to-be-sent file in the form of a data packet when the sending device receives the first preparation completion message returned by any one of the receiving devices in the multicast group.
  • the STA_S When the STA_S detects that the device STA_2 is newly added to the multicast group, the STA_S sends a first message to the STA_2, where the first message carries at least the file name and the file of the file to be sent.
  • the number of blocks and the first data packet identifier, the first data packet identifier is used to indicate the data packet to be transmitted by the STA_S, and the first message is used to notify STA_2 of the information of the data packet to be transmitted by the STA_S.
  • the first message may also carry the file size on the basis of the file name and the number of blocks of the file to be sent.
  • the first message is used to notify the specific situation of the file that the newly joined device is currently transmitting, so that the newly added device can receive the file being transmitted by the sending device on the basis of the current transmission.
  • the first message may not carry the data packet identifier of the data packet to be transmitted by the STA_S, which is not specifically limited in this embodiment of the present invention.
  • the data packet identifier used to indicate the data packet to be transmitted by the STA_S may be the data packet identifier currently being transmitted by the STA_S, or may be the data packet identifier of the data packet to be transmitted by the STA_S, through the sending device and the receiving device.
  • the agreement between the receiving device and the receiving device can know which one of the files to be sent is currently being sent by the transmitting device, and can also know which one of the files to be transmitted is to be transmitted by the transmitting device.
  • the sending device detects that a new receiving device joins the multicast group in any of the following cases: (1) When the sending device is a local area network initiating and managing device, the sending device has a dynamic host setting protocol (DHCP, The function of the dynamic host configuration protocol is responsible for the mapping of multicast addresses. Each device that joins the network must apply for an IP address from the sending device. Therefore, when the new device applies to join the multicast group, the sending device can detect the function. New to join the device. (2) The sending device is in a local area network. When a new device joins the local area network, the sending device can obtain the message that the new device joins the multicast group at the IP layer, thereby detecting that a new device joins the multicast group.
  • DHCP dynamic host setting protocol
  • the multicast group address mapping is performed by a certain router.
  • the router updates the multicast group address mapping table, and simultaneously notifies the sending device according to the preset setting.
  • the sending device can detect the newly joined device.
  • the local area network mentioned in these methods can be a wireless local area network.
  • the method for detecting a newly added device may have other implementation manners, which are not described in detail in the embodiments of the present invention.
  • STA_2 When STA_2 receives the first message, send a preparation completion message to STA_S.
  • the preparation completion message is used to notify the STA_S that the STA_2 has started the process of receiving the file.
  • the STA_2 joins the multicast group and sends a preparation completion message, it starts receiving the data packet from the STA_S and receives the data packet sent by the STA_S.
  • STA_S continues to multicast to send the data packet of the file to be sent.
  • This step 308 is the same as the step 305, and is a process in which the STA_S continues to send the data packet of the file to be sent, and details are not described herein again.
  • the STA_S receives the receiving acknowledgment message sent by the STA_1, and the receiving acknowledgment message carries the fourth data packet identifier, determining that the current primary receiving device of the multicast group has received all the data packets of the file to be sent, the fourth The data packet identifier is used to indicate the last data packet of the file to be sent, and STA_2 is selected as the primary receiving device, and the second primary receiving device determining message is sent to STA_2, and the second primary receiving device determines that the message is used to notify the STA_2 that it has been Select as the primary receiving device.
  • the STA_S When the STA_S receives the reception confirmation message sent by STA_1 and the reception confirmation message carries the data packet identifier of the last data packet of the file to be sent, it is determined that the STA_1 has received all the data packets of the file to be sent, that is, When the file transmission of the STA_1 ends, the STA_2 newly added to the multicast group is selected as the primary receiving device.
  • the new joining device is selected as the primary receiving device to continue transmitting.
  • the multicast preparation request message may be multicast again, so that the receiving device that receives the preparation request message returns the preparation completion message.
  • the first receiving device that returns the preparation completion message is selected as the master device.
  • the step 309 can be replaced by the following steps: sending a preparation request message to the current multicast group multicast, when the sending device receives the first preparation completion message returned by the third device (such as STA_3) in the current multicast group. Transmitting, to the third device, a third primary receiving device determining message, where the third primary receiving device determining message is used to notify the third device that it has been selected as the primary receiving device, and when receiving the carrying by the third device When receiving the confirmation message of the third data packet identifier, according to the third data packet identifier, The pre-multicast group multicasts the data packet of the file to be sent that has not been received by the third device, and the third data packet identifier is used to indicate that the third device should receive the data packet next time, according to the third device The data packet of the file to be sent that has been received is determined.
  • the third data packet identifier may be one or more, that is, the third device STA_3 may notify the STA_S of the multiple data packets that it has not received at one time, or may notify the STA_S that it has not been notified multiple times.
  • the received data packet is not specifically limited in this embodiment of the present invention.
  • the STA_2 When receiving the second primary receiving device determining message, the STA_2 sends a receiving acknowledgement message carrying the second data packet identifier to the STA_S according to the data packet received by the STA_2, where the second data packet identifier is used to indicate that the STA_2 next time should be
  • the received data packet is determined by STA_2 according to the data packet of the file to be sent that it has received.
  • the second data packet identifier may be one or more, that is, the second device STA_2 may notify the STA_S of the multiple data packets that are not received by the STA_S, or may notify the STA_S of the multiple times.
  • the received data packet is not specifically limited in this embodiment of the present invention.
  • the STA_2 has received a partial data packet of the file to be sent.
  • STA_2 sends a receiving confirmation message to the STA_S according to the received data packet.
  • the Receive Acknowledgement message is used to determine the identity of the packet that should be received next time. It should be noted that, in the transmission process, the data packet may be lost. Therefore, in step 310, the receiving confirmation message may be sent as needed to obtain the data packet that the STA_2 has not received.
  • the receiving confirmation message sent by the STA_2 may carry any one of 1, 2 or 5-9.
  • the data packet identifier is used to request to receive the data packet with the identifier 2, 3 or 6-10.
  • the STAS sends, according to the data packet identifier carried in the received acknowledgment message, the data packet that is not received by the STA_2 in the to-be-sent file to the current multicast group.
  • the multicast group at this time is a multicast group that excludes the original primary receiving device STA_1 and joins the new device STA_2.
  • the steps 306-311 are the transmission process when a new device is detected to join the multicast group, and when it is determined that STA_2 has received all the data packets of the file to be sent, if there is no newly added device, then according to step 301-
  • the process of 305 continues to select the primary receiving device and performs file transmission. If there is a newly added device, the continuation is performed according to 306-311, which is not described in the embodiment of the present invention.
  • first data packet identifier, the second data packet identifier, the third data packet identifier, and the fourth data packet identifier involved in the foregoing process are only used to distinguish the data packet identifiers at different stages, and the data packet identifier is not identified. The type and the like are distinguished.
  • the method provided by the embodiment of the present invention when the new device is added to the multicast group, notifies the newly added device to the newly added device in time, so that the newly added device can perform MFTP.
  • the content of the currently transmitted file is known in time, and reception is started immediately to improve the transmission efficiency.
  • FIG. 4 is a schematic structural diagram of an apparatus for file transmission according to an embodiment of the present invention.
  • the device includes: a sending module 401 and a receiving module 402.
  • the sending module 401 is connected to the receiving module 402.
  • the sending module 401 is configured to send a preparation request message to the multicast group multicast, where the preparation request message carries at least a file name and a number of blocks of the file to be sent, the multicast group includes at least one device;
  • the receiving module 402 is configured to receive a preparation completion message returned by the device in the multicast group;
  • the sending module 401 is further configured to: When receiving the first preparation completion message returned by the first device in the multicast group, the receiving module 402 sends a first primary receiving device determining message to the first device, where the first primary receiving device determines that the message is used for notification.
  • the first device has been selected as the primary receiving device, and the data packet of the file to be sent is sent to the multicast group.
  • the sending module 401 is further configured to: when the second device newly joins the multicast group, The second device sends a first message, where the first message carries at least a file name, a number of blocks, and a first data packet identifier of the file to be sent, where the first data packet identifier is used to indicate The data packet to be transmitted by the sending device, the first message is used to notify the second device of the information of the data packet to be transmitted by the sending device, so that the second device receives the waiting for the transmitting device to be transmitted according to the first message. Sending file data pack.
  • the receiving module 402 is further configured to: after the sending module 401 sends the first message to the second device, receive the preparation completion message sent by the second device.
  • the sending module 401 is further configured to: when the current primary receiving device of the multicast group has received all the data packets of the file to be sent, send a second primary receiving device determining message to the second device, where the The two primary receiving device determining message is used to notify the second device that it has been selected as the primary receiving device,
  • the receiving module 402 is further configured to receive a receiving confirmation message that is sent by the second device and that carries the second data packet identifier.
  • the sending module 401 is further configured to: when the receiving module 402 receives the receiving confirmation message that carries the second data packet identifier sent by the second device, send the first multicast group to the current multicast group according to the second data packet identifier. a data packet of the file to be sent that has not been received by the device, the second data packet identifier is used to indicate that the second device should receive the data packet next time, and the second device is configured according to the file to be sent that the second device has received. Data packet to determine;
  • the sending module 401 is further configured to: when the current primary receiving device of the multicast group has received all the data packets of the file to be sent, send the preparation request message to the current multicast group multicast,
  • the receiving module 402 is further configured to receive a preparation completion message sent by the device in the current multicast group.
  • the sending module 401 is further configured to: when the receiving module 402 receives the first preparation completion message returned by the third device in the current multicast group, send a third primary receiving device determining message to the third device, where the The three primary receiving device determining message is used to notify the third device that it has been selected as the primary receiving device,
  • the receiving module 402 is further configured to receive a receiving confirmation message that is sent by the third device and that carries the third data packet identifier.
  • the sending module 401 is further configured to: when the receiving module 402 receives the piggyback sent by the third device And sending, by the third data packet identifier, a data packet of the to-be-sent file that has not been received by the third device, and the third data packet identifier is used by the third data packet identifier.
  • the data packet indicating that the third device should receive next time is determined by the third device according to the data packet of the file to be sent that it has received.
  • the device further includes an acknowledgment module, configured to: when the receiving module 402 receives the first receiving acknowledgment message sent by the current primary receiving device in the multicast group, and the first receiving acknowledgment message carries the fourth data packet identifier And determining that the current primary receiving device of the multicast group has received all the data packets of the file to be sent, and the fourth data packet identifier is used to indicate the last data packet of the file to be sent.
  • an acknowledgment module configured to: when the receiving module 402 receives the first receiving acknowledgment message sent by the current primary receiving device in the multicast group, and the first receiving acknowledgment message carries the fourth data packet identifier And determining that the current primary receiving device of the multicast group has received all the data packets of the file to be sent, and the fourth data packet identifier is used to indicate the last data packet of the file to be sent.
  • FIG. 5 is a schematic structural diagram of an apparatus for file transmission according to an embodiment of the present invention.
  • the device includes: a joining module 501 and a receiving module 502; wherein the joining module 501 is connected to the receiving module 502; and when the sending device multicasts the data packet of the file to be sent to the device in the multicast group.
  • the joining module 501 is configured to join the multicast group, the multicast group includes at least one device, and the receiving module 502 is configured to receive the first message sent by the sending device to the local end, where the first message carries the at least one a file name of the file to be sent, a number of blocks, and a first data packet identifier, where the first data packet identifier is used to indicate a data packet to be transmitted by the sending device, where the first message is used to notify the local end that the sending device is about to transmit
  • the information of the data packet; the receiving module 502 is further configured to receive, according to the first message, a data packet of the file to be sent that is to be transmitted by the sending device.
  • the device further includes a sending module, configured to send a preparation completion message to the sending device after the receiving module receives the first message sent by the sending device.
  • a sending module configured to send a preparation completion message to the sending device after the receiving module receives the first message sent by the sending device.
  • the receiving module 502 is further configured to receive a second primary receiving device determining message, where the second primary receiving device determines that the sending device has received the file to be sent by the sending device at the current primary receiving device of the multicast group. All the data packets are sent to the local end, and the second primary receiving device determines that the message is used to select the local end as the primary receiving device;
  • the sending module 502 is further configured to send, according to the data packet of the to-be-sent file received by the local end, a receiving confirmation message carrying the second data packet identifier, where the second data packet identifier is used to indicate the local end The data packet that should be received at a time, so that the sending device multicasts the data packet of the to-be-sent file that has not been received by the local end to the current multicast group according to the second data packet identifier;
  • the receiving module 503 is further configured to receive, by the sending device, a data packet of the to-be-sent file that is not received by the local end.
  • the apparatus for file transmission provided by the foregoing embodiment is only illustrated by the division of the foregoing functional modules. In actual applications, the function distribution may be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the apparatus for file transmission provided by the foregoing embodiment is the same as the method embodiment of the file transmission, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • FIG. 6 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • the device 600 includes: a transmitter 632, a receiver 631, a memory 633, and a processor 634 connected to the transmitter 632, the receiver 631, and the memory 633, respectively;
  • the memory 633 is for storing executable program code, the program code including computer operating instructions.
  • the memory 633 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
  • the processor 634 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more configured to implement the embodiments of the present invention. integrated circuit.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • the processor 634 is configured to execute executable program code stored in the memory 633, such as a computer program, to execute a program corresponding to the executable code.
  • the transmitter 632 sends a preparation request message to the multicast group multicast, where the preparation request message is at least Carrying the file name and the number of blocks of the file to be sent, the multicast group includes at least one device; when the receiver 631 receives the first preparation completion message returned by the first device in the multicast group, the transmitter 632 passes the transmitter 632.
  • the second device receives, according to the first message, a data packet of the file to be sent that is to be transmitted by the sending device.
  • FIG. 7 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • the device 700 includes: a transmitter 732, a receiver 731, a memory 733, and a processor 734 connected to the transmitter 732, the receiver 731, and the memory 733, respectively;
  • the memory 733 is for storing executable program code, the program code including computer operating instructions.
  • the memory 733 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
  • the processor 734 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more configured to implement the embodiments of the present invention. integrated circuit.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • the processor 734 is configured to execute executable program code stored in the memory 733, such as a computer program, to execute a program corresponding to the executable code.
  • the device 700 joins the multicast group in the process of multicasting the data packet of the file to be sent to the device in the multicast group, the multicast group includes at least one device, and the receiver 731 uses And receiving the first message sent by the sending device to the local device, where the first message carries at least the file name, the number of blocks, and the first data packet identifier of the file to be sent, where the first data packet identifier is used to indicate the sending device.
  • a data packet to be transmitted the first message is used to notify the second device of the information of the data packet to be transmitted by the sending device, and the receiver 731 is further configured to receive, according to the first message, the to-be-transmitted transmission that the sending device is about to transmit.
  • the data packet of the file is further configured to receive, according to the first message, the to-be-transmitted transmission that the sending device is about to transmit.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种文件传输的方法和装置,属于通信技术领域。所述方法包括:发送设备向组播组组播准备请求消息;当该发送设备接收到该组播组中的第一设备返回的第一个准备完成消息时,向该第一设备发送主接收设备确定消息,该主接收设备确定消息用于通知该第一设备其已被选择为主接收设备,向该组播组组播该待发送文件的数据包;当有第二设备新加入该组播组时,向该第二设备发送第一消息。本发明通过在有新设备加入组播组时,及时将当前正在传输的文件信息通知给新加入的设备,使得该新加入设备能够在已经进行的MFTP过程中及时地了解当前传输的文件内容,马上开始接收,提高传输效率。

Description

文件传输的方法和装置
本申请要求于2013年11月15日提交中国专利局、申请号为201310573873.7中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信技术领域,特别涉及一种文件传输的方法和装置。
背景技术
WiFi(Wireless Fidelity,无线保真)是一种无线网络通信技术,它将个人电脑、手持设备(如PDA(Personal Digital Assistant,个人数字助理)、手机)等终端以无线方式互相连接,改善了基于IEEE802.11标准的无线网络产品之间的互通性。
现有的WiFi技术提供了用于实现一对多组播的MFTP(Multicast File Transfer Protocol,组播文件传输协议)。MFTP的功能是将一个文件从一台设备传送到多台设备。在组播组已经建立完成的前提下,它的传输过程简述如下:发送设备将文件分成若干个指定长度的数据包,发送设备向组播组组播RRQ(Ready Request,准备请求消息),当组播组中的接收设备收到RRQ后,向发送设备发送RDY(Ready,准备完成消息),发送设备选择第一个返回RDY的接收设备作为主接收设备(master receiver)。发送设备向所有接收设备以组播形式发送文件内容,在组播过程中,只有主接收设备需要向发送设备回复ACK(Acknowledgment,确认消息),每当发送设备接收到主接收设备返回的ACK后,继续组播发送下一个数据包。在当前主接收设备接收完该文件内容后,重复上述选择主接收设备的方法,从未完成接收的接收设备中选择下一个主接收设备,继续组播数据包,直到所有接收设备均接收完成。
在实施本发明的过程中,发明人发现现有技术中至少存在以下缺点:
在一对多的组播场景中,接收设备需要在应答了发送设备所广播的RRQ后才能开始接收组播内容,而一旦有些接收设备(如新加入该组播组的设备)错过了传输开始时发送设备所广播的RRQ,没办法及时开始接收组播内容,从而降低传输效率。
发明内容
为了解决传输效率低的问题,本发明实施例提供了一种文件传输的方法和装置。该技术方案如下:
第一方面,提供了一种文件传输的方法,该方法包括:
发送设备向组播组组播发送准备请求消息,该准备请求消息至少携带待发送文件的文件名称和分块数量,该组播组包括至少一个设备;
当该发送设备接收到该组播组中的第一设备返回的第一个准备完成消息时,向该第一设备发送第一主接收设备确定消息,该第一主接收设备确定消息用于通知该第一设备其已被选择为主接收设备,向该组播组组播发送该待发送文件的数据包;
当有第二设备新加入该组播组时,向该第二设备发送第一消息,该第一消息至少携带该待发送文件的文件名称、分块数量和第一数据包标识,该第一数据包标识用于指示该发送设备即将传输的数据包,该第一消息用于通知该第二设备该发送设备即将传输的数据包的信息,使得该第二设备根据该第一消息接收该发送设备即将传输的该待发送文件的数据包。
结合第一方面,在第一方面的第一种可能实现方式中,当有第二设备新加入该组播组时,向该第二设备发送第一消息之后,该方法还包括:
接收该第二设备发送的准备完成消息。
结合第一方面,在第一方面的第二种可能实现方式中,在向该第二设备发送第一消息,使得该第二设备根据该第一消息接收该发送设备即将传 输的该待发送文件的数据包之后,当该组播组的当前主接收设备已经接收到该待发送文件的所有数据包时,该方法还包括:
向该第二设备发送第二主接收设备确定消息,该第二主接收设备确定消息用于通知该第二设备其已被选择为主接收设备,当接收到该第二设备发送的携带第二数据包标识的接收确认消息时,根据该第二数据包标识,向当前组播组组播发送该第二设备尚未接收的该待发送文件的数据包,该第二数据包标识用于指示该第二设备下一次应接收的数据包,是该第二设备根据其已接收到的该待发送文件的数据包来确定的;或,
向当前组播组组播发送该准备请求消息,当该发送设备接收到该当前组播组中的第三设备返回的第一个准备完成消息时,向该第三设备发送第三主接收设备确定消息,该第三主接收设备确定消息用于通知该第三设备其已被选择为主接收设备,当接收到该第三设备发送的携带第三数据包标识的接收确认消息时,根据该第三数据包标识,向当前组播组组播发送该第三设备尚未接收的该待发送文件的数据包,该第三数据包标识用于指示该第三设备下一次应接收的数据包,是该第三设备根据其已接收到的该待发送文件的数据包来确定的。
结合第一方面的第二种可能实现方式,在第一方面的第三种可能实现方式中,该发送设备接收到该组播组中当前主接收设备发送的第一接收确认消息且该第一接收确认消息携带第四数据包标识时,确定该组播组的当前主接收设备已经接收到该待发送文件的所有数据包,该第四数据包标识用于指示该待发送文件的最后一个数据包。
第二方面,提供了一种文件传输的方法,该方法包括:
在发送设备向组播组中的设备组播发送待发送文件的数据包的过程中,第二设备加入该组播组,该组播组包括至少一个设备;
接收该发送设备向该第二设备发送的第一消息,该第一消息至少携带该待发送文件的文件名称、分块数量和第一数据包标识,该第一数据包标识用于指示该发送设备即将传输的数据包,该第一消息用于通知该第二设备该发送设备即将传输的数据包的信息;
根据该第一消息接收该发送设备即将传输的该待发送文件的数据包。
结合第二方面,在第二方面的第一种可能实现方式中,接收该发送设备向该第二设备发送的第一消息之后,该方法还包括:
该第二设备向该发送设备发送准备完成消息。
结合第二方面,,在第二方面的第二种可能实现方式中,该方法还包括:该第二设备接收第二主接收设备确定消息,该第二主接收设备确定消息由该发送设备在该组播组的当前主接收设备已经接收到该待发送文件的所有数据包时发送给该第二设备,该第二主接收设备确定消息用于通知该第二设备其已被选择为主接收设备;
该第二设备根据该第二设备已接收到的该待发送文件的数据包,向该发送设备发送携带第二数据包标识的接收确认消息,该第二数据包标识用于指示该第二设备下一次应接收的数据包,使得该发送设备根据该第二数据包标识向当前组播组组播发送该第二设备尚未接收的该待发送文件的数据包;
接收该发送设备发送的该第二设备尚未接收的该待发送文件的数据包。
第三方面,提供了一种文件传输的装置,该装置包括:发送模块和接收模块,
其中,该发送模块用于向组播组组播发送准备请求消息,该准备请求 消息至少携带待发送文件的文件名称和分块数量,该组播组包括至少一个设备;
该接收模块用于接收该组播组中的设备返回的准备完成消息;
该发送模块还用于当该接收模块接收到该组播组中的第一设备返回的第一个准备完成消息时,向该第一设备发送第一主接收设备确定消息,该第一主接收设备确定消息用于通知该第一设备其已被选择为主接收设备,向该组播组组播发送该待发送文件的数据包;
该发送模块还用于当有第二设备新加入该组播组时,向该第二设备发送第一消息,该第一消息至少携带该待发送文件的文件名称、分块数量和第一数据包标识,该第一数据包标识用于指示该发送设备即将传输的数据包,该第一消息用于通知该第二设备该发送设备即将传输的数据包的信息,使得该第二设备根据该第一消息接收该发送设备即将传输的该待发送文件的数据包。
结合第三方面,在第三方面的第一种可能实现方式中,该接收模块还用于该发送模块向该第二设备发送第一消息之后,接收该第二设备发送的准备完成消息。
结合第三方面,在第三方面的第二种可能实现方式中,该发送模块还用于当该组播组的当前主接收设备已经接收到该待发送文件的所有数据包时,向该第二设备发送第二主接收设备确定消息,该第二主接收设备确定消息用于通知该第二设备其已被选择为主接收设备,
该接收模块还用于接收该第二设备发送的携带第二数据包标识的接收确认消息,
该发送模块还用于当该接收模块接收到该第二设备发送的携带第二数据包标识的接收确认消息时,根据该第二数据包标识,向当前组播组组播 发送该第二设备尚未接收的该待发送文件的数据包,该第二数据包标识用于指示该第二设备下一次应接收的数据包,是该第二设备根据其已接收到的该待发送文件的数据包来确定的;
或,
该发送模块还用于当该组播组的当前主接收设备已经接收到该待发送文件的所有数据包时,向当前组播组组播发送该准备请求消息,
该接收模块还用于接收该当前组播组中的设备发送的准备完成消息,
该发送模块还用于当该接收模块接收到该当前组播组中的第三设备返回的第一个准备完成消息时,向该第三设备发送第三主接收设备确定消息,该第三主接收设备确定消息用于通知该第三设备其已被选择为主接收设备,
该接收模块还用于接收该第三设备发送的携带第三数据包标识的接收确认消息,
该发送模块还用于当该接收模块接收到该第三设备发送的携带第三数据包标识的接收确认消息时,根据该第三数据包标识,向当前组播组组播发送该第三设备尚未接收的该待发送文件的数据包,该第三数据包标识用于指示该第三设备下一次应接收的数据包,是该第三设备根据其已接收到的该待发送文件的数据包来确定的。
结合第三方面的第二种可能实现方式,在第三方面的第三种可能实现方式中,该装置还包括确认模块,用于当该接收模块接收到该组播组中当前主接收设备发送的第一接收确认消息且该第一接收确认消息携带第四数据包标识时,确定该组播组的当前主接收设备已经接收到该待发送文件的所有数据包,该第四数据包标识用于指示该待发送文件的最后一个数据包。
第四方面,提供了一种文件传输的装置,该装置包括:接收模块和加 入模块,
其中,当在发送设备向组播组中的设备组播发送待发送文件的数据包的过程中,该加入模块用于加入该组播组,该组播组包括至少一个设备;
该接收模块用于接收该发送设备向本端发送的第一消息,该第一消息至少携带该待发送文件的文件名称、分块数量和第一数据包标识,该第一数据包标识用于指示该发送设备即将传输的数据包,该第一消息用于通知本端该发送设备即将传输的数据包的信息;
该接收模块还用于根据该第一消息接收该发送设备即将传输的该待发送文件的数据包。
结合第四方面,在第四方面的第一种可能实现方式中,该装置还包括发送模块,该发送模块用于在该接收模块接收该发送设备发送的第一消息之后,向该发送设备发送准备完成消息。
结合第四方面,在第四方面的第二种可能实现方式中,该接收模块还用于接收第二主接收设备确定消息,该第二主接收设备确定消息由该发送设备在该组播组的当前主接收设备已经接收到该待发送文件的所有数据包时发送给该本端,该第二主接收设备确定消息用于选择该本端为主接收设备;
该发送模块还用于根据本端已接收到的该待发送文件的数据包,向该发送设备发送携带第二数据包标识的接收确认消息,该第二数据包标识用于指示本端下一次应接收的数据包,使得该发送设备根据该第二数据包标识向当前组播组组播发送该本端尚未接收的该待发送文件的数据包;
该接收模块还用于接收该发送设备发送的该本端尚未接收的该待发送文件的数据包。
本发明实施例提供的技术方案带来的有益效果是:
通过在有新设备加入组播组时,及时将当前正在传输的文件信息通知给新加入设备,使得该新加入设备能够在已经进行的MFTP过程中及时地了解当前传输的文件内容,马上开始接收,提高传输效率。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种文件传输的方法的流程图;
图2是本发明实施例提供的一种文件传输的方法的流程图;
图3是本发明实施例提供的一种文件传输的方法的流程图;
图4是本发明实施例提供的文件传输的装置结构示意图;
图5是本发明实施例提供的文件传输的装置结构示意图;
图6为本发明实施例所涉及的设备的结构示意图;
图7为本发明实施例所涉及的设备的结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
图1是本发明实施例提供的一种文件传输的方法的流程图。参见图1,该方法包括:
101、发送设备向组播组组播发送准备请求消息,该准备请求消息至少携带待发送文件的文件名称和分块数量,该组播组包括至少一个设备。
102、当该发送设备接收到该组播组中的第一设备返回的第一个准备完成消息时,向该第一设备发送第一主接收设备确定消息,该第一主接收设 备确定消息用于通知该第一设备其已被选择为主接收设备,向该组播组组播发送该待发送文件的数据包。
103、当有第二设备新加入该组播组时,向该第二设备发送第一消息,该第一消息至少携带该待发送文件的文件名称、分块数量和第一数据包标识,该第一数据包标识用于指示该发送设备即将传输的数据包,该第一消息用于通知该第二设备该发送设备即将传输的数据包的信息,使得该第二设备根据该第一消息接收该发送设备即将传输的该待发送文件的数据包。
本发明实施例提供的方法,通过在有新设备加入组播组时,及时将当前正在传输的文件信息通知给新加入设备,使得该新加入设备能够在已经进行MFTP过程中及时地了解当前传输的文件内容,马上开始接收,提高传输效率。
图2是本发明实施例提供的一种文件传输的方法的流程图。参见图2,该方法包括:
201、在发送设备向组播组中的设备组播发送待发送文件的数据包的过程中,第二设备加入该组播组,该组播组包括至少一个设备。
202、接收该发送设备向该第二设备发送的第一消息,该第一消息至少携带该待发送文件的文件名称、分块数量和第一数据包标识,该第一数据包标识用于指示该发送设备即将传输的数据包,该第一消息用于通知该第二设备该发送设备即将传输的数据包的信息。
203、根据该第一消息接收该发送设备即将传输的该待发送文件的数据包。
本发明实施例提供的方法,通过在有新设备加入组播组时,及时将当前正在传输的文件信息通知给新加入设备,使得该新加入设备能够在已经进行MFTP过程中及时地了解当前传输的文件内容,马上开始接收,提高传输效率。
图3是本发明实施例提供的一种文件传输的方法的流程图。该发明实施例中的交互主体为发送设备STA_S,组播组中的接收设备包括第一设备STA_1和第三设备STA_3,新加入的第二设备以STA_2表示。参见图3,该方法包括:
301、发送设备STA_S向组播组组播发送待发送文件的准备请求消息,该准备请求消息至少携带该待发送文件的文件名称和分块数量,该组播组包括至少一个设备。
其中,组播组中的多个设备建立设备之间的IP层连接。
可选地,该准备请求消息可以为RRQ,该准备请求消息在携带该待发送文件的文件名称和分块数量的基础上,还可以携带文件大小。
302、当STA_1接收到该准备请求消息,向STA_S发送准备完成消息。
当STA_1接收到该准备请求消息时,可以由该STA_1用户选择是否接受该待发送文件的传输,当确定接受时,可通过STA_1的功能按键确定,使得STA_1向STA_S发送准备完成消息。
需要说明的是,本发明实施例仅以该STA_1为第一个反馈准备完成消息的设备为例进行说明。因此,在此步骤302中,仅对该STA_1发送准备完成消息的过程进行描述,在实际场景中,对于组播组中的每个接收设备来说,其发送准备完成消息的过程与该步骤302同理,在此不再赘述。
303、当STA_S接收到该组播组中的STA_1发送的准备完成消息,且该STA_1发送的准备完成消息为该STA_S接收到的第一个准备完成消息,STA_S将该STA_1选择为主接收设备,向STA_1发送第一主接收设备确定消息,第一主接收设备确定消息用于通知该STA_1其已被选择为主接收设备。
进一步地,当STA_S在接收到第一个准备完成消息之后,还接收到其他接收设备如STA_2发送的准备完成消息时,向其他接收设备发送非主接 收设备确定消息,使得其他接收设备在接收到该消息时,获知自身不是主接收设备,也即是在接收到该STA_S发送的数据包时,无需返回接收确认消息。
需要说明的是,该步骤303以及后续步骤中的第一主接收设备确定消息、第二主接收设备确定消息等仅用于区分所确定的主设备,事实上,该第一主接收设备确定消息和第二主接收设备确定消息等的具体格式和携带的信息等可以相同,本发明实施例不对此进行限定。
304、当STA_1接收到第一主接收设备确定消息时,向STA_S发送携带第一数据包标识的接收确认消息,该第一数据包标识用于指示该发送设备即将传输的数据包,该接收确认消息用于确定下一次应接收数据包。
305、当STA_S接收到该STA_1发送的接收确认消息时,根据接收到的携带第一数据包标识的接收确认消息,向该组播组组播发送该待发送文件的数据包。
对于上述步骤303-305来说,该第一主接收设备确定消息为MRQ(Master Request,主接收设备确定消息),该第一主接收设备确定消息用于通知第一设备已经被选择为主接收设备,该主接收设备每当接收到STA_S组播发送的数据包时,需要向STA_S反馈接收确认消息,该接收确认消息用于确定下一次应接收的数据包标识,以使得STA_S按照接收到的数据包标识继续发送数据包。如,该接收确认消息可以携带的数据包标识为(k-1),则当STA_S接收到该(k-1)时,发送数据包标识为k的数据包,其中,k为正整数,也即是,如果该接收确认消息携带的数据包标识为3,则该STA_1下一个应该接收的数据包为数据包标识为4的数据包。
上述步骤303-305,是当发送设备接收到组播组中任一个接收设备返回的第一个准备完成消息时,以数据包形式发送该待发送文件的过程。
306、当STA_S检测到有设备STA_2新加入该组播组时,STA_S向STA_2发送第一消息,该第一消息至少携带该待发送文件的文件名称、分 块数量和第一数据包标识,该第一数据包标识用于指示该STA_S即将传输的数据包,该第一消息用于通知STA_2该STA_S即将传输的数据包的信息。
该第一消息在携带待发送文件的文件名称和分块数量的基础上,还可以携带文件大小。该第一消息用于通知新加入的设备当前正在传输的文件的具体情况,以使得新加入的设备能够在当前传输的基础上对发送设备正在传输的文件进行接收。当然,该第一消息还可以不携带该STA_S即将传输的数据包的数据包标识,本发明实施例对此不作具体限定。另外,该用于指示该STA_S即将传输的数据包的数据包标识可以是STA_S当前正在传输的数据包标识,也可以是该STA_S即将传输的数据包的数据包标识,通过发送设备和接收设备之间的协议,该接收设备可以获知发送设备当前正在发送的数据包是待发送文件中的哪一个,还可以获知发送设备即将传输的数据包是待发送文件中的哪一个。
其中,发送设备检测到有新的接收设备加入组播组的方式有以下任一种情况:(1)当发送设备是一个局域网的发起和管理设备,该发送设备具有动态主机设置协议(DHCP,Dynamic Host Configuration Protocol)功能,并负责组播地址的映射,每个新加入该网络的设备都要向该发送设备申请IP地址,所以当新设备申请加入组播组时,发送设备可以检测到该新加入设备。(2)发送设备处于一个局域网内,当有新设备加入该局域网时,发送设备能够获得该新设备在IP层加入组播组时的消息,从而检测到有新设备加入该组播组。(3)组播组地址映射由某一路由器负责,当新加入的设备向该路由器申请加入组播组时,路由器更新组播组地址映射表,根据预先的设定,同时通知发送设备,使得发送设备可以检测到该新加入设备。这些方法所说的局域网都可以是无线局域网。而事实上,该检测到新加入设备的方法还可以有其他实现方式,本发明实施例不做赘述。
307、当STA_2接收到第一消息时,向STA_S发送准备完成消息。
该准备完成消息用于通知STA_S该STA_2已经开始文件的接收过程, 此时,该STA_2加入组播组并发送准备完成消息后,从该STA_S当前发送数据包开始,接收该STA_S所发送的数据包。
308、STA_S继续组播发送该待发送文件的数据包。
该步骤308与步骤305同理,是该STA_S继续发送待发送文件的数据包的过程,在此不再赘述。
309、当该STA_S接收到STA_1发送的接收确认消息且该接收确认消息携带第四数据包标识时,确定该组播组的当前主接收设备已经接收到待发送文件的所有数据包,该第四数据包标识用于指示该待发送文件的最后一个数据包,选择STA_2为主接收设备,向STA_2发送第二主接收设备确定消息,该第二主接收设备确定消息用于通知该STA_2其已被选择为主接收设备。
当该STA_S接收到STA_1发送的接收确认消息且该接收确认消息携带该待发送文件的最后一个数据包的数据包标识时,确定该STA_1已经接收到该待发送文件的所有数据包,也即是该STA_1的文件传输结束,则将新加入组播组的STA_2选择为主接收设备。
需要说明的是,本发明实施例仅以在确定该组播组的当前主接收设备已经接收到待发送文件的所有数据包之后,选择新加入设备为主接收设备继续进行发送为例进行说明,而事实上,在确定该组播组的当前主接收设备已经接收到待发送文件的所有数据包之后,还可以再次组播发送准备请求消息,使得接收到准备请求消息的接收设备返回准备完成消息,并将第一个返回准备完成消息的接收设备选择为主设备。也即是,该步骤309可用以下步骤代替:向当前组播组组播发送准备请求消息,当发送设备接收到当前组播组中的第三设备(如STA_3)返回的第一个准备完成消息时,向该第三设备发送第三主接收设备确定消息,该第三主接收设备确定消息用于通知该第三设备其已被选择为主接收设备,当接收到该第三设备发送的携带第三数据包标识的接收确认消息时,根据该第三数据包标识,向当 前组播组组播发送该第三设备尚未接收的该待发送文件的数据包,该第三数据包标识用于指示该第三设备下一次应接收的数据包,是该第三设备根据其已接收到的该待发送文件的数据包来确定的。需要说明的是,该第三数据包标识可以是一个或多个,也即是该第三设备STA_3可以一次性通知STA_S其未接收到的多个数据包,也可以分多次通知STA_S其未接收到的数据包,本发明实施例对此不作具体限定。
310、STA_2接收到第二主接收设备确定消息时,根据STA_2已接收到的数据包,向STA_S发送携带第二数据包标识的接收确认消息,该第二数据包标识用于指示STA_2下一次应接收的数据包,是STA_2根据其已接收到的待发送文件的数据包来确定的。
需要说明的是,该第二数据包标识可以是一个或多个,也即是该第二设备STA_2可以一次性通知STA_S其未接收到的多个数据包,也可以分多次通知STA_S其未接收到的数据包,本发明实施例对此不作具体限定。
经过步骤307-308,该STA_2已经接收到该待发送文件的部分数据包,为了能够接收到该待发送文件的所有数据包,STA_2根据已接收到的数据包,向STA_S发送接收确认消息,该接收确认消息用于确定下一次应接收的数据包标识。需要说明的是,由于在传输过程中,数据包有可能丢失,因此,在步骤310中,可以按需发送接收确认消息,以获取该STA_2尚未接收到的数据包。
例如,待发送文件分为10个数据包,当前STA_2已接收到数据包标识为1,4,5的数据包,则该STA_2发送的接收确认消息可以携带1、2或5~9中任一个数据包标识,即分别用来请求接收标识为2、3或6~10的数据包。
311、该STAS根据接收到的接收确认消息所携带的数据包标识,向当前组播组组播发送待发送文件中该STA_2尚未接收的数据包。
此时的组播组为排除了原主接收设备STA_1、且加入了新设备STA_2的组播组。
该步骤306-311是当检测到有新设备加入组播组时的传输过程,而当确定STA_2已接收到待发送文件的所有数据包时,如果当前没有新加入的设备,则按照步骤301-305的过程继续选择主接收设备并进行文件传输,如果有新加入的设备,则按照306-311继续执行,本发明实施例不再赘述。
需要说明的是,上述过程中涉及到的第一数据包标识、第二数据包标识、第三数据包标识以及第四数据包标识仅用于区分不同阶段的数据包标识,并不对数据包标识的类型等进行区分。
本发明实施例提供的方法,通过改变现有的MFTP协议,在有新设备加入组播组时,及时将当前正在传输的文件信息通知给新加入设备,使得该新加入设备能够在已经进行MFTP过程中及时地了解当前传输的文件内容,马上开始接收,提高传输效率。
图4是本发明实施例提供的一种文件传输的装置的结构示意图。参见图4,该装置包括:发送模块401和接收模块402;其中,发送模块401和接收模块402连接;该发送模块401用于向组播组组播发送准备请求消息,该准备请求消息至少携带待发送文件的文件名称和分块数量,该组播组包括至少一个设备;该接收模块402该接收模块用于接收该组播组中的设备返回的准备完成消息;该发送模块401还用于当接收模块402接收到该组播组中的第一设备返回的第一个准备完成消息时,向该第一设备发送第一主接收设备确定消息,该第一主接收设备确定消息用于通知该第一设备其已被选择为主接收设备,向该组播组组播发送该待发送文件的数据包;该发送模块401还用于当有第二设备新加入该组播组时,向该第二设备发送第一消息,该第一消息至少携带该待发送文件的文件名称、分块数量和第一数据包标识,该第一数据包标识用于指示该发送设备即将传输的数据包,该第一消息用于通知该第二设备该发送设备即将传输的数据包的信息,使得该第二设备根据该第一消息接收该发送设备即将传输的该待发送文件的 数据包。
可选地,该接收模块402还用于在该发送模块401向该第二设备发送第一消息之后,接收该第二设备发送的准备完成消息。
可选地,该发送模块401还用于当该组播组的当前主接收设备已经接收到该待发送文件的所有数据包时,向该第二设备发送第二主接收设备确定消息,该第二主接收设备确定消息用于通知该第二设备其已被选择为主接收设备,
该接收模块402还用于接收该第二设备发送的携带第二数据包标识的接收确认消息,
该发送模块401还用于当该接收模块402接收到该第二设备发送的携带第二数据包标识的接收确认消息时,根据该第二数据包标识,向当前组播组组播发送该第二设备尚未接收的该待发送文件的数据包,该第二数据包标识用于指示该第二设备下一次应接收的数据包,是该第二设备根据其已接收到的该待发送文件的数据包来确定的;
该发送模块401还用于当该组播组的当前主接收设备已经接收到该待发送文件的所有数据包时,向当前组播组组播发送该准备请求消息,
该接收模块402还用于接收该当前组播组中的设备发送的准备完成消息,
该发送模块401还用于当该接收模块402接收到该当前组播组中的第三设备返回的第一个准备完成消息时,向该第三设备发送第三主接收设备确定消息,该第三主接收设备确定消息用于通知该第三设备其已被选择为主接收设备,
该接收模块402还用于接收该第三设备发送的携带第三数据包标识的接收确认消息,
该发送模块401还用于当该接收模块402接收到该第三设备发送的携 带第三数据包标识的接收确认消息时,根据该第三数据包标识,向当前组播组组播发送该第三设备尚未接收的该待发送文件的数据包,该第三数据包标识用于指示该第三设备下一次应接收的数据包,是该第三设备根据其已接收到的该待发送文件的数据包来确定的。
可选地,该装置还包括确认模块,用于当该接收模块402接收到该组播组中当前主接收设备发送的第一接收确认消息且该第一接收确认消息携带第四数据包标识时,确定该组播组的当前主接收设备已经接收到该待发送文件的所有数据包,该第四数据包标识用于指示该待发送文件的最后一个数据包。
图5是本发明实施例提供的一种文件传输的装置的结构示意图。参见图5,该装置包括:加入模块501和接收模块502;其中,加入模块501和接收模块502连接;当在发送设备向组播组中的设备组播发送待发送文件的数据包的过程中,该加入模块501用于加入该组播组,该组播组包括至少一个设备;该接收模块502用于用于接收该发送设备向本端发送的第一消息,该第一消息至少携带该待发送文件的文件名称、分块数量和第一数据包标识,该第一数据包标识用于指示该发送设备即将传输的数据包,该第一消息用于通知本端该发送设备即将传输的数据包的信息;该接收模块502还用于根据该第一消息接收该发送设备即将传输的该待发送文件的数据包。
可选地,该装置还包括发送模块,用于在该接收模块接收该发送设备发送的第一消息之后,向该发送设备发送准备完成消息。
可选地,该接收模块502还用于接收第二主接收设备确定消息,该第二主接收设备确定消息由该发送设备在该组播组的当前主接收设备已经接收到该待发送文件的所有数据包时发送给该本端,该第二主接收设备确定消息用于选择该本端为主接收设备;
该发送模块502还用于根据本端已接收到的该待发送文件的数据包,向该发送设备发送携带第二数据包标识的接收确认消息,该第二数据包标识用于指示本端下一次应接收的数据包,使得该发送设备根据该第二数据包标识向当前组播组组播发送该本端尚未接收的该待发送文件的数据包;
该接收模块503还用于接收该发送设备发送的该本端尚未接收的该待发送文件的数据包。
需要说明的是:上述实施例提供的文件传输的装置在文件传输时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的文件传输的装置与文件传输的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图6为本发明实施例所提供的一种设备的结构示意图。如图6所示,该设备600包括:发射器632、接收器631、存储器633以及分别与发射器632、接收器631和存储器633连接的处理器634;
存储器633用于存储可执行程序代码,该程序代码包括计算机操作指令。存储器633可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
处理器634可能是一个中央处理器(Central Processing Unit,简称为CPU),或者是特定集成电路(Application Specific Integrated Circuit,简称为ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。
处理器634用于执行存储器633中存储的可执行程序代码,例如计算机程序来运行与可执行代码对应的程序。
该发射器632向组播组组播发送准备请求消息,该准备请求消息至少 携带待发送文件的文件名称和分块数量,该组播组包括至少一个设备;当接收器631接收到该组播组中的第一设备返回的第一个准备完成消息时,通过发射器632向该第一设备发送第一主接收设备确定消息,该第一主接收设备确定消息用于通知该第一设备其已被选择为主接收设备,发射器632向该组播组组播发送该待发送文件的数据包;当有第二设备新加入该组播组时,发射器632向该第二设备发送第一消息,该第一消息至少携带该待发送文件的文件名称、分块数量和第一数据包标识,该第一数据包标识用于指示该发送设备即将传输的数据包,该第一消息用于通知该第二设备该发送设备即将传输的数据包的信息,使得该第二设备根据该第一消息接收该发送设备即将传输的该待发送文件的数据包。
该设备实现的功能可以参考前述方法实施例中发送设备实现的功能。
图7为本发明实施例所提供的一种设备的结构示意图。如图7所示,该设备700包括:发射器732、接收器731、存储器733以及分别与发射器732、接收器731和存储器733连接的处理器734;
存储器733用于存储可执行程序代码,该程序代码包括计算机操作指令。存储器733可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
处理器734可能是一个中央处理器(Central Processing Unit,简称为CPU),或者是特定集成电路(Application Specific Integrated Circuit,简称为ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。
处理器734用于执行存储器733中存储的可执行程序代码,例如计算机程序来运行与可执行代码对应的程序。
该设备700在发送设备向组播组中的设备组播发送待发送文件的数据包的过程中,加入该组播组,该组播组包括至少一个设备;接收器731用 于接收该发送设备向本端发送的第一消息,该第一消息至少携带该待发送文件的文件名称、分块数量和第一数据包标识,该第一数据包标识用于指示该发送设备即将传输的数据包,该第一消息用于通知该第二设备该发送设备即将传输的数据包的信息;该接收器731还用于根据该第一消息接收该发送设备即将传输的该待发送文件的数据包。
该设备实现的功能可以参考前述方法实施例中第二设备实现的功能。
上述所有可选技术方案,可以采用任意结合形成本发明的可选实施例,在此不再一一赘述。
需要说明的是,本发明实施例中所述“第一”、“第二”……等,均为了彼此进行区分,无其他特定含义。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (14)

  1. 一种文件传输的方法,其特征在于,所述方法包括:
    发送设备向组播组组播发送准备请求消息,所述准备请求消息至少携带待发送文件的文件名称和分块数量,所述组播组包括至少一个设备;
    当所述发送设备接收到所述组播组中的第一设备返回的第一个准备完成消息时,向所述第一设备发送第一主接收设备确定消息,所述第一主接收设备确定消息用于通知所述第一设备其已被选择为主接收设备,向所述组播组组播发送所述待发送文件的数据包;
    当有第二设备新加入所述组播组时,向所述第二设备发送第一消息,所述第一消息至少携带所述待发送文件的文件名称、分块数量和第一数据包标识,所述第一数据包标识用于指示所述发送设备即将传输的数据包,所述第一消息用于通知所述第二设备所述发送设备即将传输的数据包的信息,使得所述第二设备根据所述第一消息接收所述发送设备即将传输的所述待发送文件的数据包。
  2. 根据权利要求1所述的方法,其特征在于,当有第二设备新加入所述组播组时,向所述第二设备发送第一消息之后,所述方法还包括:
    接收所述第二设备发送的准备完成消息。
  3. 根据权利要求1所述的方法,其特征在于,在向所述第二设备发送第一消息,使得所述第二设备根据所述第一消息接收所述发送设备即将传输的所述待发送文件的数据包之后,当所述组播组的当前主接收设备已经接收到所述待发送文件的所有数据包时,所述方法还包括:
    向所述第二设备发送第二主接收设备确定消息,所述第二主接收设备确定消息用于通知所述第二设备其已被选择为主接收设备,当接收到所述第二设备发送的携带第二数据包标识的接收确认消息时,根据所述第二数 据包标识,向当前组播组组播发送所述第二设备尚未接收的所述待发送文件的数据包,所述第二数据包标识用于指示所述第二设备下一次应接收的数据包,是所述第二设备根据其已接收到的所述待发送文件的数据包来确定的;或,
    向当前组播组组播发送所述准备请求消息,当所述发送设备接收到所述当前组播组中的第三设备返回的第一个准备完成消息时,向所述第三设备发送第三主接收设备确定消息,所述第三主接收设备确定消息用于通知所述第三设备其已被选择为主接收设备,当接收到所述第三设备发送的携带第三数据包标识的接收确认消息时,根据所述第三数据包标识,向当前组播组组播发送所述第三设备尚未接收的所述待发送文件的数据包,所述第三数据包标识用于指示所述第三设备下一次应接收的数据包,是所述第三设备根据其已接收到的所述待发送文件的数据包来确定的。
  4. 根据权利要求3所述的方法,其特征在于,所述发送设备接收到所述组播组中当前主接收设备发送的第一接收确认消息且所述第一接收确认消息携带第四数据包标识时,确定所述组播组的当前主接收设备已经接收到所述待发送文件的所有数据包,所述第四数据包标识用于指示所述待发送文件的最后一个数据包。
  5. 一种文件传输的方法,其特征在于,所述方法包括:
    在发送设备向组播组中的设备组播发送待发送文件的数据包的过程中,第二设备加入所述组播组,所述组播组包括至少一个设备;
    接收所述发送设备向所述第二设备发送的第一消息,所述第一消息至少携带所述待发送文件的文件名称、分块数量和第一数据包标识,所述第一数据包标识用于指示所述发送设备即将传输的数据包,所述第一消息用于通知所述第二设备所述发送设备即将传输的数据包的信息;
    根据所述第一消息接收所述发送设备即将传输的所述待发送文件的数据包。
  6. 根据权利要求5所述的方法,其特征在于,接收所述发送设备向所述第二设备发送的第一消息之后,所述方法还包括:
    所述第二设备向所述发送设备发送准备完成消息。
  7. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    所述第二设备接收第二主接收设备确定消息,所述第二主接收设备确定消息由所述发送设备在所述组播组的当前主接收设备已经接收到所述待发送文件的所有数据包时发送给所述第二设备,所述第二主接收设备确定消息用于通知所述第二设备其已被选择为主接收设备;
    所述第二设备根据所述第二设备已接收到的所述待发送文件的数据包,向所述发送设备发送携带第二数据包标识的接收确认消息,所述第二数据包标识用于指示所述第二设备下一次应接收的数据包,使得所述发送设备根据所述第二数据包标识向当前组播组组播发送所述第二设备尚未接收的所述待发送文件的数据包;
    接收所述发送设备发送的所述第二设备尚未接收的所述待发送文件的数据包。
  8. 一种文件传输的装置,其特征在于,所述装置包括:发送模块和接收模块,
    其中,所述发送模块用于向组播组组播发送准备请求消息,所述准备请求消息至少携带待发送文件的文件名称和分块数量,所述组播组包括至少一个设备;
    所述接收模块用于接收所述组播组中的设备返回的准备完成消息;
    所述发送模块还用于当所述接收模块接收到所述组播组中的第一设备返回的第一个准备完成消息时,向所述第一设备发送第一主接收设备确定消息,所述第一主接收设备确定消息用于通知所述第一设备其已被选择为主接收设备,向所述组播组组播发送所述待发送文件的数据包;
    所述发送模块还用于当有第二设备新加入所述组播组时,向所述第二设备发送第一消息,所述第一消息至少携带所述待发送文件的文件名称、分块数量和第一数据包标识,所述第一数据包标识用于指示所述发送设备即将传输的数据包,所述第一消息用于通知所述第二设备所述发送设备即将传输的数据包的信息,使得所述第二设备根据所述第一消息接收所述发送设备即将传输的所述待发送文件的数据包。
  9. 根据权利要求8所述的装置,其特征在于,所述接收模块还用于在所述发送模块向所述第二设备发送第一消息之后,接收所述第二设备发送的准备完成消息。
  10. 根据权利要求8所述的装置,其特征在于,
    所述发送模块还用于当所述组播组的当前主接收设备已经接收到所述待发送文件的所有数据包时,向所述第二设备发送第二主接收设备确定消息,所述第二主接收设备确定消息用于通知所述第二设备其已被选择为主接收设备,
    所述接收模块还用于接收所述第二设备发送的携带第二数据包标识的接收确认消息,
    所述发送模块还用于当所述接收模块接收到所述第二设备发送的携带第二数据包标识的接收确认消息时,根据所述第二数据包标识,向当前组播组组播发送所述第二设备尚未接收的所述待发送文件的数据包,所述第二数据包标识用于指示所述第二设备下一次应接收的数据包,是所述第二 设备根据其已接收到的所述待发送文件的数据包来确定的;
    或,
    所述发送模块还用于当所述组播组的当前主接收设备已经接收到所述待发送文件的所有数据包时,向当前组播组组播发送所述准备请求消息,
    所述接收模块还用于接收所述当前组播组中的设备发送的准备完成消息,
    所述发送模块还用于当所述接收模块接收到所述当前组播组中的第三设备返回的第一个准备完成消息时,向所述第三设备发送第三主接收设备确定消息,所述第三主接收设备确定消息用于通知所述第三设备其已被选择为主接收设备,
    所述接收模块还用于接收所述第三设备发送的携带第三数据包标识的接收确认消息,
    所述发送模块还用于当所述接收模块接收到所述第三设备发送的携带第三数据包标识的接收确认消息时,根据所述第三数据包标识,向当前组播组组播发送所述第三设备尚未接收的所述待发送文件的数据包,所述第三数据包标识用于指示所述第三设备下一次应接收的数据包,是所述第三设备根据其已接收到的所述待发送文件的数据包来确定的。
  11. 根据权利要求10所述的装置,其特征在于,所述装置还包括确认模块,用于当所述接收模块接收到所述组播组中当前主接收设备发送的第一接收确认消息且所述第一接收确认消息携带第四数据包标识时,确定所述组播组的当前主接收设备已经接收到所述待发送文件的所有数据包,所述第四数据包标识用于指示所述待发送文件的最后一个数据包。
  12. 一种文件传输的装置,其特征在于,所述装置包括:接收模块和加入模块,
    其中,当在发送设备向组播组中的设备组播发送待发送文件的数据包的过程中,所述加入模块用于加入所述组播组,所述组播组包括至少一个设备;
    所述接收模块用于接收所述发送设备向本端发送的第一消息,所述第一消息至少携带所述待发送文件的文件名称、分块数量和第一数据包标识,所述第一数据包标识用于指示所述发送设备即将传输的数据包,所述第一消息用于通知本端所述发送设备即将传输的数据包的信息;
    所述接收模块还用于根据所述第一消息接收所述发送设备即将传输的所述待发送文件的数据包。
  13. 根据权利要求12所述的装置,其特征在于,所述装置还包括发送模块,用于在所述接收模块接收所述发送设备发送的第一消息之后,向所述发送设备发送准备完成消息。
  14. 根据权利要求12所述的装置,其特征在于,所述接收模块还用于接收第二主接收设备确定消息,所述第二主接收设备确定消息由所述发送设备在所述组播组的当前主接收设备已经接收到所述待发送文件的所有数据包时发送给所述本端,所述第二主接收设备确定消息用于选择所述本端为主接收设备;
    所述发送模块还用于根据本端已接收到的所述待发送文件的数据包,向所述发送设备发送携带第二数据包标识的接收确认消息,所述第二数据包标识用于指示本端下一次应接收的数据包,使得所述发送设备根据所述第二数据包标识向当前组播组组播发送所述本端尚未接收的所述待发送文件的数据包;
    所述接收模块还用于接收所述发送设备发送的所述本端尚未接收的所述待发送文件的数据包。
PCT/CN2014/091261 2013-11-15 2014-11-17 文件传输的方法和装置 WO2015070810A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/152,957 US20160261678A1 (en) 2013-11-15 2016-05-12 File transfer method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310573873.7A CN104639343B (zh) 2013-11-15 2013-11-15 文件传输的方法和装置
CN201310573873.7 2013-11-15

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/152,957 Continuation US20160261678A1 (en) 2013-11-15 2016-05-12 File transfer method and apparatus

Publications (1)

Publication Number Publication Date
WO2015070810A1 true WO2015070810A1 (zh) 2015-05-21

Family

ID=53056800

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/091261 WO2015070810A1 (zh) 2013-11-15 2014-11-17 文件传输的方法和装置

Country Status (3)

Country Link
US (1) US20160261678A1 (zh)
CN (1) CN104639343B (zh)
WO (1) WO2015070810A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108134965B (zh) * 2018-01-23 2020-09-01 重庆大学 一种点播业务的无线侧组播传输的方法

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101155295A (zh) * 2006-09-28 2008-04-02 李典 基于区域数据环存的网络流媒体数据分发方法
CN101242337A (zh) * 2007-02-08 2008-08-13 张永敏 一种计算机网络的内容发布方法及系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030061333A1 (en) * 2001-05-04 2003-03-27 Stephen Dean System and method for universal networked device management
CN101588235B (zh) * 2009-01-23 2013-04-17 西安电子科技大学 一种基于MIPv6的安全组播方法及步骤

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101155295A (zh) * 2006-09-28 2008-04-02 李典 基于区域数据环存的网络流媒体数据分发方法
CN101242337A (zh) * 2007-02-08 2008-08-13 张永敏 一种计算机网络的内容发布方法及系统

Also Published As

Publication number Publication date
CN104639343A (zh) 2015-05-20
US20160261678A1 (en) 2016-09-08
CN104639343B (zh) 2018-04-27

Similar Documents

Publication Publication Date Title
WO2021063133A1 (zh) Harq进程管理方法、装置、终端及存储介质
JP7174058B2 (ja) 伝送モードを判定するための方法およびデバイス、記憶媒体、ならびに電子デバイス
TW200814822A (en) A method for acquiring information for media independent handover
US10225830B2 (en) Processing method of data packet, terminal, base station and system
EP2918140A1 (en) Proxy connection method and apparatus
WO2020143544A1 (zh) 系统信息的传输方法、终端及网络设备
WO2016011849A1 (zh) 一种控制空口资源的方法、设备及系统
WO2015180418A1 (zh) 组播传输方法、装置及系统
WO2015042911A1 (zh) 寻呼方法、网络设备和通信系统
WO2013091510A1 (zh) 传输数据帧的方法和装置
WO2015131358A1 (zh) 信道资源指示方法及装置
JP2020517193A (ja) ワイヤレスデバイスのためのフロー制御
US20130084897A1 (en) Methods and apparatuses for management of sms message identifications in a multi-mode device
WO2018141181A1 (zh) 数据传输方法及装置
WO2015113206A1 (zh) 多媒体广播多播业务获取方法、装置和通信系统
WO2010111871A1 (zh) Hrpd系统中非3gpp2系统信息的发送、响应方法与装置
WO2015139287A1 (zh) 检测设备对设备信号的方法、用户设备和基站
WO2016131195A1 (zh) 数据传输方法和设备
WO2013166678A1 (zh) 一种移动设置协商方法和装置
US9025531B2 (en) Mobile device driven information exchange
WO2015061993A1 (zh) 一种通信方法、网络侧设备和通信系统
WO2015070810A1 (zh) 文件传输的方法和装置
WO2017113240A1 (zh) 一种处理保活探测报文的方法、装置及系统
WO2023024119A1 (zh) 一种应用于短距无线通信的数据传输方法及通信装置
WO2017185368A1 (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: 14862240

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: 14862240

Country of ref document: EP

Kind code of ref document: A1