WO2019218951A1 - 一种传输文件的方法及终端 - Google Patents

一种传输文件的方法及终端 Download PDF

Info

Publication number
WO2019218951A1
WO2019218951A1 PCT/CN2019/086527 CN2019086527W WO2019218951A1 WO 2019218951 A1 WO2019218951 A1 WO 2019218951A1 CN 2019086527 W CN2019086527 W CN 2019086527W WO 2019218951 A1 WO2019218951 A1 WO 2019218951A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
communication
file
modes supported
connections
Prior art date
Application number
PCT/CN2019/086527
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 WO2019218951A1 publication Critical patent/WO2019218951A1/zh

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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and a terminal for transmitting a file.
  • Today's terminals generally have a variety of data communication capabilities, that is, the ability to use a variety of data communication technologies for data transmission.
  • the above various data communication technologies may include the following data communication technologies, such as Bluetooth communication technology, Near Field Communication (NFC) communication technology, OTG (On The Go) communication technology, and wifi direct connection (Wi-) Fi Direct) communication technology, wireless local area network (WLAN) communication technology, general packet radio service (GPRS) communication technology, mobile communication technology (mobile communication) and other communication technologies.
  • each type of data communication technology to establish a communication connection has its own learning costs, and the way of pairing connections is not nearly the same.
  • Bluetooth communication technology when using Bluetooth communication technology to establish a communication connection, one party needs to open the monitoring and the other party searches for the identification. Some mobile phones automatically turn off monitoring after dozens of seconds for security and power consumption considerations.
  • the Bluetooth communication connection needs to be established, the user needs to manually turn on the monitoring, which may cause trouble to the user.
  • the network environment in which the mobile phone is located is complicated. For example, the distance is too long, the signal is not good, and the configuration is cumbersome, which may make it difficult for the user to effectively share a slightly larger file or a large number of files.
  • a short-range wireless communication technology such as Bluetooth, wifi direct connection, NFC, wifi, etc. is used to transmit files through a single channel.
  • the two parties agree on the transmission method to be used, such as Bluetooth, wifi direct connection, NFC, wifi, etc., and open the corresponding switch and port.
  • a terminal discovers another terminal and creates a connection, it can transfer files.
  • long-distance wireless communication technologies such as GPRS and WLAN are used to transmit files through a single channel.
  • Two terminals that need to transfer files are connected to the same server, or the router creates an indirect connection, and then performs file transfer.
  • a simple combination of Bluetooth and wifi is used to transmit file technology. For example, it is required to simultaneously turn on wifi and Bluetooth, quickly find each other through Bluetooth, and then directly transfer files through wifi. It is necessary to open wifi and Bluetooth at the same time. There is a connection that cannot be completed without opening. It is limited to two connection modes of wifi and Bluetooth, and the scope of use is very limited. This method essentially also involves transferring files through a single path.
  • files are transmitted through a single channel. Due to the transmission distance and the transmission environment constraints, the user's subjective selection of transmission paths may not be optimal. When the user selects a transmission path for file transmission, the transmission may be interrupted due to factors such as distance becoming far, the signal is not good, the network is not good, and the user needs to manually retry or select another transmission path. Moreover, even if there are multiple transmission paths between the two terminals, only one transmission path can be selected for connection. The use is cumbersome and the transmission efficiency is low.
  • the embodiment of the invention provides a method and a terminal for transmitting a file, which are simple to use and high in transmission efficiency.
  • a method of transferring a file receives a request for transmitting a file to the second terminal; the first terminal establishes a plurality of first communication connections with the second terminal according to multiple communication modes supported by the first terminal and the second terminal The first terminal transmits a file to the second terminal through at least one of the plurality of first communication connections.
  • the first terminal after receiving the request for transmitting the file to the second terminal, the first terminal does not directly use a communication connection that has been established or transmits a file to the second terminal according to a communication connection established by a communication mode selected by the user. Rather, a plurality of first communication connections are established with the second terminal according to multiple communication modes supported by the first terminal and the second terminal, so that the first terminal may be according to the number of files or files to be transmitted. Transmitting a file to the second terminal by using at least one of the plurality of first communication connections.
  • the transmission efficiency is high because a plurality of communication connections are used to transfer files or a communication connection with a high-quality communication connection among a plurality of communication connections.
  • the first terminal before the first terminal establishes multiple first communication connections with the second terminal according to multiple communication modes supported by the first terminal and the second terminal, The first terminal establishes a second communication connection with the second terminal; the first terminal receives information from the second terminal by using the second communication connection, where the information is used to establish the multiple first communications connection.
  • the first terminal establishes a second communication connection with the second terminal; the first terminal receives information from the second terminal by using the second communication connection, so that the first terminal is based on the slave terminal.
  • the information received by the second terminal establishes the plurality of first communication connections.
  • the information is an identifier of multiple communication modes supported by the first terminal and the second terminal, where the information is used by the second terminal according to the first And determining, by the terminal, the identifiers of the multiple communication modes supported by the first terminal and the identifiers of the multiple communication modes supported by the second terminal, where the first terminal connects to the second by using the second communication connection
  • the terminal sends the identifiers of the multiple communication modes supported by the first terminal.
  • the first terminal sends the identifier of the multiple communication modes supported by the first terminal to the second terminal by using the second communication connection
  • the second terminal sends the identifier according to the first terminal.
  • the identifiers of the multiple communication modes supported by the first terminal and the identifiers of the multiple communication modes supported by the second terminal determine identifiers of multiple communication modes supported by the first terminal and the second terminal.
  • the information is an identifier of multiple communication modes supported by the second terminal
  • the first terminal is configured according to the identifiers of the multiple communication modes supported by the first terminal
  • the The identifiers of the multiple communication modes supported by the second terminal determine the identifiers of the multiple communication modes supported by the first terminal and the second terminal.
  • the first terminal receives, by the second terminal, an identifier of multiple communication modes supported by the second terminal from the second terminal, and is received by the first terminal according to the first terminal.
  • the identifiers of the multiple communication modes supported by the second terminal and the identifiers of the multiple communication modes supported by the first terminal determine identifiers of multiple communication modes supported by the first terminal and the second terminal.
  • the first terminal displays an identifier of each communication manner of the multiple communication modes supported by the first terminal; the first terminal determines that the user supports from the first terminal A communication mode selected by the communication mode; the first terminal discovers the second terminal according to a communication mode selected by the user, and establishes the second communication connection with the second terminal.
  • the second communication connection can be manually established by the user selecting a familiar communication method, the second communication connection being a direct communication connection.
  • the first terminal and the second terminal establish the second communication connection by using a server.
  • the second communication connection is an indirect communication connection.
  • the first terminal receives a first identifier set from the server, where the first identifier set includes an identifier of a terminal near the first terminal and/or an association of the first terminal.
  • the first terminal displays the first identifier set; the first terminal determines to transmit a file to the second terminal according to the identifier of the second terminal selected by the user from the first identifier set.
  • the associated terminal of the first terminal may be a terminal that has had information interaction with the first terminal through the server, or may also be a terminal that has established an association relationship with the first terminal.
  • the association relationship between the two terminals may be an association relationship between users of the two terminals.
  • the second communication connection is an indirect communication connection established by the server
  • the identifier of the terminal in the vicinity of the first terminal and/or the identifier of the associated terminal of the first terminal may be determined by the server, so that the first terminal is fast. Discover and select the second terminal.
  • the first terminal exchanges, with the second terminal, each communication in a plurality of communication modes supported by the first terminal and the second terminal by using the second communication connection. a connection parameter of the mode; the first terminal establishes a plurality of first communication connections with the second terminal according to connection parameters of each communication mode in the multiple communication modes supported by the first terminal and the second terminal .
  • the first terminal and the second terminal automatically exchange connection parameters of each communication mode, which is simple to use without manual setting by the user.
  • the first terminal uses each of the files as a task; the first terminal connects to the second terminal by using at least one of the plurality of first communication connections Transfer the task.
  • the first terminal uses each of the files as a task; and transmits the task to the second terminal by using at least one of the plurality of first communication connections, thereby implementing transmission resources. Optimization.
  • the first terminal determines, according to each file to be transmitted, whether the file size is smaller than a first threshold; when the result of the determination is that the file size is less than or equal to the first threshold, the file is used as a file a task; when the result of the determination is that the file size is greater than the first threshold, dividing the file into a plurality of tasks according to the first threshold; the first terminal communicating by using at least one of the plurality of first communication connections The connection transmits the task to the second terminal.
  • the first terminal divides the large file into multiple tasks for each file to be transmitted, so that multiple communication connections can cooperatively transfer large files, so that the optimization of the transmission resources can be further implemented.
  • the first terminal according to the number of the tasks, and a preset priority of a communication mode corresponding to each of the plurality of first communication connections, from the plurality of Selecting at least one communication connection in a communication connection transmits the task to the second terminal.
  • the preset priority of each communication mode can be determined according to a preset rule, such as the level of transmission efficiency, whether a deduction is generated, etc., so that the selected communication connection can better meet the needs of the user.
  • the first terminal selects at least one of the plurality of first communication connections according to the number of the tasks and the transmission quality of each of the plurality of first communication connections.
  • a communication connection transmits the task to the second terminal.
  • the first terminal can periodically monitor the transmission quality of each communication connection, and the foregoing transmission quality can include transmission stability and transmission efficiency, which can be measured by a packet loss rate and the like.
  • the communication connection transmission task with good transmission quality can be automatically selected, and the user experience is good without user operation.
  • the embodiment of the present invention provides a terminal, which can implement the functions performed in the foregoing method design of the first aspect, and the functions can be implemented by using hardware or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the structure of the terminal includes a processor configured to support the terminal to perform the corresponding functions of the first aspect method described above.
  • the terminal can also include a memory for coupling with the processor that retains the program instructions and data necessary for the terminal.
  • the terminal may also include a communication interface for transmitting or receiving information, transmitting files, and the like.
  • an embodiment of the present invention provides a communication device, which may be, for example, a chip, and the communication device may be disposed in a terminal, where the communication device includes a processor and an interface.
  • the processor is configured to support the communication device to perform the corresponding functions of the first aspect method described above.
  • the interface is used to support communication between the communication device and other communication devices or other network elements.
  • the communication device can also include a memory for coupling with the processor that retains the program instructions and data necessary for the communication device.
  • an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores instructions, when executed on a computer, causing the computer to perform any of the foregoing first aspect or the first aspect. The method described in the design.
  • an embodiment of the present invention provides a computer program product, comprising: instructions, when executed by a computer, causing a computer to perform any of the above aspects or any one of the possible aspects of the first aspect The method described in the above.
  • an embodiment of the present invention provides a computer program, including instructions, when the program is executed by a computer, the instructions cause the computer to perform any of the above first aspect or any of the possible aspects of the first aspect. Said method.
  • the first terminal after receiving the request for transmitting the file to the second terminal, the first terminal does not directly use a communication connection that has been established or transmits a file to the second terminal according to a communication connection established by a communication mode selected by the user. Rather, a plurality of first communication connections are established with the second terminal according to multiple communication modes supported by the first terminal and the second terminal, so that the first terminal may be according to the number of files or files to be transmitted. Transmitting a file to the second terminal by using at least one of the plurality of first communication connections.
  • the transmission efficiency is high because a plurality of communication connections are used to transfer files or a communication connection with a high-quality communication connection among a plurality of communication connections.
  • FIG. 1 is a schematic diagram of an application scenario based on a method for transmitting a file according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a method for transmitting a file according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of another method for transmitting a file according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of another method for transmitting a file according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of a multi-path transmission file according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a startup page of a transmission file according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a user interface of a terminal A and a terminal B after establishing negotiation according to an embodiment of the present invention
  • FIG. 9 is a schematic diagram of a task queue to be sent according to an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a multi-path concurrent transmission file according to an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of a multi-channel concurrent receiving file according to an embodiment of the present invention.
  • FIG. 12 is a schematic diagram of a file transmission progress according to an embodiment of the present invention.
  • FIG. 13 is a schematic diagram of another multi-path transmission file according to an embodiment of the present invention.
  • FIG. 14 is a schematic structural diagram of another terminal according to an embodiment of the present disclosure.
  • FIG. 15 is a schematic diagram of a communication device according to an embodiment of the present invention.
  • the present invention contemplates a way to efficiently transfer files over multiple paths.
  • the first terminal receives a request for transmitting a file to the second terminal (ie, the terminal that receives the file); the first terminal supports multiple communications supported by the first terminal and the second terminal And establishing, by the second terminal, a plurality of first communication connections; the first terminal transmitting a file to the second terminal by using at least one of the plurality of first communication connections.
  • the first terminal after receiving the request for transmitting the file to the second terminal, the first terminal does not directly use a communication connection that has been established or transmits a file to the second terminal according to a communication connection established by a communication mode selected by the user. Rather, a plurality of first communication connections are established with the second terminal according to multiple communication modes supported by the first terminal and the second terminal, so that the first terminal may be according to the number of files or files to be transmitted. Transmitting a file to the second terminal by using at least one of the plurality of first communication connections.
  • the transmission efficiency is high because a plurality of communication connections are used to transfer files or a communication connection with a high-quality communication connection among a plurality of communication connections.
  • the file transmission software may be installed on both terminals of the file to be transmitted, for example, in a file management software such as a file manager or a photo library, and the file is shared.
  • This file transfer software can be used during the action.
  • the existing mode that the machine exists for transmission is automatically scanned, and the user is prompted to select one, such as NFC.
  • the two terminals After the two terminals discover each other and establish a connection in this way, the two terminals automatically match other possible connection modes of the two terminals, such as Bluetooth, wlan, and wifi direct connection. Automatically exchange Bluetooth id through NFC, wlan monitors ip and port, wifi direct connection password and other connection parameters, and then tries to connect directly in the LAN, wifi direct connection, Bluetooth and other communication connections.
  • the terminal when a user transmits multiple files, the terminal divides the files into different transmission paths for transmission. When the user transmits a large file, the terminal divides the file into multiple small files and marks the serial number. Do multiplex and then merge the files after the transfer is complete. In the process of multiplex transmission, the stability and transmission efficiency of each transmission path are monitored in real time, and the migration transmission task is adjusted to a faster channel in real time.
  • an indirect connection method may also be adopted for the manner of negotiating the transmission path, for example, an instant messaging (IM) system such as Huawei member, QQ, or the like.
  • IM instant messaging
  • the server makes an indirect connection.
  • Both terminals establish a connection with the IM system.
  • the IM system can quickly notify the other party, so that the two terminals can discover each other, and the user can also select his own friend to directly communicate.
  • the two terminals complete the negotiation process of the above transmission path, and perform the following process of creating a connection and a file transmission.
  • the purpose of the embodiment of the present invention is to facilitate the transmission of files, including two terminals automatically discovering the path that can be used for transmitting files, and automatically completing the transmission path negotiation, and completing the connection parameter exchange, and creating a connection for transmission in multiple ways.
  • the convenience of transferring files between terminals is improved; on the other hand, the transmission path commonly shared between terminals is fully utilized for file transmission, thereby improving transmission efficiency.
  • FIG. 1 is a schematic diagram of an application scenario based on a method for transmitting a file according to an embodiment of the present invention.
  • the terminal 103 used by the user 101 transmits a file to the terminal 104 used by the user 102.
  • both the terminal 103 and the terminal 104 are in a network offline state, that is, there is no indirect communication connection between the terminal 103 and the terminal 104 through the server 105 to the terminal 104.
  • the terminal 103 and the terminal 104 establish a communication connection only by the short-range communication method, and transmit information or files through the established communication connection.
  • the terminal 103 and the terminal 104 first establish a communication connection through which the communication connection is established.
  • both the terminal 103 and the terminal 104 are in a network online state, that is, there is an indirect communication connection between the terminal 103 and the terminal 104 through the server 105 to the terminal 104.
  • the terminal 103 and the terminal 104 can establish a communication connection by a short-range communication method and a communication connection by a long-distance communication method, and transmit information or files through the established communication connection, for example, the terminal 103 and the terminal.
  • the identifiers of the multiple communication modes supported by the interaction are connected, and then, according to the multiple communication modes supported by the terminal 103 and the terminal 104, a plurality of communication connections are established, and multiple communication connections are established between the terminal 103 and the terminal 104. Collaborate to transfer files.
  • the distance between the terminal 103 and the terminal 104 is relatively close, which satisfies the condition of short-range communication.
  • both the terminal 103 and the terminal 104 are logged in to the server 105, and the server 105 can determine that the distance between the terminal 103 and the terminal 104 satisfies the condition of short-range communication, and transmits notification information to the terminal 103 and the terminal 104 to make the terminal 103 and terminal 104 discover each other.
  • the terminal 103 and the terminal 104 can automatically establish multiple communication connections and cooperatively transmit files through multiple communication connections, on the one hand, the user does not need manual operation, and the use is simple, and on the other hand, multiple communication connections can be used for cooperation. Transmission files or multiple communication connections transmit high quality communication connections to transfer files, so transmission efficiency is high.
  • FIG. 2 is a schematic diagram of a method for transmitting a file according to an embodiment of the present disclosure. The method may be based on the application scenario shown in FIG.
  • Step 201 The first terminal receives a request for transmitting a file to the second terminal.
  • the first terminal receives an instruction from the user to share the file, thereby determining that the file needs to be transferred to the second terminal.
  • the first terminal is a terminal that sends a file
  • the second terminal is a terminal that receives a file
  • Step 202 The first terminal establishes multiple first communication connections with the second terminal according to multiple communication modes supported by the first terminal and the second terminal.
  • the first terminal before the step 202, the first terminal establishes a second communication connection with the second terminal; the first terminal receives information from the second terminal by using the second communication connection, where The information is used to establish the plurality of first communication connections.
  • the first terminal establishes a second communication connection with the second terminal; the first terminal receives information from the second terminal by using the second communication connection, so that the first terminal is based on the slave terminal.
  • the information received by the second terminal establishes the plurality of first communication connections.
  • the plurality of first communication connections are usually communication connections established by using short-range communication
  • the second communication connection may be a communication connection established by using short-range communication, or A communication connection established for long-distance communication.
  • the second communication connection is a communication connection established by the short-range communication mode
  • the second communication connection may be included in the plurality of first communication connections, and when the second communication connection is a communication established by using a long-distance communication mode
  • the first communication connection and the second communication connection may be a communication connection established by a short-distance communication method or a communication connection established by a long-distance communication mode.
  • the information is an identifier of multiple communication modes supported by the first terminal and the second terminal, where the information is sent by the second terminal according to the first terminal. And determining, by the identifier of the multiple communication modes supported by the terminal, and the identifiers of the multiple communication modes supported by the second terminal, where the first terminal sends the first terminal to the second terminal by using the second communication connection.
  • the identification of multiple communication methods supported the first terminal sends the identifier of the multiple communication modes supported by the first terminal to the second terminal by using the second communication connection, and the second terminal sends the identifier according to the first terminal.
  • the identifiers of the multiple communication modes supported by the first terminal and the identifiers of the multiple communication modes supported by the second terminal determine identifiers of multiple communication modes supported by the first terminal and the second terminal.
  • the information is an identifier of multiple communication modes supported by the second terminal
  • the first terminal is configured according to multiple identifiers supported by the first terminal and multiple types supported by the second terminal.
  • the identifier of the communication mode determines a plurality of communication modes supported by the first terminal and the second terminal.
  • the first terminal receives, by the second terminal, an identifier of multiple communication modes supported by the second terminal from the second terminal, and is received by the first terminal according to the first terminal.
  • the identifiers of the multiple communication modes supported by the second terminal and the identifiers of the multiple communication modes supported by the first terminal determine identifiers of multiple communication modes supported by the first terminal and the second terminal.
  • the first terminal and the second terminal may establish multiple pieces according to the multiple communication modes supported by the first terminal and the second terminal.
  • a communication connection
  • the first terminal displays an identifier of each communication mode supported by the first terminal, and the first terminal determines that the user supports multiple communication modes supported by the first terminal. a communication mode selected by the first terminal to discover the second terminal according to a communication mode selected by the user, and establish the second communication connection with the second terminal.
  • the second communication connection can be manually established by the user selecting a familiar communication method, the second communication connection being a direct communication connection.
  • the first terminal and the second terminal establish the second communication connection through a server.
  • the second communication connection is an indirect communication connection.
  • the server can cause the first terminal to quickly discover and select the second terminal.
  • the first terminal receives a first identifier set from the server, where the first identifier set includes an identifier of a terminal near the first terminal and/or an identifier of an associated terminal of the first terminal; A terminal displays the first identifier set; the first terminal determines to transmit a file to the second terminal according to an identifier of the second terminal selected by the user from the first identifier set.
  • the associated terminal of the first terminal may be a terminal that has had information interaction with the first terminal through the server, or may also be a terminal that has established an association relationship with the first terminal.
  • the association relationship between the two terminals may be an association relationship between users of the two terminals.
  • the second communication connection is an indirect communication connection established by the server
  • the identifier of the terminal in the vicinity of the first terminal and/or the identifier of the associated terminal of the first terminal may be determined by the server, so that the first terminal is fast. Discover and select the second terminal.
  • the first terminal exchanges connection parameters of each communication mode among the multiple communication modes supported by the first terminal and the second terminal by using the second communication connection with the second terminal.
  • the first terminal establishes a plurality of first communication connections with the second terminal according to connection parameters of each communication mode in the multiple communication modes supported by the first terminal and the second terminal.
  • the first terminal and the second terminal automatically exchange connection parameters of each communication mode, which is simple to use without manual setting by the user.
  • the priority of each communication mode can be preset, and multiple communication connections are sequentially established according to the priority level.
  • Step 203 The first terminal transmits a file to the second terminal by using at least one of the plurality of first communication connections.
  • the first terminal treats each of the files as a task; the first terminal transmits the task to the second terminal through at least one of the plurality of first communication connections .
  • the first terminal uses each of the files as a task; and transmits the task to the second terminal by using at least one of the plurality of first communication connections, thereby implementing transmission resources. Optimization.
  • the first terminal determines, for each file to be transmitted, whether the file size is less than a first threshold; when the result of the determination is that the file size is less than or equal to the first threshold, the file is regarded as a task; When the result of the determination is that the file size is greater than the first threshold, the file is divided into multiple tasks according to the first threshold; the first terminal is connected to at least one of the plurality of first communication connections.
  • the second terminal transmits the task.
  • the first terminal divides the large file into multiple tasks for each file to be transmitted, so that multiple communication connections can cooperatively transfer large files, so that the optimization of the transmission resources can be further implemented.
  • the first terminal may select, but is not limited to, select at least one communication connection from the plurality of first communication connections based on the following two manners.
  • the first terminal selects at least one of the plurality of first communication connections according to the number of the tasks and a preset priority of a communication mode corresponding to each communication connection of the plurality of first communication connections.
  • a communication connection transmits the task to the second terminal.
  • the preset priority of each communication mode can be determined according to a preset rule, such as the level of transmission efficiency, whether a deduction is generated, etc., so that the selected communication connection can better meet the needs of the user.
  • the first terminal selects at least one communication connection from the plurality of first communication connections according to the number of the tasks and the transmission quality of each of the plurality of first communication connections.
  • the second terminal transmits the task. It can be understood that the first terminal can periodically monitor the transmission quality of each communication connection, and the foregoing transmission quality can include transmission stability and transmission efficiency, and can be measured by a packet loss rate or the like.
  • the communication connection transmission task with good transmission quality can be automatically selected, and the user experience is good without user operation.
  • the first terminal selects from the multiple first communication connections according to the number of the tasks and a preset priority of a communication mode corresponding to each communication connection of the plurality of first communication connections.
  • the first terminal monitors stability and transmission efficiency of each of the plurality of first communication connections in a preset time period; according to the multiple times in the preset time period Updating the real-time priority of the communication mode corresponding to each communication connection in the plurality of first communication connections; and determining the real-time priority lower than the preset level by the stability and transmission efficiency of each communication connection in a communication connection
  • the task on the communication connection is migrated to the communication connection with the real-time priority higher than the preset level for transmission.
  • the process of establishing a communication connection by the first terminal may include two stages.
  • a communication connection ie, a second communication connection
  • the identification of multiple communication modes supported by the two terminals is exchanged through the communication connection to determine multiple communication modes supported by the two terminals;
  • multiple communication connections ie, multiple first communication connections
  • the first terminal may cooperate to transmit the file to the second terminal through the multiple first communication connections established in the second phase, or may establish a second communication connection and the second phase established in the first phase.
  • the plurality of first communication connections cooperate to transfer files to the second terminal.
  • the method further includes: the first terminal sending, to the second terminal, file information of a file to be transmitted, where the file information includes a number of files, a file number of each file, At least one of the file size of each file and the file summary for each file.
  • the method further includes: the first terminal monitoring a transmission progress of each file in the file to be transmitted at the end of the preset time period; the first terminal displays a transmission progress of each file.
  • the processing procedure of the first terminal (that is, the terminal that sends the file) is mainly described. Since the processing process of the second terminal (that is, the terminal that receives the file) corresponds to the processing process of the first terminal, Make a statement.
  • the first terminal after receiving the request for transmitting the file to the second terminal, the first terminal does not directly use a communication connection that has been established or transmits a file to the second terminal according to a communication connection established by a communication mode selected by the user. Rather, a plurality of first communication connections are established with the second terminal according to multiple communication modes supported by the first terminal and the second terminal, so that the first terminal may be according to the number of files or files to be transmitted. Transmitting a file to the second terminal by using at least one of the plurality of first communication connections.
  • the transmission efficiency is high because a plurality of communication connections are used to transfer files or a communication connection with a high-quality communication connection among a plurality of communication connections.
  • FIG. 3 is a schematic diagram of another method for transmitting a file according to an embodiment of the present invention.
  • the first scenario for example, the terminal 103
  • the second terminal for example, the terminal 104
  • the method includes:
  • Step 301 The first terminal performs transmission file preparation, and scans all available transmission paths in the local area; the second terminal performs transmission file preparation, and scans all available local transmission paths.
  • step 301 can be triggered by a user.
  • the condition of the triggering step 301 may be that the first terminal receives the request to transfer the file to the second terminal, and the second terminal receives the request to transfer the file from the first terminal.
  • Step 302 The first terminal receives an instruction of the user, where the instruction is used to select one of the multiple transmission paths, and the second terminal receives an instruction of the user, where the instruction is used to select one of the multiple transmission paths.
  • the first terminal establishes a communication connection with the second terminal by using the selected transmission path.
  • Step 303 The second terminal sends a transmission path supported by the local device to the first terminal by using the established communication connection.
  • Step 304 The first terminal sends a transmission path supported by the first terminal and the second terminal to the second terminal.
  • Step 305 The second terminal requests the first terminal to initiate the connection of mode 1.
  • Step 306 the first terminal starts the connection of mode 1.
  • Step 307 The second terminal sends the indication information that the mode 1 connection is successful to the first terminal.
  • Step 308 The second terminal requests the connection of the mode 2 to the first terminal.
  • Step 309 The first terminal sends the indication information of the mode 2 connection timeout to the second terminal.
  • the mode 1 and the mode 2 belong to a transmission path supported by the first terminal and the second terminal, and the transmission path supported by the first terminal and the second terminal includes multiple communication modes, except that the mode 1 and the mode 2 are included. It may also include mode 3, mode 4, etc., and the process of establishing a communication connection in each manner is similar, and will not be described herein.
  • Step 310 multiple ways of file transfer.
  • the process of negotiating in step 302, and 303, 304, 305, 307, and 308 is not necessarily a method of directly connecting through a network, but also a server through a third-party server, such as an Instant Messaging (IM) system.
  • IM Instant Messaging
  • FIG. 4 is a schematic diagram of another method for transmitting a file according to an embodiment of the present invention.
  • the first scenario for example, the terminal 103 and the second terminal (for example, the terminal 104) may be based on the application scenario shown in FIG.
  • the server for example, the server 105 of the IM system to the terminal 104.
  • the method includes:
  • Step 401 The first terminal performs transmission file preparation, and scans all available transmission paths in the local area; the second terminal performs transmission file preparation, and scans all available local transmission paths.
  • step 401 can be triggered by the user.
  • the condition of the triggering step 401 may be that the first terminal receives the request to transfer the file to the second terminal, and the second terminal receives the request to transfer the file from the first terminal.
  • Step 402 The first terminal and the second terminal both log in to the IM system, and report their own network information and geographic location information.
  • the network information includes current surrounding wifi information, base station information, and the like.
  • Step 403 The IM system compares the wifi information, the base station information, and the geographical location information of the two terminals to determine whether the wifi information around the two terminals is the same, whether the same base station is connected, whether the geographic latitude and longitude are similar, and whether the two terminal users are known. Nearby.
  • Step 404 The IM system notifies the first terminal, and the second terminal can transmit the file in the vicinity of the first terminal.
  • steps 402 through 404 are alternative ways of discovering the terminal.
  • the second terminal is an associated terminal of the first terminal, for example, the second terminal may be in the buddy list of the first terminal, and the processes of steps 402 to 404 may be omitted.
  • Step 405 The first terminal actively sends a message to the IM system, where the message includes a transmission path supported by the first terminal, and the IM system is required to send the message to the second terminal.
  • Step 406 The IM system notifies the second terminal of the transmission path supported by the first terminal.
  • Step 407 The second terminal sends, by using the IM system, the transmission path supported by the first terminal and the second terminal to the first terminal.
  • Step 408 The first terminal requests the connection of the mode 1 to the second terminal.
  • step 409 the second terminal starts the connection of the mode 1.
  • Step 410 The first terminal sends the indication information that the mode 1 connection is successful to the second terminal.
  • Step 411 The first terminal requests the connection of the mode 2 to the second terminal.
  • Step 412 The second terminal sends the indication information of the mode 2 connection timeout to the first terminal.
  • the mode 1 and the mode 2 belong to a transmission path supported by the first terminal and the second terminal, and the transmission path supported by the first terminal and the second terminal includes multiple communication modes, except that the mode 1 and the mode 2 are included. It may also include mode 3, mode 4, etc., and the process of establishing a communication connection in each manner is similar, and will not be described herein.
  • step 413 a plurality of ways are performed for file transfer.
  • FIG. 5 is a schematic structural diagram of a terminal according to an embodiment of the present application.
  • the mobile terminal is used as a mobile phone as an example
  • FIG. 5 is a block diagram showing a partial structure of the mobile phone 100 related to the embodiment of the present invention.
  • FIG. 5 is a block diagram showing a part of the structure of the mobile phone 100 related to the embodiment of the present invention.
  • the mobile phone 100 includes a radio frequency (RF) circuit 110, a power source 120, a processor 130, a memory 140, an input unit 150, a display unit 160, a USB driver 170, a GPS module 180, and other wireless communication modules 190. And other components.
  • RF radio frequency
  • the RF circuit 110 provides communication capabilities such as GPRS, mobile communication (e.g., 4G), and is one of the transmission paths in the present invention. In one example, it can be used to communicate with the IM system, for example, to acquire base station information and report it to the IM. system. The base station information is used by the IM system to locate the locations of the two terminals.
  • the memory 140 can be used to store software programs and modules, and the processor 130 executes various functional applications and data processing of the mobile phone 100 by running software programs and modules stored in the memory 140.
  • the application of the file to be shared in the present invention, the transmission file management module, and the transferred file are all stored in the memory 140.
  • the running of the application, the processing logic of the application are all executed on the processor 130.
  • the USB Driver 170 can provide communication capabilities of other terminal devices and the mobile phone 100, such as copying files from a PC (personal computer) to the mobile phone 100, or transferring files with another mobile phone through an OTG data line. It can be understood that it does not belong to the essential composition of the mobile phone 100, but such a transmission path is also one of the aspects of the present invention.
  • the GPS module 180 can provide a positioning capability to display the latitude and longitude of the terminal, and in one example can be uploaded to the IM system as a determination as to whether the two terminals are in close proximity.
  • Other wireless transmission modules 190 include short-distance transmission modules such as Bluetooth, NFC, and Wifi modules.
  • the mobile phone 100 transmits and receives emails, browses web pages, and accesses streaming media through other wireless transmission modules 190. It provides wireless broadband Internet access to users, while providing the ability to communicate with other terminal devices, including file transfer capabilities. It can be understood that it does not belong to the necessary configuration of the mobile phone 100.
  • the mobile phone may have one or more of them, and is not limited to these types, and all belong to the transmission path of the present invention.
  • the input unit 150 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 100.
  • the present invention requires the user to select a file to be sent, and to create a connection and receive a file, all of which are triggered by the user through the input unit 150.
  • the display unit 160 can be used to display what needs to be displayed during the entire transmission process in the current invention, including a list of files, a progress of transmission, a way to connect, and other interfaces.
  • the mobile phone 100 also includes a power source 120 (such as a battery) that supplies power to various components.
  • the power source can be logically coupled to the processor 130 through a power management system to manage functions such as charging, discharging, and power consumption through the power management system.
  • the mobile phone 100 may further include a camera, an infrared module, and the like, and details are not described herein again.
  • FIG. 6 is a schematic diagram of a multi-path transmission file according to an embodiment of the present invention.
  • the following modules are mainly involved in the embodiments of the present invention.
  • Application refers to applications on the terminal that need to share files, such as a gallery, file manager, browser, and so on.
  • the file transmission management module is an implementation module of the method for transmitting a file provided by the embodiment of the present invention, which is used for calling a terminal such as wifi, Bluetooth, NFC, USB, etc. to perform connection, negotiating a transmission path, and transmitting a file management operation.
  • Storage module refers to the module that stores files on the mobile phone, such as built-in SD card, external SD card, and so on.
  • the file transfer management module in the embodiment of the present invention is used to share files between terminals. First, when an application on the terminal A needs to share files to other terminals in the application, the following steps are performed:
  • the application on terminal A passes the file transfer management module's interface to the list of files to be shared (the location in the storage module).
  • the file transfer management module of terminal A When the file transfer management module of terminal A receives the request to send a file, it detects all the modules of the machine that can be used to transfer files. Let users choose a familiar way to connect, such as NFC.
  • the terminal B user can click the receive file button, and also automatically scan all the modules of the machine that can be used to transfer files. Prompt the user to choose one, such as NFC.
  • both terminals A and B select NFC and establish a connection, the negotiation of other transmission paths in the background is started, and a connection is created.
  • the terminal B After connecting to the NFC, the terminal B first responds to the terminal A: the transmission paths supported by the local device are: Bluetooth, wifi direct connection, wlan, OTG data line.
  • Terminal A returns a message, and the transmission path supported by this machine is Bluetooth, wifi direct connection, and wlan.
  • Terminal B turns on Bluetooth.
  • Terminal B sends a message to terminal A, which includes the ID number of the Bluetooth.
  • Terminal A sends the Bluetooth MAC address of the local machine to terminal B.
  • Terminal A activates Bluetooth and actively searches for signals based on the Bluetooth ID of Terminal B and attempts to connect.
  • the Bluetooth of terminal B After receiving the connection of terminal A, the Bluetooth of terminal B automatically determines whether it belongs to the mac address of terminal A, and if so, automatically accepts the connection.
  • Terminal A After the Bluetooth connection is successful. Terminal A sends a message indicating that the connection is successful to terminal B. The Bluetooth connection ends.
  • terminal A will send a message that the Bluetooth connection failed to terminal B.
  • the Bluetooth connection ends.
  • FIG. 8 is a schematic diagram of a user interface of the terminal A and the terminal B after the negotiation is established.
  • terminal B sends a message to terminal A that can start sending files.
  • Terminal A sends a list of files to be sent to B through NFC.
  • the message content includes the number of files, the number of each file, the file size, and the md5 of the file.
  • Terminal A divides the file to be sent according to the file size and puts it into the local queue.
  • FIG. 10 is a schematic diagram of a terminal A concurrently transmitting files in multiple ways.
  • the file transfer management module continuously obtains the sending task from the task queue to be sent, and the corresponding data stream from the storage module or the file fragment, and assigns the task to the connected module.
  • the file transfer management module waits for the transfer queue to pull a task and assign it to the module.
  • FIG. 11 is a schematic diagram of the terminal B concurrently receiving files in multiple ways.
  • the file transfer management module verifies the md5 and size of the slice every time a slice is received. When all the fragments of a file are transferred, the size of the entire file and md5 are verified. Make sure the entire file is sent correctly.
  • Both the terminal A and the terminal B can display the transmission progress of the multiple files on the interface according to the size that each file has been sent.
  • FIG. 12 is a schematic diagram of the file transmission progress provided by the embodiment of the present invention.
  • the user connects the two terminals by using a connection method that is well known by the user, and the terminal discovers and creates other connection modes by itself, and fully exerts all the device capabilities of the terminal that can transmit files.
  • the program will automatically negotiate to create connections for other transmission paths.
  • This embodiment uses a queue to divide into a plurality of small transmission tasks according to the number and size of files, and uses the queue to perform multiplex transmission on multiple transmission paths, fully utilizing the capabilities of the terminal, and improving transmission efficiency.
  • FIG. 13 is a schematic diagram of another multi-path transmission file according to an embodiment of the present invention.
  • the terminal sends a file to a friend or a nearby person through the IM system.
  • Terminal A and terminal B perform the interaction of the transmission path through the intermediate server. If both terminal A and terminal B are logged in to a unified account, in the file manager, when the terminal A user clicks on the file sharing, the terminal A user pops up. A list of friends, as well as nearby users. After the user selects, the terminal B user will receive a notification to receive the file. If shown at 13, the remaining process is similar to the embodiment shown in FIG. It was changed to a third-party intermediate server only by negotiating the transmission path and passing the file list.
  • the two terminals do not need to perform a specific transmission connection.
  • the negotiation of the transmission path can be completed.
  • both mobile phones are logged into the Huawei account, and all of them are logged into QQ, WeChat, etc. IM system. It is more convenient to make the connection between the two terminals easier, and there is no need to configure the specific connection.
  • the method of initial connection may be a method that cannot be used for file transmission, and both terminals may be connected to an intermediate server, and the transmission path is negotiated indirectly through the server.
  • the transmission path priority configuration can be performed, for example, the GPRS transmission has the lowest priority to avoid the generation of traffic charges.
  • the concept of a transport path can be used for a wider range of file transfers, such as file transfer via multiple servers such as Baidu.
  • each network element such as a terminal, etc.
  • each network element in order to implement the above functions, includes hardware structures and/or software modules corresponding to each function.
  • the present invention can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
  • the embodiment of the present invention may divide a function module into a terminal or the like according to the foregoing method example.
  • each function module may be divided according to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present invention is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • FIG. 14 shows a possible structural diagram of the terminal involved in the above embodiment.
  • the terminal 1400 includes a processing module 1402, a communication module 1403, and an input module 1404.
  • the processing module 1402 is configured to control and manage the actions of the terminal.
  • the processing module 1402 is configured to support the terminal to perform the processes in FIGS. 2 through 4, and/or other processes for the techniques described herein.
  • the communication module 1403 is configured to support communication between the terminal and other network entities, such as with an IM system or other terminals.
  • the input module 1404 is configured to support the terminal to receive an instruction of the user to share the file.
  • the terminal may further include a storage module 1401 for storing program codes and data of the terminal.
  • the terminal 1400 functions as a first terminal, that is, a terminal that transmits a file.
  • the input module 1404 is configured to receive a request for transmitting a file to the second terminal;
  • the processing module 1402 is configured to control the communication module 1403 to establish a plurality of first communication connections with the second terminal according to multiple communication modes supported by the first terminal and the second terminal;
  • the communication module 1403 is configured to establish a plurality of first communication connections with the second terminal, and transmit files to the second terminal by using at least one of the plurality of first communication connections.
  • the processing module 1402 controls the communication module 1403 to establish a plurality of first communication connections with the second terminal according to multiple communication modes supported by the first terminal and the second terminal. And is further configured to control the communication module 1403 to establish a second communication connection with the second terminal;
  • the communication module 1403 is further configured to receive information from the second terminal by using the second communication connection, where the information is used to establish the multiple first communication connections.
  • the information is an identifier of multiple communication modes supported by the first terminal and the second terminal, where the information is sent by the second terminal according to the communication module.
  • the identifier of the multiple communication modes supported by the first terminal and the identifier of the multiple communication modes supported by the second terminal are determined, wherein the communication module sends the first terminal to the second terminal by using the second communication connection The identification of multiple communication methods supported by the terminal.
  • the information is an identifier of multiple communication modes supported by the second terminal
  • the processing module is configured according to multiple identifiers supported by the first terminal and multiple supported by the second terminal.
  • the identifier of the communication mode determines the identifiers of the multiple communication modes supported by the first terminal and the second terminal.
  • the first terminal further includes a display module 1405.
  • the processing module 1402 is configured to establish a second communication connection with the second terminal, including:
  • the communication module 1403 is configured to discover the second terminal according to a communication mode selected by the user, and establish the second communication connection with the second terminal.
  • the processing module 1402 is configured to control the communication module 1403 to establish a second communication connection with the second terminal, including: controlling the communication module 1403 and the second terminal to establish the Two communication connections.
  • the first terminal further includes a display module 1405.
  • the processing module 1402 is further configured to control the communication module 1403 to receive a first identifier set from the server, where the first identifier set includes the An identifier of the terminal in the vicinity of the first terminal and/or an identifier of the associated terminal of the first terminal; controlling the display module 1405 to display the first identifier set; and the user received according to the input module 1404 from the first identifier
  • the identification of the second terminal selected in the set determines to transmit a file to the second terminal.
  • the processing module 1402 is configured to control, by using the multiple communications modes supported by the first terminal and the second terminal, the communication module 1403 to establish multiple first communication connections with the second terminal. ,include:
  • the communication module 1403 is configured to establish a plurality of first communication connections with the second terminal according to connection parameters of each communication mode supported by the first terminal and the second terminal.
  • the communication module 1403 is configured to transmit a file to the second terminal by using at least one of the plurality of first communication connections, including:
  • the communication module 1403 is configured to transmit a file to the second terminal by using at least one of the plurality of first communication connections, including:
  • the file is regarded as a task
  • the file is divided into multiple tasks according to the first threshold
  • the communication module 1403 is configured to transmit the task to the second terminal by using at least one of the plurality of first communication connections, including:
  • the communication module 1403 is configured to transmit the task to the second terminal by using at least one of the plurality of first communication connections, including:
  • the terminal 1400 functions as the second terminal, that is, the terminal that receives the file, and the composition of the terminal is similar to that of the first terminal, and details are not described herein.
  • the communication module 1403 does not directly use one established communication connection or one communication connection established according to a communication mode selected by the user to the second terminal. Transmitting a file, but the processing module 1402 establishes a plurality of first communication connections with the second terminal according to multiple communication modes supported by the first terminal and the second terminal, so that the communication module 1403 can be transmitted according to the The number of files or the file size is transmitted to the second terminal through at least one of the plurality of first communication connections. Since the process of establishing a plurality of communication connections is automatically implemented by the terminal, no manual operation by the user is required. It is easy to use, and can transfer files in a cooperative transmission file or a communication connection with a high-quality communication connection among a plurality of communication connections, and thus the transmission efficiency is high.
  • the processing module 1402 can be a processor or controller, such as the processor 130 in FIG.
  • the communication module 1403 may be a communication interface, a transceiver, a transceiver circuit, etc., wherein the communication interface is a collective name and may include one or more interfaces, such as the RF circuit 110 of FIG.
  • the storage module 1403 can be a memory, such as the memory 140 of FIG.
  • Input module 1404 can include a touch panel or other input device, such as input unit 150 in FIG.
  • Display module 1405 may be referred to as a display unit, such as display unit 160 in FIG.
  • the memory 140 is configured to store program instructions
  • the processor 130 is configured to perform a method for transmitting a file provided by an embodiment of the present invention according to a program instruction stored in the memory 140.
  • FIG. 15 is a schematic diagram of a communication device according to an embodiment of the present disclosure.
  • the communication device 1500 may be a chip, and the chip includes a processing unit and a communication unit.
  • the processing unit may be a processor 1510, which may be various types of processors as described above.
  • the communication unit may for example be an input/output interface 1520, a pin or a circuit, etc., which may comprise or be connected to a system bus.
  • the communication device further includes a storage unit, and the storage unit may be a memory 1530 inside the chip, such as a register, a cache, a random access memory (RAM), an EEPROM, or a FLASH.
  • the memory unit may also be a memory external to the chip, which may be various types of memory as described above.
  • the processor is coupled to a memory, and the processor can execute instructions stored in the memory to cause the communication device to perform the methods illustrated in Figures 2 through 4 above.
  • the present invention may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present invention are generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable medium to another computer readable medium, for example, the computer instructions can be wired from a website site, computer, server or data center (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg infrared, wireless, microwave, etc.) to another website site, computer, server or data center.
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state hard disk) or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明实施例涉及一种传输文件的方法及终端。该方法包括:第一终端接收向第二终端传输文件的请求;所述第一终端根据所述第一终端和所述第二终端共同支持的多种通信方式与所述第二终端建立多条第一通信连接;所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件。本发明实施例,使用简单,传输效率高。

