Nothing Special   »   [go: up one dir, main page]

CN103401738A - Terminal connecting method and terminal connecting device - Google Patents

Terminal connecting method and terminal connecting device Download PDF

Info

Publication number
CN103401738A
CN103401738A CN2013103298785A CN201310329878A CN103401738A CN 103401738 A CN103401738 A CN 103401738A CN 2013103298785 A CN2013103298785 A CN 2013103298785A CN 201310329878 A CN201310329878 A CN 201310329878A CN 103401738 A CN103401738 A CN 103401738A
Authority
CN
China
Prior art keywords
terminal
broadcast message
address
sending
network
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
CN2013103298785A
Other languages
Chinese (zh)
Other versions
CN103401738B (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.)
Beijing Xiaomi Technology Co Ltd
Original Assignee
Beijing Xiaomi 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 Xiaomi Technology Co Ltd filed Critical Beijing Xiaomi Technology Co Ltd
Priority to CN201310329878.5A priority Critical patent/CN103401738B/en
Publication of CN103401738A publication Critical patent/CN103401738A/en
Application granted granted Critical
Publication of CN103401738B publication Critical patent/CN103401738B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a terminal connecting method and a terminal connecting device, belonging to the technical field of communication. The method comprises the following steps: periodically sending a broadcast message for detecting a first terminal to a network, wherein the broadcast message carries a self IP (internet protocol) address; receiving a feedback message returned by the first terminal, wherein the feedback message carries the IP address of the first terminal, and identification of the first terminal; sending a connecting message to the first terminal according to the IP address of the first terminal; and identifying the first terminal according to the identification of the first terminal. With the adoption of the method and the device, the terminal and control equipments such as a personal computer are connected through a network connection manner, and a process of handshaking, connection confirmation and identification of the control equipments and an Android terminal, so that the connection manners of the terminal and the control equipments such as the personal computer are increased, and the efficiency of controlling the terminal, which is inconveniently to be connected by using a USB (universal serial bus) connecting line, is improved.

Description

Method and device for connecting terminal
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for connecting a terminal.
Background
With the development of terminal technology, people can conveniently manage contents such as applications and files in a terminal through a terminal equipment management tool at a PC (Personal Computer) end. Before the management operation, the terminal and the PC terminal need to be connected so that the PC terminal can recognize the terminal and then can manage the application or file.
For the connection between the terminal of the Android operating system and the PC terminal, the terminal is connected by a USB (universal serial BUS) data line, and then an operating command for managing applications or files is transmitted through the USB data line. When the terminal is connected with the PC end through the USB data line, the terminal sends a master-slave equipment number to the PC end, the PC end inquires a drive corresponding to the master-slave equipment number in the corresponding relation between the master-slave equipment number and the drive stored in the PC end, and the terminal is identified according to the searched drive. After the terminal is identified, the application or file management is performed on the terminal by calling an ADB (Android Debug Bridge).
In the process of implementing the invention, the inventor finds that the technology at least has the following problems:
some terminals adopting the Android operating system are fixedly placed and are inconvenient to move, so that the terminals are inconvenient to be connected with a PC (personal computer) end through a USB (universal serial bus) data line for application or file management, and therefore the mode of connecting the terminals with the PC end through the USB data line is relatively limited, and the terminals are not favorable for management.
Disclosure of Invention
In order to solve the above technical problem, embodiments of the present invention provide a method and an apparatus for connecting a terminal. The technical scheme is as follows:
in one aspect, a method for connecting terminals is provided, and the method includes:
periodically sending a broadcast message for detecting a first terminal to a network, wherein the broadcast message carries a protocol IP address interconnected among own networks;
receiving a feedback message returned by the first terminal through a network, wherein the feedback message carries the IP address of the first terminal and the identifier of the first terminal;
and sending a connection message to the first terminal according to the IP address of the first terminal, and identifying the first terminal according to the identifier of the first terminal.
In another aspect, a method of connecting terminals is provided, the method including:
after being connected with a third terminal through a USB interface, the third terminal periodically sends a broadcast message for detecting the first terminal to a network, wherein the broadcast message carries an IP address of the third terminal;
receiving a feedback message returned by the first terminal through a network, wherein the feedback message carries the IP address of the first terminal and the identifier of the first terminal;
and sending a connection message to the first terminal according to the IP address of the first terminal, and sending the identifier of the first terminal to a third terminal so that the third terminal identifies the first terminal according to the identifier of the first terminal.
In another aspect, a method of connecting terminals is provided, the method including:
receiving a broadcast message through a network, wherein the broadcast message carries an IP address of a terminal which sends the broadcast message;
sending a feedback message to the terminal according to the IP address of the terminal sending the broadcast message, wherein the feedback message carries the IP address and the identification of the feedback message;
and receiving a connection message sent by the terminal, and establishing connection with the terminal through a network.
In another aspect, an apparatus for connecting a terminal is provided, the apparatus including:
a first sending module, configured to periodically send a broadcast message for detecting a first terminal to a network, where the broadcast message carries a protocol IP address interconnected between networks of the first sending module;
a first receiving module, configured to receive, through a network, a feedback message returned by the first terminal, where the feedback message carries an IP address of the first terminal and an identifier of the first terminal;
and the first connection module is used for sending a connection message to the first terminal according to the IP address of the first terminal and identifying the first terminal according to the identifier of the first terminal.
In another aspect, an apparatus for connecting a terminal is provided, the apparatus including:
the third sending module is used for periodically sending a broadcast message for detecting the first terminal to the network after the third sending module is connected with a third terminal through a USB interface, wherein the broadcast message carries an IP address of the third sending module;
a third receiving module, configured to receive, through a network, a feedback message returned by the first terminal, where the feedback message carries an IP address of the first terminal and an identifier of the first terminal;
and the second connection module is used for sending a connection message to the first terminal according to the IP address of the first terminal and sending the identifier of the first terminal to a third terminal so that the third terminal can identify the first terminal according to the identifier of the first terminal.
In another aspect, an apparatus for connecting a terminal is provided, the apparatus including:
a fifth receiving module, configured to receive a broadcast message through a network, where the broadcast message carries an IP address of a terminal that sends the broadcast message;
a fifth sending module, configured to send a feedback message to the terminal according to an IP address of the terminal that sends the broadcast message, where the feedback message carries its own IP address and its own identifier;
and the third connection module is used for receiving the connection message sent by the terminal and establishing connection with the terminal through a network.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
the method comprises the steps of handshaking, connection confirmation and identification with an android terminal in a network connection mode, and connecting the terminal with control equipment such as a PC (personal computer). The mode that the terminal is connected with control equipment such as a PC is increased, and the efficiency of controlling the terminal which is inconvenient to use a USB connecting line for connection is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for connecting a terminal according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for connecting terminals according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for connecting terminals according to a third embodiment of the present invention;
fig. 4 is a flowchart of a method for connecting terminals according to a fourth embodiment of the present invention;
fig. 5 is a flowchart of a method for connecting terminals according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a device for connecting terminals according to a sixth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a device for connecting terminals according to a seventh embodiment of the present invention;
fig. 8 is a schematic structural diagram of a device for connecting terminals according to an eighth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Example one
An embodiment of the present invention provides a method for connecting a terminal, which is shown in fig. 1.
The method for connecting the terminal comprises the following steps:
101: periodically sending a broadcast message for detecting a first terminal to a network, wherein the broadcast message carries a protocol IP address interconnected among own networks;
102: receiving a feedback message returned by the first terminal through a network, wherein the feedback message carries the IP address of the first terminal and the identifier of the first terminal;
103: and sending a connection message to the first terminal according to the IP address of the first terminal, and identifying the first terminal according to the identifier of the first terminal.
The embodiment of the invention performs the processes of handshaking, connection confirmation and identification with the android terminal in a network connection mode, and connects the terminal with control equipment such as a PC (personal computer). The mode that the terminal is connected with control equipment such as a PC is increased, and the efficiency of controlling the terminal which is inconvenient to use a USB connecting line for connection is improved.
Example two
An embodiment of the present invention provides a method for connecting a terminal, see fig. 2.
The method for connecting the terminal comprises the following steps:
201: after being connected with a third terminal through a USB interface, the third terminal periodically sends a broadcast message for detecting the first terminal to a network, wherein the broadcast message carries an IP address of the third terminal;
202: receiving a feedback message returned by the first terminal through a network, wherein the feedback message carries the IP address of the first terminal and the identifier of the first terminal;
203: and sending a connection message to the first terminal according to the IP address of the first terminal, and sending the identifier of the first terminal to a third terminal so that the third terminal identifies the first terminal according to the identifier of the first terminal, wherein the third terminal is connected with the third terminal through a USB interface.
The embodiment of the invention performs the processes of handshaking, connection confirmation and identification with the android terminal in a network connection mode, and connects the terminal with control equipment such as a PC (personal computer). The mode that the terminal is connected with control equipment such as a PC is increased, and the efficiency of controlling the terminal which is inconvenient to use a USB connecting line for connection is improved.
EXAMPLE III
An embodiment of the present invention provides a method for connecting a terminal, which is shown in fig. 3.
The method for connecting the terminal comprises the following steps:
301: receiving a broadcast message through a network, wherein the broadcast message carries an IP address of a terminal which sends the broadcast message;
302: sending a feedback message to the terminal according to the IP address of the terminal sending the broadcast message, wherein the feedback message carries the IP address and the identification of the feedback message;
303: and receiving a connection message sent by the terminal, and establishing connection with the terminal through a network.
The embodiment of the invention performs the processes of handshaking, connection confirmation and identification with the android terminal in a network connection mode, and connects the terminal with control equipment such as a PC (personal computer). The mode that the terminal is connected with control equipment such as a PC is increased, and the efficiency of controlling the terminal which is inconvenient to use a USB connecting line for connection is improved.
Example four
An embodiment of the present invention provides a method for connecting a terminal, which is shown in fig. 4.
It should be noted that the execution subject of the embodiment of the present invention is a PC, that is, a third terminal, and sends a broadcast message to a terminal to be connected through its own network card, and connects through the network connection command of the ADB.
Further, the first terminal in the embodiment of the present invention is a terminal equipped with an Android operating system, and may include, but is not limited to, a mobile phone, a television, a set-top box, and the like.
The method for connecting the terminal comprises the following steps:
401: and the third terminal periodically sends a broadcast message for detecting the first terminal to the network, wherein the broadcast message carries the protocol IP address interconnected between the networks.
And the third terminal periodically sends broadcast messages to the network through a network card of the third terminal, and the broadcast messages are used for detecting the android terminal which needs to be connected with the third terminal in the network.
Preferably, before the third terminal transmits the broadcast message, the transmitted broadcast message may be configured to designate a terminal that receives the broadcast message.
Therefore, steps that can also be performed before step 401 are:
and receiving configuration information for sending the broadcast message, wherein the configuration information carries the IP address of the first terminal or the terminal name of the first terminal.
When the configuration information carries the IP address of the appointed first terminal, setting the destination address for sending the broadcast message as the IP address of the first terminal; when the configuration information carries the terminal name of the appointed first terminal, the terminal name is added into the appointed field in the broadcast message, so that each terminal receiving the broadcast message is matched with the terminal name of the terminal according to the terminal name in the appointed field in the broadcast message, and if the terminal name is matched with the terminal name, the subsequent handshake connection process is carried out. The method can be used for the situation that a plurality of android terminals exist in the current network environment, and the terminals needing to be connected can be appointed to be connected for subsequent operation.
Therefore, after the third terminal designates the IP address or the terminal name of the connected terminal, step 401 may be:
according to the IP address of the first terminal carried in the configuration information, periodically sending a broadcast message for detecting the first terminal to a network; or,
and adding the terminal name of the first terminal into a broadcast message, and periodically sending the broadcast message for detecting the first terminal to a network, so that when the first terminal receives the broadcast message, whether the broadcast message is sent to the first terminal is determined according to the terminal name of the first terminal.
402: the first terminal receives a broadcast message through a network, wherein the broadcast message carries an IP address of a third terminal which sends the broadcast message.
The first terminal may start the steps of handshaking and connecting with the third terminal after receiving the broadcast message after the function switch of the network is turned on; or, the first terminal may always turn on the function of the network, and perform connection only when the user needs to perform connection, and at this time, start the steps of performing handshake and connection with the third terminal only by starting a function switch connected to the third terminal.
403: and sending a feedback message to the third terminal according to the IP address of the third terminal sending the broadcast message, wherein the feedback message carries the IP address and the identification of the feedback message.
When the third terminal performs the process of designating the receiving terminal in step 401, the execution process of step 403 is not changed for the first type of IP address designating the receiving terminal; for the second type of terminal name that specifies the receiving terminal, the broadcast message also carries the specified terminal name, and the process of step 403 is as follows:
and when the terminal name carried in the broadcast message is determined to be the same as the terminal name of the terminal, returning a feedback message to the terminal according to the IP address of the terminal sending the broadcast message.
Preferably, when the feedback message is returned to the third terminal, the preset port information may also be returned to the third terminal. The port information is used for receiving an operation command after connection with the third terminal is established.
And if the terminal name carried in the broadcast message is judged to be different from the terminal name of the broadcast message, discarding the broadcast message and not performing subsequent connection processing.
404: and the third terminal receives a feedback message returned by the first terminal through the network, wherein the feedback message carries the IP address of the first terminal and the identifier of the first terminal.
At this time, the process of handshaking between the third terminal and the first terminal is completed, and then the process of connecting is performed, and step 405 is executed.
Preferably, the port information sent by the first terminal may be identified in the feedback message. The terminal is used for sending the operation command to the first terminal after establishing connection with the first terminal according to the IP address and the port information of the first terminal.
405: and the third terminal sends a connection message to the first terminal according to the IP address of the first terminal, and identifies the first terminal according to the identifier of the first terminal.
The connection message is specifically a network connection command of the ADB sent by the third terminal to the first terminal, and is used for establishing network connection with the first terminal.
The first terminal is identified through the identifier of the first terminal, specifically, the model of the first terminal can be identified.
406: and receiving a connection message sent by the third terminal, and establishing connection with the third terminal through a network.
After the connection is established, the user may send various operation commands to the first terminal, where the operation commands may be: transmitting information such as short messages and address lists in the terminal to an operation command stored by a third terminal; an operation command for deleting the application in the first terminal; an operation command for installing the application in the first terminal; an operation command for transmitting data to the first terminal, etc., and a process of transmitting the operation command is performed in step 407.
407: and the third terminal receives the operation command sent to the first terminal, encapsulates the operation command and forwards the encapsulated operation command to the first terminal through a network according to the IP address of the first terminal.
And encapsulating the operation command into a command sent through a network, and sending the encapsulated operation command to the IP address and the port number of the first terminal obtained when the handshake is carried out with the first terminal.
408: the first terminal receives an operation command sent by a terminal which establishes connection with the first terminal through a network, and operates according to the operation command.
The embodiment of the invention performs the processes of handshaking, connection confirmation and identification with the android terminal in a network connection mode, and connects the terminal with control equipment such as a PC (personal computer). The mode that the terminal is connected with control equipment such as a PC is increased, and the efficiency of controlling the terminal which is inconvenient to use a USB connecting line for connection is improved.
EXAMPLE five
An embodiment of the present invention provides a method for connecting a terminal, see fig. 5.
It should be noted that the execution subject of the embodiment of the present invention is to connect a second terminal to a PC (third terminal) through a USB interface, where the second terminal is provided with a network connection device, sends a broadcast message to a terminal to be connected through the network connection device, and connects the terminal through a network connection command of the ADB after the handshake process. The descriptions of some steps are the same as the descriptions of the steps in the fourth embodiment, and are not repeated herein.
Further, the first terminal in the embodiment of the present invention is a terminal equipped with an Android operating system, and may include, but is not limited to, a mobile phone, a television, a set-top box, and the like.
The method for connecting the terminal comprises the following steps:
501: after the second terminal is connected with the third terminal through the USB interface, a broadcast message for detecting the first terminal is periodically sent to the network, and the broadcast message carries the IP address of the second terminal.
Preferably, before the second terminal transmits the broadcast message, the transmitted broadcast message may be configured to designate a terminal that receives the broadcast message.
Therefore, steps that can also be performed before step 501 are:
and receiving configuration information which is sent by a third terminal and used for sending the broadcast message, wherein the configuration information carries the IP address of the first terminal or the terminal name of the first terminal.
When the configuration information carries the IP address of the appointed first terminal, setting the destination address for sending the broadcast message as the IP address of the first terminal; when the configuration information carries the terminal name of the appointed first terminal, the terminal name is added into the appointed field in the broadcast message, so that each terminal receiving the broadcast message is matched with the terminal name of the terminal according to the terminal name in the appointed field in the broadcast message, and if the terminal name is matched with the terminal name, the subsequent handshake connection process is carried out. The method can be used for the situation that a plurality of android terminals exist in the current network environment, and the terminals needing to be connected can be appointed to be connected for subsequent operation.
Therefore, after the third terminal designates the IP address or the terminal name of the connected terminal and sends the configuration information to the second terminal, step 501 may be:
according to the IP address of the first terminal carried in the configuration information, periodically sending a broadcast message for detecting the first terminal to a network; or,
and adding the terminal name of the first terminal into a broadcast message, and periodically sending the broadcast message for detecting the first terminal to a network, so that when the first terminal receives the broadcast message, whether the broadcast message is sent to the first terminal is determined according to the terminal name of the first terminal.
502: a first terminal receives a broadcast message through a network, wherein the broadcast message carries an IP address of a second terminal which sends the broadcast message.
503: and sending a feedback message to the second terminal according to the IP address of the second terminal sending the broadcast message, wherein the feedback message carries the IP address and the identification of the second terminal.
When the third terminal performs the process of designating the receiving terminal in step 501, the execution process of step 503 is not changed for the first type of IP address designating the receiving terminal; for the second type of terminal name that specifies the receiving terminal, the broadcast message also carries the specified terminal name, and the process of step 503 is:
and when the terminal name carried in the broadcast message is determined to be the same as the terminal name of the terminal, returning a feedback message to the terminal according to the IP address of the terminal sending the broadcast message.
And if the terminal name carried in the broadcast message is judged to be different from the terminal name of the broadcast message, discarding the broadcast message and not performing subsequent connection processing.
Preferably, when the feedback message is returned to the third terminal, the preset port information may also be returned to the third terminal. The port information is used for receiving an operation command after connection with the third terminal is established.
504: and the second terminal receives a feedback message returned by the first terminal through the network, wherein the feedback message carries the IP address of the first terminal and the identifier of the first terminal.
At this time, the process of handshaking between the second terminal and the first terminal is completed, and then the process of connecting is performed, and step 505 is executed.
Preferably, the port information sent by the first terminal may be identified in the feedback message. The terminal is used for sending the operation command to the first terminal after establishing connection with the first terminal according to the IP address and the port information of the first terminal.
505: and according to the IP address of the first terminal, the second terminal sends a connection message to the first terminal and sends the identifier of the first terminal to a third terminal so that the third terminal identifies the first terminal according to the identifier of the first terminal, wherein the third terminal is connected with the third terminal through a USB interface.
The connection message is specifically a network connection command of the ADB sent by the second terminal to the first terminal, and is used for establishing network connection with the first terminal.
506: the third terminal receives the identification of the first terminal sent by the second terminal through a Universal Serial Bus (USB) interface, and identifies the first terminal according to the identification of the first terminal; and the second terminal is connected with the second terminal through a USB interface.
And the process of identifying the third terminal comprises the steps of inquiring the drive corresponding to the identifier of the first terminal by inquiring the corresponding relation between the identifier of the terminal and the drive after receiving the identifier of the first terminal sent by the second terminal through the USB interface, and identifying the first terminal according to the drive.
507: and the third terminal sends the operation command to the second terminal through a USB interface so that the second terminal packages the operation command and forwards the packaged operation command to the first terminal through a network according to the IP address of the first terminal.
When a user operates the third terminal to send an operation command to the first terminal, the operation command needs to be sent to the second terminal through the USB interface, the second terminal packages the operation command, and the operation command is forwarded to the first terminal through the network.
Further, the data returned by the first terminal is also received by the second terminal and forwarded to the third terminal.
508: and the second terminal receives the operation command sent by the third terminal, encapsulates the operation command and forwards the encapsulated operation command to the first terminal through the network according to the IP address of the first terminal.
509: the first terminal receives an operation command sent by a terminal which establishes connection with the first terminal through a network, and operates according to the operation command.
The embodiment of the invention performs the processes of handshaking, connection confirmation and identification with the android terminal in a network connection mode, and connects the terminal with control equipment such as a PC (personal computer). The mode that the terminal is connected with control equipment such as a PC is increased, and the efficiency of controlling the terminal which is inconvenient to use a USB connecting line for connection is improved.
EXAMPLE six
An embodiment of the present invention provides a device for connecting a terminal, and referring to fig. 6, the device includes:
a first sending module 601, configured to periodically send a broadcast message for detecting a first terminal to a network, where the broadcast message carries a protocol IP address interconnected between networks of the first sending module;
a first receiving module 602, configured to receive a feedback message returned by the first terminal through a network, where the feedback message carries an IP address of the first terminal and an identifier of the first terminal;
a first connection module 603, configured to send a connection message to the first terminal according to the IP address of the first terminal, and identify the first terminal according to the identifier of the first terminal.
In a specific embodiment, the apparatus further comprises:
a second receiving module 604, configured to receive configuration information used for sending a broadcast message, where the configuration information carries an IP address of the first terminal or a terminal name of the first terminal.
Wherein, the first sending module 601 includes:
a first sending unit, configured to periodically send, to a network, a broadcast message for detecting the first terminal according to the IP address of the first terminal carried in the configuration information;
a second sending unit, configured to add the terminal name of the first terminal into a broadcast message, and periodically send the broadcast message used for detecting the first terminal to a network, so that when the first terminal receives the broadcast message, it determines whether the broadcast message is sent to itself according to the terminal name of the first terminal.
The first connection module 603 is specifically configured to:
receiving an identifier of the first terminal sent by a second terminal through a Universal Serial Bus (USB) interface, and identifying the first terminal according to the identifier of the first terminal; and the second terminal is connected with the second terminal through a USB interface.
Wherein the apparatus further comprises:
a second sending module 605, configured to receive an operation command sent to the first terminal, encapsulate the operation command, and forward the encapsulated operation command to the first terminal through a network according to the IP address of the first terminal.
The second sending module 605 is specifically configured to:
and sending the operation command to a second terminal through a USB interface so that the second terminal encapsulates the operation command and forwards the encapsulated operation command to the first terminal through a network according to the IP address of the first terminal.
The embodiment of the invention performs the processes of handshaking, connection confirmation and identification with the android terminal in a network connection mode, and connects the terminal with control equipment such as a PC (personal computer). The mode that the terminal is connected with control equipment such as a PC is increased, and the efficiency of controlling the terminal which is inconvenient to use a USB connecting line for connection is improved.
EXAMPLE seven
An embodiment of the present invention provides an apparatus for connecting a terminal, and referring to fig. 7, the apparatus includes:
a third sending module 701, configured to periodically send, after being connected to a third terminal through a USB interface, a broadcast message for detecting the first terminal to a network, where the broadcast message carries an IP address of the third terminal;
a third receiving module 702, configured to receive, through a network, a feedback message returned by the first terminal, where the feedback message carries an IP address of the first terminal and an identifier of the first terminal;
a second connection module 703, configured to send a connection message to the first terminal according to the IP address of the first terminal, and send the identifier of the first terminal to a third terminal, so that the third terminal identifies the first terminal according to the identifier of the first terminal.
In a specific embodiment, the apparatus further comprises:
a fourth receiving module 704, configured to receive configuration information sent by the third terminal and used for sending the broadcast message, where the configuration information carries an IP address of the first terminal or a terminal name of the first terminal.
The third sending module 701 includes:
a third sending unit, configured to periodically send, to a network, a broadcast message for detecting the first terminal according to the IP address of the first terminal carried in the configuration information; or,
a fourth sending unit, configured to add the terminal name of the first terminal into a broadcast message, and periodically send the broadcast message used for detecting the first terminal to a network, so that when the first terminal receives the broadcast message, it determines whether the broadcast message is sent to itself according to the terminal name of the first terminal.
Wherein the apparatus further comprises:
a fourth sending module 705, configured to receive the operation command sent by the third terminal, encapsulate the operation command, and forward the encapsulated operation command to the first terminal through a network according to the IP address of the first terminal.
The embodiment of the invention performs the processes of handshaking, connection confirmation and identification with the android terminal in a network connection mode, and connects the terminal with control equipment such as a PC (personal computer). The mode that the terminal is connected with control equipment such as a PC is increased, and the efficiency of controlling the terminal which is inconvenient to use a USB connecting line for connection is improved.
Example eight
An embodiment of the present invention provides a device for connecting a terminal, and referring to fig. 8, the device includes:
a fifth receiving module 801, configured to receive a broadcast message through a network, where the broadcast message carries an IP address of a terminal that sends the broadcast message;
a fifth sending module 802, configured to send a feedback message to the terminal according to an IP address of the terminal that sends the broadcast message, where the feedback message carries an IP address of the terminal and an identifier of the terminal;
a third connection module 803, configured to receive a connection message sent by the terminal, and establish a connection with the terminal through a network.
In a specific embodiment, the broadcast message further carries a name of a terminal to be connected;
the fifth sending module 802 is specifically configured to:
and when the terminal name carried in the broadcast message is determined to be the same as the terminal name of the terminal, returning a feedback message to the terminal according to the IP address of the terminal sending the broadcast message.
Wherein the apparatus further comprises:
a sixth receiving module 804, configured to receive, through the network, an operation command sent by a terminal that establishes a connection with the sixth receiving module, and perform an operation according to the operation command.
The embodiment of the invention performs the processes of handshaking, connection confirmation and identification with the android terminal in a network connection mode, and connects the terminal with control equipment such as a PC (personal computer). The mode that the terminal is connected with control equipment such as a PC is increased, and the efficiency of controlling the terminal which is inconvenient to use a USB connecting line for connection is improved.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (26)

1. A method of connecting terminals, the method comprising:
periodically sending a broadcast message for detecting a first terminal to a network, wherein the broadcast message carries a protocol IP address interconnected among own networks;
receiving a feedback message returned by the first terminal through a network, wherein the feedback message carries the IP address of the first terminal and the identifier of the first terminal;
and sending a connection message to the first terminal according to the IP address of the first terminal, and identifying the first terminal according to the identifier of the first terminal.
2. The method of claim 1, wherein before the periodically sending the broadcast message for probing the first terminal into the network, the method further comprises:
and receiving configuration information for sending the broadcast message, wherein the configuration information carries the IP address of the first terminal or the terminal name of the first terminal.
3. The method of claim 2, wherein the periodically sending a broadcast message to the network for probing the first terminal comprises:
according to the IP address of the first terminal carried in the configuration information, periodically sending a broadcast message for detecting the first terminal to a network; or,
and adding the terminal name of the first terminal into a broadcast message, and periodically sending the broadcast message for detecting the first terminal to a network, so that when the first terminal receives the broadcast message, whether the broadcast message is sent to the first terminal is determined according to the terminal name of the first terminal.
4. The method of claim 1, wherein the identifying the first terminal according to the identity of the first terminal comprises:
receiving an identifier of the first terminal sent by a second terminal through a Universal Serial Bus (USB) interface, and identifying the first terminal according to the identifier of the first terminal; and the second terminal is connected with the second terminal through a USB interface.
5. The method of claim 1, wherein after sending a connect message to the first terminal according to the IP address of the first terminal and identifying the first terminal according to the identity of the first terminal, the method further comprises:
and receiving an operation command sent to the first terminal, encapsulating the operation command, and forwarding the encapsulated operation command to the first terminal through a network according to the IP address of the first terminal.
6. The method of claim 5, wherein the receiving the operation command sent to the first terminal, encapsulating the operation command, and forwarding the encapsulated operation command to the first terminal through a network according to the IP address of the first terminal comprises:
and sending the operation command to a second terminal through a USB interface so that the second terminal encapsulates the operation command and forwards the encapsulated operation command to the first terminal through a network according to the IP address of the first terminal.
7. A method of connecting terminals, the method comprising:
after being connected with a third terminal through a USB interface, the third terminal periodically sends a broadcast message for detecting the first terminal to a network, wherein the broadcast message carries an IP address of the third terminal;
receiving a feedback message returned by the first terminal through a network, wherein the feedback message carries the IP address of the first terminal and the identifier of the first terminal;
and sending a connection message to the first terminal according to the IP address of the first terminal, and sending the identifier of the first terminal to a third terminal so that the third terminal identifies the first terminal according to the identifier of the first terminal.
8. The method of claim 7, wherein before the periodically sending the broadcast message for probing the first terminal into the network, the method further comprises:
and receiving configuration information which is sent by a third terminal and used for sending the broadcast message, wherein the configuration information carries the IP address of the first terminal or the terminal name of the first terminal.
9. The method of claim 8, wherein the periodically sending a broadcast message to the network for probing the first terminal comprises:
according to the IP address of the first terminal carried in the configuration information, periodically sending a broadcast message for detecting the first terminal to a network; or,
and adding the terminal name of the first terminal into a broadcast message, and periodically sending the broadcast message for detecting the first terminal to a network, so that when the first terminal receives the broadcast message, whether the broadcast message is sent to the first terminal is determined according to the terminal name of the first terminal.
10. The method of claim 7, wherein after sending the connection message to the first terminal according to the IP address of the first terminal and sending the identity of the first terminal to a third terminal, the method further comprises:
and receiving an operation command sent by the third terminal, encapsulating the operation command, and forwarding the encapsulated operation command to the first terminal through a network according to the IP address of the first terminal.
11. A method of connecting terminals, the method comprising:
receiving a broadcast message through a network, wherein the broadcast message carries an IP address of a terminal which sends the broadcast message;
sending a feedback message to the terminal according to the IP address of the terminal sending the broadcast message, wherein the feedback message carries the IP address and the identification of the feedback message;
and receiving a connection message sent by the terminal, and establishing connection with the terminal through a network.
12. The method according to claim 11, wherein the broadcast message further carries a name of a terminal to be connected;
the sending a feedback message to the terminal according to the IP address of the terminal sending the broadcast message includes:
and when the terminal name carried in the broadcast message is determined to be the same as the terminal name of the terminal, returning a feedback message to the terminal according to the IP address of the terminal sending the broadcast message.
13. The method according to claim 11, wherein after receiving the connection message sent by the terminal and establishing a connection with the terminal through the network, the method further comprises:
and receiving an operation command sent by a terminal establishing connection with the terminal through a network, and operating according to the operation command.
14. An apparatus for connecting terminals, the apparatus comprising:
a first sending module, configured to periodically send a broadcast message for detecting a first terminal to a network, where the broadcast message carries a protocol IP address interconnected between networks of the first sending module;
a first receiving module, configured to receive, through a network, a feedback message returned by the first terminal, where the feedback message carries an IP address of the first terminal and an identifier of the first terminal;
and the first connection module is used for sending a connection message to the first terminal according to the IP address of the first terminal and identifying the first terminal according to the identifier of the first terminal.
15. The apparatus of claim 14, further comprising:
a second receiving module, configured to receive configuration information used for sending the broadcast message, where the configuration information carries an IP address of the first terminal or a terminal name of the first terminal.
16. The apparatus of claim 15, wherein the first sending module comprises:
a first sending unit, configured to periodically send, to a network, a broadcast message for detecting the first terminal according to the IP address of the first terminal carried in the configuration information;
a second sending unit, configured to add the terminal name of the first terminal into a broadcast message, and periodically send the broadcast message used for detecting the first terminal to a network, so that when the first terminal receives the broadcast message, it determines whether the broadcast message is sent to itself according to the terminal name of the first terminal.
17. The apparatus of claim 14, wherein the first connection module is specifically configured to:
receiving an identifier of the first terminal sent by a second terminal through a Universal Serial Bus (USB) interface, and identifying the first terminal according to the identifier of the first terminal; and the second terminal is connected with the second terminal through a USB interface.
18. The apparatus of claim 14, further comprising:
and the second sending module is used for receiving the operation command sent to the first terminal, encapsulating the operation command and forwarding the encapsulated operation command to the first terminal through a network according to the IP address of the first terminal.
19. The apparatus of claim 18, wherein the second sending module is specifically configured to:
and sending the operation command to a second terminal through a USB interface so that the second terminal encapsulates the operation command and forwards the encapsulated operation command to the first terminal through a network according to the IP address of the first terminal.
20. An apparatus for connecting terminals, the apparatus comprising:
the third sending module is used for periodically sending a broadcast message for detecting the first terminal to the network after the third sending module is connected with a third terminal through a USB interface, wherein the broadcast message carries an IP address of the third sending module;
a third receiving module, configured to receive, through a network, a feedback message returned by the first terminal, where the feedback message carries an IP address of the first terminal and an identifier of the first terminal;
and the second connection module is used for sending a connection message to the first terminal according to the IP address of the first terminal and sending the identifier of the first terminal to a third terminal so that the third terminal can identify the first terminal according to the identifier of the first terminal.
21. The apparatus of claim 20, further comprising:
a fourth receiving module, configured to receive configuration information sent by the third terminal and used for sending the broadcast message, where the configuration information carries an IP address of the first terminal or a terminal name of the first terminal.
22. The apparatus of claim 21, wherein the third sending module comprises:
a third sending unit, configured to periodically send, to a network, a broadcast message for detecting the first terminal according to the IP address of the first terminal carried in the configuration information; or,
a fourth sending unit, configured to add the terminal name of the first terminal into a broadcast message, and periodically send the broadcast message used for detecting the first terminal to a network, so that when the first terminal receives the broadcast message, it determines whether the broadcast message is sent to itself according to the terminal name of the first terminal.
23. The apparatus of claim 20, further comprising:
and the fourth sending module is used for receiving the operation command sent by the third terminal, encapsulating the operation command, and forwarding the encapsulated operation command to the first terminal through a network according to the IP address of the first terminal.
24. An apparatus for connecting terminals, the apparatus comprising:
a fifth receiving module, configured to receive a broadcast message through a network, where the broadcast message carries an IP address of a terminal that sends the broadcast message;
a fifth sending module, configured to send a feedback message to the terminal according to an IP address of the terminal that sends the broadcast message, where the feedback message carries its own IP address and its own identifier;
and the third connection module is used for receiving the connection message sent by the terminal and establishing connection with the terminal through a network.
25. The apparatus of claim 24, wherein the broadcast message further carries a name of a terminal to be connected;
the fifth sending module is specifically configured to:
and when the terminal name carried in the broadcast message is determined to be the same as the terminal name of the terminal, returning a feedback message to the terminal according to the IP address of the terminal sending the broadcast message.
26. The apparatus of claim 24, further comprising:
and the sixth receiving module is used for receiving an operation command sent by the terminal establishing connection with the sixth receiving module through the network and operating according to the operation command.
CN201310329878.5A 2013-07-31 2013-07-31 A kind of method and device connecting terminal Active CN103401738B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310329878.5A CN103401738B (en) 2013-07-31 2013-07-31 A kind of method and device connecting terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310329878.5A CN103401738B (en) 2013-07-31 2013-07-31 A kind of method and device connecting terminal

Publications (2)

Publication Number Publication Date
CN103401738A true CN103401738A (en) 2013-11-20
CN103401738B CN103401738B (en) 2017-03-01

Family

ID=49565268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310329878.5A Active CN103401738B (en) 2013-07-31 2013-07-31 A kind of method and device connecting terminal

Country Status (1)

Country Link
CN (1) CN103401738B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468260A (en) * 2014-11-13 2015-03-25 百度在线网络技术(北京)有限公司 Recognition method, device and system for mobile terminal device
CN105991386A (en) * 2015-01-28 2016-10-05 阿里巴巴集团控股有限公司 Computer and terminal connection method, device and system
CN107102874A (en) * 2017-04-10 2017-08-29 南京优通信息科技股份有限公司 A kind of concurrent installation method of application program and system
CN110418311A (en) * 2018-04-28 2019-11-05 华为技术有限公司 A kind of interconnected method based on multiple terminals, device and terminal
CN111766788A (en) * 2020-06-01 2020-10-13 珠海格力电器股份有限公司 Intelligent household control method and device
CN112911021A (en) * 2021-03-23 2021-06-04 厦门四信通信科技有限公司 Method, device and equipment for actively connecting terminal

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1430339A (en) * 2001-12-20 2003-07-16 诺基亚有限公司 Terminal identification
CN1543732A (en) * 2001-07-18 2004-11-03 ������������ʽ���� Communication system and method
CN1725200A (en) * 2004-07-22 2006-01-25 三星电子株式会社 Be used for equipment and method in portable terminal storage and reading of data
CN101075938A (en) * 2006-05-19 2007-11-21 深圳艾科创新微电子有限公司 System and method for converting between cell-phone telecommunication protocol and USB mass storage protocol
CN103024062A (en) * 2012-12-24 2013-04-03 腾讯科技(深圳)有限公司 Data sharing method, clients and data sharing system
CN103037535A (en) * 2011-10-10 2013-04-10 华移联科(沈阳)技术有限公司 Method of connecting panel personal computer to network, panel personal computer and mobile terminal
CN103051694A (en) * 2012-12-12 2013-04-17 北京奇虎科技有限公司 Method for controlling equipment by mobile communication terminal and mobile communication terminal
CN103051693A (en) * 2012-12-12 2013-04-17 北京奇虎科技有限公司 Equipment control method and mobile communication terminal

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1543732A (en) * 2001-07-18 2004-11-03 ������������ʽ���� Communication system and method
CN1430339A (en) * 2001-12-20 2003-07-16 诺基亚有限公司 Terminal identification
CN1725200A (en) * 2004-07-22 2006-01-25 三星电子株式会社 Be used for equipment and method in portable terminal storage and reading of data
CN101075938A (en) * 2006-05-19 2007-11-21 深圳艾科创新微电子有限公司 System and method for converting between cell-phone telecommunication protocol and USB mass storage protocol
CN103037535A (en) * 2011-10-10 2013-04-10 华移联科(沈阳)技术有限公司 Method of connecting panel personal computer to network, panel personal computer and mobile terminal
CN103051694A (en) * 2012-12-12 2013-04-17 北京奇虎科技有限公司 Method for controlling equipment by mobile communication terminal and mobile communication terminal
CN103051693A (en) * 2012-12-12 2013-04-17 北京奇虎科技有限公司 Equipment control method and mobile communication terminal
CN103024062A (en) * 2012-12-24 2013-04-03 腾讯科技(深圳)有限公司 Data sharing method, clients and data sharing system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468260A (en) * 2014-11-13 2015-03-25 百度在线网络技术(北京)有限公司 Recognition method, device and system for mobile terminal device
CN105991386A (en) * 2015-01-28 2016-10-05 阿里巴巴集团控股有限公司 Computer and terminal connection method, device and system
CN107102874A (en) * 2017-04-10 2017-08-29 南京优通信息科技股份有限公司 A kind of concurrent installation method of application program and system
CN110418311A (en) * 2018-04-28 2019-11-05 华为技术有限公司 A kind of interconnected method based on multiple terminals, device and terminal
CN111766788A (en) * 2020-06-01 2020-10-13 珠海格力电器股份有限公司 Intelligent household control method and device
CN112911021A (en) * 2021-03-23 2021-06-04 厦门四信通信科技有限公司 Method, device and equipment for actively connecting terminal

Also Published As

Publication number Publication date
CN103401738B (en) 2017-03-01

Similar Documents

Publication Publication Date Title
CN103401738B (en) A kind of method and device connecting terminal
CN112737899B (en) Intelligent device management method and device, storage medium and electronic device
CN103077058B (en) Method and device for installing application program
EP3208974A1 (en) Power line carrier communication terminal control device, system and method
WO2019184658A1 (en) Profile switching method and apparatus, and mobile terminal
CN110062054B (en) Remote control method and system for Internet of things equipment
CN105530268A (en) Heterogeneous protocol interconnection method and controller
EP2905938B1 (en) Method for acquiring locating information, terminal and mobile broadband interface model (mbim) device
CN111405059B (en) Cloud device data transmission method, electronic device and Internet of things system
JP2018033254A (en) Power transmission device, power reception device, power supply system and power transmission method
CN105357664A (en) Wireless control system and data communication method thereof
CN104918296A (en) Network connection assistance system and method
US20170168473A1 (en) Signalling of specification information on an industrial device
CN104519482A (en) Equipment parameter configuration method and device
CN111541688A (en) Embedded system compatible with multiple protocols, data processing method and device
US20170127472A1 (en) Method and wireless device for controlling disconnection of a wireless device in a wi-fi direct group of a wireless network
CN104539493B (en) Based on the intelligent terminal that USB interface is realized to the managing and control system and its implementation of intelligent appliance
CN105978606A (en) Remote communication method for Bluetooth device, Bluetooth device and client
CN108540516B (en) Running state information acquisition method, control terminal, network equipment and system
CN106597873A (en) Method, device and system for carrying out remote maintenance of automation equipment
CN110602143B (en) Method, system and readable storage medium for realizing communication between PC (personal computer) end and remote equipment
CN109871288A (en) Execute method, apparatus, equipment and the medium of android system order
CN113630298A (en) Intelligent control system, method and device
CN108928213B (en) Parameter configuration method of control panel, control panel and controlled equipment
CN107360566B (en) Type-based uplink data encryption control method and device for Internet of things terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant after: Xiaomi Technology Co., Ltd.

Address before: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant before: Beijing Xiaomi Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant