CN104580376A - Method, device and system for constructing connection between terminals in local area network - Google Patents

Method, device and system for constructing connection between terminals in local area network Download PDF

Info

Publication number
CN104580376A
CN104580376A CN201410769011.6A CN201410769011A CN104580376A CN 104580376 A CN104580376 A CN 104580376A CN 201410769011 A CN201410769011 A CN 201410769011A CN 104580376 A CN104580376 A CN 104580376A
Authority
CN
China
Prior art keywords
terminal
information
client
socket server
services
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
Application number
CN201410769011.6A
Other languages
Chinese (zh)
Other versions
CN104580376B (en
Inventor
李彦男
朱时煜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201410769011.6A priority Critical patent/CN104580376B/en
Publication of CN104580376A publication Critical patent/CN104580376A/en
Application granted granted Critical
Publication of CN104580376B publication Critical patent/CN104580376B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers

Landscapes

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

Abstract

The invention provides a method, a device and a system for constructing connection between terminals in a local area network. The method comprises the steps that a client of a first terminal establishes a hypertext transfer protocol (HTTP) service and provides HTTP service information and a preset identification character string for a client of a second terminal; the client of the second terminal acquires the preset identification character string and then establishes a socket server; the client of the second terminal sends an access request including the socket server to the client of the first terminal; after receiving the access request, the client of the first terminal establishes wifi connection between the first terminal and the second terminal. According to the method, convenience in connection establishment between two terminals in the same local area network can be improved.

Description

Set up the methods, devices and systems connected between terminal in a local network
[technical field]
The present invention relates to Computer Applied Technology field, particularly a kind ofly set up the methods, devices and systems connected between terminal in a local network.
[background technology]
The use of the such as mobile terminal such as smart mobile phone, panel computer is more and more universal now, usually needs to connect to realize managing between PC (Personal Computer, personal computer) and mobile terminal.Main at present exist following two kinds of modes:
First kind of way: connected by USB (Universal Serial Bus, USB) line between PC and mobile terminal, this is mode more common at present, but this mode needs user to carry with USB line, cumbersome.
The second way: PC is connected with server respectively with mobile terminal, by the mode exchange message of this indirect connection, but this mode is owing to needing the step of carrying out respectively connecting between PC and server and connecting between mobile terminal and server, realize more loaded down with trivial details, connection speed is slow, and need the situation depending on outer net, mortality is higher.
[summary of the invention]
In view of this, the invention provides and a kind ofly set up the methods, devices and systems connected between terminal in a local network, so that improve convenience.
Concrete technical scheme is as follows:
The invention provides and a kind ofly set up the method connected between terminal in a local network, the method comprises:
The client of S1, first terminal sets up HTML (Hypertext Markup Language) HTTP service, HTTP information on services and default identification strings is supplied to the client of the second terminal;
After the client of S2, described second terminal gets described default identification strings, set up sockets services socket server;
The client of S3, described second terminal sends to the client of described first terminal the access request comprising socket server information according to described HTTP information on services;
After the client of S4, described first terminal receives described access request, complete the wifi connection establishment between described first terminal and described second terminal.
According to the present invention one preferred implementation, the client that described HTTP information on services and default identification strings are supplied to the second terminal is comprised: the client of described first terminal generates the information code comprising described HTTP information on services and default identification strings, shows described information code;
The client scan of described second terminal also resolves described information code, the identification strings obtaining described HTTP information on services and preset.
According to the present invention one preferred implementation, described HTTP information on services comprises: the ip address of described first terminal and port numbers;
Described socket server information comprises: the ip address of described second terminal and port numbers.
According to the present invention one preferred implementation, described socket server information also comprises: check information;
After the client of described first terminal receives described access request, comprise further: utilize described check information to verify.
According to the present invention one preferred implementation, in described S4, the client of described first terminal and the client executing handshake procedure of described second terminal are to complete the wifi connection establishment between described first terminal and described second terminal.
According to the present invention one preferred implementation, the method also comprises: after described first terminal is connected disconnection with the wifi of described second terminal, the client of described second terminal deletes described socket server.
According to the present invention one preferred implementation, after completing the wifi connection establishment between described first terminal and described second terminal, the identify label that the client of described first terminal and the client of described second terminal record distant terminal is mutually as the identify label of binding terminal.
According to the present invention one preferred implementation, described first terminal is connected disconnection with the wifi of described second terminal after, the method also comprises:
The client of A1, described second terminal is when being opened, or when described second terminal is connected to wifi access point, set up socket server, and sending User Datagram Protoco (UDP) udp broadcast, described udp broadcast comprises the identify label of socket server information, the identify label of the second terminal and described second terminal binding terminal;
After the client of A2, described first terminal receives described udp broadcast, if comprise the identify label of described first terminal in described udp broadcast, and the identify label of the second terminal comprised in described udp broadcast is the identify label of described first terminal binding terminal, then send to the client of described second terminal the HTTP information on services set up according to the socket server information comprised in described udp broadcast;
Go to and perform described S3.
According to the present invention one preferred implementation, go in described A2 and perform before described S3, also comprise: the client of described second terminal deletes the socket server set up, re-establish a new socket server.
Present invention also offers and a kind ofly set up the device connected between terminal in a local network, this device is arranged at first terminal, and this device comprises:
Module is set up in service, for setting up HTTP service, HTTP information on services and default identification strings is supplied to interactive module;
Interactive module, for being supplied to the second terminal by described HTTP information on services and default identification strings; After receiving the access request from described second terminal, complete the wifi connection establishment between described first terminal and described second terminal, described access request comprises the socket server information that described second terminal is set up.
According to the present invention one preferred implementation, module is set up in described service, specifically for generating the information code comprising described HTTP information on services and default identification strings, described information code is supplied to described interactive module;
Described interactive module, specifically for showing described information code on the screen of described first terminal.
According to the present invention one preferred implementation, described HTTP information on services comprises: the ip address of described first terminal and port numbers;
Described socket server information comprises: the ip address of described second terminal and port numbers.
According to the present invention one preferred implementation, described socket server information also comprises: check information;
This device also comprises: correction verification module, for after described interactive module receives described access request, utilizes described check information to verify.
According to the present invention one preferred implementation, described interactive module, also performs handshake procedure to complete the wifi connection establishment between described first terminal and described second terminal for described second terminal.
According to the present invention one preferred implementation, this device also comprises: binding module, and for after completing the wifi connection establishment between described first terminal and described second terminal, the identify label of recording described second terminal is as the identify label of binding terminal.
According to the present invention one preferred implementation, this device also comprises:
Described interactive module, also for after receiving the udp broadcast from described second terminal, if comprise the identify label of described first terminal in described udp broadcast, and the identify label of the second terminal comprised in described udp broadcast is the identify label of described first terminal binding terminal, then sends described service according to the socket server information comprised in described udp broadcast to described second terminal and set up the HTTP information on services that module sets up.
Present invention also offers and a kind ofly set up the device connected between terminal in a local network, this device is arranged at the second terminal, described interactive module, also for obtaining HTTP information on services from first terminal and the identification strings preset; Send access request according to described HTTP information on services to described first terminal, comprise service in this access request and set up the socket server information that module provides, to complete the wifi connection establishment between described first terminal and described second terminal;
Module is set up in service, if get described default identification strings for described interactive module, then sets up socket server, and socket server information is supplied to described interactive module.
According to the present invention one preferred implementation, described interactive module by scan and resolve described first terminal display information code, obtain described HTTP information on services and preset identification strings.
According to the present invention one preferred implementation, described HTTP information on services comprises: the ip address of described first terminal and port numbers;
Described socket server information comprises: the ip address of described second terminal and port numbers.
According to the present invention one preferred implementation, described interactive unit, also performs handshake procedure to complete the wifi connection establishment between described first terminal and described second terminal for described first terminal.
According to the present invention one preferred implementation, module is set up in described service, also for after described first terminal is connected disconnection with the wifi of described second terminal, deletes described socket server.
According to the present invention one preferred implementation, module is set up in described service, also for when this device is opened, or when described second terminal is connected to wifi access point, set up socket server, the udp broadcast comprising the identify label of binding terminal of socket server information, the identify label of the second terminal and described second terminal is supplied to described interactive module;
Described interactive module, also for sending described udp broadcast.
According to the present invention one preferred implementation, module is set up in described service, if also for receiving HTTP information on services after transmission udp broadcast, then delete the socket server of foundation, re-establishes a new socket server.
Present invention also offers and a kind ofly set up the system connected between terminal in a local network, this system comprises above-mentioned two kinds of devices.
As can be seen from the above technical solutions, set up connection between two terminals in the present invention without the need to being connected by USB line, and without the need to connecting with server respectively, but directly set up the connection between two terminals, improve convenience.
[accompanying drawing explanation]
The method flow diagram that wifi connects is set up between the PC that Fig. 1 provides for the embodiment of the present invention and mobile phone;
Automatically the method flow diagram connected to set up wifi is found between the PC that Fig. 2 provides for the embodiment of the present invention and mobile phone;
The structure drawing of device being arranged at first terminal that Fig. 3 provides for the embodiment of the present invention;
The structure drawing of device being arranged at the second terminal that Fig. 4 provides for the embodiment of the present invention.
[embodiment]
In order to make the object, technical solutions and advantages of the present invention clearly, describe the present invention below in conjunction with the drawings and specific embodiments.
System provided by the invention is made up of the first terminal be under same local area network (LAN) and the second terminal, wherein first terminal can be the terminal equipments such as PC, intelligent television, mobile phone, panel computer, second terminal can be the terminal equipments such as PC, intelligent television, mobile phone, panel computer equally, first terminal and the second terminal all can possess the function wirelessly accessing wifi access point, also can only have the second terminal to possess the function wirelessly accessing wifi access point, and first terminal can access same local area network (LAN) in wired mode.
The method flow diagram that wifi connects is set up between a kind of PC that Fig. 1 provides for the embodiment of the present invention and mobile phone, in the present embodiment for mobile phone and PC two terminals, certainly applicable equally for other mobile terminal styles in same local area network (LAN), such as set up wifi between mobile phone with intelligent television to be connected, set up wifi between PC with panel computer and be connected etc.As shown in fig. 1, the method can specifically comprise the following steps:
In 101, pc client sets up HTTP (Hypertext transfer protocol, HTML (Hypertext Markup Language)) service.
Pc client can set up the HTTP service of a non-given content in this step, conducts interviews for follow-up cell-phone customer terminal.
In 102, pc client generates a Quick Response Code, the identification strings comprising HTTP information on services in this Quick Response Code and preset.
Ip address and the port numbers of PC is comprised in HTTP information on services.Certainly, except the mode of Quick Response Code, the other forms of information codes such as one-dimension code can also be adopted, with only for Quick Response Code in the present embodiment.
A network address can be comprised in Quick Response Code, comprise default identification strings in this network address and be mainly used in informing that cell-phone customer terminal can be set up wifi with this PC and be connected.Such as by http: // 172.0.4.5:5808/csuitewificonnect.php? this network address of a=*** generates Quick Response Code, and wherein 172.0.4.5 is the ip address of PC, and 5808 is port numbers, and csuitewificonnect is default identification strings.
In 103, if cell-phone customer terminal resolves the banner string obtaining HTTP information on services and preset from the Quick Response Code of scanning, then determine that can set up wifi with PC is connected.
In 104, cell-phone customer terminal sets up socket server (sockets services), sends the access request comprising socket server information according to the HTTP information on services obtained in 103 to pc client.
In this step, add socket server information after the website information that cell-phone customer terminal can obtain in 103, then access this network address, namely send access request.Described socket server information comprises ip address and the port numbers of mobile phone, can also comprise check information further.
In 105, after pc client receives the access request comprising socket server information, utilize the check information comprised in socket server to verify, if verification succeeds, then perform 106.
If do not comprise socket server information in the access request that pc client receives, then pc client can reply the response comprising cell-phone customer terminal download address.
When utilizing check information to verify in this step, if verify unsuccessfully, then the wifi connection establishment failure between PC and mobile phone.The form of check information and verification scheme are not limited in the embodiment of the present invention.
In 106, perform handshake procedure between pc client and cell-phone customer terminal, wifi connection establishment between PC and mobile phone successfully of shaking hands completes, and the identify label that pc client and cell-phone customer terminal record mutually the other side in 107 completes the binding between PC and mobile phone.
Handshake procedure in 106, in order to increase reliability and fail safe and perform, is not the necessary step of the present invention.Handshake mechanism is not limited in the embodiment of the present invention, the three-way handshake mechanism of such as TCP/IP can be adopted.
Pc client can carry the identify label of PC in Quick Response Code, the identify label of PC also can be provided to cell-phone customer terminal in above-mentioned handshake procedure, the identify label of PC can be the GUID (Globally Unique Identifier, globally unique identifier) etc. of PC.Cell-phone customer terminal can the identify label of carrying mobile phone in the access request sent, and in above-mentioned handshake procedure, also can provide the identify label of mobile phone to pc client, the identify label of mobile phone can be the sequence number etc. of mobile phone.
After the above-mentioned flow process of execution, can connect based on the wifi set up between mobile phone and PC and carry out data interaction, thus realize the management of PC to mobile phone.
No matter that the client of mobile phone or the client of PC are subject to triggering that (such as user clicks the option disconnecting wifi connection in the client of mobile phone, or in the client of PC, click the option etc. disconnecting wifi and connect), after the wifi disconnected between mobile phone and PC connects, in order to power saving cell-phone customer terminal can delete the socket server of foundation, pc client can retain the HTTP service of foundation, also can retain the HTTP service of foundation.But no matter be that pc client or cell-phone customer terminal can retain binding information, i.e. the identify label of the other side, this binding information manually can be deleted by user.
In addition, for the PC mutually bound and mobile phone, namely set up PC and the mobile phone of wifi connection, can realize automatically finding and connecting, this process can as shown in Figure 2, comprise the following steps:
In 201, be opened at cell-phone customer terminal, or when cell-phone customer terminal is connected to wifi access point, set up interim socket server, and send UDP (User Datagram Protocol, User Datagram Protoco (UDP)) broadcast, this udp broadcast comprise interim socket server information, mobile phone identify label and bound the identify label of PC of this mobile phone.
Interim socket server information comprises ip address and the port numbers of mobile phone, can also comprise check information further.All identify labels of having bound the PC of this mobile phone of record, when sending udp broadcast, are included in this udp broadcast by cell-phone customer terminal, have bound more than one of the PC possibility of this mobile phone.
In 202, after pc client listens to udp broadcast, if comprise the identify label of self PC in this udp broadcast and the identify label of the mobile phone comprised in this udp broadcast is the identify label of the mobile phone that this PC has bound, then perform 203.
If do not comprise the identify label of self PC in this udp broadcast, or the identify label of the mobile phone comprised in this udp broadcast is not the identify label of the mobile phone that this PC has bound, then do not do subsequent treatment.In addition, if comprise check information in udp broadcast, then utilize check information to verify further, if verification succeeds, then perform 203; Otherwise do not do subsequent treatment.
In 203, pc client, according to the interim socket server information comprised in udp broadcast, sends the HTTP information on services of pc client foundation to cell-phone customer terminal.
If when disconnecting PC and being connected with the wifi between mobile phone, pc client does not delete HTTP service, then directly send this HTTP information on services in this step.If when disconnecting PC and being connected with the wifi between mobile phone, pc client deletes HTTP service, then in this step, first pc client sets up HTTP service, then sends the HTTP information on services of pc client foundation to cell-phone customer terminal.
In 204, cell-phone customer terminal deletes interim socket server, then starts to perform step 104 and flow process afterwards thereof in flow process shown in Fig. 1.Namely after cell-phone customer terminal deletes interim socket server in 204, set up a new socket server, send the access request comprising socket server information according to the HTTP information on services received to pc client.
In embodiments of the present invention, also the differentiation between interim socket server and socket server can be there is in cell-phone customer terminal, but cell-phone customer terminal sets up socket server in 201, in 204, do not re-establish socket server, but directly adopt this socket server to send access request.
In 205, after pc client receives the access request comprising socket server information, the check information comprised in socket server is utilized to verify, if verification succeeds, then perform handshake procedure between pc client and cell-phone customer terminal in 206, the wifi connection establishment of shaking hands successfully between PC and mobile phone completes.
With Fig. 3 and Fig. 4, device provided by the invention is described in detail respectively below.The structure drawing of device being arranged at first terminal that Fig. 3 provides for the embodiment of the present invention, as shown in Figure 3, this device can comprise service and set up module 01 and interactive module 02, can further include correction verification module 03 and binding module 04.
Service is set up module 01 and is responsible for setting up HTTP service, and HTTP information on services and default identification strings are supplied to interactive module 02.Set up in this service the HTTP service that module 01 can set up a non-given content, conduct interviews for follow-up cell-phone customer terminal.HTTP information on services and default identification strings are supplied to the second terminal by interactive module 02.
If the second terminal is mobile terminal and possess scanning and analytical capabilities, then can adopt this preferred implementation, namely service is set up module 01 and is generated the Quick Response Code comprising HTTP information on services and default identification strings, Quick Response Code is supplied to interactive module 02.Quick Response Code shows by interactive module 02 on the screen of first terminal, carries out scanning and resolving for the second terminal.Certainly, except the mode of Quick Response Code, the other forms of information codes such as one-dimension code can also be adopted, with only for Quick Response Code in the present embodiment.
After second terminal is resolved and is obtained HTTP information on services and default identification strings from the Quick Response Code of scanning, determine that can set up wifi with first terminal is connected, then the second terminal sets up sockekt server, sends the access request comprising socket server information according to the HTTP information on services obtained to first terminal.
After interactive module 02 now in this device receives the access request from the second terminal, complete the wifi connection establishment between first terminal and the second terminal.
Above-mentioned HTTP information on services can comprise ip address and the port numbers of first terminal, and socket server information comprises ip address and the port numbers of the second terminal.Further, socket server information can also comprise: check information.Correction verification module 03 can, after interactive module 02 receives access request, utilize check information to verify.If verification succeeds, then interactive module 02 can and the second terminal perform handshake procedure to complete the wifi connection establishment between first terminal and the second terminal.If verify unsuccessfully, then the wifi connection establishment failure between first terminal and the second terminal.
After completing the wifi connection establishment between first terminal and the second terminal, the identify label that binding module 04 records the second terminal is as the identify label of binding terminal.Second terminal can carry the identify label of the second terminal in the access request sent, and also can provide the identify label of the second terminal in above-mentioned handshake procedure.
In order to adapt to and the wifi realizing the second terminal automatically finds and is connected flow process, after interactive module 02 receives the udp broadcast from the second terminal, if comprise the identify label of first terminal in udp broadcast, and the identify label of the second terminal comprised in udp broadcast is the identify label of first terminal binding terminal, then send to the second terminal the HTTP information on services that module 01 foundation is set up in service according to the socket server information comprised in udp broadcast.
The structure drawing of device being arranged at the second terminal that Fig. 4 provides for the embodiment of the present invention, as shown in Figure 4, this device can comprise: module 12 is set up in interactive module 11 and service.
Interactive module 11 obtain from first terminal HTTP information on services and preset identification strings.If interactive module 11 gets default identification strings, then service is set up module 12 and is set up socket server, and socket server information is supplied to interactive module 11.Interactive module 11 sends access request according to HTTP information on services to first terminal, comprises service and set up the socket server information that module provides, to complete the wifi connection establishment between first terminal and the second terminal in this access request.
As one preferably execution mode, first terminal can generate the information code comprising HTTP information on services and default identification strings, and the interactive module 11 of the second terminal can by scanning and resolving the information code that this information code obtains HTTP information on services and default identification strings.Information code can adopt the form such as Quick Response Code, one-dimension code.
Above-mentioned HTTP information on services comprises ip address and the port numbers of first terminal; Socket server information comprises ip address and the port numbers of the second terminal, can further include check information.
Above-mentioned interactive unit 11 can and first terminal perform handshake procedure to complete the wifi connection establishment between first terminal and the second terminal.
No matter be that first terminal or the second terminal are subject to triggering rear disconnection wifi connection between the two, service sets up module 12 after first terminal is connected disconnection with the wifi of the second terminal, considers, can delete socket server for power saving.
In order to realize the process that the second terminal automatically finds with the first terminal be connected and connects, module 12 is set up in service can when this device be opened, or when the second terminal is connected to wifi access point, set up socket server, the udp broadcast comprising the identify label of binding terminal of socket server information, the identify label of the second terminal and the second terminal is supplied to interactive module 11, sends udp broadcast by interactive module 11.
After first terminal listens to udp broadcast, if comprise the identify label of first terminal in this udp broadcast and the identify label of the second terminal comprised in this udp broadcast is the identify label of this first terminal binding terminal, then according to the socket server information comprised in udp broadcast, send HTTP information on services to the second terminal.
If the service of above-mentioned second terminal is set up module 12 and receive HTTP information on services after transmission udp broadcast, then delete the socket server of foundation, re-establish a new socket server.That is, in automatic discovery procedure, start to set up an interim socket server, after receiving the HTTP information on services of first terminal, delete interim socket server, re-establish a socket server.Then interactive module 112 sends the access request comprising the socket server information re-established to first terminal according to the HTTP information on services received.
Described as can be seen from above, methods, devices and systems provided by the invention possess following advantage:
1) connection between two terminals is set up in the present invention without the need to being connected by USB line, and without the need to connecting with server respectively, but directly set up the connection between two terminals, improve convenience.
2) being connected in local area network (LAN) between two terminals realizes, and does not rely on outer net, and connection speed is fast, connects into power high.
3) be applicable to be in the plurality of application scenes in same local area network (LAN), such as, connection between PC and mobile phone, the connection between intelligent television and mobile phone, connection between PC and panel computer etc.
In several embodiment provided by the present invention, should be understood that, disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, and such as, the division of described unit, is only a kind of logic function and divides, and actual can have other dividing mode when realizing.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form that hardware also can be adopted to add SFU software functional unit realizes.
The above-mentioned integrated unit realized with the form of SFU software functional unit, can be stored in a computer read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) perform the part steps of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. various can be program code stored medium.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.

Claims (24)

1. set up the method connected between terminal in a local network, it is characterized in that, the method comprises:
The client of S1, first terminal sets up HTML (Hypertext Markup Language) HTTP service, HTTP information on services and default identification strings is supplied to the client of the second terminal;
After the client of S2, described second terminal gets described default identification strings, set up sockets services socket server;
The client of S3, described second terminal sends to the client of described first terminal the access request comprising socket server information according to described HTTP information on services;
After the client of S4, described first terminal receives described access request, complete the wifi connection establishment between described first terminal and described second terminal.
2. method according to claim 1, it is characterized in that, the client that described HTTP information on services and default identification strings are supplied to the second terminal is comprised: the client of described first terminal generates the information code comprising described HTTP information on services and default identification strings, shows described information code;
The client scan of described second terminal also resolves described information code, the identification strings obtaining described HTTP information on services and preset.
3. method according to claim 1, is characterized in that, described HTTP information on services comprises: the ip address of described first terminal and port numbers;
Described socket server information comprises: the ip address of described second terminal and port numbers.
4. method according to claim 3, is characterized in that, described socket server information also comprises: check information;
After the client of described first terminal receives described access request, comprise further: utilize described check information to verify.
5. method according to claim 1, is characterized in that, in described S4, the client of described first terminal and the client executing handshake procedure of described second terminal are to complete the wifi connection establishment between described first terminal and described second terminal.
6. method according to claim 1, is characterized in that, the method also comprises: after described first terminal is connected disconnection with the wifi of described second terminal, the client of described second terminal deletes described socket server.
7. the method according to the arbitrary claim of claim 1 to 6, it is characterized in that, after completing the wifi connection establishment between described first terminal and described second terminal, the identify label that the client of described first terminal and the client of described second terminal record distant terminal is mutually as the identify label of binding terminal.
8. method according to claim 7, is characterized in that, described first terminal is connected disconnection with the wifi of described second terminal after, the method also comprises:
The client of A1, described second terminal is when being opened, or when described second terminal is connected to wifi access point, set up socket server, and sending User Datagram Protoco (UDP) udp broadcast, described udp broadcast comprises the identify label of socket server information, the identify label of the second terminal and described second terminal binding terminal;
After the client of A2, described first terminal receives described udp broadcast, if comprise the identify label of described first terminal in described udp broadcast, and the identify label of the second terminal comprised in described udp broadcast is the identify label of described first terminal binding terminal, then send to the client of described second terminal the HTTP information on services set up according to the socket server information comprised in described udp broadcast;
Go to and perform described S3.
9. method according to claim 8, is characterized in that, goes to and performs before described S3, also comprise in described A2: the client of described second terminal deletes the socket server set up, and re-establishes a new socket server.
10. set up the device connected between terminal in a local network, this device is arranged at first terminal, it is characterized in that, this device comprises:
Module is set up in service, for setting up HTTP service, HTTP information on services and default identification strings is supplied to interactive module;
Interactive module, for being supplied to the second terminal by described HTTP information on services and default identification strings; After receiving the access request from described second terminal, complete the wifi connection establishment between described first terminal and described second terminal, described access request comprises the socket server information that described second terminal is set up.
11. devices according to claim 10, is characterized in that, module is set up in described service, specifically for generating the information code comprising described HTTP information on services and default identification strings, described information code are supplied to described interactive module;
Described interactive module, specifically for showing described information code on the screen of described first terminal.
12. devices according to claim 10, is characterized in that, described HTTP information on services comprises: the ip address of described first terminal and port numbers;
Described socket server information comprises: the ip address of described second terminal and port numbers.
13. devices according to claim 12, is characterized in that, described socket server information also comprises: check information;
This device also comprises: correction verification module, for after described interactive module receives described access request, utilizes described check information to verify.
14. devices according to claim 10, is characterized in that, described interactive module, also perform handshake procedure to complete the wifi connection establishment between described first terminal and described second terminal for described second terminal.
15. according to claim 10 to the device described in 14 arbitrary claims, it is characterized in that, this device also comprises: binding module, for after completing the wifi connection establishment between described first terminal and described second terminal, the identify label of recording described second terminal is as the identify label of binding terminal.
16. devices according to claim 15, is characterized in that, this device also comprises:
Described interactive module, also for after receiving the udp broadcast from described second terminal, if comprise the identify label of described first terminal in described udp broadcast, and the identify label of the second terminal comprised in described udp broadcast is the identify label of described first terminal binding terminal, then sends described service according to the socket server information comprised in described udp broadcast to described second terminal and set up the HTTP information on services that module sets up.
Set up the device connected between terminal in a local network for 17. 1 kinds, this device is arranged at the second terminal, it is characterized in that, described interactive module, also for obtain from first terminal HTTP information on services and preset identification strings; Send access request according to described HTTP information on services to described first terminal, comprise service in this access request and set up the socket server information that module provides, to complete the wifi connection establishment between described first terminal and described second terminal;
Module is set up in service, if get described default identification strings for described interactive module, then sets up socket server, and socket server information is supplied to described interactive module.
18. devices according to claim 17, is characterized in that, described interactive module by scan and resolve described first terminal display information code, obtain described HTTP information on services and preset identification strings.
19. devices according to claim 17, is characterized in that, described HTTP information on services comprises: the ip address of described first terminal and port numbers;
Described socket server information comprises: the ip address of described second terminal and port numbers.
20. devices according to claim 17, is characterized in that, described interactive unit, also perform handshake procedure to complete the wifi connection establishment between described first terminal and described second terminal for described first terminal.
21. devices according to claim 17, is characterized in that, module is set up in described service, also for after described first terminal is connected disconnection with the wifi of described second terminal, delete described socket server.
22. according to claim 17 to the device described in 21 arbitrary claims, it is characterized in that, module is set up in described service, also for when this device is opened, or when described second terminal is connected to wifi access point, set up socket server, the udp broadcast comprising the identify label of binding terminal of socket server information, the identify label of the second terminal and described second terminal is supplied to described interactive module;
Described interactive module, also for sending described udp broadcast.
23. devices according to claim 22, is characterized in that, module is set up in described service, if also for receiving HTTP information on services after transmission udp broadcast, then delete the socket server of foundation, re-establish a new socket server.
Set up the system connected between terminal in a local network, it is characterized in that for 24. 1 kinds, this system comprises: the device as described in claim as arbitrary in claim 10 to 14 and the device as described in claim as arbitrary in claim 17 to 21.
CN201410769011.6A 2014-12-12 2014-12-12 The methods, devices and systems connected between terminal are established in a local network Active CN104580376B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410769011.6A CN104580376B (en) 2014-12-12 2014-12-12 The methods, devices and systems connected between terminal are established in a local network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410769011.6A CN104580376B (en) 2014-12-12 2014-12-12 The methods, devices and systems connected between terminal are established in a local network