Description

一种传输文件的方法及终端
本申请要求于2018年5月17日提交中国国家知识产权局、申请号为201810476102.9、发明名称为“一种传输文件的方法及终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信领域,尤其涉及一种传输文件的方法及终端。
背景技术
现在的终端一般都会具备多种数据通信能力,即采用多种数据通信技术进行数据传输的能力。上述多种数据通信技术可以包括如下数据通信技术,比如,蓝牙(Bluetooth)通信技术、近场通信(Near Field Communication,NFC)通信技术、OTG(On The Go)通信技术、wifi直连(Wi-Fi Direct)通信技术、无线局域网(Wireless Local Area Networks,wlan)通信技术、通用分组无线服务(General Packet Radio Service,GPRS)通信技术、移动通信技术(mobile communication)等通信技术。
采用每一种数据通信技术建立通信连接都有自身的学习成本,配对连接的方式也不近相同。比如采用蓝牙通信技术建立通信连接时,需要一方打开监听,另外一方搜寻识别。有的手机为了安全、耗电方面的考虑,打开监听以后会在几十秒以后自动关闭监听。当需要建立蓝牙通信连接时,需要用户手动打开监听,这些会给用户造成使用上的困扰。此外还有时候手机所处的网络环境复杂,比如距离稍远,信号不好,配置繁琐,可能导致用户很难把一个稍大的文件,或者大量的文件有效的分享成功。
一种现有技术中,采用蓝牙、wifi直连、NFC、wifi等近距离无线通信技术通过单一途径传输文件。当一个终端用户试图分享一个文件给另外一个终端的时候,双方约定好使用的传输方式,比如近距离的蓝牙、wifi直连、NFC、wifi等,并且打开相应的开关和端口。当一个终端发现另外一个终端并创建连接以后就可以进行文件的传输。
另一种现有技术中,采用GPRS,WLAN等远距离无线通信技术通过单一途径传输文件。需要传输文件的两个终端共同连接相同的服务器、或者路由器创建间接连接,然后进行文件传输。
又一种现有技术中,采用蓝牙、wifi直连简单组合传输文件技术,比如要求同时开启wifi和蓝牙,通过蓝牙快速找到对方,然后通过wifi直连传输文件。需要同时打开wifi和蓝牙,有一种不打开不能完成传输,仅限于wifi和蓝牙两种连接方式,使用范围很局限。该方法实质上也属于通过单一途径传输文件。
上面三种现有技术中,都是通过单一途径传输文件,由于传输距离、传输环境制约,用户主观选择的传输途径可能并不是最优的。当用户选择一种传输途径进行文件传输的时候,可能会因为距离变远、信号不好、网络不好等因素发生传输中断,需要用户手动进行重试或者选择其它传输途径。并且,即便是两个终端之间存在多种传输途径,也只能选择一种传输途径进行连接。使用繁琐、传输效率低。
发明内容
本发明实施例提供了一种传输文件的方法及终端,使用简单、传输效率高。
第一方面,提供了一种传输文件的方法。第一终端接收向第二终端传输文件的请求;所述第一终端根据所述第一终端和所述第二终端共同支持的多种通信方式与所述第二终端建立多条第一通信连接;所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件。
本发明实施例,第一终端接收到向第二终端传输文件的请求后,不是直接使用已经建立的一条通信连接或根据用户选择的一种通信方式建立的一条通信连接向第二终端传输文件,而是根据所述第一终端和所述第二终端共同支持的多种通信方式与所述第二终端建立多条第一通信连接,从而所述第一终端可以根据待传输的文件数量或文件大小通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件,由于建立多条通信连接的过程是终端自动实现的,无需用户手动操作,因此使用简单,并且可以使用多条通信连接协作传输文件或多条通信连接中传输质量较高的通信连接传输文件,因此传输效率高。
在一种可能的实施方式中,所述第一终端根据所述第一终端和所述第二终端共同支持的多种通信方式与所述第二终端建立多条第一通信连接之前,所述第一终端与所述第二终端先建立第二通信连接;所述第一终端通过所述第二通信连接从所述第二终端接收信息,所述信息用于建立所述多条第一通信连接。根据该实施方式,所述第一终端与所述第二终端先建立第二通信连接;所述第一终端通过所述第二通信连接从所述第二终端接收信息,从而第一终端根据从第二终端接收到的信息建立所述多条第一通信连接。
在一种可能的实施方式中,所述信息为所述第一终端和所述第二终端共同支持的多种通信方式的标识,其中,所述信息由所述第二终端根据所述第一终端发送的所述第一终端支持的多种通信方式的标识以及所述第二终端支持的多种通信方式的标识确定,其中所述第一终端通过所述第二通信连接向所述第二终端发送所述第一终端支持的多种通信方式的标识。根据该实施方式,第一终端通过所述第二通信连接向所述第二终端发送所述第一终端支持的多种通信方式的标识,由所述第二终端根据所述第一终端发送的所述第一终端支持的多种通信方式的标识以及所述第二终端支持的多种通信方式的标识确定所述第一终端和所述第二终端共同支持的多种通信方式的标识。
在一种可能的实施方式中,所述信息为所述第二终端支持的多种通信方式的标识,所述第一终端根据所述第一终端支持的多种通信方式的标识以及所述第二终端支持的多种通信方式的标识确定所述第一终端和所述第二终端共同支持的多种通信方式的标识。根据该实施方式,第一终端通过所述第二通信连接从所述第二终端接收所述第二终端支持的多种通信方式的标识,由所述第一终端根据所述第一终端接收的所述第二终端支持的多种通信方式的标识以及所述第一终端支持的多种通信方式的标识确定所述第一终端和所述第二终端共同支持的多种通信方式的标识。
在一种可能的实施方式中,所述第一终端显示所述第一终端支持的多种通信方式中每种通信方式的标识;所述第一终端确定用户从所述第一终端支持的多种通信方式中选择的一种通信方式;所述第一终端根据所述用户选择的一种通信方式发现所述第二终端,并与 所述第二终端建立所述第二通信连接。根据该实施方式,可以由用户选择一种熟悉的通信方式手动建立第二通信连接,该第二通信连接为直接的通信连接。
在一种可能的实施方式中,所述第一终端和所述第二终端通过服务器建立所述第二通信连接。根据该实施方式,该第二通信连接为间接的通信连接。
在一种可能的实施方式中,所述第一终端从所述服务器接收第一标识集合,所述第一标识集合包括所述第一终端附近终端的标识和/或所述第一终端的关联终端的标识;所述第一终端显示所述第一标识集合;所述第一终端根据用户从所述第一标识集合中选择的所述第二终端的标识确定向所述第二终端传输文件。可以理解的是,上述第一终端的关联终端可以为与第一终端通过服务器有过信息交互的终端,或者还可以为与第一终端建立过关联关系的终端。上述两个终端之间的关联关系可以为两个终端的用户之间的关联关系,例如,两个终端的用户属于同一群组,或两个终端的用户互为好友。根据该实施方式,当第二通信连接为经过服务器建立的间接通信连接时,可以由服务器确定第一终端附近终端的标识和/或所述第一终端的关联终端的标识,便于第一终端快速发现并选择第二终端。
在一种可能的实施方式中,所述第一终端通过所述第二通信连接与所述第二终端交换所述第一终端和所述第二终端共同支持的多种通信方式中每种通信方式的连接参数;所述第一终端根据所述第一终端和所述第二终端共同支持的多种通信方式中每种通信方式的连接参数与所述第二终端建立多条第一通信连接。根据该实施方式,第一终端和第二终端自动交换每种通信方式的连接参数,无需用户手动设置,使用简单。
在一种可能的实施方式中,所述第一终端将每个所述文件作为一个任务;所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务。根据该实施方式,所述第一终端将每个所述文件作为一个任务;通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务,从而实现传输资源的优化。
在一种可能的实施方式中,所述第一终端针对待传输的每个文件,判断文件大小是否小于第一阈值;当判断结果为文件大小小于或等于所述第一阈值时,将文件作为一个任务;当判断结果为文件大小大于所述第一阈值时,根据所述第一阈值将文件划分为多个任务;所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务。根据该实施方式,第一终端针对待传输的每个文件,将大文件划分为多个任务,便于多条通信连接协作传输大文件,从而可以进一步实现传输资源的优化。
在一种可能的实施方式中,所述第一终端根据所述任务的数量和所述多条第一通信连接中每条通信连接对应的通信方式的预设优先级,从所述多条第一通信连接中选择至少一条通信连接向所述第二终端传输所述任务。根据该实施方式,可以根据预设规则,例如传输效率的高低、是否会产生扣费等确定每种通信方式的预设优先级,从而使选择的通信连接更能符合用户的需求。
在一种可能的实施方式中,所述第一终端根据所述任务的数量和所述多条第一通信连接中每条通信连接的传输质量,从所述多条第一通信连接中选择至少一条通信连接向所述第二终端传输所述任务。可以理解的是,第一终端可以周期性监测每条通信连接的传输质量,上述传输质量可以包括传输稳定性和传输效率,可以通过丢包率等来衡量。根据该实施方式,能够自动选择传输质量佳的通信连接传输任务,无需用户操作,用户体验佳。
第二方面,本发明实施例提供了一种终端,该终端可以实现上述第一方面方法设计中所执行的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。
在一个可能的设计中,该终端的结构中包括处理器,该处理器被配置为支持该终端执行上述第一方面方法中相应的功能。该终端还可以包括存储器,该存储器用于与处理器耦合,其保存该终端必要的程序指令和数据。该终端还可以包括通信接口,该通信接口用于发送或接收信息、传输文件等。
第三方面,本发明实施例提供了一种通信装置,该通信装置可以例如是芯片,该通信装置可以设置于终端中,该通信装置包括处理器和接口。该处理器被配置为支持该通信装置执行上述第一方面方法中相应的功能。该接口用于支持该通信装置与其他通信装置或其他网元之间的通信。该通信装置还可以包括存储器,该存储器用于与处理器耦合,其保存该通信装置必要的程序指令和数据。
第四方面,本发明实施例提供了一种计算机存储介质,所述计算机存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面的任意一种可能的设计中所述的方法。
第五方面,本发明实施例提供了一种计算机程序产品,其包含指令,当所述程序被计算机所执行时,该指令使得计算机执行上述第一方面或第一方面的任意一种可能的设计中所述的方法。
第六方面,本发明实施例提供了一种计算机程序,其包含指令,当所述程序被计算机所执行时,该指令使得计算机执行上述第一方面或第一方面的任意一种可能的设计中所述的方法。
本发明实施例,第一终端接收到向第二终端传输文件的请求后,不是直接使用已经建立的一条通信连接或根据用户选择的一种通信方式建立的一条通信连接向第二终端传输文件,而是根据所述第一终端和所述第二终端共同支持的多种通信方式与所述第二终端建立多条第一通信连接,从而所述第一终端可以根据待传输的文件数量或文件大小通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件,由于建立多条通信连接的过程是终端自动实现的,无需用户手动操作,因此使用简单,并且可以使用多条通信连接协作传输文件或多条通信连接中传输质量较高的通信连接传输文件,因此传输效率高。
附图说明
图1为本发明实施例提供的传输文件的方法基于的一种应用场景示意图;
图2为本发明实施例提供的一种传输文件的方法通信示意图;
图3为本发明实施例提供的另一种传输文件的方法通信示意图;
图4为本发明实施例提供的另一种传输文件的方法通信示意图;
图5为本发明实施例提供的一种终端结构示意图;
图6为本发明实施例提供的一种多途径传输文件示意图;
图7为本发明实施例提供的一种传输文件启动页面示意图;
图8为本发明实施例提供的一种建立协商后的终端A和终端B的用户界面示意图;
图9为本发明实施例提供的一种待发送任务队列示意图;
图10为本发明实施例提供的一种多途径并发发送文件示意图;
图11为本发明实施例提供的一种多途径并发接收文件示意图;
图12为本发明实施例提供的一种文件传输进度示意图;
图13为本发明实施例提供的另一种多途径传输文件示意图;
图14为本发明实施例提供的另一种终端结构示意图;
图15为本发明实施例提供的一种通信装置示意图。
具体实施方式
现在的平板、笔记本、手机等终端都会有蓝牙、wifi、GPRS、NFC等多种数据传输能力。本发明设计了一种通过多路径高效传输文件的方式。
第一终端(即发送文件的终端)接收向第二终端(即接收文件的终端)传输文件的请求;所述第一终端根据所述第一终端和所述第二终端共同支持的多种通信方式与所述第二终端建立多条第一通信连接;所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件。
本发明实施例,第一终端接收到向第二终端传输文件的请求后,不是直接使用已经建立的一条通信连接或根据用户选择的一种通信方式建立的一条通信连接向第二终端传输文件,而是根据所述第一终端和所述第二终端共同支持的多种通信方式与所述第二终端建立多条第一通信连接,从而所述第一终端可以根据待传输的文件数量或文件大小通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件,由于建立多条通信连接的过程是终端自动实现的,无需用户手动操作,因此使用简单,并且可以使用多条通信连接协作传输文件或多条通信连接中传输质量较高的通信连接传输文件,因此传输效率高。
在一个示例中,通过任意一种途径创建通信连接后,自主发现、协商其它共同具有的传输途径(即通信方式),自动创建多条通信连接,多途径共同传输文件。
作为一种非限定的实现方式,本发明实施例中,可以在要传输文件的两个终端上都安装了本文件传输软件,比如在文件管理器、照片库等文件管理软件中,发起分享文件的动作时,可以使用本文件传输软件。本领域技术人员可以理解,采用硬件实现也是可以的。
在一个示例中,对于处于网络离线状态(未连接互联网)的两个终端,在启动文件传输软件以后会自动扫描本机存在的可以用于传输的方式,并提示用户选择一种,比如NFC,当两个终端通过这种方式发现对方并建立连接以后,两个终端会自动匹配两个终端可能的其它连接方式,比如蓝牙、wlan、wifi直连等。自动通过NFC交换蓝牙id,wlan监听ip和端口,wifi直连密码等连接参数,随后依次尝试进行局域网内直连、wifi直连、蓝牙等通信连接。
在一个示例中,当用户传输多个文件的时候,终端会把文件分到不同的传输路径进行传输,当用户传输大文件的时候,终端会把文件分割成多个小文件并进行标记序号,进行多路传输,然后在传输完成后进行文件合并。在多路传输的过程中,会实时监测各路传输途径的稳定性和传输效率,实时调整迁移传输任务到更快速的通道上。
在一个示例中,对于处于网络在线状态(连接互联网)的两个终端,对于协商传输途 径的方式,也可以采用间接的连接方式,比如通过华为会员、QQ等即时通信(Instant Messaging,IM)系统的服务器进行间接连接。两个终端都和IM系统建立连接,通过两者上传的地理位置和在线网络,IM系统可以很快的通知对方,使两个终端相互发现,用户也可以自己选择自己的好友直接进行通信。通过IM系统,两个终端完成上述传输途径的协商过程,并进行下面的创建连接、文件传输过程。
本发明实施例目的是更方便传输文件,包括两个终端自动发现自身可以用于传输文件的途径,并自动完成传输途径协商,并完成连接参数交换,多途径创建连接进行传输。一方面,提高了终端间传输文件的便捷性;另一方面,充分利用终端间共同具有的传输途径进行文件传输,提高传输效率。
图1为本发明实施例提供的传输文件的方法基于的一种应用场景示意图。参照图1,用户101使用的终端103向用户102使用的终端104传输文件。一种情况是终端103和终端104均处于网络离线状态,即终端103和终端104之间不存在终端103通过服务器105到终端104的间接通信连接。这种情况下,终端103和终端104之间仅通过近距离通信方式建立通信连接,并通过建立的通信连接传输信息或文件,例如,终端103和终端104先建立一条通信连接,通过该通信连接交互支持的多种通信方式的标识,然后根据终端103和终端104共同支持的多种通信方式建立多条通信连接,通过终端103和终端104之间的多条通信连接协作传输文件。另一种情况是终端103和终端104均处于网络在线状态,即终端103和终端104之间存在终端103通过服务器105到终端104的间接通信连接。这种情况下,终端103和终端104之间既可以通过近距离通信方式建立通信连接又可以通过远距离通信方式建立通信连接,并通过建立的通信连接传输信息或文件,例如,终端103和终端104先通过该间接通信连接交互支持的多种通信方式的标识,然后根据终端103和终端104共同支持的多种通信方式建立多条通信连接,通过终端103和终端104之间的多条通信连接协作传输文件。
可以理解的是,终端103和终端104之间的距离较近,满足近距离通信的条件。
在一个示例中,终端103和终端104均登录了服务器105,服务器105可以确定终端103和终端104之间的距离满足近距离通信的条件,并向终端103和终端104发送通知信息,以使终端103和终端104互相发现。
本发明实施例,由于终端103和终端104可以自动建立多条通信连接,并通过多条通信连接协作传输文件,因此一方面无需用户手动操作,使用简单,另一方面可以使用多条通信连接协作传输文件或多条通信连接中传输质量较高的通信连接传输文件,因此传输效率高。
图2为本发明实施例提供的一种传输文件的方法通信示意图,该实施例可以基于图1所示的应用场景,该方法包括:
步骤201,第一终端接收向第二终端传输文件的请求。
例如,第一终端接收到了用户分享文件的指令,从而确定需要向第二终端传输文件。
可以理解的是,第一终端为发送文件的终端,第二终端为接收文件的终端。
步骤202,第一终端根据所述第一终端和所述第二终端共同支持的多种通信方式与所述第二终端建立多条第一通信连接。
在一个示例中,在步骤202之前,所述第一终端与所述第二终端先建立第二通信连接;所述第一终端通过所述第二通信连接从所述第二终端接收信息,所述信息用于建立所述多条第一通信连接。根据该实施方式,所述第一终端与所述第二终端先建立第二通信连接;所述第一终端通过所述第二通信连接从所述第二终端接收信息,从而第一终端根据从第二终端接收到的信息建立所述多条第一通信连接。
可以理解的是,出于经济方面的考虑,上述多条第一通信连接通常为采用近距离通信方式建立的通信连接,上述第二通信连接可以为采用近距离通信方式建立的通信连接,也可以为采用远距离通信方式建立的通信连接。当上述第二通信连接为采用近距离通信方式建立的通信连接时,上述第二通信连接可以包括在上述多条第一通信连接中,当上述第二通信连接为采用远距离通信方式建立的通信连接时,上述第二通信连接不包括在上述多条第一通信连接中。当然了,如果不考虑经济因素,上述第一通信连接和第二通信连接既可以为采用近距离通信方式建立的通信连接,也可以为采用远距离通信方式建立的通信连接。
例如,所述信息为所述第一终端和所述第二终端共同支持的多种通信方式的标识,其中,所述信息由所述第二终端根据所述第一终端发送的所述第一终端支持的多种通信方式的标识以及所述第二终端支持的多种通信方式的标识确定,其中所述第一终端通过所述第二通信连接向所述第二终端发送所述第一终端支持的多种通信方式的标识。根据该实施方式,第一终端通过所述第二通信连接向所述第二终端发送所述第一终端支持的多种通信方式的标识,由所述第二终端根据所述第一终端发送的所述第一终端支持的多种通信方式的标识以及所述第二终端支持的多种通信方式的标识确定所述第一终端和所述第二终端共同支持的多种通信方式的标识。
又例如,所述信息为所述第二终端支持的多种通信方式的标识,所述第一终端根据所述第一终端支持的多种通信方式的标识以及所述第二终端支持的多种通信方式的标识确定所述第一终端和所述第二终端共同支持的多种通信方式。根据该实施方式,第一终端通过所述第二通信连接从所述第二终端接收所述第二终端支持的多种通信方式的标识,由所述第一终端根据所述第一终端接收的所述第二终端支持的多种通信方式的标识以及所述第一终端支持的多种通信方式的标识确定所述第一终端和所述第二终端共同支持的多种通信方式的标识。
有了所述第一终端和所述第二终端共同支持的多种通信方式的标识,所述第一终端和所述第二终端就可以根据所述共同支持的多种通信方式建立多条第一通信连接;
在一个示例中,所述第一终端显示所述第一终端支持的多种通信方式中每种通信方式的标识;所述第一终端确定用户从所述第一终端支持的多种通信方式中选择的一种通信方式;所述第一终端根据所述用户选择的一种通信方式发现所述第二终端,并与所述第二终端建立所述第二通信连接。根据该实施方式,可以由用户选择一种熟悉的通信方式手动建立第二通信连接,该第二通信连接为直接的通信连接。
在另一个示例中,所述第一终端和所述第二终端通过服务器建立所述第二通信连接。根据该实施方式,该第二通信连接为间接的通信连接。
当第二通信连接为间接的通信连接时,服务器可以使第一终端快速发现并选择第二终端。
例如,所述第一终端从所述服务器接收第一标识集合,所述第一标识集合包括所述第一终端附近终端的标识和/或所述第一终端的关联终端的标识;所述第一终端显示所述第一标识集合;所述第一终端根据用户从所述第一标识集合中选择的所述第二终端的标识确定向所述第二终端传输文件。可以理解的是,上述第一终端的关联终端可以为与第一终端通过服务器有过信息交互的终端,或者还可以为与第一终端建立过关联关系的终端。上述两个终端之间的关联关系可以为两个终端的用户之间的关联关系,例如,两个终端的用户属于同一群组,或两个终端的用户互为好友。根据该实施方式,当第二通信连接为经过服务器建立的间接通信连接时,可以由服务器确定第一终端附近终端的标识和/或所述第一终端的关联终端的标识,便于第一终端快速发现并选择第二终端。
在一个示例中,所述第一终端通过所述第二通信连接与所述第二终端交换所述第一终端和所述第二终端共同支持的多种通信方式中每种通信方式的连接参数;所述第一终端根据所述第一终端和所述第二终端共同支持的多种通信方式中每种通信方式的连接参数与所述第二终端建立多条第一通信连接。根据该实施方式,第一终端和第二终端自动交换每种通信方式的连接参数,无需用户手动设置,使用简单。
可以理解的是,可以预先设定每种通信方式的优先级,按照优先级的高低依次建立多条通信连接。
步骤203,第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件。
在一个示例中,所述第一终端将每个所述文件作为一个任务;所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务。根据该实施方式,所述第一终端将每个所述文件作为一个任务;通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务,从而实现传输资源的优化。
在另一个示例中,所述第一终端针对待传输的每个文件,判断文件大小是否小于第一阈值;当判断结果为文件大小小于或等于所述第一阈值时,将文件作为一个任务;当判断结果为文件大小大于所述第一阈值时,根据所述第一阈值将文件划分为多个任务;所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务。根据该实施方式,第一终端针对待传输的每个文件,将大文件划分为多个任务,便于多条通信连接协作传输大文件,从而可以进一步实现传输资源的优化。
其中,第一终端可以但不限于基于如下两种方式从所述多条第一通信连接中选择至少一条通信连接。
例如,所述第一终端根据所述任务的数量和所述多条第一通信连接中每条通信连接对应的通信方式的预设优先级,从所述多条第一通信连接中选择至少一条通信连接向所述第二终端传输所述任务。根据该实施方式,可以根据预设规则,例如传输效率的高低、是否会产生扣费等确定每种通信方式的预设优先级,从而使选择的通信连接更能符合用户的需求。
又例如,所述第一终端根据所述任务的数量和所述多条第一通信连接中每条通信连接的传输质量,从所述多条第一通信连接中选择至少一条通信连接向所述第二终端传输所述任务。可以理解的是,第一终端可以周期性监测每条通信连接的传输质量,上述传输质量 可以包括传输稳定性和传输效率,可以通过丢包率等来衡量。根据该实施方式,能够自动选择传输质量佳的通信连接传输任务,无需用户操作,用户体验佳。
又例如,所述第一终端根据所述任务的个数和所述多条第一通信连接中每条通信连接对应的通信方式的预设优先级,从所述多条第一通信连接中选择至少一条通信连接之后,所述第一终端监测预设时间周期内所述多条第一通信连接中每条通信连接的稳定性和传输效率;根据所述预设时间周期内所述多条第一通信连接中每条通信连接的稳定性和传输效率,更新所述多条第一通信连接中每条通信连接对应的通信方式的实时优先级;将所述实时优先级低于预设级别的通信连接上的任务迁移到所述实时优先级高于预设级别的通信连接上进行传输。
需要说明的是,第一终端建立通信连接的过程可以包括两个阶段。第一个阶段,先建立一条通信连接(即第二通信连接),通过该条通信连接交互两个终端支持的多种通信方式的标识,以确定两个终端共同支持的多种通信方式;第二个阶段,根据两个终端共同支持的多种通信方式,建立多条通信连接(即多条第一通信连接)。步骤203中,第一终端可以仅通过第二个阶段建立的多条第一通信连接协作向第二终端传输文件,也可以通过第一个阶段建立的一条第二通信连接和第二个阶段建立的多条第一通信连接协作向第二终端传输文件。
在一个示例中,步骤203之前,所述方法还包括:所述第一终端向所述第二终端发送待传输文件的文件信息,所述文件信息包括文件个数、每个文件的文件编号、每个文件的文件大小和每个文件的文件摘要中的至少一项。
在一个示例中,所述方法还包括:所述第一终端监测预设时间周期结束时待传输文件中每个文件的传输进度;所述第一终端显示每个文件的传输进度。
本发明实施例中,重点描述了第一终端(即发送文件的终端)的处理过程,由于第二终端(即接收文件的终端)的处理过程与第一终端的处理过程相对应,在此不做赘述。
本发明实施例,第一终端接收到向第二终端传输文件的请求后,不是直接使用已经建立的一条通信连接或根据用户选择的一种通信方式建立的一条通信连接向第二终端传输文件,而是根据所述第一终端和所述第二终端共同支持的多种通信方式与所述第二终端建立多条第一通信连接,从而所述第一终端可以根据待传输的文件数量或文件大小通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件,由于建立多条通信连接的过程是终端自动实现的,无需用户手动操作,因此使用简单,并且可以使用多条通信连接协作传输文件或多条通信连接中传输质量较高的通信连接传输文件,因此传输效率高。
图3为本发明实施例提供的另一种传输文件的方法通信示意图,该实施例可以基于图1所示的应用场景,第一终端(例如终端103)和第二终端(例如终端104)均处于网络离线状态,即终端103和终端104之间不存在终端103通过服务器105到终端104的间接通信连接。该方法包括:
步骤301,第一终端进行传输文件准备,扫描本地所有可用的传输途径;第二终端进行传输文件准备,扫描本地所有可用的传输途径。
其中,步骤301可以由用户触发。触发步骤301的条件可以为第一终端接收到向第二终端传输文件的请求,以及第二终端接收到从第一终端传输文件的请求。
步骤302,第一终端接收用户的指令,该指令用于从多种传输途径中选择一种传输途径;第二终端接收用户的指令,该指令用于从多种传输途径中选择一种传输途径;第一终端采用选择的传输途径与第二终端建立通信连接。
步骤303,第二终端通过建立的通信连接向第一终端发送本机支持的传输途径。
步骤304,第一终端向第二终端发送第一终端和第二终端共同支持的传输途径。
步骤305,第二终端向第一终端请求开始方式1的连接。
步骤306,第一终端开始方式1的连接。
步骤307,第二终端向第一终端发送方式1连接成功的指示信息。
步骤308,第二终端向第一终端请求开始方式2的连接。
步骤309,第一终端向第二终端发送方式2连接超时的指示信息。
可以理解的是,方式1和方式2属于第一终端和第二终端共同支持的传输途径,第一终端和第二终端共同支持的传输途径包括多种通信方式,除了包括方式1和方式2,还可能包括方式3、方式4等,每种方式建立通信连接的过程类似,在此不做赘述。
步骤310,多种途径进行文件传输。
其中步骤302,以及303、304、305、307、308协商的过程不一定是通过网络上直接连接的方式进行通信,也包括通过第三方服务器,比如即时通信(Instant Messaging,IM)系统的服务器。
图4为本发明实施例提供的另一种传输文件的方法通信示意图,该实施例可以基于图1所示的应用场景,第一终端(例如终端103)和第二终端(例如终端104)均处于网络在线状态,即终端103和终端104之间存在终端103通过IM系统的服务器(例如服务器105)到终端104的间接通信连接。该方法包括:
步骤401,第一终端进行传输文件准备,扫描本地所有可用的传输途径;第二终端进行传输文件准备,扫描本地所有可用的传输途径。
其中,步骤401可以由用户触发。触发步骤401的条件可以为第一终端接收到向第二终端传输文件的请求,以及第二终端接收到从第一终端传输文件的请求。
步骤402,第一终端和第二终端都登录到IM系统,并上报自己的网络信息以及地理位置信息。网络信息包括当前周围的wifi信息,基站信息等。
步骤403,IM系统通过比较两个终端的wifi信息、基站信息、地理位置信息判断两个终端周围的wifi信息是否相同,是否连接的同一个基站、地理经纬度是否相近,从而知道两个终端用户是否在附近。
步骤404,IM系统通知第一终端,第二终端在第一终端附近可以传输文件。
可以理解的是,步骤402至404为可选的发现终端的方式。
作为一种可替代的方案,在一个示例中,第二终端为第一终端的关联终端,例如第二终端在第一终端的好友列表里,可以免去步骤402至404的过程。
步骤405,第一终端主动发送消息给IM系统,该消息包括第一终端支持的传输途径,要求IM系统将消息发送给第二终端。
步骤406,IM系统把第一终端支持的传输途径通知给第二终端。
步骤407,第二终端通过IM系统向第一终端发送第一终端和第二终端共同支持的传 输途径。
步骤408,第一终端向第二终端请求开始方式1的连接。
步骤409,第二终端开始方式1的连接。
步骤410,第一终端向第二终端发送方式1连接成功的指示信息。
步骤411,第一终端向第二终端请求开始方式2的连接。
步骤412,第二终端向第一终端发送方式2连接超时的指示信息。
可以理解的是,方式1和方式2属于第一终端和第二终端共同支持的传输途径,第一终端和第二终端共同支持的传输途径包括多种通信方式,除了包括方式1和方式2,还可能包括方式3、方式4等,每种方式建立通信连接的过程类似,在此不做赘述。
步骤413,多种途径进行文件传输。
图5为本申请实施例提供的一种终端结构示意图,以移动终端为手机为例,图5示出的是与本发明实施例相关的手机100的部分结构的框图。
以终端设备为手机为例,图5示出的是与本发明实施例相关的手机100的部分结构的框图。参考图5,手机100包括:射频(Radio Frequency,RF)电路110、电源120、处理器130、存储器140、输入单元150、显示单元160、USB Driver 170、GPS模块180、以及其它无线通信模块190等部件。
以上各模块在本发明中的作用:
RF电路110提供GPRS、移动通信(例如4G)等通信能力,在本发明中是一种传输途径之一,在一个示例中,可用于和IM系统通信,例如,获取基站信息,并上报给IM系统。基站信息用于IM系统定位两个终端的位置。
存储器140可用于存储软件程序以及模块,处理器130通过运行存储在存储器140的软件程序以及模块,从而执行手机100的各种功能应用以及数据处理。本发明中的要分享文件的应用,发送文件管理模块,以及传输的文件都存储在存储器140中。应用的运行、应用的处理逻辑都在处理器130上执行。
USB Driver 170,可提供其它终端设备与手机100的通信能力,比如从PC(个人电脑)上拷贝文件到手机100中,或者和另外一个手机通过OTG数据线传输文件等。可以理解的是,其并不属于手机100的必须构成,但是这种传输途径也是本发明涉及的一种。
GPS模块180,可提供定位能力,显示终端所处的经纬度,在一个示例中可以上传给IM系统作为两个终端是否在相近位置的判断。
其它无线传输模块190,包括蓝牙、NFC、Wifi模块等近距离传输模块。手机100通过其它无线传输模块190收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问,同时提供了和其它终端设备实现通信的能力,包括文件传输的能力。可以理解的是,其并不属于手机100的必须构成,手机可以具备其中的一种或者多种,也并不限于这几种,它们都属于本发明涉及的传输途径。
输入单元150可用于接收输入的数字或字符信息,以及产生与手机100的用户设置以及功能控制有关的键信号输入。本发明需要用户选择发送的文件、以及创建连接、接收文件都是要用户通过输入单元150触发。
显示单元160可用于显示当前发明中的整个发送过程中需要显示的东西,包括文件列 表,传输进度,可以连接的方式,以及其它界面等信息。
手机100还包括给各个部件供电的电源120(比如电池),电源可以通过电源管理系统与处理器130逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗等功能。尽管未示出,手机100还可以包括摄像头、红外线模块等,在此不再赘述。
图6为本发明实施例提供的一种多途径传输文件示意图。本发明实施例中主要涉及如下模块。
应用:是指终端上需要分享文件的应用,比如图库、文件管理器、浏览器等。
文件传输管理模块:是本发明实施例提供的传输文件的方法的实现模块,用于调用终端的wifi、蓝牙、NFC、USB等模块进行连接,协商传输途径、发送文件管理等操作。
存储模块:是指手机上的存储文件的模块,比如内置SD卡,外置SD卡等。
本发明实施例中的文件传输管理模块用于终端之间分享文件,首先当终端A上的某个应用当需要应用内分享文件给其它终端的时候,会进行下面的步骤:
终端A上的应用通过拉起文件传输管理模块的界面(activity),把要分享的文件列表(在存储模块中的位置)传递给它。
终端A的文件传输管理模块在收到发送文件的请求的时候,会检测本机所有可以用于传输文件的模块。让用户选择一种熟悉的方式进行连接,比如NFC。如图7中的(a)所示的终端A的用户界面示意图。
同时终端B用户可以点击接收文件按钮,同时也会自动自动扫描本机所有可以用于传输文件的模块。提示用户选择一种,比如NFC。如图7中的(b)所示的终端B的用户界面示意图。
当终端A和B都选择了NFC,并建立连接以后,开始后台的其它传输途径的协商,并创建连接。
整个协商过程如下:
连接上NFC以后,终端B首先响应终端A:本机支持的传输途径有:蓝牙、wifi直连、wlan、OTG数据线。
终端A返回消息,本机同样支持的传输途径有蓝牙、wifi直连、wlan。
终端B开启蓝牙。
终端B发送消息给终端A,消息中包括蓝牙的ID号。
终端A发送本机的蓝牙mac地址给终端B。终端A启动蓝牙,并主动根据终端B的蓝牙ID搜索信号,并尝试连接。
终端B的蓝牙在收到终端A的连接以后,会自动判断是否属于终端A的mac地址,如果是就自动接受连接。
在蓝牙连接成功后。终端A会发送连接成功的信息给终端B。蓝牙连接结束。
如果在20秒的时间内,没有完成蓝牙连接,终端A会发送蓝牙连接失败的信息给终端B。蓝牙连接结束。
终端B在蓝牙连接完成以后。开始准备进行下一个连接方式的连接,直到所有的连接创建。如图8所示为建立协商后的终端A和终端B的用户界面示意图。
在所有的连接过程结束后,终端B会向终端A发送可以开始发送文件的消息。
终端A会通过NFC,把要发送的文件列表发送给B。消息内容包括文件个数,每个文件的编号,文件大小,以及文件的md5。
假设有3个文件
文件1:0.5M
文件2:20M
文件3:5M
终端A会根据文件大小,对要发送的文件进行分割,并放入本地队列。
对于<2M的文件,当做一个发送任务
对于>2M的大文件,会被分割成2M一个的分片任务。
整个发送任务队列如图9所示。
终端A文件传输管理模块,会把发送任务会以抢占式的方式分配给不同的发送途径。如图10所示为终端A多途径并发发送文件示意图。
文件传输管理模块会不断的从待发送任务队列中获取发送任务,对应的从存储模块或得文件分片的数据流,把任务分配给已经连接的模块。
当其中一个模块发送完一个文件分片任务以后,文件传输管理模块会再等待传输队列再拉取一个任务分配给这个模块。
从而充分的利用所用的传输途径。并发的进行文件传输。
在终端B的文件传输管理模块,会接收不同传输途径发送过来的文件,因为多途径发送,终端B收到文件、以及文件分片没有先后顺序。如图11所示为终端B多途径并发接收文件示意图。
文件传输管理模块,在每接收完一个分片时,会校验分片的md5和大小,当一个文件的所有分片都传输完成的时候,会校验整个文件的大小以及md5。确保整个文件发送正确。
终端A和终端B都可以根据每个文件已经发送的的大小,在界面上显示多个文件的传输进度,如图12所示为本发明实施例提供的文件传输进度示意图。
本发明实施例,用户只要使用自己熟知的一种连接方式,把两个终端进行连接,连接后终端自己发现并创建其它连接方式,全面发挥终端的所有可以传输文件的器件能力。以达到快速传输文件的目的。用户只要知道其中一种传输途径的使用方式,进行连接后,程序就会自动协商创建其它传输途径的连接。该实施例使用队列,按文件数量、大小分割成多个小的发送任务,利用队列,在多传输途径上进行多路传输,充分利用了终端的能力,提高了传输效率。
图13为本发明实施例提供的另一种多途径传输文件示意图。终端通过IM系统发文件给好友或附近的人。
终端A和终端B,通过中间服务器进行传输途径的交互,如果终端A和终端B在都登录了某统一账户,在文件管理器中,当终端A用户点击了文件分享以后,会弹出终端A用户的好友列表,以及附近的用户。用户选择后,终端B用户会收到一个接收文件的通知。如果13所示,剩下的过程和图6所示的实施例类似。仅是在协商传输途径,以及传递文件列表的地方改成了通过第三方中间服务器。
本发明实施例,两个终端并不需要进行具体的传输连接,只要登录共同的IM系统,即可完成传输途径的协商,具体比如两个手机都登录了华为账号,都登录了QQ、微信等IM系统。让两个终端开始的连接更加便捷,不需要再去进行具体连接的配置。初次进行连接的方式可以是不能用于文件传输的方式,可以是两个终端都可以连接中间服务器,间接通过服务器进行传输途径的协商。
在一个示例中,可以进行传输途径优先级配置,比如GPRS传输优先级最低,以免产生流量费用。
在一个示例中,传输途径的概念可以用于更广范围的文件传输,比如通过百度网盘、亚马逊云等多个服务器的文件中转传输。
上述主要从方法流程的角度对本发明实施例的方案进行了介绍。可以理解的是,各个网元,例如终端等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本发明能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
本发明实施例可以根据上述方法示例对终端等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本发明实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用集成的模块的情况下,图14示出了上述实施例中所涉及的终端的一种可能的结构示意图。终端1400包括:处理模块1402、通信模块1403和输入模块1404。处理模块1402用于对终端的动作进行控制管理,例如,处理模块1402用于支持终端执行图2至图4中的过程,和/或用于本文所描述的技术的其它过程。通信模块1403用于支持终端与其他网络实体的通信,例如与IM系统或其他终端之间的通信。输入模块1404用于支持终端接收用户的分享文件的指令。终端还可以包括存储模块1401,用于存储终端的程序代码和数据。
一种情况,终端1400作为第一终端,即发送文件的终端。
所述输入模块1404,用于接收向第二终端传输文件的请求;
所述处理模块1402,用于根据所述第一终端和所述第二终端共同支持的多种通信方式控制所述通信模块1403与所述第二终端建立多条第一通信连接;
所述通信模块1403,用于与所述第二终端建立多条第一通信连接,以及通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件。
在一个示例中,在所述处理模块1402根据所述第一终端和所述第二终端共同支持的多种通信方式控制所述通信模块1403与所述第二终端建立多条第一通信连接之前,还用于控制所述通信模块1403与所述第二终端建立第二通信连接;
所述通信模块1403,还用于通过所述第二通信连接从所述第二终端接收信息,所述 信息用于建立所述多条第一通信连接。
在一个示例中,所述信息为所述第一终端和所述第二终端共同支持的多种通信方式的标识,其中,所述信息由所述第二终端根据所述通信模块发送的所述第一终端支持的多种通信方式的标识以及所述第二终端支持的多种通信方式的标识确定,其中所述通信模块通过所述第二通信连接向所述第二终端发送所述第一终端支持的多种通信方式的标识。
在一个示例中,所述信息为所述第二终端支持的多种通信方式的标识,所述处理模块根据所述第一终端支持的多种通信方式的标识以及所述第二终端支持的多种通信方式的标识确定所述第一终端和所述第二终端共同支持的多种通信方式的标识。
在一个示例中,所述第一终端还包括显示模块1405;所述处理模块1402用于与所述第二终端建立第二通信连接,包括:
控制所述显示模块1405显示所述第一终端支持的多种通信方式中每种通信方式的标识;
确定用户从所述第一终端支持的多种通信方式中选择的一种通信方式;
控制所述通信模块1403根据所述用户选择的一种通信方式发现所述第二终端,并与所述第二终端建立所述第二通信连接。
在一个示例中,所述处理模块1402用于控制所述通信模块1403与所述第二终端建立第二通信连接,包括:控制所述通信模块1403和所述第二终端通过服务器建立所述第二通信连接。
在一个示例中,所述第一终端还包括显示模块1405;所述处理模块1402,还用于控制所述通信模块1403从所述服务器接收第一标识集合,所述第一标识集合包括所述第一终端附近终端的标识和/或所述第一终端的关联终端的标识;控制所述显示模块1405显示所述第一标识集合;根据所述输入模块1404接收的用户从所述第一标识集合中选择的所述第二终端的标识确定向所述第二终端传输文件。
在一个示例中,所述处理模块1402用于根据所述第一终端和所述第二终端共同支持的多种通信方式控制所述通信模块1403与所述第二终端建立多条第一通信连接,包括:
控制所述通信模块1403通过所述第二通信连接与所述第二终端交换所述第一终端和所述第二终端共同支持的多种通信方式中每种通信方式的连接参数;
控制所述通信模块1403根据所述第一终端和所述第二终端共同支持的多种通信方式中每种通信方式的连接参数与所述第二终端建立多条第一通信连接。
在一个示例中,所述通信模块1403用于通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件,包括:
将每个所述文件作为一个任务;
通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务。
在一个示例中,所述通信模块1403用于通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件,包括:
针对待传输的每个文件,判断文件大小是否小于第一阈值;
当判断结果为文件大小小于或等于所述第一阈值时,将文件作为一个任务;
当判断结果为文件大小大于所述第一阈值时,根据所述第一阈值将文件划分为多个任 务;
通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务。
在一个示例中,所述通信模块1403用于通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务,包括:
根据所述任务的数量和所述多条第一通信连接中每条通信连接对应的通信方式的预设优先级,从所述多条第一通信连接中选择至少一条通信连接向所述第二终端传输所述任务。
在一个示例中,所述通信模块1403用于通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务,包括:
根据所述任务的数量和所述多条第一通信连接中每条通信连接的传输质量,从所述多条第一通信连接中选择至少一条通信连接向所述第二终端传输所述任务。
另一种情况,终端1400作为第二终端,即接收文件的终端,其组成结构与第一终端类似,在此不做赘述。
本发明实施例,输入模块1404接收到向第二终端传输文件的请求后,通信模块1403不是直接使用已经建立的一条通信连接或根据用户选择的一种通信方式建立的一条通信连接向第二终端传输文件,而是由处理模块1402根据所述第一终端和所述第二终端共同支持的多种通信方式与所述第二终端建立多条第一通信连接,从而通信模块1403可以根据待传输的文件数量或文件大小通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件,由于建立多条通信连接的过程是终端自动实现的,无需用户手动操作,因此使用简单,并且可以使用多条通信连接协作传输文件或多条通信连接中传输质量较高的通信连接传输文件,因此传输效率高。
其中,处理模块1402可以是处理器或控制器,例如图5中的处理器130。通信模块1403可以是通信接口、收发器、收发电路等,其中,通信接口是统称,可以包括一个或多个接口,例如图5中的RF电路110。存储模块1403可以是存储器,例如图5中的存储器140。输入模块1404可以包括触控面板或其他输入设备,例如图5中的输入单元150。显示模块1405可以称为显示单元,例如图5中的显示单元160。
在本发明实施例中,
所述存储器140,用于存储程序指令;
所述处理器130,用于根据所述存储器140中存储的程序指令执行本发明实施例提供的传输文件的方法。
图15为本申请实施例提供的一种通信装置示意图,如图15所示,所述通信装置1500可以是芯片,所述芯片包括处理单元和通信单元。所述处理单元可以是处理器1510,所述处理器可以是前文所述的各种类型的处理器。所述通信单元例如可以是输入/输出接口1520、管脚或电路等,所述通信单元可以包括系统总线或者与系统总线连接。可选地,所述通信装置还包括存储单元,所述存储单元可以是所述芯片内部的存储器1530,例如寄存器、缓存、随机存取存储器(random access memory,RAM)、EEPROM或者FLASH等;所述存储单元还可以是位于所述芯片外部的存储器,该存储器可以是前文所述的各种类型的存储器。处理器连接到存储器,该处理器可以运行存储器存储的指令,以使该通信装置执行上 述图2至图4所示的方法。
在上述各个本发明实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读介质向另一个计算机可读介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘)等。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。

Claims (26)

  1. 一种传输文件的方法,其特征在于,所述方法包括:
    第一终端接收向第二终端传输文件的请求;
    所述第一终端根据所述第一终端和所述第二终端共同支持的多种通信方式与所述第二终端建立多条第一通信连接;
    所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件。
  2. 如权利要求1所述的方法,其特征在于,所述第一终端根据所述第一终端和所述第二终端共同支持的多种通信方式与所述第二终端建立多条第一通信连接之前,所述方法还包括:
    所述第一终端与所述第二终端建立第二通信连接;
    所述第一终端通过所述第二通信连接从所述第二终端接收信息,所述信息用于建立所述多条第一通信连接。
  3. 如权利要求2所述的方法,其特征在于,所述信息为所述第一终端和所述第二终端共同支持的多种通信方式的标识,其中,所述信息由所述第二终端根据所述第一终端发送的所述第一终端支持的多种通信方式的标识以及所述第二终端支持的多种通信方式的标识确定,其中所述第一终端通过所述第二通信连接向所述第二终端发送所述第一终端支持的多种通信方式的标识。
  4. 如权利要求2所述的方法,其特征在于,所述信息为所述第二终端支持的多种通信方式的标识,其用于所述第一终端根据所述第一终端支持的多种通信方式的标识以及所述第二终端支持的多种通信方式的标识确定所述第一终端和所述第二终端共同支持的多种通信方式的标识。
  5. 如权利要求2至4中任一项所述的方法,其特征在于,所述第一终端与所述第二终端建立第二通信连接,包括:
    所述第一终端显示所述第一终端支持的多种通信方式中每种通信方式的标识;
    所述第一终端确定用户从所述第一终端支持的多种通信方式中选择的一种通信方式;
    所述第一终端根据所述用户选择的一种通信方式发现所述第二终端,并与所述第二终端建立所述第二通信连接。
  6. 如权利要求2至4中任一项所述的方法,其特征在于,所述第一终端与所述第二终端建立第二通信连接,包括:所述第一终端和所述第二终端通过服务器建立所述第二通信连接。
  7. 如权利要求6所述的方法,其特征在于,所述第一终端接收向第二终端传输文件的请求,包括:
    所述第一终端从所述服务器接收第一标识集合,所述第一标识集合包括所述第一终端附近终端的标识和/或所述第一终端的关联终端的标识;
    所述第一终端显示所述第一标识集合;
    所述第一终端根据用户从所述第一标识集合中选择的所述第二终端的标识确定向所述第二终端传输文件。
  8. 如权利要求2至7中任一项所述的方法,其特征在于,所述第一终端根据所述第一终端和所述第二终端共同支持的多种通信方式与所述第二终端建立多条第一通信连接,包括:
    所述第一终端通过所述第二通信连接与所述第二终端交换所述第一终端和所述第二终端共同支持的多种通信方式中每种通信方式的连接参数;
    所述第一终端根据所述第一终端和所述第二终端共同支持的多种通信方式中每种通信方式的连接参数与所述第二终端建立多条第一通信连接。
  9. 如权利要求1至8中任一项所述的方法,其特征在于,所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件,包括:
    所述第一终端将每个所述文件作为一个任务;
    所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务。
  10. 如权利要求1至8中任一项所述的方法,其特征在于,所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件,包括:
    所述第一终端针对待传输的每个文件,判断文件大小是否小于第一阈值;
    当判断结果为文件大小小于或等于所述第一阈值时,将文件作为一个任务;
    当判断结果为文件大小大于所述第一阈值时,根据所述第一阈值将文件划分为多个任务;
    所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务。
  11. 如权利要求9或10所述的方法,其特征在于,所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务,包括:
    所述第一终端根据所述任务的数量和所述多条第一通信连接中每条通信连接对应的通信方式的预设优先级,从所述多条第一通信连接中选择至少一条通信连接向所述第二终端传输所述任务。
  12. 如权利要求9或10所述的方法,其特征在于,所述第一终端通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务,包括:
    所述第一终端根据所述任务的数量和所述多条第一通信连接中每条通信连接的传输质量,从所述多条第一通信连接中选择至少一条通信连接向所述第二终端传输所述任务。
  13. 一种终端,用作第一终端,其特征在于,所述第一终端包括:输入模块、处理模块和通信模块;
    所述输入模块,用于接收向第二终端传输文件的请求;
    所述处理模块,用于根据所述第一终端和所述第二终端共同支持的多种通信方式控制所述通信模块与所述第二终端建立多条第一通信连接;
    所述通信模块,用于与所述第二终端建立多条第一通信连接,以及通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件。
  14. 如权利要求13所述的终端,其特征在于,所述处理模块根据所述第一终端和所述第二终端共同支持的多种通信方式控制所述通信模块与所述第二终端建立多条第一通信连接之前,还用于控制所述通信模块与所述第二终端建立第二通信连接;
    所述通信模块,还用于通过所述第二通信连接从所述第二终端接收信息,所述信息用于所述处理模块建立所述多条第一通信连接。
  15. 如权利要求14所述的终端,其特征在于,所述信息为所述第一终端和所述第二终端共同支持的多种通信方式的标识,其中,所述信息由所述第二终端根据所述通信模块发送的所述第一终端支持的多种通信方式的标识以及所述第二终端支持的多种通信方式的标识确定,其中所述通信模块通过所述第二通信连接向所述第二终端发送所述第一终端支持的多种通信方式的标识。
  16. 如权利要求14所述的终端,其特征在于,所述信息为所述第二终端支持的多种通信方式的标识,所述处理模块根据所述第一终端支持的多种通信方式的标识以及所述第二终端支持的多种通信方式的标识确定所述第一终端和所述第二终端共同支持的多种通信方式的标识。
  17. 如权利要求14至16中任一项所述的终端,其特征在于,所述第一终端还包括显示模块;所述处理模块用于与所述第二终端建立第二通信连接,包括:
    控制所述显示模块显示所述第一终端支持的多种通信方式中每种通信方式的标识;
    确定用户从所述第一终端支持的多种通信方式中选择的一种通信方式;
    控制所述通信模块根据所述用户选择的一种通信方式发现所述第二终端,并与所述第二终端建立所述第二通信连接。
  18. 如权利要求14至16中任一项所述的终端,其特征在于,所述处理模块用于控制所述通信模块与所述第二终端建立第二通信连接,包括:控制所述通信模块和所述第二终端通过服务器建立所述第二通信连接。
  19. 如权利要求18所述的终端,其特征在于,所述第一终端还包括显示模块;所述处理模块,还用于控制所述通信模块从所述服务器接收第一标识集合,所述第一标识集合包括所述第一终端附近终端的标识和/或所述第一终端的关联终端的标识;控制所述显示模块显示所述第一标识集合;根据所述输入模块接收的用户从所述第一标识集合中选择的所述第二终端的标识确定向所述第二终端传输文件。
  20. 如权利要求14至19中任一项所述的终端,其特征在于,所述处理模块用于根据所述第一终端和所述第二终端共同支持的多种通信方式控制所述通信模块与所述第二终端建立多条第一通信连接,包括:
    控制所述通信模块通过所述第二通信连接与所述第二终端交换所述第一终端和所述第二终端共同支持的多种通信方式中每种通信方式的连接参数;
    控制所述通信模块根据所述第一终端和所述第二终端共同支持的多种通信方式中每种通信方式的连接参数与所述第二终端建立多条第一通信连接。
  21. 如权利要求13至20中任一项所述的终端,其特征在于,所述通信模块用于通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件,包括:
    将每个所述文件作为一个任务;
    通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务。
  22. 如权利要求13至20中任一项所述的终端,其特征在于,所述通信模块用于通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输文件,包括:
    针对待传输的每个文件,判断文件大小是否小于第一阈值;
    当判断结果为文件大小小于或等于所述第一阈值时,将文件作为一个任务;
    当判断结果为文件大小大于所述第一阈值时,根据所述第一阈值将文件划分为多个任务;
    通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务。
  23. 如权利要求21或22所述的终端,其特征在于,所述通信模块用于通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务,包括:
    根据所述任务的数量和所述多条第一通信连接中每条通信连接对应的通信方式的预设优先级,从所述多条第一通信连接中选择至少一条通信连接向所述第二终端传输所述任务。
  24. 如权利要求21或22所述的终端,其特征在于,所述通信模块用于通过所述多条第一通信连接中的至少一条通信连接向所述第二终端传输所述任务,包括:
    根据所述任务的数量和所述多条第一通信连接中每条通信连接的传输质量,从所述多条第一通信连接中选择至少一条通信连接向所述第二终端传输所述任务。
  25. 一种终端,用作第一终端,其特征在于,所述终端包括存储器、处理器和通信接口;
    所述存储器,用于存储程序指令;
    所述处理器,用于执行所述存储器中存储的程序指令,使得所述终端执行根据权利要求1至12任一项所述的方法。
  26. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在计算机上运行时,使所述计算机执行根据权利要求1至12任一项所述的方法。
PCT/CN2019/086527 2018-05-17 2019-05-13 一种传输文件的方法及终端 WO2019218951A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810476102.9 2018-05-17
CN201810476102.9A CN110505712A (zh) 2018-05-17 2018-05-17 一种传输文件的方法及终端

Publications (1)

Publication Number Publication Date
WO2019218951A1 true WO2019218951A1 (zh) 2019-11-21

Family

ID=68539507

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/086527 WO2019218951A1 (zh) 2018-05-17 2019-05-13 一种传输文件的方法及终端

Country Status (2)

Country Link
CN (1) CN110505712A (zh)
WO (1) WO2019218951A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111343423A (zh) * 2020-02-26 2020-06-26 倪东杰 一种视频传输方法、装置、存储介质及电子设备
CN111314661A (zh) * 2020-02-26 2020-06-19 倪东杰 一种视频采集传输设备及系统
CN111918414A (zh) * 2020-07-27 2020-11-10 深圳市亿道数码技术有限公司 一种基于安卓系统下的无线多重冗余通讯方法
CN114364026B (zh) * 2021-08-27 2023-05-12 华为技术有限公司 通信方法及电子设备
CN115022859A (zh) * 2022-06-30 2022-09-06 四川长虹电器股份有限公司 一种无线局域网和蓝牙互补通信方法
CN116056182A (zh) * 2023-02-02 2023-05-02 中科南京移动通信与计算创新研究院 一种有中心的无线自组网两跳组网方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247610A (zh) * 2007-02-13 2008-08-20 艾威梯软件技术(北京)有限公司 管理多种短距离无线技术通信的方法、设备及系统
CN103580842A (zh) * 2013-11-04 2014-02-12 惠州Tcl移动通信有限公司 一种多类型无线链路并行传输的方法和系统
WO2015180051A1 (zh) * 2014-05-28 2015-12-03 华为技术有限公司 数据发送方法及装置
CN105703808A (zh) * 2014-11-28 2016-06-22 腾讯科技(深圳)有限公司 一种传输数据的方法和装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8279893B2 (en) * 2006-06-16 2012-10-02 Nvidia Corporation System and method for communicating data utilizing multiple types of data connections
JP5900228B2 (ja) * 2012-08-06 2016-04-06 ブラザー工業株式会社 通信装置
CN103401898A (zh) * 2013-07-15 2013-11-20 上海鼎为通讯电子有限公司 在移动终端之间传输数据的方法及移动终端
CN104320417B (zh) * 2014-11-06 2017-06-06 北京安奇智联科技有限公司 移动终端和web终端之间互连及流传输和流媒体播放的方法
CN104581993B (zh) * 2014-12-15 2019-05-03 华为技术有限公司 无线连接建立的方法、数据传输的方法以及终端
CN105430602A (zh) * 2015-11-27 2016-03-23 广东欧珀移动通信有限公司 一种组网方法及系统
CN106550492B (zh) * 2016-10-27 2019-07-30 广东欧珀移动通信有限公司 一种移动终端之间数据转移的方法及移动终端
CN107018554B (zh) * 2017-03-07 2020-11-06 Oppo广东移动通信有限公司 一种数据传输方法、装置及智能终端
CN107087292B (zh) * 2017-03-10 2021-01-01 北方工业大学 一种移动终端适应性传输数据的方法
CN107396396B (zh) * 2017-05-31 2020-03-24 北京交通大学 支持多源多径的数据传输管理方法
CN107659968A (zh) * 2017-10-13 2018-02-02 惠州Tcl移动通信有限公司 移动终端及其数据传输方法、及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247610A (zh) * 2007-02-13 2008-08-20 艾威梯软件技术(北京)有限公司 管理多种短距离无线技术通信的方法、设备及系统
CN103580842A (zh) * 2013-11-04 2014-02-12 惠州Tcl移动通信有限公司 一种多类型无线链路并行传输的方法和系统
WO2015180051A1 (zh) * 2014-05-28 2015-12-03 华为技术有限公司 数据发送方法及装置
CN105703808A (zh) * 2014-11-28 2016-06-22 腾讯科技(深圳)有限公司 一种传输数据的方法和装置

Also Published As

Publication number Publication date
CN110505712A (zh) 2019-11-26

Similar Documents

Publication Publication Date Title
WO2019218951A1 (zh) 一种传输文件的方法及终端
US11671813B2 (en) Function execution device and communication terminal
US10735524B2 (en) Multipath TCP subflow establishment and control
EP2557825B1 (en) Methods and apparatus for forming wi-fi p2p group using Wi-Fi Direct
US20130311694A1 (en) Devices and methods for facilitating direct pairing in a wireless docking system
US20130311692A1 (en) Apparatus and method for direct pairing in a wireless docking system
KR101658495B1 (ko) 통신 접속을 구축하는 방법 및 장치
WO2018045561A1 (zh) 一种文件的发送方法、接收方法及终端
US20150009862A1 (en) Wireless Network Connection Establishment Method and Terminal Device
EP3054649A1 (en) Peer to peer networking and sharing systems and methods
JP2015508273A (ja) ピアツーピアリンクを介した共有ネットワークアクセス
US20090254924A1 (en) Operating system interfaces for virtual wifi and softap capable drivers
WO2019184805A1 (zh) 网络切换方法、通信装置及通信设备
CN104009925A (zh) 路由器的桥接建立方法、装置和路由器
JP2015070458A (ja) 通信機器
CN112469055A (zh) 设备配网方法、相关设备和存储介质
KR20230008169A (ko) 릴레이 결정 방법, 구성 방법, 장치, 단말 및 네트워크측 장치
WO2016029772A1 (zh) 一种通信方法及设备
US20170346891A1 (en) Communication method
WO2017181626A1 (zh) 友邻共享网络建立方法、使用方法及友邻共享网络系统
JP2019068204A (ja) 通信装置と端末装置のためのコンピュータプログラム
CN117134848B (zh) 通道建立方法、设备及存储介质
WO2022206663A1 (zh) Pdu会话建立方法、相关设备及可读存储介质

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

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

Country of ref document: EP

Kind code of ref document: A1