CN105872039A - Method for transmitting file between terminal devices, terminal device and a file transmission system - Google Patents
Method for transmitting file between terminal devices, terminal device and a file transmission system Download PDFInfo
- Publication number
- CN105872039A CN105872039A CN201610187410.0A CN201610187410A CN105872039A CN 105872039 A CN105872039 A CN 105872039A CN 201610187410 A CN201610187410 A CN 201610187410A CN 105872039 A CN105872039 A CN 105872039A
- Authority
- CN
- China
- Prior art keywords
- terminal unit
- file
- purpose terminal
- server
- transmission link
- 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.)
- Pending
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 225
- 238000000034 method Methods 0.000 title claims abstract description 23
- 239000000203 mixture Substances 0.000 description 11
- 238000001514 detection method Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002195 synergetic effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/40—Support for services or applications
-
- 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/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Mobile Radio Communication Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a method for transmitting a file between terminal devices, a terminal device and a file transmission system. The method comprises following steps of establishing a first transmission link with a server; searching whether an objective terminal device is in own local area network or not when a to-be-transmitted file is sent to an objective terminal device; establishing a second transmission link with the objective terminal device if there is the objective terminal device; sending the to-be-transmitted file to the objective terminal device through the second transmission link; sending the to-be-transmitted file to the server through the first transmission link if there is no objective terminal device; and forwarding the to-be-transmitted file to the objective terminal device by the server through a third transmission link established between the server and the objective terminal device. Through adoption of the mode, the transmission speed of transmitting the to-be-transmitted file between the terminal devices can be improved.
Description
Technical field
The present invention relates to technical field of data transmission, particularly relate to transmit between terminal unit file
Method, terminal unit and document transmission system.
Background technology
Along with the development of smart mobile phone, from strength to strength, its capacity is increasingly for the function of smart mobile phone
Greatly, the kind of the file stored also gets more and more.Smart mobile phone it is frequently necessary to and other intelligence hands
Machine or computer inter-transmitting file, to realize file-sharing or synergetic office work.
In prior art, the mode of smart mobile phone inter-transmitting file includes that Bluetooth transmission and computer transfer pass
Defeated.Bluetooth transmission refers to that two smart mobile phones directly carry out bluetooth connection, then carries out nothing by bluetooth
Line transmits, but Bluetooth transmission only allows point-to-point transmission, and the connection distance that bluetooth is allowed
The shortest, only tens meters, very inconvenient.Computer transfer transmission refers to that source smart mobile phone first leads to
Cross data wire to be connected with computer, by files passe to be transmitted to computer, then source smart mobile phone and electricity
Brain disconnects, and then, purpose smart mobile phone is connected with computer by data wire, then from computer
Carrying file to be transmitted, computer transfer transmission bothers, and is limited by data wire the most very much.Therefore,
Inter-transmitting file very inconvenient between smart mobile phone in prior art.
Summary of the invention
The technical problem that present invention mainly solves is to provide the side transmitting file between a kind of terminal unit
Method, terminal unit and document transmission system, when transmitting file to be transmitted between terminal unit, mainly
It is to be transmitted by network, facilitates and between smart mobile phone, transmit file to be transmitted;It addition, terminal sets
Standby when transmitting file to be transmitted can also intelligent selection transmission network, improve the biography of file to be transmitted
Defeated speed.
For solving above-mentioned technical problem, the technical scheme that the present invention uses is: provide a kind of whole
The method of end equipment room transmission file, including: set up the first transmission link between server;
When sending file to be transmitted to purpose terminal unit, in the LAN at himself place, search is
No there is described purpose terminal unit;If there is described purpose terminal unit, then set up and described mesh
Terminal unit between the second transmission link;By described second transmission link to described purpose eventually
End equipment sends described file to be transmitted;If the most described purpose terminal unit, then pass through institute
State the first transmission link and send described file to be transmitted to described server, so that described server leads to
Cross the 3rd transmission link set up between server and purpose terminal unit to turn to purpose terminal unit
Send out file to be transmitted described.
Wherein, described by described first transmission link to described server send described literary composition to be transmitted
Part, so that described server is by the 3rd chain set up between server and purpose terminal unit
Road direction purpose terminal unit forwards the step of described file to be transmitted to include: transmit by described first
Server described in chain road direction sends file transmission request message, wherein, described file transmission request report
Literary composition carries the mark of described purpose terminal unit;Receive the file transmission permission that described server returns
Message, wherein, described file transmission permission message is that server is according to the transmission request of described file
Find described server and set up the message returned when having three transmission links with purpose terminal unit;
According to described file transmission permission message, described by described first transmission link to described server
Send described file to be transmitted, so that described server forwards described to be transmitted to purpose terminal unit
File.
Wherein, whether described search in the LAN at himself place exists described purpose terminal and sets
Standby step includes: the LAN broadcast's search message to himself place described, wherein, described
Search message carries the mark of described purpose terminal unit;Receiving described purpose terminal unit root
The response message returned according to described search message, then exist in judging LAN described in himself place
Described purpose terminal unit, if being not received by the response message that described purpose terminal unit returns,
Described purpose terminal unit is there is not in then judging LAN described in himself place.
Wherein, described response message carries IP address and the port of purpose terminal unit;Described
One transmission link, the second transmission link and the 3rd transmission link are TCP link.
Wherein, before the step of the first transmission link between described foundation and server, described
Method also includes: send logon message to described server;Receive described server according to registration report
The successful registration message returned after literary composition successful registration.
For solving above-mentioned technical problem, another technical solution used in the present invention is: provide one
Terminal unit, sets up module including first, for setting up the first transmission link between server;
Search module, for when sending file to be transmitted to purpose terminal unit, at himself place
In LAN, whether search exists described purpose terminal unit;Second sets up module, for when described
When search module searches purpose terminal unit, set up second between described purpose terminal unit
Transmission link;First transport module, is used for by described second transmission link to described purpose terminal
Equipment sends described file to be transmitted;Second transport module, for not searching when described search module
When rope is to purpose terminal unit, treated to described in the transmission of described server by described first transmission link
Transmission file, so that described server is by the between server and purpose terminal unit the 3rd of foundation the
Transmission link forwards described file to be transmitted to purpose terminal unit.
Wherein, described second transport module includes: the first transmitting element, for by described first
Transmission link sends file transmission request message to described server, and wherein, the transmission of described file please
Message is asked to carry the mark of described purpose terminal unit;Receive unit, be used for receiving described server
The file transmission permission message returned, wherein, described file transmission permission message is that server is at root
Find described server according to the transmission request of described file and have the 3rd biography with the foundation of purpose terminal unit
The message returned during transmission link;Second transmitting element, is used for according to described file transmission permission message,
Described send described file to be transmitted by described first transmission link to described server, so that institute
State server and forward described file to be transmitted to purpose terminal unit.
Wherein, described search module includes: radio unit, for the office to himself place described
Territory net broadcast search message, wherein, described search message carries the mark of described purpose terminal unit;
Identifying unit, for receiving described purpose terminal unit according to answering that described search message returns
Answer message, then there is described purpose terminal unit in judging LAN described in himself place, if not having
Have and receive the response message that described purpose terminal unit returns, then judge office described in himself place
Described purpose terminal unit is there is not in the net of territory.
Wherein, described response message carries IP address and the port of purpose terminal unit;Described
One transmission link, the second transmission link and the 3rd transmission link are TCP link.
For solving above-mentioned technical problem, another technical solution used in the present invention is: provide one
Document transmission system, including server, source terminal equipment and purpose terminal unit, wherein, described
Source terminal equipment is set up with server the first transmission link, described purpose terminal unit and server
Foundation has the 3rd transmission link;Described source terminal equipment, for when treating to the transmission of purpose terminal unit
During transmission file, search in the LAN at himself place and whether there is described purpose terminal and set
Standby, if there is described purpose terminal unit, then set up second between described purpose terminal unit
Transmission link, sends described to be transmitted by described second transmission link to described purpose terminal unit
File, if the most described purpose terminal unit, then by described first transmission link to described
Server sends described file to be transmitted, so that described server passes through the 3rd transmission link to purpose
Terminal unit forwards described file to be transmitted.
The invention has the beneficial effects as follows: be different from the situation of prior art, source terminal equipment of the present invention
Set up the first transmission link and the 3rd transmission link with purpose terminal unit respectively with server, work as source
Terminal unit is when purpose terminal unit transmits file to be transmitted, and source terminal equipment first judges that purpose is eventually
Whether end equipment is positioned at the LAN at source terminal equipment place, if, then source terminal equipment and mesh
Terminal unit between directly set up the second transmission link, source terminal equipment pass through the second transmission link
Transmit file to be transmitted to purpose terminal unit, and source terminal equipment and purpose terminal unit are positioned at same
One LAN, when file to be transmitted transmits in LAN, its transmission speed faster, thus carries
The transmission speed that high file to be transmitted transmits between terminal devices.When source terminal equipment is whole with purpose
End equipment is not positioned at same LAN, and source terminal equipment is turned to purpose terminal unit by server
Send out file to be transmitted, it is ensured that file to be transmitted arrives purpose terminal unit smoothly.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of document transmission system embodiment of the present invention;
Fig. 2 is the schematic diagram of terminal unit embodiment of the present invention;
Fig. 3 is the flow chart of the method embodiment transmitting file between terminal unit of the present invention;
Fig. 4 be transmit between terminal unit of the present invention the method embodiment of file judge terminal unit with
Whether purpose terminal unit is positioned at the flow chart of same LAN;
Fig. 5 be in the method embodiment transmitting file between terminal unit of the present invention by server to
Purpose terminal unit forwards the flow chart of file to be transmitted.
Detailed description of the invention
The present invention is described in detail with embodiment below in conjunction with the accompanying drawings.
Referring to Fig. 1, document transmission system 20 includes server 21, source terminal equipment 22 and mesh
Terminal unit 23.Source terminal equipment 22 is set up with server 21 the first transmission link, purpose
Terminal unit 23 is set up with server 21 the 3rd transmission link.Source terminal equipment 22 and purpose
Terminal unit 23 can be personal computer, smart mobile phone, PDA or panel computer etc..
Source terminal equipment 22 is for when sending file to be transmitted to purpose terminal unit 23, at it
In the LAN at self place, whether search exists purpose terminal unit 23, sets if there is purpose terminal
Standby 23, then set up the second transmission link between purpose terminal unit 23, by the second transmission
Chain road direction purpose terminal unit 23 sends file to be transmitted, if not purpose terminal unit 23,
Then send file to be transmitted to server 21, so that server 21 passes through by the first transmission link
3rd transmission link forwards file to be transmitted to purpose terminal unit 23.
When file to be transmitted transmits in LAN, owing to needing not move through turning of too many network node
Sending out, therefore, file to be transmitted would generally be than transmission speed in wide area network in the transmission speed of LAN
Degree wants fast.When source terminal equipment 22 is positioned at same LAN with purpose terminal unit 23, directly
Set up the second transmission link between source terminal equipment 22 and purpose terminal unit 23, then pass through
Second transmission link transmits file to be transmitted, substantially increases the transmission speed of file to be transmitted.When
When source terminal equipment 22 and purpose terminal unit 23 are not located at same LAN, literary composition to be transmitted
Part is forwarded by server 21, it is ensured that file to be transmitted arrives purpose terminal unit 23 smoothly.
In order to avoid file to be transmitted is lost, when forwarding file to be transmitted by server 21,
Need to inquire the 3rd chain whether server 21 is set up between purpose terminal unit 23
Road, only server 21 are set up when having three transmission link between purpose terminal unit 23,
Just allowing server 21 to forward file to be transmitted, concrete, source terminal equipment 22 is by the first biography
Transmission link sends file transmission request message, wherein, file transmission request message to server 21
Carry the mark of purpose terminal unit 23.After server 21 receives file transmission request message,
The 3rd transmission link judged whether and set up between purpose terminal unit 23, if having, then returns
Back into file transmission permission message, if not having, then re-establishes between purpose terminal unit 23
Three transmission links, return file transmission permission message, otherwise return and do not allow transmission after being successfully established
File message.Purpose terminal unit 23 receives the file transmission permission message that server 21 returns
After, according to file transmission permission message, send to be transmitted by the first transmission link to server 21
File, so that server 21 forwards file to be transmitted to purpose terminal unit 23.Certainly, to be passed
Defeated file also can carry the mark of purpose terminal unit 23 so that server 21 receive to be passed
After defeated file, know and to which terminal unit forward.In the present embodiment, purpose terminal
The mark of equipment 23 is preferably IP address and the port of purpose terminal unit 23.
Further, whether source terminal equipment 22 is searched in the LAN at himself place and is existed
Purpose terminal unit 23 mainly realizes by the way of broadcasting packet, particularly as follows: purpose terminal
The equipment 23 LAN broadcast's search message to himself place, wherein, search message carries mesh
The mark of terminal unit 23.When terminal unit in LAN receives search message, it is judged that
Identifying whether that search message carries is identical with the mark of self, if identical, then returns response message,
If differing, do not process.Source terminal equipment 22 is receiving purpose terminal unit 23 according to searching
, then there is purpose terminal in judging the LAN at himself place and set in the response message that rope message returns
Standby 23, if being not received by the response message that purpose terminal unit 23 returns, then judge himself
Purpose terminal unit 23 is there is not in the LAN at place.Certainly, in other alternate embodiments,
Also whether there is purpose terminal unit 23, example in being not limited to search for LAN by the way
As: source terminal equipment 22 broadcasts another kind of search message, and the terminal unit in LAN is receiving
During to another kind search message, all returning the mark of self, source terminal equipment 22 is according to return
Mark judges whether LAN exists purpose terminal unit 23.
What deserves to be explained is: source terminal equipment 22 searches for the function of LAN other terminal unit interior
A kind of service is directly registered, such as: NSD LAN finds clothes when source terminal equipment 22 starts
Business, when source terminal equipment 22 needs to send file to be transmitted to purpose terminal unit 23, source is eventually
Whether end equipment 22 exists in finding the LAN at service search self place by NSD LAN
Purpose terminal unit 23.Certainly, other terminal unit in LAN also with source terminal equipment 22
Similar, registration NSD LAN finds service too.Further, and the terminal of LAN sets
Standby on startup just startup NSD LAN find service, it is also possible to start link establishment service,
Link establishment service is for setting up the transmission link between terminal unit and server 21.In this reality
Executing in mode, the first transmission link, the second transmission link and the 3rd transmission link are TCP link.
Certainly, set up on startup and server in source terminal equipment 22 and purpose terminal unit 23
During transmission link between 21, need first to register to server 21, then source terminal equipment 22 is to clothes
Business device 21 sends logon message.Logon message carries the relevant information of source terminal equipment 22, such as:
The MAC Address of source terminal equipment 22 and IMEI serial number etc..In order to ensure the peace of logon message
Entirely, logon message can also be encrypted, such as: is spliced by MAC and IMEI serial number
Get up and carry out base64 encryption, and the data after encryption are sent to server 21 registering.
Server 21, after succeeding in registration, returns successful registration message, can take in successful registration message
Give the device id of source terminal equipment 22 distribution with server 21, wherein, device id can be only
One.Device id can also be as the mark of source terminal equipment 22.Source terminal equipment 22 receives
Successful registration message.
In embodiments of the present invention, source terminal equipment is built with server respectively with purpose terminal unit
Vertical first transmission link and the 3rd transmission link, when source terminal equipment is treated to the transmission of purpose terminal unit
During transmission file, source terminal equipment first judges whether purpose terminal unit is positioned at source terminal equipment place
LAN in, if, then directly set up the second biography between source terminal equipment and purpose terminal unit
Transmission link, source terminal equipment transmits literary composition to be transmitted by the second transmission link to purpose terminal unit
Part, and source terminal equipment and purpose terminal unit are positioned at same LAN, improve file to be transmitted
Transmission speed.When source terminal equipment and purpose terminal unit are not positioned at same LAN, source is eventually
End equipment forwards file to be transmitted by server to purpose terminal unit, it is ensured that file to be transmitted is suitable
Profit arrives purpose terminal unit.
Invention further provides a kind of terminal unit embodiment.Refer to Fig. 2, terminal unit 30
Including first setting up module 301, search module 302, second setting up module 303, first and transmit mould
Block 304 and the second transport module 305.
First sets up module 301, for setting up the first transmission link between server.Search
Module 302, for when sending file to be transmitted to purpose terminal unit, at himself place
In LAN, whether search exists purpose terminal unit.Second sets up module 303, for when search
When module 302 searches purpose terminal unit, set up the second transmission between purpose terminal unit
Link.First transport module 304, for sending to purpose terminal unit by the second transmission link
File to be transmitted.Second transport module 305, for not searching purpose when search module 302
During terminal unit, send file to be transmitted by the first transmission link to server, so that server
By the 3rd transmission link of foundation between server and purpose terminal unit to purpose terminal unit
Forward file to be transmitted.
And can be than the speed of transmission in wide area network during speed that file to be transmitted transmits in LAN
Degree wants fast, and therefore, when source terminal equipment is positioned at same LAN with purpose terminal unit, source is eventually
Directly set up the second transmission link between end equipment and purpose terminal unit to be transmitted, can be significantly
Improve the transmission speed of file to be transmitted.When source terminal equipment is not located at purpose terminal unit
During same LAN, then forwarded by server, it is ensured that file to be transmitted arrives mesh smoothly
Terminal unit.
In order to avoid file to be transmitted is lost, when forwarding file to be transmitted by server, can be first
Whether inquiry server sets up the second transmission link with purpose terminal unit, concrete, the second transmission
Module 305 includes the first transmitting element 3051, receives unit 3052 and the second transmitting element 3053.
First transmitting element 3051, transmits for sending file by the first transmission link to server
Request message, wherein, file transmission request message carries the mark of purpose terminal unit.Receive single
Unit 3052, for receiving the file transmission permission message that server returns, wherein, file transmission is permitted
Can message to be server build with purpose terminal unit finding server according to file transmission request
Found the message returned when having three transmission links.Second transmitting element 3053, for passing according to file
Defeated license message, sends file to be transmitted by the first transmission link to server, so that server
File to be transmitted is forwarded to purpose terminal unit.
And whether terminal unit is when searching for purpose terminal unit at same LAN, can be by wide
The mode broadcasting search message realizes, and concrete, search module 302 includes radio unit 3021
With identifying unit 3022.
Radio unit 3021, for the LAN broadcast's search message to himself place, wherein,
Search message carries the mark of purpose terminal unit.Identifying unit 3022, for receiving purpose
The response message that terminal unit returns according to search message, then in judging the LAN at himself place
There is purpose terminal unit, if being not received by the response message that purpose terminal unit returns, then sentencing
Purpose terminal unit is there is not in the LAN at himself place fixed.In the present embodiment, preferably
, response message carries IP address and the port of purpose terminal unit;First transmission link,
Two transmission links and the 3rd transmission link are TCP link.
And terminal unit is when forwarding file to be transmitted by server, need first to be registered as service
The member of device, then terminal unit also includes sending module (not shown) and receiver module (not shown).
Sending module, for sending logon message to server.Receiver module, is used for receiving server root
According to the successful registration message returned after logon message successful registration.
What deserves to be explained is: the above-mentioned module included by terminal unit all registers the form of service,
When terminal unit starts, automatically at running background, shielding user, user can directly make two
Individual terminal unit is transmitted file to be transmitted.
In embodiments of the present invention, first set up module and server and set up the first chain
Road, and purpose terminal unit and server set up the 3rd transmission link, when source terminal equipment is to mesh
Terminal unit transmit file to be transmitted time, search module search purpose terminal unit whether be positioned at source
In the LAN at terminal unit place, if, then second set up between module and purpose terminal unit
Directly setting up the second transmission link, the first transport module is set to purpose terminal by the second transmission link
Standby transmission file to be transmitted, owing to source terminal equipment and purpose terminal unit are positioned at same local
Net, improves the transmission speed of file to be transmitted.When source terminal equipment is not positioned at purpose terminal unit
In same LAN, the second transport module forwards literary composition to be transmitted by server to purpose terminal unit
Part, it is ensured that file to be transmitted arrives purpose terminal unit smoothly.
The present invention provides again the method embodiment transmitting file between terminal unit.Refer to Fig. 3,
Method includes:
Step S401: set up the first transmission link between server;
Terminal unit is that the first transmission link between detection and server is the most normal, can pass through
First transmission link periodically sends detection messages to server, during server response detection messages, then
Illustrate that the first transmission link is normal.
Step S402: when sending file to be transmitted to purpose terminal unit, at himself place
In LAN, whether search exists purpose terminal unit;If there is purpose terminal unit, then enter step
Rapid S403, otherwise enters step S405;
When terminal unit searches purpose terminal unit in the LAN at the place of self, then illustrate
Terminal unit and purpose terminal unit are positioned at same LAN.Concrete, at himself place
In LAN, whether search exists purpose terminal unit and mainly realizes by the way of broadcasting packet,
Then as it can be seen, step S402 includes again:
Step S4021: the LAN broadcast's search message to himself place, wherein, search report
Literary composition carries the mark of purpose terminal unit;
The mark of purpose terminal unit can for the purpose of the IP address of terminal unit or MAC Address.
Step S4022: receiving the response message that purpose terminal unit returns according to search message,
Purpose terminal unit is there is, if being not received by purpose eventually in then judging the LAN at himself place
, then there is not purpose terminal in judging the LAN at himself place in the response message that end equipment returns
Equipment.
Other terminal unit of LAN, when receiving search message, can judge that searching for message is taken
Identifying whether of band is identical with the mark of self, if identical, then responds, returns a response message
If differing, then it is not responding to, the most any process.Certainly, in other alternate embodiments, also
Can arrange all of terminal unit and all return response message, response message can carry different interior
Hold, carry out judging whether are terminal unit and purpose terminal unit by the content entrained by response message
It is positioned at same LAN.
Step S403: set up the second transmission link between purpose terminal unit;
After terminal unit and purpose terminal unit set up the second transmission link, it is also possible to pass by second
Transmission link periodically sends detection messages to purpose terminal unit, when purpose terminal unit responds, then says
Bright second transmission link is normal.In the present embodiment, the first transmission link and the second transmission link
It is both preferably TCP link.
Step S404: send file to be transmitted to purpose terminal unit by the second transmission link;
Step S405: send file to be transmitted to server by the first transmission link, so that service
Device is set to purpose terminal by the 3rd transmission link set up between server and purpose terminal unit
Standby forwarding file to be transmitted.
3rd transmission link is preferably also TCP link.In order to avoid file to be transmitted is lost, logical
When crossing server forwarding file to be transmitted, can first inquire whether server is set up with purpose terminal unit
Second transmission link, concrete, step S405 includes:
Step S4051: send file transmission request report to described server by the first transmission link
Literary composition, wherein, file transmission request message carries the mark of purpose terminal unit;
Step S4052: receiving the file transmission permission message that server returns, wherein, file passes
Defeated license message is server to be set with purpose terminal finding server according to file transmission request
The message that standby foundation returns when having three transmission links;
Step S4053: according to file transmission permission message, by the first transmission link to server
Send file to be transmitted, so that server forwards file to be transmitted to purpose terminal unit.
What deserves to be explained is: the first transmission link set up between terminal unit and server and purpose
The 3rd transmission link between terminal unit and server can pre-build, such as: terminal unit
With purpose terminal unit on startup, first set up transmission link with server, the first transmission link and
Second transmission link can also be set up as required, such as: terminal unit searches and purpose terminal
When equipment is not positioned at same local, terminal unit just sets up the first transmission link with server, clothes
Business device, when receiving file transmission request message, just sets up the 3rd chain with purpose terminal unit
Road.
Further, when terminal unit forwards file to be transmitted by server, terminal unit can be first
Be registered as the member of server, then method also includes:
Step S406: send logon message to server;
Server, after receiving logon message, can be registered according to logon message, register
Successful registration message is returned after merit.
Step S407: receive server according to the successful registration report returned after logon message successful registration
Literary composition;
After receiving successful registration message, know that terminal unit has become as the member of server, eventually
End equipment just can set up transmission link with server.Server and terminal unit set up transmission link
Time, can first judge whether terminal unit is registered members, if not, need terminal unit first to register
Become member, just allow to set up transmission link.
In embodiments of the present invention, source terminal equipment is built with server respectively with purpose terminal unit
Vertical first transmission link and the 3rd transmission link, when source terminal equipment is treated to the transmission of purpose terminal unit
During transmission file, source terminal equipment first judges whether purpose terminal unit is positioned at source terminal equipment place
LAN in, if, then directly set up the second biography between source terminal equipment and purpose terminal unit
Transmission link, source terminal equipment transmits literary composition to be transmitted by the second transmission link to purpose terminal unit
Part, and source terminal equipment and purpose terminal unit are positioned at same LAN, file to be transmitted is in office
In the net of territory during transmission, its transmission speed faster, thus improves file to be transmitted between terminal devices
The transmission speed of transmission.When source terminal equipment and purpose terminal unit are not positioned at same LAN,
Source terminal equipment forwards file to be transmitted by server to purpose terminal unit, it is ensured that literary composition to be transmitted
Part arrives purpose terminal unit smoothly.
The foregoing is only embodiments of the present invention, not thereby limit the patent model of the present invention
Enclosing, every equivalent structure utilizing description of the invention and accompanying drawing content to be made or equivalence flow process become
Change, or be directly or indirectly used in other relevant technical fields, be the most in like manner included in the present invention's
In scope of patent protection.
Claims (10)
1. the method transmitting file between a terminal unit, it is characterised in that including:
Set up the first transmission link between server;
When sending file to be transmitted to purpose terminal unit, search in the LAN at himself place
Whether rope exists described purpose terminal unit;
If there is described purpose terminal unit, then set up second between described purpose terminal unit
Transmission link;
Described file to be transmitted is sent to described purpose terminal unit by described second transmission link;
If the most described purpose terminal unit, then by described first transmission link to described clothes
Business device sends described file to be transmitted, so that described server is by server and purpose terminal unit
Between set up the 3rd transmission link to purpose terminal unit forward described file to be transmitted.
Method the most according to claim 1, it is characterised in that
Described by described first transmission link to described server send described file to be transmitted, with
Make described server by between server and purpose terminal unit set up the 3rd transmission link to
Purpose terminal unit forwards the step of described file to be transmitted to include:
File transmission request message is sent to described server by described first transmission link, its
In, described file transmission request message carries the mark of described purpose terminal unit;
Receiving the file transmission permission message that described server returns, wherein, the transmission of described file is permitted
Can message be that server is finding described server with purpose eventually according to the transmission request of described file
End equipment sets up the message returned when having three transmission links;
According to described file transmission permission message, described by described first transmission link to described clothes
Business device sends described file to be transmitted, so that described server is treated to described in the forwarding of purpose terminal unit
Transmission file.
Method the most according to claim 1, it is characterised in that
Whether described search in the LAN at himself place exists described purpose terminal unit
Step includes:
LAN broadcast's search message to himself place described, wherein, described search message is taken
Mark with described purpose terminal unit;
Receiving the response message that described purpose terminal unit returns according to described search message, then
Described purpose terminal unit is there is, if being not received by institute in judging LAN described in himself place
State the response message that purpose terminal unit returns, then do not deposit in judging LAN described in himself place
At described purpose terminal unit.
Method the most according to claim 3, it is characterised in that
Described response message carries IP address and the port of purpose terminal unit;
Described first transmission link, the second transmission link and the 3rd transmission link are TCP link.
Method the most according to claim 1, it is characterised in that
Before the step of the first transmission link between described foundation and server, described method is also
Including:
Logon message is sent to described server;
Receive described server according to the successful registration message returned after logon message successful registration.
6. a terminal unit, it is characterised in that including:
First sets up module, for setting up the first transmission link between server;
Search module, for when sending file to be transmitted to purpose terminal unit, in himself institute
LAN in search for whether there is described purpose terminal unit;
Second sets up module, for when described search module searches purpose terminal unit, sets up
And the second transmission link between described purpose terminal unit;
First transport module, for sending out to described purpose terminal unit by described second transmission link
Send described file to be transmitted;
Second transport module, is used for when described search module does not search purpose terminal unit,
Described file to be transmitted is sent to described server by described first transmission link, so that described clothes
The 3rd transmission link that business device passes through to set up between server and purpose terminal unit is to purpose terminal
File to be transmitted described in device forwards.
Terminal unit the most according to claim 6, it is characterised in that described second transmission mould
Block includes:
First transmitting element, for sending file by described first transmission link to described server
Transmission request message, wherein, described file transmission request message carries described purpose terminal unit
Mark;
Receive unit, for receiving the file transmission permission message that described server returns, wherein,
Described file transmission permission message is that server is finding described according to the transmission request of described file
Server and purpose terminal unit set up the message returned when having three transmission links;
Second transmitting element, for according to described file transmission permission message, described by described the
One transmission link sends described file to be transmitted to described server, so that described server is to purpose
Terminal unit forwards described file to be transmitted.
Terminal unit the most according to claim 6, it is characterised in that described search module bag
Include:
Radio unit, for the LAN broadcast's search message to himself place described, wherein,
Described search message carries the mark of described purpose terminal unit;
Identifying unit, for returning according to described search message receiving described purpose terminal unit
Response message, then there is described purpose terminal unit in judging LAN described in himself place,
If being not received by the response message that described purpose terminal unit returns, then judge himself place institute
Described purpose terminal unit is there is not in stating LAN.
Terminal unit the most according to claim 8, it is characterised in that
Described response message carries IP address and the port of purpose terminal unit;
Described first transmission link, the second transmission link and the 3rd transmission link are TCP link.
10. a document transmission system, it is characterised in that include server, source terminal equipment and mesh
Terminal unit, wherein, described source terminal equipment and server are set up the first transmission link, institute
State purpose terminal unit and have the 3rd transmission link with server foundation;
Described source terminal equipment, for when sending file to be transmitted to purpose terminal unit, at it
In the LAN at self place, whether search exists described purpose terminal unit, if there is described purpose
Terminal unit, then set up the second transmission link between described purpose terminal unit, by described
Second transmission link sends described file to be transmitted to described purpose terminal unit, if not institute
State purpose terminal unit, then send described to be passed by described first transmission link to described server
Defeated file, so that described server is treated to described in the forwarding of purpose terminal unit by the 3rd transmission link
Transmission file.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610187410.0A CN105872039A (en) | 2016-03-29 | 2016-03-29 | Method for transmitting file between terminal devices, terminal device and a file transmission system |
PCT/CN2016/089449 WO2017166522A1 (en) | 2016-03-29 | 2016-07-08 | Method for transmitting file between terminal devices, terminal device and file transmission system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610187410.0A CN105872039A (en) | 2016-03-29 | 2016-03-29 | Method for transmitting file between terminal devices, terminal device and a file transmission system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105872039A true CN105872039A (en) | 2016-08-17 |
Family
ID=56625949
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610187410.0A Pending CN105872039A (en) | 2016-03-29 | 2016-03-29 | Method for transmitting file between terminal devices, terminal device and a file transmission system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105872039A (en) |
WO (1) | WO2017166522A1 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106790481A (en) * | 2016-12-07 | 2017-05-31 | 掌阅科技股份有限公司 | Equipment room data transmission method, device, server and computer-readable storage medium |
CN108573009A (en) * | 2017-07-03 | 2018-09-25 | 北京金山云网络技术有限公司 | A kind of file search method and device |
CN109039904A (en) * | 2018-08-01 | 2018-12-18 | 武汉绿色网络信息服务有限责任公司 | A kind of application method for routing and device |
CN110049074A (en) * | 2018-01-13 | 2019-07-23 | 阿里巴巴集团控股有限公司 | Method, system and the storage medium and computer equipment that data upload |
CN114363063A (en) * | 2018-11-01 | 2022-04-15 | 西安万像电子科技有限公司 | Data transmission method, device and system |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112491976A (en) * | 2020-11-11 | 2021-03-12 | 京东数字科技控股股份有限公司 | File transmission method, device, server and storage medium |
CN114615259A (en) * | 2022-04-07 | 2022-06-10 | 百富计算机技术(深圳)有限公司 | File transmission method and device and terminal equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101179849A (en) * | 2006-11-07 | 2008-05-14 | 联发科技股份有限公司 | Wireless communication device and its method of establishing a communication connection and network switch method |
CN101605138A (en) * | 2009-07-14 | 2009-12-16 | 中兴通讯股份有限公司 | Document transmission method and terminal |
CN101902826A (en) * | 2010-06-30 | 2010-12-01 | 北京乔讯科技有限公司 | Method and system for establishing data connection |
CN102098614A (en) * | 2011-02-18 | 2011-06-15 | 华为技术有限公司 | Communication method and device |
CN105207867A (en) * | 2015-10-30 | 2015-12-30 | 北京奇艺世纪科技有限公司 | Equipment connecting method and equipment connecting device |
CN105208129A (en) * | 2015-10-10 | 2015-12-30 | 南京邻动网络科技有限公司 | Flexible mobile terminal file transfer method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1168789A (en) * | 1997-08-15 | 1999-03-09 | Nec Corp | Layer 3 switching using server |
-
2016
- 2016-03-29 CN CN201610187410.0A patent/CN105872039A/en active Pending
- 2016-07-08 WO PCT/CN2016/089449 patent/WO2017166522A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101179849A (en) * | 2006-11-07 | 2008-05-14 | 联发科技股份有限公司 | Wireless communication device and its method of establishing a communication connection and network switch method |
CN101605138A (en) * | 2009-07-14 | 2009-12-16 | 中兴通讯股份有限公司 | Document transmission method and terminal |
CN101902826A (en) * | 2010-06-30 | 2010-12-01 | 北京乔讯科技有限公司 | Method and system for establishing data connection |
CN102098614A (en) * | 2011-02-18 | 2011-06-15 | 华为技术有限公司 | Communication method and device |
CN105208129A (en) * | 2015-10-10 | 2015-12-30 | 南京邻动网络科技有限公司 | Flexible mobile terminal file transfer method |
CN105207867A (en) * | 2015-10-30 | 2015-12-30 | 北京奇艺世纪科技有限公司 | Equipment connecting method and equipment connecting device |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106790481A (en) * | 2016-12-07 | 2017-05-31 | 掌阅科技股份有限公司 | Equipment room data transmission method, device, server and computer-readable storage medium |
CN108573009A (en) * | 2017-07-03 | 2018-09-25 | 北京金山云网络技术有限公司 | A kind of file search method and device |
CN110049074A (en) * | 2018-01-13 | 2019-07-23 | 阿里巴巴集团控股有限公司 | Method, system and the storage medium and computer equipment that data upload |
CN109039904A (en) * | 2018-08-01 | 2018-12-18 | 武汉绿色网络信息服务有限责任公司 | A kind of application method for routing and device |
CN109039904B (en) * | 2018-08-01 | 2020-12-22 | 武汉绿色网络信息服务有限责任公司 | Application routing method and device |
CN114363063A (en) * | 2018-11-01 | 2022-04-15 | 西安万像电子科技有限公司 | Data transmission method, device and system |
Also Published As
Publication number | Publication date |
---|---|
WO2017166522A1 (en) | 2017-10-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105872039A (en) | Method for transmitting file between terminal devices, terminal device and a file transmission system | |
EP3576379B1 (en) | Service layer interworking using mqtt protocol | |
EP3298806B1 (en) | Methods and apparatus for analyzing and grouping service layer subscriptions and notifications for enhanced efficiency | |
US9781579B2 (en) | Method and device for realizing terminal WIFI talkback | |
EP3100471A1 (en) | Context-aware and proximity-aware service layer connectivity management | |
RU2016114821A (en) | METHODS, DEVICES AND COMPUTER SOFTWARE PRODUCTS FOR FACILITATING COMMUNICATION TYPE "DEVICE-DEVICE" BETWEEN WIRELESS COMMUNICATION DEVICES | |
US11233817B2 (en) | Methods and apparatus for end device discovering another end device | |
CN110383896A (en) | Method for network access, terminal, access net and core net | |
CN104158883A (en) | Method, device, equipment and system for carrying out user login through cross-terminal equipment | |
RU2009110486A (en) | SYSTEMS AND METHODS FOR KEY MANAGEMENT IN WIRELESS COMMUNICATION SYSTEMS | |
JP6599546B2 (en) | How to enable unroot resource discovery in the service layer | |
CN102340650A (en) | Method and system for video monitoring of terminal | |
CN102457409A (en) | Method and system for link failure detection | |
WO2014173086A1 (en) | Information transmission and forwarding method and apparatus | |
JP2013175916A5 (en) | ||
US9451429B2 (en) | Message processing method with respect to terminal having multiple external identifiers | |
CN107659930A (en) | A kind of AP connection control methods and device | |
CN105657040A (en) | Inter-device intranet communication method and system | |
CN105848083A (en) | Method, terminal and system for realizing communication | |
EP3482296A1 (en) | Message retargeting in machine-to-machine service layer communications | |
CN104955153B (en) | Method, device and equipment for discovering resources | |
WO2015065766A1 (en) | Discovery of wi-fi direct services via discovery probe | |
CN105612773A (en) | Zeroconf profile transferring to enable fast roaming | |
CN105282231A (en) | Data drainage method, device, and system based on application types | |
KR20120047350A (en) | Methods of discovering communication entity using discovery gateway and systems for discovering communication entity |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160817 |
|
WD01 | Invention patent application deemed withdrawn after publication |