Publications (2)

Publication Number Publication Date
CN104580376A true CN104580376A (en) 2015-04-29
CN104580376B CN104580376B (en) 2019-03-08

Family

ID=53095534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410769011.6A Active CN104580376B (en) 2014-12-12 2014-12-12 The methods, devices and systems connected between terminal are established in a local network

Country Status (1)

Country Link
CN (1) CN104580376B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105263194A (en) * 2015-09-18 2016-01-20 北京金山安全软件有限公司 Method and device for establishing communication connection between mobile equipment and fixed equipment
CN105306567A (en) * 2015-10-23 2016-02-03 小米科技有限责任公司 Method and device for terminal connection
CN107277578A (en) * 2016-04-06 2017-10-20 北京优朋普乐科技有限公司 The method and system manipulated by mobile terminal to television terminal
CN107809807A (en) * 2017-10-20 2018-03-16 广州小鹏汽车科技有限公司 The communication means and device of large-size screen monitors and mobile terminal are controlled in a kind of Android
CN107948277A (en) * 2017-11-22 2018-04-20 王佳 One kind is across screen exchange method and device
CN109729118A (en) * 2017-10-30 2019-05-07 阿里巴巴集团控股有限公司 Data transmission method, network problem determine method, client and server
CN110418311A (en) * 2018-04-28 2019-11-05 华为技术有限公司 A kind of interconnected method based on multiple terminals, device and terminal
CN113301048A (en) * 2021-05-26 2021-08-24 随锐科技集团股份有限公司 Method and system for realizing conference control link

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110080894A1 (en) * 2008-04-28 2011-04-07 Ntt Docomo, Inc. Mobile communication method, mobile station, and wireless access network apparatus
CN103544956A (en) * 2013-06-20 2014-01-29 Tcl集团股份有限公司 WIFI speaker and intelligent terminal negotiated decoding method and system
CN103780397A (en) * 2014-02-25 2014-05-07 中国科学院信息工程研究所 Multi-screen multi-factor WEB identity authentication method convenient and fast to implement
CN104184834A (en) * 2014-09-11 2014-12-03 东莞宇龙通信科技有限公司 File transmission method and device and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110080894A1 (en) * 2008-04-28 2011-04-07 Ntt Docomo, Inc. Mobile communication method, mobile station, and wireless access network apparatus
CN103544956A (en) * 2013-06-20 2014-01-29 Tcl集团股份有限公司 WIFI speaker and intelligent terminal negotiated decoding method and system
CN103780397A (en) * 2014-02-25 2014-05-07 中国科学院信息工程研究所 Multi-screen multi-factor WEB identity authentication method convenient and fast to implement
CN104184834A (en) * 2014-09-11 2014-12-03 东莞宇龙通信科技有限公司 File transmission method and device and terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DANIEL CAMPS MUR等: ""DEVICE-TO-DEVICE COMMUNICATIONS WITH WIFI"", 《IEEE WIRELESS COMMUNICATIONS》 *
宋素荣: ""基于TCP的Java socket通信技术"", 《科技创新导报》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105263194A (en) * 2015-09-18 2016-01-20 北京金山安全软件有限公司 Method and device for establishing communication connection between mobile equipment and fixed equipment
US10694551B2 (en) 2015-09-18 2020-06-23 Beijing Kingsoft Internet Security Software Co., Ltd. Method and apparatus for binding communication between mobile device and fixed device
CN105306567A (en) * 2015-10-23 2016-02-03 小米科技有限责任公司 Method and device for terminal connection
CN105306567B (en) * 2015-10-23 2019-07-19 小米科技有限责任公司 Method and device for terminal connection
CN107277578A (en) * 2016-04-06 2017-10-20 北京优朋普乐科技有限公司 The method and system manipulated by mobile terminal to television terminal
CN107809807A (en) * 2017-10-20 2018-03-16 广州小鹏汽车科技有限公司 The communication means and device of large-size screen monitors and mobile terminal are controlled in a kind of Android
CN109729118A (en) * 2017-10-30 2019-05-07 阿里巴巴集团控股有限公司 Data transmission method, network problem determine method, client and server
CN109729118B (en) * 2017-10-30 2022-04-01 阿里巴巴集团控股有限公司 Data transmission method, network problem determination method, client and server
CN107948277A (en) * 2017-11-22 2018-04-20 王佳 One kind is across screen exchange method and device
CN110418311A (en) * 2018-04-28 2019-11-05 华为技术有限公司 A kind of interconnected method based on multiple terminals, device and terminal
CN113301048A (en) * 2021-05-26 2021-08-24 随锐科技集团股份有限公司 Method and system for realizing conference control link
CN113301048B (en) * 2021-05-26 2023-04-07 随锐科技集团股份有限公司 Method and system for realizing conference control link

Also Published As

Publication number Publication date
CN104580376B (en) 2019-03-08

Similar Documents

Publication Publication Date Title
CN104580376A (en) Method, device and system for constructing connection between terminals in local area network
CN102802059B (en) The method of configuration machine top box, Apparatus and system
CN103986776B (en) A kind of router and the method for down loading based on router
US20110246983A1 (en) Wireless Network Backup Device and Method
CN103024062A (en) Data sharing method, clients and data sharing system
US20140214963A1 (en) Method, server and system for data sharing in social networking service
CN103618710A (en) Individual processing method and device of file between mobile device and computing device
CN103152392A (en) Providing method, acquisition method, equipment and system of installation package
CN105611422A (en) Online live broadcast method based on multi-media list and apparatus thereof
CN105554136B (en) Backup Data restoring method, apparatus and system
CN108540552B (en) Device interconnection method, apparatus, system, device and storage medium
CN111542035A (en) Cloud service connection method, system and related equipment
WO2016119623A1 (en) Method and device for realizing network sharing
CN103716230A (en) Message sending method, device and server
CN105701153A (en) Method and device for reading webpage resources and electronic equipment
CN103997437A (en) Cloud server registration function testing method
CN103581240A (en) Application program downloading method, user equipment and application server
CN105009115A (en) Method and apparatus for obtaining network resources
CN106899630B (en) Thumbnail display method and device for pictures in network disk
CN109479214B (en) Load balancing method and related device
CN102904935B (en) Downloading method, downloading device and downloading system based on home gateway
US20170171357A1 (en) Apparatus and method for assisting in downloading file successfully
CN110177360B (en) Method and device for binding with wearable device
CN105282821A (en) Terminal and method for connecting the terminal with wireless fidelity WiFi access point
CN104065519A (en) Method for improving conversation interactive performance and automatic configuration server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant