Handheld device controls the method and system of computer terminal by scan code
Technical field
The present invention relates to the control technology between a kind of equipment, particularly relate to and utilize handheld device to control the method and system of computer terminal.
Background technology
Along with the develop rapidly of a series of handheld device such as smart mobile phone and panel computer is with universal, developer's a large amount of application software that has been smart mobile phone and dull and stereotyped development of computers, such as originally can only run video playback client on computers, and also can run on smart mobile phone and panel computer now.
But, than the disposal ability of computer, the disposal ability of smart mobile phone and this kind of handheld device of panel computer is more limited, and limit by the capacity of the memory device in handheld device, and the video resource often in handheld device is nothing like the aboundresources on computer.
And the aboundresources on computer but portability is poor, handheld device good portability but resource are not enriched, and owing to there is not association between handheld device and computer, causing each other can not be complementary, causes data resource to waste.
Summary of the invention
The object of the invention is to solve the problem, provide a kind of handheld device controls computer terminal method and system by scan code, can be controlled computer terminal by handheld device, such as selected by handheld device and play the video resource be positioned on computer terminal, make the characteristic of computer terminal and handheld device obtain complementation, avoid the waste of data resource.
Technical scheme of the present invention is: present invention is disclosed a kind of handheld device controls computer terminal method by scan code, comprising:
One computer terminal is to a server request scan code or produce scan code this server registration backward voluntarily, and the information of user name is carried on this scan code by this computer terminal;
This server obtains user name, the outer net IP and Intranet IP of this computer terminal;
One handheld device is resolved with this scan code photographed and is obtained user name, and by this user name to this server request, obtains outer net IP and the Intranet IP of this computer terminal from this server;
This handheld device, according to the outer net IP of this computer terminal obtained from this server and Intranet IP, judges whether self and this computer terminal are in same outer net and same Intranet;
If this handheld device and this computer terminal are in same outer net and same Intranet, then this handheld device is initiated to this computer terminal to control request;
This computer terminal receives the control request of this handheld device, sets up the connection between this computer terminal and this handheld device, the operation controlling on this computer terminal to make this handheld device.
Handheld device according to the present invention controls an embodiment of the method for computer terminal by scan code, if this handheld device and this computer terminal are positioned at same outer net, then representing this handheld device with this computer terminal is carry out Internet connection by same dns server.
Handheld device according to the present invention controls the embodiment of method of computer terminal by scan code, is between this handheld device under same dns server and this computer terminal and is communicated by ICP/IP protocol.
Handheld device according to the present invention controls an embodiment of the method for computer terminal by scan code, if this handheld device and this computer terminal are positioned at same Intranet, then representing this handheld device with this computer terminal is be in the same network segment.
Handheld device according to the present invention controls an embodiment of the method for computer terminal by scan code, also comprise after the connection establishment between this computer terminal and this handheld device completes:
This handheld device controls the video playback on this computer terminal.
Present invention further teaches a kind of handheld device controls computer terminal system by scan code, comprise a server, a computer terminal and a handheld device, wherein:
This computer terminal comprises:
One scan code information carrying module, this computer terminal is to this server request scan code or produce scan code this server registration backward voluntarily, and the information of user name is carried on this scan code by this computer terminal;
This server comprises:
One log-on message acquisition module, connects this computer terminal, obtains the user name of this computer terminal, outer net IP and Intranet IP;
One log-on message sending module, connects this handheld device, according to the username information that this handheld device provides, the outer net IP of the computer terminal of correspondence and Intranet IP is sent to this handheld device;
This handheld device comprises:
One scan code parsing module, connects this server, resolves obtain user name with this scan code photographed, and by this user name to this server request;
One judge module, according to outer net IP and the Intranet IP of this computer terminal obtained from this server, judges whether self and this computer terminal are in same outer net and same Intranet;
One connection control sets up module, if this handheld device and this computer terminal are in same outer net and same Intranet, then this handheld device is initiated to this computer terminal to control request, set up the connection between this computer terminal and this handheld device, the operation controlling on this computer terminal to make this handheld device.
Handheld device according to the present invention controls an embodiment of the system of computer terminal by scan code, in this judge module, if this handheld device and this computer terminal are positioned at same outer net, then representing this handheld device with this computer terminal is carry out Internet connection by same dns server.
Handheld device according to the present invention controls the embodiment of system of computer terminal by scan code, is between this handheld device under same dns server and this computer terminal and is communicated by ICP/IP protocol.
Handheld device according to the present invention controls an embodiment of the system of computer terminal by scan code, in judge module, if this handheld device and this computer terminal are positioned at same Intranet, then representing this handheld device with this computer terminal is be in the same network segment.
Handheld device according to the present invention controls an embodiment of the system of computer terminal by scan code, this handheld device also comprises:
Transmit control module, controls the video playback on this computer terminal.
The present invention contrasts prior art following beneficial effect: the solution of the present invention is that handheld device is passed through to resolve scan code acquisition user name, outer net IP and the Intranet IP of computer terminal is obtained based on the username information request server be resolved to, and judge whether handheld device and computer terminal are in same outer net and same Intranet with this, thus the control that connects between, and then carry out the follow-up video selected by handheld device on broadcasting computer terminal.
Accompanying drawing explanation
Fig. 1 shows handheld device of the present invention controls the preferred embodiment of the method for computer terminal flow chart by scan code.
Fig. 2 shows handheld device of the present invention controls the preferred embodiment of the system of computer terminal schematic diagram by scan code.
Fig. 3 shows handheld device of the present invention carries out conputer controlled schematic diagram by scan code.
Embodiment
Below in conjunction with drawings and Examples, the invention will be further described.
handheld device controls the embodiment of the method for computer terminal by scan code
Fig. 1 shows handheld device of the present invention controls the preferred embodiment of the method for computer terminal flow process by scan code.Refer to Fig. 1, the method for the present embodiment comprises following treatment step.
Step S10: computer terminal is to server request scan code or produce to server registration after scan code voluntarily, and the information of user name is carried on this scan code by computer terminal.
Have two kinds of modes, the first is that computer terminal shows to server request scan code, after obtaining scan code, is carried to by username information on scan code; The second is that computer terminal produces scan code and voluntarily to server registration.
Step S11: server obtains user name, the outer net IP and Intranet IP of computer terminal.
Step S12: handheld device is resolved with the scan code photographed and obtained user name, and by user name to this server request, obtains outer net IP and the Intranet IP of computer terminal from server.
Handheld device opens control inerface, selects the mode by scan code, and the scan code of the computer terminal photographed with camera is resolved and obtained user name.
Step S13: handheld device, according to the outer net IP of the computer terminal obtained from server and Intranet IP, judges whether self and computer terminal are in same outer net and same Intranet.
Step S14: if handheld device and computer terminal are in same outer net and same Intranet, then handheld device is initiated to computer terminal to control request.
Outer net IP refers to the dns server address that the Internet connects.If handheld device and computer terminal are positioned at same outer net, then represent handheld device and computer terminal carries out Internet connection by same dns server.And communicated by ICP/IP protocol between the handheld device be under same dns server and computer terminal.
Intranet IP refers to LAN IP.If handheld device and computer terminal are positioned at same Intranet, then represent handheld device and computer terminal is in the same network segment, such as, under being connected to same router.
Outer net IP is identical to be not necessarily in the same network segment, that is can mark off multiple network segment under a dns server, and the terminal equipment between cross-network segment can realize communication by routing forwarding.
Step S15: computer terminal receives the control request of handheld device, sets up the connection between computer terminal and handheld device, the operation controlling on this computer terminal to make handheld device.
Preferably, also comprise after the connection establishment between computer terminal and handheld device completes: handheld device controls the video playback on computer terminal.
After computer terminal and handheld device connect, concrete operation has following three kinds:
1, client UI interface is synchronous: the operation on the client UI interface of handheld device, is mapped on the client UI interface of computer terminal; In addition, what deserves to be explained is, in the present embodiment, user can select to open or close synchronizing function on the client UI interface of handheld device.
2, Voice command: user sends control command by voice to handheld device, handheld device sends to computer terminal after phonetic order is changed into executable control command.
3, touch pad controls: touch pad handheld device can being used as computer terminal uses, and the video directly controlling computer terminal is selected and plays.
handheld device controls the embodiment of the system of computer terminal by scan code
Fig. 2 shows handheld device of the present invention controls the embodiment of the system of computer terminal principle by scan code.Fig. 3 shows server, connection establishment process between computer terminal and handheld device.Please simultaneously see Fig. 2 and Fig. 3, the system of the present embodiment comprises server 1, computer terminal 2 and a handheld device 3.
One scan code information carrying module 10 is set in computer terminal 1.Server 2 comprises log-on message acquisition module 20, log-on message sending module 22.Handheld device 3 comprises one scan code parsing module 30, judge module 32, connection control and sets up module 34.
Computer terminal 1 is asked scan code to server 2 or is registered to server 2 after producing scan code voluntarily, and the information of user name is carried on scan code by computer terminal 1.Log-on message acquisition module 20 connects computer terminal 1, obtains user name, the outer net IP and Intranet IP of computer terminal 1.
Scan code parsing module 30 connection server 2, resolves the scan code photographed and obtains user name, and send request by this user name to server 2.
Log-on message sending module 22 connects handheld device 3, according to the username information that handheld device 3 provides, the outer net IP of the computer terminal 1 of correspondence and Intranet IP is sent to handheld device 3.
Judge module 32, according to the outer net IP of the computer terminal 1 obtained from server 2 and Intranet IP, judges whether self and computer terminal 1 are in same outer net and same Intranet.
Outer net IP refers to the dns server address that the Internet connects.If handheld device 3 and computer terminal 1 are positioned at same outer net, then represent handheld device 3 and computer terminal 1 carries out Internet connection by same dns server.And communicated by ICP/IP protocol between the handheld device 3 be under same dns server and computer terminal 1.
Intranet IP refers to LAN IP.If handheld device 3 and computer terminal 1 are positioned at same Intranet, then represent handheld device 3 and computer terminal 1 is in the same network segment, such as, under being connected to same router.
Outer net IP is identical to be not necessarily in the same network segment, that is can mark off multiple network segment under a dns server, and the terminal equipment between cross-network segment can realize communication by routing forwarding.
If handheld device 3 and computer terminal 1 are in same outer net and same Intranet, then set up module 34 by connection control to process: handheld device 3 is initiated to computer terminal 1 to control request, set up the connection between computer terminal 1 and handheld device 3, the operation controlling on computer terminal 1 to make handheld device 3.
Preferably, handheld device also comprises transmit control module, controls the video playback on this computer terminal.
After computer terminal 1 and handheld device 3 connect, concrete operation has following three kinds:
1, client UI interface is synchronous: the operation on the client UI interface of handheld device 3, is mapped on the client UI interface of computer terminal 1; In addition, what deserves to be explained is, in the present embodiment, user can select to open or close synchronizing function on the client UI interface of handheld device 3.
2, Voice command: user sends control command by voice to handheld device 3, after phonetic order is changed into executable control command by handheld device 3, sends to computer terminal 1.
3, touch pad controls: touch pad handheld device 3 can being used as computer terminal 1 uses, and the video directly controlling computer terminal 1 is selected and plays.
Above-described embodiment is available to those of ordinary skill in the art to realize and uses of the present invention; those of ordinary skill in the art can be without departing from the present invention in the case of the inventive idea; various modifications or change are made to above-described embodiment; thus protection scope of the present invention not limit by above-described embodiment, and should be the maximum magnitude meeting the inventive features that claims are mentioned.