CN110022329A - Document transmission method, device, computer readable storage medium and computer equipment - Google Patents
Document transmission method, device, computer readable storage medium and computer equipment Download PDFInfo
- Publication number
- CN110022329A CN110022329A CN201810016688.0A CN201810016688A CN110022329A CN 110022329 A CN110022329 A CN 110022329A CN 201810016688 A CN201810016688 A CN 201810016688A CN 110022329 A CN110022329 A CN 110022329A
- Authority
- CN
- China
- Prior art keywords
- terminal
- file
- transmission channel
- direct
- offline
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
Abstract
This application involves a kind of document transmission method, device, computer readable storage medium and computer equipment, method includes: that second terminal obtains the conversation message that first terminal is sent, and the corresponding file identification of file of first terminal transmission is carried in conversation message;Second terminal triggering session message generates file transmission request, and file transmission request is for requesting the corresponding file of transmission file identification from server;When second terminal, which is detected, has direct-connected transmission channel between first terminal, then the offline transmission channel of multichannel and direct-connected transmission channel provided by server transmits the corresponding file of file identification.Make while the offline transmission channel of multichannel provided by server transmits file in this way, this document can also be transmitted by the direct-connected transmission channel between terminal, the resource of direct-connected transmission channel is effectively utilized, the rate of file transmission is greatly improved, additionally it is possible to the effective occupancy reduced to server bandwidth resource.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of document transmission method, device, computer-readable deposit
Storage media and computer equipment.
Background technique
With the rapid development of Internet, user transmits mutually file by internet, share file also more and more frequently.
But when transmitting file, the problems such as occupying network bandwidth if the file of transmission is larger, cause network Caton.
In traditional technology, solve the problems, such as that file transmission accelerates using P2P (peer to peer, P-2-P technology)
Transmission technology refers to and the similar p2p sharing files transport protocol such as BitTorrent (bit stream), eMule (electric mule) has been used to add
The technology that the software of fast file transmission uses.P 2 p technology is usually using a Tracker server (BitTorrent server
Referred to as Tracker) store the summary info of the file that each user of this document transmitting software in network holds.File reception
It, can also be by being looked into Tracker server according to the summary info of file while the source address of Fang Cong file downloads file
The user for holding this document is found out, and to user's demand file, to achieve the purpose that accelerate downloading.
However, this P2P accelerates the shortcomings that transmission technology to be, the essence between file reception side and sender can not achieve
Standard accelerates, and in accelerator, also occupies the network bandwidth of non-reception side user and the operational capability of computer for no reason, causes
The waste of server bandwidth resource.
Summary of the invention
Based on this, it is necessary to the technical issues of for bandwidth resources waste, provide a kind of document transmission method, device, meter
Calculation machine readable storage medium storing program for executing and computer equipment.
A kind of document transmission method, which comprises
Second terminal obtains the conversation message that the first terminal is sent, and described first is carried in the conversation message eventually
Hold the corresponding file identification of file sent;
The second terminal triggers the conversation message, generates file transmission request, the file transmission request for from
The corresponding file of the file identification is transmitted in server request;
When the second terminal, which is detected, has direct-connected transmission channel between the first terminal, then pass through the clothes
The offline transmission channel of multichannel of device offer of being engaged in and the direct-connected transmission channel transmit the corresponding file of the file identification.
A kind of document transmission method, which comprises
Receive the file that first terminal is sent to second terminal and preservation;
The transmission request of second terminal file is received, request is transmitted according to the file and is established between the second terminal
The offline transmission channel of multichannel, the offline transmission channel of multichannel are used for direct-connected when having between the first terminal and second terminal
When transmission channel, with file described in the direct-connected transmission channel common transport to the extremely second terminal.
A kind of file transfer means, described device include:
Conversation message obtains module, obtains the conversation message that the first terminal is sent, the session for second terminal
The corresponding file identification of file that the first terminal is sent is carried in message;
Transmission request generation module, triggers the conversation message for the second terminal, generates file transmission request, institute
File transmission request is stated for transmitting the corresponding file of the file identification from server request;
Document transmission module, for having direct-connected transmission logical between the first terminal when the second terminal is detected
When road, then the offline transmission channel of the multichannel provided by the server and the direct-connected transmission channel transmit the file identification
Corresponding file.
A kind of file transfer means, described device include:
Preserving module, for receiving the file and preservation that first terminal is sent to second terminal;
Transmission module, for receive second terminal file transmission request, according to the file transmit request establish with it is described
The offline transmission channel of multichannel between second terminal, the offline transmission channel of multichannel are used to work as the first terminal and second eventually
When there is direct-connected transmission channel between end, with file described in the direct-connected transmission channel common transport to the extremely second terminal.
A kind of computer equipment, including memory, processor and be stored on the memory and can transport on a processor
Capable computer program, the processor perform the steps of when executing the computer program
Second terminal obtains the conversation message that the first terminal is sent, and described first is carried in the conversation message eventually
Hold the corresponding file identification of file sent;
The second terminal triggers the conversation message, generates file transmission request, the file transmission request for from
The corresponding file of the file identification is transmitted in server request;
When the second terminal, which is detected, has direct-connected transmission channel between the first terminal, then pass through the clothes
The offline transmission channel of multichannel of device offer of being engaged in and the direct-connected transmission channel transmit the corresponding file of the file identification.
A kind of computer equipment, including memory, processor and be stored on the memory and can transport on a processor
Capable computer program, the processor perform the steps of when executing the computer program
Receive the file that first terminal is sent to second terminal and preservation;
The transmission request of second terminal file is received, request is transmitted according to the file and is established between the second terminal
The offline transmission channel of multichannel, the offline transmission channel of multichannel are used for direct-connected when having between the first terminal and second terminal
When transmission channel, with file described in the direct-connected transmission channel common transport to the extremely second terminal.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
It is performed the steps of when row
Second terminal obtains the conversation message that the first terminal is sent, and described first is carried in the conversation message eventually
Hold the corresponding file identification of file sent;
The second terminal triggers the conversation message, generates file transmission request, the file transmission request for from
The corresponding file of the file identification is transmitted in server request;
When the second terminal, which is detected, has direct-connected transmission channel between the first terminal, then pass through the clothes
The offline transmission channel of multichannel of device offer of being engaged in and the direct-connected transmission channel transmit the corresponding file of the file identification.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
It is performed the steps of when row
Receive the file that first terminal is sent to second terminal and preservation;
The transmission request of second terminal file is received, request is transmitted according to the file and is established between the second terminal
The offline transmission channel of multichannel, the offline transmission channel of multichannel are used for direct-connected when having between the first terminal and second terminal
When transmission channel, with file described in the direct-connected transmission channel common transport to the extremely second terminal.
Above-mentioned document transmission method, device, computer readable storage medium and computer equipment, are obtained by second terminal
The conversation message that first terminal is sent carries the corresponding file identification of file of first terminal transmission in conversation message;Second
Terminal triggering session message generates file transmission request, and file transmission request is for requesting transmission file identification pair from server
The file answered;When second terminal, which is detected, has direct-connected transmission channel between first terminal, then provided by server
The offline transmission channel of multichannel and the corresponding file of direct-connected transmission channel transmission file identification.In this way, so that passing through
While the offline transmission channel of the multichannel that server provides transmits file, additionally it is possible to which the direct-connected transmission channel passed through between terminal passes
The resource of direct-connected transmission channel is effectively utilized in defeated this document, the rate of file transmission is greatly improved, additionally it is possible to have
The reduction of effect saves file and transmits the flow that need to be expended to the occupancy of server bandwidth resource.
Detailed description of the invention
Fig. 1 is the applied environment figure of document transmission method in one embodiment;
Fig. 2A is the structural block diagram of computer equipment in one embodiment;
Fig. 2 B is the structural block diagram of computer equipment in another embodiment;
Fig. 3 is the flow diagram of document transmission method in one embodiment;
When Fig. 4 is that second terminal transmits file by the offline transmission channel of multichannel and direct-connected transmission channel in one embodiment
Flow diagram;
Fig. 5 is the flow diagram of document transmission method in another embodiment;
Timing diagram when Fig. 6 is file transmission in one embodiment;
Fig. 7 be in one embodiment file transport stream to schematic diagram;
Fig. 8 A is the functional image schematic diagram one of transfer function in one embodiment;
Fig. 8 B is the functional image schematic diagram two of transfer function in one embodiment;
Fig. 9 A is the functional image schematic diagram one of transfer function in another embodiment;
Fig. 9 B is the functional image schematic diagram two of transfer function in another embodiment;
Figure 10 is in one embodiment using specific instant messaging application as the interface schematic diagram of application scenarios;
Figure 11 is the flow diagram of document transmission method in another embodiment;
Figure 12 is the structural block diagram of file transfer means in one embodiment;
Figure 13 is the structural block diagram of file transfer means in another embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and
It is not used in restriction the application.
Fig. 1 shows the applied environment figure of document transmission method in one embodiment.Referring to Fig.1, this document transmission method
It can be applied in document transmission system, which includes terminal 110A, terminal 110B and server 120, includes in server 120
There are off-line files server, terminal 110A and terminal 110B to connect by network with server 120.Terminal 110A and terminal 110B
It can be but not limited to personal computer, the laptop, personal digital assistant, intelligence of various energy operating file transmission methods
Mobile phone, tablet computer and portable wearable device etc..Server 120 can be the server for realizing simple function, can also be with
It is the server for realizing multiple functions, specifically can be independent physical server, be also possible to physical server cluster.Specifically
Ground, when terminal 110A sends off-line files to terminal 110B by specifically application, terminal 110A first passes through network will be on file
The off-line files server in server 120 is reached, it is corresponding that server 120 carries file to terminal 110B transmission one again
The conversation message of file identification.After terminal 110B triggers conversation message generation file transmission request, off-line files server will
File corresponding with file identification is transmitted to terminal 110B, i.e. terminal 110B is under the off-line files server in server 120
Carry this document.
Fig. 2A shows the internal structure chart of computer equipment in one embodiment.The computer equipment specifically can be figure
Terminal 110A, terminal 110B in 1.As shown in Figure 2 A, it includes total by system which, which includes the computer equipment,
Processor, memory, network interface, input unit and the display screen of line connection.Wherein, memory includes that non-volatile memories are situated between
Matter and built-in storage.The non-volatile memory medium of the computer equipment is stored with operating system, can also be stored with computer journey
Sequence when the computer program is executed by processor, may make processor to realize document transmission method of following Fig. 3 into Figure 10.
Computer program can also be stored in the built-in storage, when which is executed by processor, processor may make to execute
Document transmission method of following Fig. 3 into Figure 10.Terminal 110A and terminal 110B carries out net by network interface and server 120
Network communication, such as terminal 110A initiate the request that file is sent to terminal 110B to server 120.The display screen of computer equipment
It can be liquid crystal display or electric ink display screen, the input unit of computer equipment can be the touching covered on display screen
Layer is touched, the key being arranged on computer equipment shell, trace ball or Trackpad are also possible to, can also be external keyboard, touching
Control plate or mouse etc..Input unit can obtain the request or file transmission request of the transmission file of user's triggering.Display screen is available
In display specific application interface, such as the downloading interface of display file transmission.
Fig. 2 B shows the internal structure chart of computer equipment in one embodiment.The computer equipment specifically can be figure
Server 120 in 1.As shown in Figure 2 B, it includes being connected by system bus which, which includes the computer equipment,
Processor, memory, network interface.Wherein, memory includes non-volatile memory medium and built-in storage.The computer equipment
Non-volatile memory medium be stored with operating system, can also be stored with computer program, which is held by processor
When row, processor may make to realize the document transmission method in following Figure 11.Computer journey can also be stored in the built-in storage
Sequence when the computer program is executed by processor, may make processor to execute document transmission method.Terminal 110A and terminal 110B
Network communication is carried out by network interface and server 120, for example terminal 110A is received by network interface and is sent out to terminal 110B
The file sent and preservation.
It will be understood by those skilled in the art that structure shown in Fig. 2A and Fig. 2 B, only related to application scheme
Part-structure block diagram, do not constitute the restriction for the computer equipment being applied thereon to application scheme, it is specific to count
Calculating machine equipment may include perhaps combining certain components or with different portions than more or fewer components as shown in the figure
Part arrangement.
As shown in figure 3, in one embodiment, provide a kind of document transmission method, this method to be applied to such as Fig. 1 and
It is illustrated in terminal shown in Fig. 2.Include:
Step 302, second terminal obtains the conversation message that first terminal is sent, and first terminal hair is carried in conversation message
The corresponding file identification of the file sent.
On first terminal and second terminal, it is equipped with specific application, can be used for file transmission, file transmission is general to divide
For on-line normalization and offline two kinds of transmission.On-line normalization refers to first terminal when file is sent to second terminal, and second eventually
End can immediately receive the file of first terminal transmission after agreeing to receive file.And transmit offline, be second terminal without
In the case where need to agreeing to transmission immediately, first terminal can also first by file upload onto the server on preserve, work as second terminal
When needing to download, this document can be downloaded from a server again.
When first terminal sends file to second terminal by offline transmission mode, file first can be uploaded to service
Device is also believed to the off-line files server saved this file into server.After server saves this file successfully,
File identification corresponding with this file can be generated, file identification is usually unique.Then first terminal can be again to second terminal
The conversation message comprising the corresponding file identification of this file is sent, after second terminal receives this this conversation message, is represented
File is successfully uploaded to server and saved by first terminal, and second terminal needs Shi Kecong server to download this file.
Step 304, second terminal triggering session message generates file transmission request, and file transmission request is for from service
The corresponding file of device request transmission file identification.
Second terminal can be disappeared after the conversation message associated with the file for receiving first terminal transmission by triggering this session
Breath generates corresponding file transmission request, after file transmission request is successfully transmitted to server, can start transmission operation, can also
To be not understood as down operation.Server can be transmitted according to file and be requested after the file transmission request for getting second terminal
The file identification of middle carrying searches file corresponding with this file identification from database.
Step 306, when second terminal, which is detected, has direct-connected transmission channel between first terminal, then pass through server
The offline transmission channel of the multichannel of offer and the corresponding file of direct-connected transmission channel transmission file identification.
Transmission channel refers to the approach of file data transfer.Direct-connected transmission channel then refers between terminal and terminal without passing through
The transfer of server, but the file data transfer approach directly set up between each other.Second terminal is disappeared by triggering session
When breath downloads from a server file, this document is downloaded indeed through the offline transmission channel of multichannel that server provides.
But when second terminal, which is detected, has direct-connected transmission channel between first terminal, then second terminal then can be with
This document is downloaded from server by the offline transmission channel of multichannel, while can also be by direct-connected transmission channel under first terminal
This document is carried, i.e., when second terminal, which is detected, has direct-connected transmission channel between first terminal, second terminal can be simultaneously
The offline transmission channel of multichannel and direct-connected transmission channel provided by server downloads this document.Under normal circumstances, first is needed
When terminal and second terminal are held in linear state, just think that there is direct-connected transmission channel between first terminal and second terminal,
But it can also be designed to, even if first terminal is in off-line state, but as long as having between first terminal and second terminal direct-connected
Transmission channel, second terminal can also download file by the offline transmission channel of multichannel and direct-connected transmission channel simultaneously.In threadiness
When state refers to that first terminal and second terminal transmit file by specific application, if successfully logged in this specific application, made
The application account that first terminal is logged in second terminal is obtained to be online.
In this way, so that while the offline transmission channel of multichannel provided by server downloads file, also
This document can be downloaded by the direct-connected transmission channel between terminal, the resource of direct-connected transmission channel effectively be utilized, substantially
The rate for improving file transmission of degree, additionally it is possible to which the effective occupancy reduced to server bandwidth resource saves file transmission
The flow that need to be expended.
In one embodiment, the lan address of first terminal is also carried in conversation message;When second terminal according to
The lan address of first terminal detects when being in same local area network with first terminal, then second terminal and first terminal it
Between have direct-connected transmission channel.
Local area network (Local Area Network, LAN) refers in the geographic range of a part, by various calculating
Machine, external equipment and database etc. link up mutually the computer communication network of composition.It can by data communication network or specially
With data circuit, it is connected with the local area network in a distant place, database or processing center, constitutes a large range of information processing system
System.File management may be implemented in local area network, application software is shared, sharing printer, scanner are shared, the schedule peace in working group
The functions such as row, Email and facsimile service.
When first terminal sends off-line files to second terminal, file first can be uploaded to server and saved, after preservation, the
One terminal can send a conversation message to second terminal, in this conversation message other than carrying file identification, also carry
There is the lan address of first terminal.Second terminal, can be according to first carried in conversation message eventually after triggering session message
Whether the lan address of lan address detection second terminal and the lan address of first terminal at end are in same local
In net.If first terminal and second terminal are in same local area network, then exist between first terminal and second terminal
Direct-connected transmission channel based on local area network, i.e. local network transport channel, then second terminal can be provided by server simultaneously
The offline transmission channel of multichannel and local network transport channel download this document.The money in local network transport channel is effectively utilized
Source reduces the occupancy to server bandwidth resource, so that having saved file transmits the flow that need to be expended.
In one embodiment, the Bluetooth identification of first terminal is also carried in conversation message;When second terminal is according to
The Bluetooth identification of one terminal detects when passing through bluetooth connection with first terminal, then has between second terminal and first terminal straight
Even transmission channel.
Bluetooth is a kind of short-range wireless communication technique, and electronic device can be connected through bluetooth each other, be saved
Traditional electric wire is removed.Through the wireless receiver on chip, the electronic product equipped with Bluetooth technology can be in a certain distance
It inside communicates with each other, transmission speed can achieve 1 Mbytes of each second.
Second terminal receives in the conversation message of first terminal transmission, not only carries file identification, also carries first
The Bluetooth identification of terminal.Bluetooth identification corresponds to bluetooth equipment, and second terminal, can be according to first terminal after triggering session message
Bluetooth identification has searched whether to be correspondingly connected with successful bluetooth equipment in the Bluetooth pairing list of second terminal.When detecting indigo plant
Tooth match list in successful connection bluetooth equipment it is corresponding with the Bluetooth identification of first terminal success after, then illustrate first terminal and
Second terminal has successfully passed bluetooth connection, then having direct-connected transmission channel, i.e. bluetooth between first terminal and second terminal
Transmission channel.The offline transmission channel of multichannel and Bluetooth transmission channel that then second terminal can be provided by server simultaneously are downloaded
This document.Under normal circumstances, after bluetooth connection, data transmission can carry out between main equipment and other equipment at any time, therefore benefit
The occupancy to server bandwidth resource can also be effectively reduced with Bluetooth transmission channel, promotes the rate transmitted to file.
In one embodiment, when second terminal, which is detected, to be connect with first terminal by physical connection mode, then
There is direct-connected transmission channel between two terminals and first terminal.
Physical connection mode connects, and refers to such as in such a way that the physics modes such as cable, data line connect.Work as second terminal
In triggering session message, it can detecte and whether connected by physical connection mode between second terminal and first terminal, when having,
Then illustrate that there are direct-connected transmission channels between second terminal and first terminal, i.e., is made of physical connection mode successful connection
Physical transmission channel.The offline transmission channel of multichannel and physical transfer that so second terminal can be provided by server simultaneously are led to
Road transmits this document, i.e. downloading this document.File is directly transmitted by physical connection mode, without expending flow, therefore by object
Transmission channel and offline download channel common transport file are managed, the rate of file transmission is greatly improved, is decreased pair
Flow cost is saved in the consuming of flow.
In one embodiment, as shown in figure 4, the offline transmission channel of multichannel and direct-connected transmission that are provided by server are led to
Transmit the corresponding file of file identification in road, comprising:
Step 402, be retrieved as in the offline transmission channel of multichannel each of include offline downloader distribution corresponding file
The transmission speed in fragment section and each offline corresponding file fragmentation section of downloader.
Downloader refers to the program module in some transmission channel downloading files, usually can control downloading beginning,
Pause and the file extent of downloading etc..It just include multiple downloaders in the offline transmission channel of multichannel that server provides,
Therefore when terminal downloads file by the offline transmission channel of multichannel, indeed through multiple in the offline transmission channel of multichannel
Offline downloader downloads this document.And when multiple offline downloaders download a file simultaneously, it actually can be by this text
Part is divided into multiple file fragmentation sections, then the corresponding fragment section of each offline downloader, when all offline downloaders all
After the downloading for respectively completing file fragmentation section, then represents entire file download and complete.
Each offline downloader can all have corresponding transmission speed, respectively when downloading corresponding file fragmentation section
The transmission speed of a downloader can have differences.Faster, and some downloaders are due to the file point of distribution for some downloader speed
Piece section is larger to cause transmission speed slower, it is also possible to since network delay causes the downloader having downloading abnormal.In short, each
Downloader has the file fragmentation section respectively distributed and corresponding file fragmentation section transmission speed.
Step 404, by offline downloader according to the sequence in the corresponding file fragmentation section of each offline downloader distribution
It is arranged.
The file fragmentation interval combinations of each offline downloader distribution are constituted into complete file.In practice
In, in order to guarantee the integrality of file, the file fragmentation section of downloader distribution has partial section overlapping, it is therefore desirable to will be every
The corresponding file fragmentation section sequence of a offline downloader distribution, it is complete according to then being constituted after the sequence sequence of file script
File.For example, file A is divided into 10 file fragmentation sections, 3 downloaders B1, B2 and B3 are distributed to, wherein downloader B1
It is assigned with file fragmentation section 1-5, downloader B2 is assigned with file fragmentation section 3-8, and downloader B3 is assigned with file fragmentation area
Between 7-10.It can be seen that, there are the file fragmentation sections of overlapping in the file fragmentation section of downloader distribution.At this point, then need by
Downloader is arranged, and the repeating part after arrangement between B1 and B2 and B2 and B3 can be capped, and can be obtained after being arranged successively
To complete file.
Step 406, according to the corresponding file fragmentation section of downloader offline each of after arrangement distribution and to file
Transfer function is calculated in the transmission speed in fragment section.
Each offline downloader is assigned corresponding file fragmentation section, and there is size in file fragmentation section, is getting
After transmission speed when the file fragmentation section of each offline downloader downloading distribution, then under available each offline downloader
Carry corresponding transfer function when file fragmentation section.For example, downloader B1 is assigned with file fragmentation section 1-5, total size 4M,
And the transmission speed of downloader B1 is 2M/s, then when downloader B1 can be obtained downloading this document fragment section, need to expend when
Between transfer function corresponding with file fragmentation section are as follows: download time=1/2* file fragmentation section.In this way, it can obtain
When downloading corresponding file fragmentation section to each offline downloader, the time that need to be expended is corresponding with file fragmentation section
Transfer function.
The transfer function of all offline downloaders is summarized again, and according to the file fragmentation section of offline downloader distribution according to
It is secondary to arrange offline downloader, then a total transfer function can be obtained and be somebody's turn to do to get to by the offline transmission channel downloading of multichannel
The transfer function of file.
Step 408, the corresponding file fragmentation section of offline downloader where maximum time point is obtained according to transfer function.
After obtaining downloading the transfer function of this document by the offline transmission channel of multichannel, it can be obtained according to this transfer function
Maximum time point, maximum time point determine when downloading this document by the offline transmission channel of multichannel, need to finally expend when
Between.Therefore corresponding downloader can be found according to maximum time point in transfer function, it is available further according to corresponding downloader
The corresponding file fragmentation section of downloader distribution.
Step 410, file corresponding with maximum time point is transmitted by direct-connected transmission channel and the offline transmission channel of multichannel
Fragment section.
Due to maximum time point determine need to finally be expended when transmitting this document by the offline transmission channel of multichannel when
Between, therefore after finding corresponding file fragmentation section according to maximum time point, in order to reduce the time that transmission need to expend, then
It needs to find maximum time point corresponding file fragmentation section and carries out sub-distribution again, use the direct-connected transmission channel being newly added
Corresponding file fragmentation section is found with offline downloader common transport this maximum time point distributed before, to maximum time
The sub-distribution again in the corresponding file fragmentation section of point is directly effectively reduced the transmission time to entire file, improves file
The rate of transmission.
In one embodiment, it is transmitted by direct-connected transmission channel with the offline transmission channel of multichannel corresponding with maximum time point
File fragmentation section, comprising: obtain to the Preset Transfer velocity amplitude of direct-connected transmission channel;Obtain maximum time point where from
The transmission speed of line downloader;According to the Preset Transfer velocity amplitude of direct channel and the offline downloader where maximum time point
Transmission speed ratio is calculated in transmission speed;By transmission speed ratio respectively from direct-connected transmission channel and maximum time point institute
Offline downloader obtain file fragmentation corresponding with maximum time point section.
The historical speed for the download channel that the Preset Transfer velocity amplitude of direct-connected transmission channel uses before can getting, if not having
There is historical speed, then can rule of thumb set the Preset Transfer velocity amplitude of direct-connected transmission channel.When being passed offline according to multichannel
After the transfer function of defeated channel transfer this document obtains maximum time point, can find it is corresponding with the maximum time point it is offline under
Carry device.And each offline downloader has corresponding transmission speed, therefore can be according to the Preset Transfer speed of direct-connected transmission channel
Transmission speed ratio is calculated in the transmission speed of offline downloader where value and the maximum time point.Further according to transmission speed
The corresponding downloader of direct-connected transmission channel and the maximum are distributed in file fragmentation corresponding with maximum time point section by ratio
Offline downloader where time point.
File fragmentation section is distributed according to transmission speed, rather than direct mean allocation can maximally utilize downloader
Resource, the rate of the cooperation of offline download channel and direct channel transmission file is significantly promoted, transmission is reduced
Time saves the time cost of file transmission.
In one embodiment, as shown in figure 5, providing a kind of document transmission method, this method to be applied to such as Fig. 1 and
It is illustrated in terminal shown in Fig. 2.Method includes:
Step 502, second terminal obtains the conversation message corresponding with transmission file that first terminal is sent.
When first terminal sends off-line files to second terminal, file first can be uploaded to server and protected by first terminal
It deposits, file is alternatively referred to as uploaded to off-line files server and is saved.But it in order to avoid file repeats to upload, can be uploaded in file
Before, MD5 algorithm is carried out to the content of file and corresponding MD5 value, i.e. a kind of cryptographic Hash (hash) of file is calculated.Due to
MD5 value is to be calculated according to the content of file, therefore the MD5 value of the file of same content is the same, then in file
It is uploaded to before off-line files server, can search whether consistent MD5 from off-line files server according to the MD5 value of file
Value, if so, then illustrate to be stored with this file on off-line files server, then without uploading again, it can be direct
It realizes " second biography ";If it is not, illustrating that, there is no this file on off-line files server, file is needed to upload, then normally opened
Dynamic upload operation.
After file is uploaded to off-line files server, off-line files server can provide a file for each file
It identifies (UUID), off-line files server can search corresponding file according to file identification.It is to be understood that being not same
The UUID of file is the same, but distributes a UUID according to uploading each time, therefore UUID is unique.For example, when eventually
When A being held to send off-line files Q to terminal B, if inquired according to the MD5 value of file Q stored on off-line files server
There is file Q, then then " second biography " can be achieved in file Q, at this moment off-line files server still can provide one for this file Q
New UUID;If according to the MD5 value of file Q inquire it is not stored on off-line files server have a file Q, on file Q need
It passes, off-line files server provides unique UUID for file Q after upload, and then first terminal retransmits one and carries this
The conversation message of the UUID of file Q is to second terminal.Therefore, repeatedly send the file of identical content, can also can be regarded as it is different from
Line file, their UUID are different, but the MD5 value of the file of identical content is identical.
In addition, this file can be added to first terminal after first terminal has sent off-line files to second terminal
Accelerate in queue.Accelerating queue is a list of sender's maintenance, after sender sends an off-line files, can be incited somebody to action
The relevant information (such as the path of this file in the terminal, off-line files UUID etc.) of this off-line files is added to this
In list.It, can be by accelerating to take in queue when having direct-connected transmission channel between the second terminal of recipient and first terminal
Relevant information out, to directly acquire file from first terminal.
Timing diagram as shown in FIG. 6, sender can trigger the operation of transmission first, file then be read, by file
Hold the MD5 value that file is calculated, then sends the request for carrying the upper transmitting file of MD5 value to off-line files server.Offline
After file server gets MD5 value, the file that will there is user to upload identical content before being searched whether according to MD5 value, i.e.,
Whether it is stored on off-line files server and this identical file of MD5 value.If it has not, then returning to the notice of " file is not present "
To sender, sender can start upper transmitting file, and file returns again to the corresponding UUID of file to sender after uploading successfully;Such as
Have, then directly returns to the corresponding UUID of file to sender.Then sender sends one and carries the corresponding UUID's of file
Conversation message is to recipient, while file is added accelerates in queue again by sender, to use when recipient's subsequent download.
Step 504, second terminal triggering session message downloads file.
Second terminal can pass through triggering session after receiving the conversation message corresponding with transmission file of first terminal transmission
Message generates file transmission request, to start to download file.File identification, i.e. UUID are carried in this conversation message, when
Two terminal triggering session message generate file transmission request Concurrency when sending to server, that is, when being sent to off-line files server,
Off-line files server can transmit the file UUID carried in request according to file and search whether corresponding file.Off-line files
Server may be provided with the file expiration time, for example the validity period of setting file is 7 days, when second terminal has been more than that 7 talentes open
When beginning to download this document, then off-line files server automatically deletes this document, then on off-line files server then not
It can be stored with file corresponding with file UUID, second terminal can not also download this document again.Corresponding file has such as been found,
The offline transmission channel of multichannel that then second terminal can be provided by off-line files server downloads this document.
Step 506, second terminal detects whether there is direct-connected transmission channel between first terminal, if so, executing step
Rapid 508;If it is not, thening follow the steps 510.
Direct-connected transmission channel refers to without the transfer by router or server between terminal and terminal, but between each other
The file data transfer approach directly set up.Between first terminal and second terminal, there is direct-connected transmission channel at least
Three kinds of situations below:
Situation one: first terminal and second terminal are located in the same local area network.
Second terminal can be detected whether with first eventually by the lan address of the first terminal carried in conversation message
End is located in the same local area network, if so, then there is the direct-connected biography based on local area network so between first terminal and second terminal
Defeated channel, i.e. local network transport channel.
Situation two: first terminal and second terminal pass through bluetooth connection.
Second terminal can be detected whether and first terminal by the Bluetooth identification of the first terminal carried in conversation message
Pass through bluetooth connection.Second terminal can be matched according to the Bluetooth identification of first terminal with the bluetooth equipment having connect, when
When the corresponding Bluetooth identification of the bluetooth equipment connected is consistent with the Bluetooth identification of first terminal, then second terminal is illustrated
Pass through bluetooth connection success with first terminal.Then there is the direct-connected transmission based on bluetooth so between first terminal and second terminal
Channel, i.e. Bluetooth transmission channel.
Situation three: first terminal is connect with second terminal with by physics mode.
It can be connected by physics modes such as data line, cables between two terminals.After successful connection, between two terminals
Then there are the transmission channels generated based on physics mode connection, i.e. physical transmission channel.
In three cases above, arbitrarily meet a kind of it is considered that having between first terminal and second terminal direct-connected
Transmission channel, but during general practice, it can consider the condition whether online along with first terminal, that is, need when first
When terminal is also at presence, second terminal just can be simultaneously by existing between the offline transmission channel of multichannel and first terminal
Direct-connected transmission channel downloads file.But this condition whether need exist then by the design of developer or product depending on because
If second terminal also can download file by direct-connected transmission channel when first terminal is in off-line state, first terminal can be occupied
Memory etc., the resource of first terminal can be consumed.If but actual demand need to be designed as it is more flexible, may be designed as first eventually
End is in off-line state, i.e. first terminal is not online, and second terminal can also download file by direct-connected transmission channel.Herein
When linear state refers to first terminal and second terminal by specific application transmission file, if successfully logged in this and specific answered
With so that the application account that first terminal is logged in second terminal is online, such as when first terminal and second terminal
It is when carrying out file transmission by some specific instant messaging application, then first terminal then refers to that first terminal is successfully stepped on online
The instant messaging application is recorded.
Step 508, second terminal downloads file by the offline transmission channel of multichannel and direct-connected transmission channel.
File transmission as shown in Figure 7 flows to schematic diagram, when at least there are above-mentioned between first terminal and second terminal
When the direct-connected transmission channel of one of three kinds of situations, second terminal when downloading file can by the offline transmission channel of multichannel
This document is downloaded simultaneously with direct-connected transmission channel.It is from off-line files server when downloading file by the offline transmission channel of multichannel
Upper downloading, and by direct-connected transmission channel from first terminal download file when, then can according to file identification (UUID) from first eventually
Relevant information is taken out in the acceleration queue at end, to download corresponding file.
In downloading, by then passing through two channel downloading same files, then there are problems that file distribution.From logic
One file can be regarded as multiple file fragmentation section compositions by upper understanding, then when downloading file by channel, it is practical
On be that a part of file fragmentation section is downloaded in each channel, the file fragmentation section respectively distributed is downloaded when channel and is finished
When, then complete the downloading of file jointly for multiple channels.
Multiple offline downloaders are contained in the offline transmission channel of multichannel that off-line files server provides, therefore are worked as and passed through
When the offline transmission channel of multichannel downloads file, actually multiple offline downloaders are in the file fragmentation area for downloading each distribution
Between, for direct-connected transmission channel, and so.But since direct-connected transmission channel is not multi-path download under normal circumstances
, it may only include a downloader, therefore can directly think the corresponding direct-connected downloader of direct-connected transmission channel.However,
Network environment is complicated and changeable, and the transmission speed of different download channels is different, i.e. the offline transmission channel of multichannel and direct-connected transmission is logical
The transmission speed in road can be variant, therefore the offline transmission channel of multichannel is being distributed in the corresponding multiple file fragmentation sections of file
With direct-connected transmission channel, i.e., multiple offline downloaders and direct-connected downloader are distributed into the corresponding multiple file fragmentation sections of file
When, if simply multiple file fragmentation sections are distributed equally, that is apparently not an optimal solution.
As shown in Figure 8 A, t (n) function can be introduced in order to facilitate understanding.Wherein set downloading file size as
20MB (one of computer store unit, pronounce " million "), independent variable n indicate n-th of file fragmentation section, and t (n) indicates the
N file fragmentation section is downloaded the time of completion, then when the max value of t (n) then indicates that entire file is completed by real downloading
The time that need to be expended.Because must all files fragment section be downloaded and finish, just it is believed that file is really to have been downloaded
Complete, therefore time-consuming maximum file fragmentation section determines the time that need to be expended when downloading entire file.The quantity of downloader,
The file fragmentation section of downloader distribution and the speed of downloader etc. determine that t (n) function completes the image of downloading file.It is false
If only file is downloaded by the offline transmission channel of multichannel, and the speed of downloader is stable in 1MB/s, then the figure of t (n) function
As then as shown in Figure 8 A.
At this point, the direct-connected downloader of direct-connected transmission channel is added in downloading queue again, it is assumed that the biography of direct-connected downloader
File fragmentation section is also evenly distributed to multiple offline downloaders and direct-connected downloader, then can obtained by defeated velocity-stabilization in 3MB/s
To t (n) function as shown in Figure 8 B.Obviously, it can be seen that from Fig. 8 B, download time does not obtain good effect of optimization.Cause
This, proposes file fragmentation section according to the strategy of the transmission speed pro rate of downloader.It will the corresponding text of maximum time point
Part fragment section is redistributed, according to the biography of the corresponding offline downloader of maximum time point and the direct-connected downloader being newly added
Defeated speed proportional is allocated.
Specifically, as shown in Figure 9 A, it is assumed that comprising there are two offline downloader, transmission speeds in the offline transmission channel of multichannel
Respectively 2MB/s and 3MB/s.The transmission speed of the corresponding direct-connected downloader of the direct-connected transmission channel of this stylish addition is 2MB/s,
So will be after the corresponding file fragmentation section of maximum time point redistributed, the image of transfer function be then become by Fig. 9 A
Fig. 9 B, it is evident that download time is obviously shortened, overall transfer speed is accelerated.
Step 510, second terminal downloads file by the offline transmission channel of multichannel.
When not having direct-connected transmission channel between second terminal and first terminal, then second terminal can only pass through offline text
The offline transmission channel of multichannel that part server provides downloads this document.
It, can be by the corresponding MD5 of file of second terminal downloading when confirming whether second terminal has completely downloaded this document
The MD5 value of the respective file stored in value and off-line files server compares, and when the two is identical, then represents second terminal
This document has completely been downloaded.It takes while by under the offline transmission channel of multichannel of server offer and local network transport channel
The mode for carrying this document, is effectively utilized the resource in local network transport channel, reduces the occupancy to server bandwidth resource,
The flow that need to be expended is transmitted to save file.
Document transmission method provided by the embodiment of the present invention is suitable for specific instant messaging application.To be specifically
When communications applications be illustrated as application scenarios.It can initiate to transmit in line file by this specific instant messaging application
Business or offline file transmission business, online Record Carrier refer to that on-line normalization refers to that first terminal is sent by file
When to second terminal, second terminal can immediately receive the file of first terminal transmission after agreeing to receive file.And offline text
Part transmission services then refer to that file is first uploaded to off-line files server by the sender of file, then by this document in offline text
Corresponding file identification is sent to the recipient of file on part server.Recipient identifies according to this document from off-line files service
Device downloads the file of this document.
As shown in Figure 10, when having direct-connected transmission channel between sender and recipient, in the application interface of recipient
On can show that the prompt of " receiving acceleration " then illustrates that recipient opens after reciever clicks the prompt options of " receiving acceleration "
The acceleration mode of direct-connected transmission channel is opened, recipient can be simultaneously by under the offline transmission channel of multichannel and direct-connected transmission channel
Carry this document.It can also show that prompts such as " both sides are your speed-raising on consolidated network: 3MB/s " are used on the application interface of recipient
Language.The recipient of file not can only one.Such as file is sent to discussion group or group by sender, then discussion group and
User in group can be recipient.
In one embodiment, as shown in figure 11, a kind of document transmission method is additionally provided, this method is to be applied to as schemed
1 and terminal shown in Fig. 2 in be illustrated.This method comprises:
Step 1102, file and the preservation that first terminal is sent to second terminal are received.
When first terminal sends off-line files to second terminal, file first can be uploaded to server and saved, i.e., by file
It is uploaded to off-line files server.It, can be first after off-line files server receives the file that first terminal is sent to second terminal
File is saved, then generates unique file identification for this document, file identification and file correspond.But in preservation
Before, whether off-line files server actually can first obtain the MD5 value of this file, then search and store on off-line files server
There is the identical file with MD5 value, if any, then it does not need again to upload this file, but can realize " second biography ", regenerate one
Unique respective file mark.Then first terminal can send a session for carrying file identification to second terminal and disappear
Breath.
Step 1104, it receives the file that second terminal is initiated and transmits request, request is transmitted according to file and is established with second eventually
The offline transmission channel of multichannel between end, the offline transmission channel of multichannel are used for direct-connected when having between first terminal and second terminal
When transmission channel, with direct-connected transmission channel common transport file to second terminal.
Second terminal receive first terminal transmission carry the conversation message of file identification after, triggerable session disappears
Breath generates corresponding file transmission request.After receiving the file transmission request of second terminal initiation, off-line files server
File corresponding with file identification is then searched according to the file identification carried in file transmission request, and is transmitted offline by multichannel
Channel transmits this file to second terminal.When having direct-connected transmission channel between first terminal and second terminal, then pass through
The offline transmission channel of multichannel and direct-connected transmission channel are by file common transport to second terminal.
In this way, so that while the offline transmission channel of multichannel provided by server transmits file, also
This document can be transmitted by the direct-connected transmission channel between terminal, the resource of direct-connected transmission channel effectively be utilized, substantially
The rate for improving file transmission of degree, additionally it is possible to which the effective occupancy reduced to server bandwidth resource saves file transmission
The flow that need to be expended.
In one embodiment, direct-connected transmission channel includes that the local network transport between first terminal and second terminal is logical
At least one of road, Bluetooth transmission channel and physical connection transmission channel.
Direct-connected transmission channel refers to without the transfer by router or server between terminal and terminal, but between each other
The file data transfer approach directly set up.It is any in following three kinds of situations when meeting between first terminal and second terminal
When a kind of, all illustrate that there is direct-connected transmission channel between first terminal and second terminal:
1, when first terminal sends off-line files to second terminal, file first can be uploaded to off-line files server, when
After uploading successfully, the conversation message for carrying the corresponding file identification of this document can be sent to second terminal.The conversation message
In also carry the lan address of first terminal, when second terminal passes through the local area network of the first terminal carried in conversation message
Address detected is based on to when being located in the same local area network with first terminal then then existing between first terminal and second terminal
The direct-connected transmission channel of local area network, i.e. local network transport channel.
2, second terminal is detected by the Bluetooth identification of the first terminal carried in conversation message and is passed through with first terminal
When bluetooth connection, then illustrate there is the direct-connected transmission channel based on bluetooth, i.e. Bluetooth transmission between first terminal and second terminal
Channel.
3, when between first terminal and second terminal by physics modes successful connections such as data line, cables, then first eventually
There are the transmission channels generated based on physics mode connection, i.e. physical transmission channel between end and second terminal.
Effectively using it is various may be direct-connected transmission channel the case where, in conjunction with offline download channel common transport file,
The rate of file transmission can be greatly improved, additionally it is possible to which the effective occupancy reduced to server bandwidth resource saves text
Part transmits the flow that need to be expended.
As shown in figure 12, in one embodiment, a kind of file transfer means are additionally provided, which includes:
Conversation message obtains module 1202, obtains the conversation message that first terminal is sent, conversation message for second terminal
In carry first terminal transmission the corresponding file identification of file.
Transmission request generation module 1204, is used for second terminal triggering session message, generates file transmission request, and file passes
Defeated request is for requesting the corresponding file of transmission file identification from server.
Document transmission module 1206, for there is direct-connected transmission channel between first terminal when second terminal is detected
When, then the offline transmission channel of multichannel and direct-connected transmission channel provided by server transmits the corresponding file of file identification.
In one embodiment, above-mentioned conversation message obtains in the conversation message that module 1202 is got and also carries first
The lan address of terminal.Above-mentioned apparatus further includes direct-connected transmission channel detection module (not shown), for working as second eventually
End detects according to the lan address of first terminal when being in same local area network with first terminal, then second terminal and first
There is direct-connected transmission channel between terminal.
In one embodiment, above-mentioned conversation message obtains in the conversation message that module 1202 is got and also carries first
The Bluetooth identification of terminal.Above-mentioned direct-connected transmission channel detection module is also used to, when second terminal is according to the bluetooth mark of first terminal
Knowledge detects when passing through bluetooth connection with first terminal then there is direct-connected transmission channel between second terminal and first terminal.
In one embodiment, above-mentioned direct-connected transmission channel detection module is also used to, when second terminal detects and first
When terminal is connected by physical connection mode, then there is direct-connected transmission channel between second terminal and first terminal.
In one embodiment, above-mentioned document transmission module 1206 is also used to, and is retrieved as wrapping in the offline transmission channel of multichannel
The corresponding file fragmentation section for each of containing offline downloader distribution and each offline downloader are to corresponding file fragmentation
The transmission speed in section;By offline downloader according to the corresponding file fragmentation section of each offline downloader distribution sequence into
Row arrangement;According to the corresponding file fragmentation section of downloader offline each of after arrangement distribution and to file fragmentation section
Transfer function is calculated in transmission speed;The corresponding file of offline downloader where maximum time point is obtained according to transfer function
Fragment section;File fragmentation corresponding with maximum time point area is downloaded by direct-connected transmission channel and the offline transmission channel of multichannel
Between.
In one embodiment, above-mentioned document transmission module 1206 is also used to, and obtains the default biography to direct-connected transmission channel
Defeated velocity amplitude;Obtain the transmission speed of the offline downloader where maximum time point;According to the Preset Transfer speed of direct channel
Transmission speed ratio is calculated in the transmission speed of offline downloader where value and maximum time point;Pass through transmission speed ratio
File fragmentation corresponding with maximum time point is obtained from the offline downloader where direct-connected transmission channel and maximum time point respectively
Section.
As shown in figure 13, in one embodiment, a kind of file transfer means are additionally provided, which includes:
Preserving module 1302, for receiving the file and preservation that first terminal is sent to second terminal.
Transmission module 1304 is transmitted request according to file and is established and second for receiving the transmission request of second terminal file
The offline transmission channel of multichannel between terminal, the offline transmission channel of multichannel are used for straight when having between first terminal and second terminal
Even when transmission channel, with direct-connected transmission channel common transport file to second terminal.
In one embodiment, above-mentioned direct-connected transmission channel includes the local network transport between first terminal and second terminal
At least one of channel, Bluetooth transmission channel and physical connection transmission channel.
In one embodiment, a kind of computer readable storage medium is additionally provided, computer program is stored thereon with, it should
Second terminal is performed the steps of when program is executed by processor and obtains the conversation message that first terminal is sent, in conversation message
Carry the corresponding file identification of file of first terminal transmission;Second terminal triggering session message generates file transmission request,
File transmission request is for requesting the corresponding file of transmission file identification from server;When second terminal detects and first terminal
Between have direct-connected transmission channel when, then pass through server provide the offline transmission channel of multichannel and direct-connected transmission channel transmission text
Part identifies corresponding file.
In one embodiment, is also carried when computer program is executed by processor above-mentioned steps, in conversation message
The lan address of one terminal;It is in same with first terminal when second terminal is detected according to the lan address of first terminal
When in local area network, then there is direct-connected transmission channel between second terminal and first terminal.
In one embodiment, is also carried when computer program is executed by processor above-mentioned steps, in conversation message
The Bluetooth identification of one terminal;Pass through bluetooth connection with first terminal when second terminal is detected according to the Bluetooth identification of first terminal
When, then there is direct-connected transmission channel between second terminal and first terminal.
In one embodiment, when computer program is executed by processor above-mentioned steps, when second terminal detects and the
When one terminal is connected by physical connection mode, then there is direct-connected transmission channel between second terminal and first terminal.
In one embodiment, computer program is executed by processor the offline transmission channel of multichannel provided by server
And when with the step of the corresponding file of direct-connected transmission channel transmission file identification, comprising: be retrieved as in the offline transmission channel of multichannel
The corresponding file fragmentation section for each of including offline downloader distribution and each offline downloader are to corresponding file point
The transmission speed in piece section;By offline downloader according to the sequence in the corresponding file fragmentation section of each offline downloader distribution
It is arranged;According to the corresponding file fragmentation section of downloader offline each of after arrangement distribution and to file fragmentation section
Transmission speed transfer function is calculated;The corresponding text of offline downloader where maximum time point is obtained according to transfer function
Part fragment section;File fragmentation corresponding with maximum time point area is transmitted by direct-connected transmission channel and the offline transmission channel of multichannel
Between.
In one embodiment, computer program is executed by processor to transmit offline by direct-connected transmission channel and multichannel and lead to
When road transmits the step in file fragmentation corresponding with maximum time point section, comprising: obtain the default biography to direct-connected transmission channel
Defeated velocity amplitude;Obtain the transmission speed of the offline downloader where maximum time point;According to the Preset Transfer speed of direct channel
Transmission speed ratio is calculated in the transmission speed of offline downloader where value and maximum time point;Pass through transmission speed ratio
File fragmentation corresponding with maximum time point is obtained from the offline downloader where direct-connected transmission channel and maximum time point respectively
Section.
In one embodiment, a kind of computer readable storage medium is additionally provided, computer program is stored thereon with, it should
The file and preservation for receiving that first terminal is sent to second terminal are performed the steps of when program is executed by processor;Receive the
The file transmission request that two terminals are initiated transmits request and establishes to transmit offline the multichannel between second terminal and leads to according to file
Road, the offline transmission channel of multichannel are used for when having direct-connected transmission channel between first terminal and second terminal, with direct-connected transmission
Channel common transport file is to second terminal.
In one embodiment, direct-connected transmission channel includes first terminal and second when computer program is executed by processor
At least one of local network transport channel, Bluetooth transmission channel and physical connection transmission channel between terminal.
Although should be understood that above-described embodiment in flow diagram in each step according to arrow instruction according to
Secondary display, but these steps are not that the inevitable sequence according to arrow instruction successively executes.Unless having herein explicitly
Bright, there is no stringent sequences to limit for the execution of these steps, these steps can execute in other order.Moreover, in figure
At least part step may include multiple sub-steps perhaps these sub-steps of multiple stages or stage be not necessarily
Synchronization executes completion, but can execute at different times, and the execution sequence in these sub-steps or stage also need not
Be so successively carry out, but can at least part of the sub-step or stage of other steps or other steps in turn or
Person alternately executes.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read
In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, provided herein
Each embodiment used in any reference to memory, storage, database or other media, may each comprise non-volatile
And/or volatile memory.Nonvolatile memory may include that read-only memory (ROM), programming ROM (PROM), electricity can be compiled
Journey ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include random access memory
(RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, such as static state RAM
(SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhanced SDRAM
(ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) directly RAM (RDRAM), straight
Connect memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application
Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (12)
1. a kind of document transmission method, which comprises
Second terminal obtains the conversation message that the first terminal is sent, and the first terminal hair is carried in the conversation message
The corresponding file identification of the file sent;
The second terminal triggers the conversation message, generates file transmission request, and the file transmission request is for from service
The corresponding file of the file identification is transmitted in device request;
When the second terminal, which is detected, has direct-connected transmission channel between the first terminal, then pass through the server
The offline transmission channel of the multichannel of offer and the direct-connected transmission channel transmit the corresponding file of the file identification.
2. the method according to claim 1, wherein also carrying the first terminal in the conversation message
Lan address;It is in when the second terminal is detected according to the lan address of the first terminal with the first terminal
When in same local area network, then there is direct-connected transmission channel between the second terminal and the first terminal.
3. the method according to claim 1, wherein also carrying the bluetooth of first terminal in the conversation message
Mark;Pass through bluetooth connection with the first terminal when the second terminal is detected according to the Bluetooth identification of the first terminal
When, then there is direct-connected transmission channel between the second terminal and the first terminal.
4. the method according to claim 1, wherein leading to when the second terminal is detected with the first terminal
When crossing physical connection mode and connecting, then there is direct-connected transmission channel between the second terminal and the first terminal.
5. the method according to claim 1, wherein the multichannel provided by the server is transmitted offline
Channel and the corresponding file of the file identification is transmitted with the direct-connected transmission channel, comprising:
Be retrieved as in the offline transmission channel of the multichannel each of include offline downloader distribution corresponding file fragmentation section
And each offline downloader is to the transmission speed in the corresponding file fragmentation section;
Offline downloader is arranged according to the sequence in the corresponding file fragmentation section of each offline downloader distribution;
According to the corresponding file fragmentation section of each offline downloader distribution after arrangement and to the file fragmentation
Transfer function is calculated in the transmission speed in section;
The corresponding file fragmentation section of offline downloader where maximum time point is obtained according to the transfer function;
The file corresponding with maximum time point is transmitted by the direct-connected transmission channel and the offline transmission channel of the multichannel
Fragment section.
6. according to the method described in claim 5, it is characterized in that, it is described by the direct-connected transmission channel and the multichannel from
Line transmission channel transmits file fragmentation corresponding with the maximum time point section, comprising:
Obtain the Preset Transfer velocity amplitude to the direct-connected transmission channel;
Obtain the transmission speed of the offline downloader where the maximum time point;
The transmission speed of offline downloader where the Preset Transfer velocity amplitude of the direct channel and the maximum time point
Transmission speed ratio is calculated in degree;
By the transmission speed ratio respectively from the offline downloading where the direct-connected transmission channel and maximum time point
Device obtains file fragmentation section corresponding with the maximum time point.
7. a kind of document transmission method, which comprises
Receive the file that first terminal is sent to second terminal and preservation;
It receives the file that second terminal is initiated and transmits request, request is transmitted according to the file and is established between the second terminal
The offline transmission channel of multichannel, the offline transmission channel of multichannel is used for straight when having between the first terminal and second terminal
Even when transmission channel, with file described in the direct-connected transmission channel common transport to the second terminal.
8. the method according to the description of claim 7 is characterized in that the direct-connected transmission channel includes that first terminal and second are whole
At least one of local network transport channel, Bluetooth transmission channel and physical connection transmission channel between end.
9. a kind of file transfer means, which is characterized in that described device includes:
Conversation message obtains module, obtains the conversation message that the first terminal is sent, the conversation message for second terminal
In carry the corresponding file identification of file that the first terminal is sent;
Transmission request generation module, triggers the conversation message for the second terminal, generates file transmission request, the text
Part transmission request is for transmitting the corresponding file of the file identification from server request;
Document transmission module, for there is direct-connected transmission channel between the first terminal when the second terminal is detected
When, then the offline transmission channel of the multichannel provided by the server and the direct-connected transmission channel transmit the file identification pair
The file answered.
10. a kind of file transfer means, which is characterized in that described device includes:
Preserving module, for receiving the file and preservation that first terminal is sent to second terminal;
Transmission module is transmitted request according to the file and is established and described second for receiving the transmission request of second terminal file
The offline transmission channel of multichannel between terminal, the offline transmission channel of multichannel be used for when the first terminal and second terminal it
Between when there is direct-connected transmission channel, with file described in the direct-connected transmission channel common transport to the second terminal.
11. a kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor,
So that the processor is executed such as the step of any one of claims 1 to 8 the method.
12. a kind of computer equipment, including memory and processor, the memory is stored with computer program, the calculating
When machine program is executed by the processor, so that the processor executes the step such as any one of claims 1 to 8 the method
Suddenly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810016688.0A CN110022329B (en) | 2018-01-08 | 2018-01-08 | File transmission method and device, computer readable storage medium and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810016688.0A CN110022329B (en) | 2018-01-08 | 2018-01-08 | File transmission method and device, computer readable storage medium and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110022329A true CN110022329A (en) | 2019-07-16 |
CN110022329B CN110022329B (en) | 2022-03-11 |
Family
ID=67187628
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810016688.0A Active CN110022329B (en) | 2018-01-08 | 2018-01-08 | File transmission method and device, computer readable storage medium and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110022329B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112491976A (en) * | 2020-11-11 | 2021-03-12 | 京东数字科技控股股份有限公司 | File transmission method, device, server and storage medium |
WO2021073313A1 (en) * | 2019-10-16 | 2021-04-22 | 中兴通讯股份有限公司 | Method and device for conference control and conference participation, server, terminal, and storage medium |
CN112968935A (en) * | 2021-01-29 | 2021-06-15 | 北京字跳网络技术有限公司 | Data transmission method, device, terminal and storage medium |
CN114466001A (en) * | 2021-12-27 | 2022-05-10 | 格美安(北京)信息技术有限公司 | File transmission method, storage medium and system based on file subpackage |
WO2024027272A1 (en) * | 2022-08-03 | 2024-02-08 | 腾讯科技(深圳)有限公司 | Multimedia resource transmission method and apparatus, electronic device, and storage medium |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101047511A (en) * | 2006-03-27 | 2007-10-03 | 腾讯科技(深圳)有限公司 | File transmission method and system |
CN101277276A (en) * | 2008-04-23 | 2008-10-01 | 腾讯科技(深圳)有限公司 | Method and system for transmission of off-line image |
CN101465824A (en) * | 2008-12-29 | 2009-06-24 | 腾讯科技(深圳)有限公司 | Multi-source transmission system and method for instant communication file |
US20110060721A1 (en) * | 2009-08-10 | 2011-03-10 | Vuze, Inc. | Offline downloader |
CN102355426A (en) * | 2011-06-30 | 2012-02-15 | 北京神州泰岳软件股份有限公司 | Method for transmitting off-line file and system |
CN103024593A (en) * | 2012-12-26 | 2013-04-03 | 人民搜索网络股份公司 | Online VOD (video on demand) acceleration system and online VOD playing method |
CN103139241A (en) * | 2011-11-24 | 2013-06-05 | 腾讯科技(深圳)有限公司 | Off-line download system and method for network resource files |
CN103248695A (en) * | 2013-05-07 | 2013-08-14 | 北京奇虎科技有限公司 | File downloading method and system and server node in CDN |
CN103516584A (en) * | 2012-06-28 | 2014-01-15 | 北京奇虎科技有限公司 | Method and device for transmitting file in instant messaging |
CN103634936A (en) * | 2013-11-21 | 2014-03-12 | 武汉极讯软件有限责任公司 | File downloading method, device and system |
CN104320417A (en) * | 2014-11-06 | 2015-01-28 | 北京安奇智联科技有限公司 | Method for interconnection and stream transmission and stream media play between mobile terminal and web terminal |
CN107317828A (en) * | 2016-04-26 | 2017-11-03 | 腾讯科技(深圳)有限公司 | Document down loading method and device |
CN107547484A (en) * | 2016-06-29 | 2018-01-05 | 上海连尚网络科技有限公司 | Message obtains, method, equipment and the system of push |
-
2018
- 2018-01-08 CN CN201810016688.0A patent/CN110022329B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101047511A (en) * | 2006-03-27 | 2007-10-03 | 腾讯科技(深圳)有限公司 | File transmission method and system |
CN101277276A (en) * | 2008-04-23 | 2008-10-01 | 腾讯科技(深圳)有限公司 | Method and system for transmission of off-line image |
CN101465824A (en) * | 2008-12-29 | 2009-06-24 | 腾讯科技(深圳)有限公司 | Multi-source transmission system and method for instant communication file |
US20110060721A1 (en) * | 2009-08-10 | 2011-03-10 | Vuze, Inc. | Offline downloader |
CN102355426A (en) * | 2011-06-30 | 2012-02-15 | 北京神州泰岳软件股份有限公司 | Method for transmitting off-line file and system |
CN103139241A (en) * | 2011-11-24 | 2013-06-05 | 腾讯科技(深圳)有限公司 | Off-line download system and method for network resource files |
CN103516584A (en) * | 2012-06-28 | 2014-01-15 | 北京奇虎科技有限公司 | Method and device for transmitting file in instant messaging |
CN103024593A (en) * | 2012-12-26 | 2013-04-03 | 人民搜索网络股份公司 | Online VOD (video on demand) acceleration system and online VOD playing method |
CN103248695A (en) * | 2013-05-07 | 2013-08-14 | 北京奇虎科技有限公司 | File downloading method and system and server node in CDN |
CN103634936A (en) * | 2013-11-21 | 2014-03-12 | 武汉极讯软件有限责任公司 | File downloading method, device and system |
CN104320417A (en) * | 2014-11-06 | 2015-01-28 | 北京安奇智联科技有限公司 | Method for interconnection and stream transmission and stream media play between mobile terminal and web terminal |
CN107317828A (en) * | 2016-04-26 | 2017-11-03 | 腾讯科技(深圳)有限公司 | Document down loading method and device |
CN107547484A (en) * | 2016-06-29 | 2018-01-05 | 上海连尚网络科技有限公司 | Message obtains, method, equipment and the system of push |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021073313A1 (en) * | 2019-10-16 | 2021-04-22 | 中兴通讯股份有限公司 | Method and device for conference control and conference participation, server, terminal, and storage medium |
US20220303319A1 (en) * | 2019-10-16 | 2022-09-22 | Zte Corporation | Method and device for conference control and conference participation, server, terminal, and storage medium |
US11838338B2 (en) * | 2019-10-16 | 2023-12-05 | Xi'an Zhongxing New Software Co., Ltd. | Method and device for conference control and conference participation, server, terminal, and storage medium |
CN112491976A (en) * | 2020-11-11 | 2021-03-12 | 京东数字科技控股股份有限公司 | File transmission method, device, server and storage medium |
CN112968935A (en) * | 2021-01-29 | 2021-06-15 | 北京字跳网络技术有限公司 | Data transmission method, device, terminal and storage medium |
CN112968935B (en) * | 2021-01-29 | 2023-02-17 | 北京字跳网络技术有限公司 | Data transmission method, device, terminal and storage medium |
CN114466001A (en) * | 2021-12-27 | 2022-05-10 | 格美安(北京)信息技术有限公司 | File transmission method, storage medium and system based on file subpackage |
WO2024027272A1 (en) * | 2022-08-03 | 2024-02-08 | 腾讯科技(深圳)有限公司 | Multimedia resource transmission method and apparatus, electronic device, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110022329B (en) | 2022-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110022329A (en) | Document transmission method, device, computer readable storage medium and computer equipment | |
CN108123800B (en) | Key management method, key management device, computer equipment and storage medium | |
CN109639828B (en) | Session message processing method and device | |
CN109347835A (en) | Information transferring method, client, server and computer readable storage medium | |
CN113347206B (en) | Network access method and device | |
CN108989848B (en) | Video resource file acquisition method and management system | |
CN108833521A (en) | Information push method, device, system, computer equipment and storage medium | |
CN109347637B (en) | Authentication method, Content Delivery Network (CDN) and content server | |
CN111163130B (en) | Network service system and data transmission method thereof | |
US10462122B2 (en) | Push notification aggregation | |
US20160021035A1 (en) | Creating a user group | |
CN106533932A (en) | Method and device for pushing instant message | |
CN113709530B (en) | Resource downloading method, system, electronic equipment and storage medium | |
CN105553831A (en) | Message delivery method and system | |
CN112954406A (en) | Data downloading method and device, computer equipment and storage medium | |
CN111510493B (en) | Distributed data transmission method and device | |
US20140282788A1 (en) | System for controlling video distribution in response to a request on reduced video data traffic and a method therefor | |
CN107864159A (en) | Communication means and device based on certificate and trust chain | |
CN113422679A (en) | Key generation method, device and system, encryption method, electronic device and computer-readable storage medium | |
EP3627361A1 (en) | Media content control | |
CN106385516B (en) | A kind of method, apparatus and terminal of the transfer of setting business | |
KR20220028950A (en) | Content delivery system | |
CN106060155A (en) | P2P (Peer to Peer) resource sharing method and device | |
CN105471818B (en) | Method and system for information transmission between application software | |
CN107995264B (en) | CDN service verification code distribution method and system based on message queue |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |