CN105991386B - Method, device and system for connecting computer and terminal - Google Patents

Method, device and system for connecting computer and terminal Download PDF

Info

Publication number
CN105991386B
CN105991386B CN201510043384.XA CN201510043384A CN105991386B CN 105991386 B CN105991386 B CN 105991386B CN 201510043384 A CN201510043384 A CN 201510043384A CN 105991386 B CN105991386 B CN 105991386B
Authority
CN
China
Prior art keywords
terminal
client
area network
local area
connection
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.)
Active
Application number
CN201510043384.XA
Other languages
Chinese (zh)
Other versions
CN105991386A (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.)
Banma Zhixing Network Hongkong Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510043384.XA priority Critical patent/CN105991386B/en
Priority to PCT/CN2016/071547 priority patent/WO2016119621A1/en
Publication of CN105991386A publication Critical patent/CN105991386A/en
Application granted granted Critical
Publication of CN105991386B publication Critical patent/CN105991386B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks

Landscapes

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

Abstract

The embodiment of the application provides a method, a device and a system for connecting a PC (personal computer) and a terminal, wherein the method for connecting the PC and the terminal applied to a PC client comprises the following steps: confirming that the associated terminal client exists in the local area network according to the detection data packet; acquiring terminal information of a related terminal client; and the trigger PC is wirelessly connected to the terminal according to the terminal information. By adopting the method provided by the embodiment of the application, the inconvenience caused by the dependence on a USB line when the PC is connected with the terminal in the prior art can be solved.

Description

Method, device and system for connecting computer and terminal
Technical Field
The present application relates to computer communication technologies, and in particular, to a method, an apparatus, and a system for connecting a computer and a terminal.
Background
Conventionally, a user generally connects a PC (Personal Computer) and a mobile terminal (for example, a smart phone, a tablet Computer, or the like) through a USB (Universal Serial Bus) line, so that the mobile terminal can be controlled by the PC and high-speed data transmission can be performed between the PC and the mobile terminal.
By adopting the connection method of the PC and the terminal in the prior art, a user needs to carry a USB wire with him, and if the user does not carry the USB wire, the connection between the PC and the terminal cannot be realized, so that the user is very inconvenient.
Disclosure of Invention
The embodiment of the application provides a method, a device and a system for connecting a computer and a terminal, which are used for solving the inconvenience caused by the dependence on a USB (universal serial bus) line when a PC (personal computer) is connected with the terminal in the prior art.
According to a first aspect of the embodiments of the present application, there is provided a method for connecting a personal computer PC and a terminal, applied to a PC client, including: confirming that the associated terminal client exists in the local area network according to the detection data packet; acquiring terminal information of a related terminal client; and the trigger PC is wirelessly connected to the terminal according to the terminal information.
According to a second aspect of the embodiments of the present application, there is provided a method for connecting a PC to a terminal, which is applied to a terminal client, and includes: confirming that the associated PC client exists in the local area network according to the detection data packet; sending terminal information to the associated PC client; and the triggering terminal receives a wireless connection establishment request sent by the PC according to the terminal information so as to establish wireless connection with the PC.
According to a third aspect of the embodiments of the present application, there is provided a connecting apparatus for a PC and a terminal, applied to a PC client, including: the first confirmation module is used for confirming that the associated terminal client exists in the local area network according to the detection data packet; the acquisition module is used for acquiring terminal information of the associated terminal client; and the first trigger module is used for triggering the PC to be wirelessly connected to the terminal according to the terminal information.
According to a fourth aspect of the embodiments of the present application, there is provided a connection apparatus for a PC and a terminal, applied to a terminal client, including: the second confirmation module is used for confirming that the associated PC client exists in the local area network according to the detection data packet; the sending module is used for sending terminal information to the associated PC client; and the second triggering connection block is used for triggering the terminal to receive a connection establishment request sent by the PC according to the terminal information so as to establish wireless connection with the PC.
According to a fifth aspect of the embodiments of the present application, there is provided a PC and terminal connection system, including: a PC client including a wireless connection device as previously applied to the PC client; terminal client comprising a wireless connection device as previously described applied to a terminal client
By adopting the method, the device and the system for connecting the PC and the terminal in the embodiment of the application, after the related PC and the terminal are confirmed to be in the same local area network through the detection data packet and the PC acquires the information of the terminal, the PC is triggered to be wirelessly connected to the terminal; the dependence on the USB cable when the PC is connected with the terminal in the prior art is avoided, so that the connection between the PC and the terminal is more convenient and faster, and the user experience is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a flowchart illustrating a wireless connection method between a PC and a terminal according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for connecting a PC to a terminal according to a second embodiment of the present application;
FIG. 3 is a schematic structural diagram of a connection device between a PC and a terminal according to a third embodiment of the present application;
FIG. 4 is a schematic structural diagram of a PC and terminal connection device according to a fourth embodiment of the present application;
fig. 5 is a system block diagram of a PC and terminal connection system according to a fifth embodiment of the present application;
fig. 6 is a flowchart of a PC and terminal connection method according to a sixth embodiment of the present application;
fig. 7 is a flowchart of a connection method of a PC and a terminal according to a seventh embodiment of the present application;
fig. 8 is a flowchart of a PC-to-terminal connection method according to an eighth embodiment of the present application;
fig. 9 is a flowchart of a method for connecting a PC to a terminal according to a ninth embodiment of the present application.
Detailed Description
In order to make the technical solutions and advantages of the embodiments of the present application more apparent, the following further detailed description of the exemplary embodiments of the present application with reference to the accompanying drawings makes it clear that the described embodiments are only a part of the embodiments of the present application, and are not exhaustive of all embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Fig. 1 is a flowchart of a wireless connection method between a PC and a terminal according to a first embodiment of the present application.
According to an embodiment of the present application, a method for connecting a PC to a terminal, which is applied to a PC client, includes the following steps:
s102, confirming that the associated terminal client exists in the local area network according to the detection data packet;
s104, acquiring terminal information of a related terminal client;
and S106, triggering the PC to be wirelessly connected to the terminal according to the terminal information.
Those skilled in the art will appreciate that a PC client is a client installed on a PC; the terminal client is the client installed on the terminal. The terminal client can be installed on a mobile terminal such as a mobile phone and a tablet computer which can be accessed to a wireless local area network; the terminal information is information for identifying the mobile terminal.
The local area network of the PC client is the local area network which is currently accessed by the PC; the existence of the associated terminal client in the local area network means that the terminal where the associated terminal client is located is accessed to the local area network. During specific implementation, the PC can be accessed to the local area network in a wireless mode or in a wired mode; the terminal typically accesses the local area network in a wireless manner. Those skilled in the art will appreciate that, in order to realize wireless connection between the PC and the terminal, the PC and the terminal are both provided with a wireless communication module such as a wireless network card.
In specific implementation, the association relationship between the terminal client and the PC client can be established in a manner that the terminal where the terminal client is located and the PC where the PC client is located are successfully connected in a wired or wireless manner within a predetermined time, the terminal client and the PC client are logged in by the same account, or the terminal client and the PC client are logged in by different accounts belonging to the same user; those skilled in the art will understand that the terminal client and the PC client can be associated with each other, and the association relationship between the terminal client and the PC client can be established. More specifically, those skilled in the art may establish the association relationship between the terminal client and the PC client by recording the unique identifier of the latest successfully connected terminal/PC on the PC client/terminal client. To avoid confusion, typically within a lan, one PC client is associated with only one end client. Preferably, the Wireless connection mode between the PC and the terminal is WIFI (Wireless-Fidelity) connection.
The speed of WIFI is different according to different standards of the wireless network card. Wherein the highest IEEE802.11b is 11Mbps, the highest IEEE802.11a is 54Mbps, the highest IEEE802.11g is also 54Mbps, and the Netgear SUPER g technology can improve the speed to 108 Mbps.
In specific implementation, the PC and the terminal may be connected by a Wireless method such as a Wireless LAN authentication and Privacy Infrastructure (WAPI).
Therefore, the user can realize the connection between the PC and the terminal in a wireless mode such as WIFI or WAPI, and the user can conveniently and quickly experience the high data transmission rate between the PC and the terminal without depending on a USB line.
By adopting the method for connecting the PC and the terminal in the embodiment of the application, after confirming that the related PC and the terminal are in the same local area network according to the detection data packet and the PC acquires the information of the terminal, triggering the PC to be wirelessly connected to the terminal; the dependence on the USB cable when the PC is connected with the terminal in the prior art is avoided, so that the connection between the PC and the terminal is more convenient and faster, and the user experience is improved.
In the method for connecting the PC and the terminal in the prior art, a user needs to start a PC client at first, then click on a main interface of the PC client to enter a mobile phone connection interface, and after entering the mobile phone connection interface, the PC client triggers the PC to scan whether a mobile phone provided with a mobile phone assistant terminal client exists in a local area network of the PC or not; if so, listing, confirming the mobile phone associated with the PC client from the listed mobile phone list by the user, and then executing subsequent operations by the PC client to enable the PC to be wirelessly connected to the mobile phone.
By adopting the scheme in the prior art, a user selects a mobile phone associated with a PC client, and if a plurality of mobile phones provided with mobile phone assistant terminal clients exist in a local area network, the user needs to spend several seconds to find the mobile phone which the user wants to connect, so that the user experience is reduced.
Optionally, confirming that the associated terminal client exists in the local area network according to the probe packet specifically includes: the PC client sends a first detection data packet in a local area network; when first response data aiming at the first detection data packet from the associated terminal client in the local area network is received, confirming that the associated terminal client exists in the local area network, wherein the first response data carries terminal information; the acquiring of the terminal information of the terminal client specifically includes: the terminal information is extracted from the first response data.
If the terminal client associated with the PC client does not exist in the lan, the PC client may retransmit the probe data packet after a predetermined time interval, or may not retransmit the probe data packet, which is not limited in this application.
In a specific implementation, the first probe packet and the first response data may be UDP (User datagram protocol) packets; the PC client may send the first probe packet in the local area network in a multicast form, or in a broadcast form. It should be understood that the above examples are for the purpose of facilitating the implementation of the present application by those skilled in the art, and are not intended to limit the present application.
Those skilled in the art should understand that, in order to enable the PC or the terminal that receives the first probe packet to identify and return response data, the first probe packet sent by the PC client carries a Unique Identifier of the PC client in the local area network, where the Unique Identifier may be an IP address of the PC, or may be a Unique Identifier that is allocated by the server for the PC client, such as a randomly generated 32-bit GUID (global Unique Identifier): 2cf2ecc8-166d-43ce-8759-38735f842211 and the like.
In specific implementation, the terminal client determines whether the PC client is associated with the PC client according to the first probe packet by using the following method: and when the terminal client receives the first detection data packet, extracting the identification of the PC from the detection data packet, comparing the identification with the identification of the associated PC stored in the terminal client, if the identification is consistent with the identification of the associated PC stored in the terminal client, judging that the PC client sending the first detection data packet is the associated PC client, and if the identification is not consistent with the identification of the associated PC client, judging that the PC client sending the first detection data packet is not the associated PC client. It should be understood that the above examples are for the purpose of facilitating the implementation of the present application by those skilled in the art, and are not intended to limit the present application.
By adopting the method in the embodiment of the application, the PC client can automatically confirm the terminal client related to the PC client in the form of sending the network detection packet and replying the response data by the related terminal client in the local area network, and the process does not need the participation of a user, so that the operation of the user is reduced, and the user experience is improved.
Preferably, the PC client start triggers the PC client to send the first probe packet within the lan. In the specific implementation of the present application, the PC client may also send the information after detecting that the PC is connected to the lan after being started, or may send the information at any other preset time.
By adopting the scheme in the embodiment of the application, the PC client side immediately triggers the first detection data packet to be sent in the local area network after being started, the process of connecting to the terminal can be immediately initiated after the user starts the PC client side, the user does not need to perform more operations, and the user experience is improved.
Optionally, confirming that the associated terminal client exists in the local area network according to the probe packet specifically includes: receiving a second detection data packet, wherein the second detection data packet is sent by the terminal client in the local area network; judging whether the terminal client is associated with the terminal client according to the second detection data packet, and if so, confirming that the associated terminal client exists in the local area network; the acquiring of the terminal information of the terminal client specifically includes: sending second response data for the second probe data packet to the associated terminal client; and receiving terminal information sent by the terminal client.
In a specific implementation, the second probe packet and the second response data may be UDP (User datagram protocol) packets; the second probe packet may be transmitted in a multicast format within the local area network, or may be transmitted in a broadcast format. It should be understood that the above examples are for the purpose of facilitating the implementation of the present application by those skilled in the art, and are not intended to limit the present application.
Those skilled in the art should understand that, in order to enable the PC or the terminal that receives the second probe packet to identify and return response data, the second probe packet sent by the terminal client carries a unique identifier of the terminal client in the local area network, where the unique identifier may be an IP address of the terminal, or may be a unique identifier that is allocated by the server to the terminal client, such as a terminal client connection code: GK5R9K, and the like.
In specific implementation, the PC client determines whether the terminal client is associated with the terminal client according to the second probe packet by using the following method: and when the PC client receives the second detection data packet, extracting the identifier of the sending terminal from the detection data packet, comparing the identifier with the identifier of the associated terminal stored by the PC client, if the identifier is consistent with the identifier of the associated terminal, judging that the terminal client sending the second detection data packet is the associated terminal client, and if the identifier is not consistent with the associated terminal client, judging that the terminal client sending the second detection data packet is not the associated terminal client. It should be understood that the above examples are for the purpose of facilitating the implementation of the present application by those skilled in the art, and are not intended to limit the present application.
By adopting the method in the embodiment of the application, when the PC client receives the second detection data packet, the existence of the associated terminal client is judged according to the content carried in the data packet, so that the PC client can automatically confirm the terminal client associated with the PC client, the participation of a user is not needed in the process, the operation of the user is reduced, and the user experience is improved.
In the prior art, when a user PC or a terminal does not have a WIFI environment, the connection between the terminal and the PC cannot be realized, so that the user is inconvenient.
Optionally, before determining that the associated terminal client exists in the local area network according to the probe packet, the method further includes: the PC client triggers the PC to establish a WIFI hotspot, and the terminal is connected to the local area network through the hotspot.
The PC can establish a WIFI hotspot (soft AP) through the wireless network card, so that the terminal and the PC can access the same local area network, the connection between the terminal and the PC is realized, and the user experience is improved.
Optionally, before determining that the associated terminal client exists in the local area network according to the probe packet, the method further includes: the terminal client triggers the terminal to establish a WIFI hotspot, and the PC is connected to the local area network through the hotspot.
The terminal can establish a WIFI hotspot through the wireless network card, so that the terminal and the PC can access the same local area network, the connection between the terminal and the PC is realized, and the user experience is improved.
Preferably, before confirming that the associated terminal client exists in the local area network according to the probe packet, the method further includes: prompting whether to connect the PC and the terminal on a PC screen or a terminal screen; the triggering of the wireless connection of the PC to the terminal according to the terminal information specifically comprises: and when the user confirms the connection, triggering the PC to be wirelessly connected to the terminal according to the terminal information.
In specific implementation, whether the terminal is connected or not is prompted on a PC screen or a terminal screen in various ways, for example, a prompt box pops up at the lower right corner of the PC screen; popping up a prompt box in the middle of a PC screen; flashing at the lower right corner of the PC, and popping up a prompt box after a user clicks; popping up a prompt box in the middle of a terminal screen, and the like; it should be understood by those skilled in the art that the above-mentioned modes are only examples and are not intended to limit the present application as long as the prompt is provided for the user.
If the user selects not to connect, closing the prompt box; or if the user does not click the select button, the prompt box is automatically closed after a predetermined time, for example, 10 s.
Taking a WIFI connection process of a PC and a mobile phone which are accessed to the same wireless local area network as an example, after the PC is started to access the wireless local area network and automatically logs in a PC client, the PC client finds that the mobile phone of a user is also accessed to the same wireless local area network; the PC acquires the related information of the mobile phone; the PC client then pops up a prompt asking the user "do you need to connect to your phone? If the user clicks the 'yes' button, the PC client triggers the PC to start the wireless communication module and is connected to the mobile phone through WIFI; if the user clicks 'no', the PC client closes the prompt box; or if the user does not click the prompt button, the prompt box is automatically closed after 10 s.
By adopting the scheme in the embodiment of the application, when the PC client finds the associated terminal clients accessed to the same local area network, the terminal client or the PC client is triggered to inquire whether to connect or not to the user, and wireless connection/disconnection is carried out according to the selection of the user; the option of whether the PC is connected with the terminal is given to the user, so that unnecessary resource consumption caused by connection of the PC and the terminal under the condition that the user does not need the option is avoided, resources are saved, and user experience is improved.
In the prior art method for connecting the PC and the terminal, after a user confirms a mobile phone associated with a PC client from a listed mobile phone list, the PC acquires mobile phone information of the mobile phone and then wirelessly connects to the mobile phone.
By adopting the scheme in the prior art, after the user confirms the connection, the PC can acquire the terminal information again, even if the acquisition is successful, a certain delay can exist, and if the acquisition is failed, the connection is still unsuccessful and is inconsistent with the user expectation, the user experience is reduced.
Preferably, the terminal information includes a terminal IP address and a port number. In specific implementation of the present application, the terminal information may further include other information of the terminal, such as a terminal name, a user mobile phone number, and the like.
By adopting the scheme in the embodiment of the application, before inquiring whether the terminal is connected to the user, the IP address and the port number of the terminal information are acquired, preparation is made for subsequent wireless connection, once the user confirms the connection, the terminal can be quickly connected to the user, the time delay caused by acquiring the terminal information after the user confirms the connection is avoided, the connection power after the user confirms the connection can be improved, and the user experience is improved.
Fig. 2 is a flowchart of a method for connecting a PC and a terminal according to a second embodiment of the present application.
As shown in fig. 2, the method for connecting a PC and a terminal applied to a terminal client according to the second embodiment of the present application includes the following steps:
s202, confirming that the associated PC client exists in the local area network according to the detection data packet;
s204, sending terminal information to the associated PC client;
s206, the terminal is triggered to receive a wireless connection establishment request sent by the PC according to the terminal information so as to establish wireless connection with the PC.
As will be understood by those skilled in the art, a terminal client is a client installed on a terminal; the PC client is a client installed on the PC. The terminal client can be installed on a mobile terminal such as a mobile phone and a tablet computer which can be accessed to a wireless local area network; the terminal information is information for identifying the mobile terminal.
The local area network of the PC client is the local area network which is currently accessed by the PC; the existence of the associated terminal client in the local area network means that the terminal where the associated terminal client is located is accessed to the local area network. During specific implementation, the PC can be accessed to the local area network in a wireless mode or in a wired mode; the terminal typically accesses the local area network in a wireless manner. Those skilled in the art will appreciate that, in order to realize wireless connection between the PC and the terminal, the PC and the terminal are both provided with a wireless communication module such as a wireless network card.
In specific implementation, the association relationship between the terminal client and the PC client can be established in a manner that the terminal where the terminal client is located and the PC where the PC client is located are successfully connected in a wired or wireless manner within a predetermined time, the terminal client and the PC client log in the same account, or different accounts belonging to the same user, and the like; those skilled in the art will understand that the terminal client and the PC client can be associated with each other, and the association relationship between the terminal client and the PC client can be established. More specifically, those skilled in the art may establish the association relationship between the terminal client and the PC client by recording the unique identifier of the latest successfully connected terminal/PC on the PC client/terminal client. To avoid confusion, typically within a lan, one PC client is associated with only one end client.
Preferably, the wireless connection establishment request accepted by the terminal is a WIFI connection establishment request.
In specific implementation, the PC and the terminal can be connected in a wireless manner such as a WAPI.
Therefore, the user can conveniently and quickly experience the high data transmission rate between the PC and the terminal without depending on the USB cable by connecting the PC and the terminal through the WIFI.
Taking a WIFI connection process of a PC and a mobile phone which are accessed to the same wireless local area network as an example, after the mobile phone is started to access the wireless local area network and automatically logs in a terminal client, the terminal client finds that the PC of a user is also accessed to the same wireless local area network; after the terminal client sends the mobile phone related information to the PC client; waiting for the PC end to send a wireless connection establishment request; if the request is received, accepting; if no request is received, no processing is performed.
By adopting the method for connecting the PC and the terminal in the embodiment of the application, when the related PC and the terminal are confirmed to be in the same local area network according to the detection data packet, the terminal sends terminal information to the PC, and then receives a wireless connection establishment request sent by the PC to establish wireless connection between the terminal and the PC; the dependence on the USB cable when the PC is connected with the terminal in the prior art is avoided, so that the connection between the PC and the terminal is more convenient and faster, and the user experience is improved.
In the method for connecting the PC and the terminal in the prior art, if a user wants to trigger the establishment of wireless connection between the PC and the terminal from the terminal side, the user needs to open a main interface of a PC client, then enters a two-dimension code connection interface to generate a two-dimension code, simultaneously opens a two-dimension code scanning tool of the terminal, scans the two-dimension code, and after the scanning is completed, the terminal requests the PC to establish wireless connection to complete the wireless connection between the PC and the terminal.
By adopting the scheme in the prior art, a user needs to open the PC client and the terminal client simultaneously, and after clicking operation for many times, the user needs to scan the two-dimensional code for connection, so that the operation is complex, and the user who is unfamiliar with the intelligent terminal is difficult to smoothly complete.
By adopting the technical scheme of the embodiment of the application, the terminal client sends the terminal information to the PC client when confirming that the associated PC client exists in the local area network, and triggers the PC side to initiate the wireless connection request.
Optionally, confirming that the associated PC client exists in the local area network according to the probe packet specifically includes: receiving a first detection data packet, wherein the first detection data packet is sent by a PC client in a local area network; judging whether the PC client is associated with the PC client or not according to the first detection data packet; if yes, confirming that the associated PC client exists in the local area network; sending terminal information to the associated PC client, specifically comprising: and sending first response data to the associated PC client, wherein the first response data carries terminal information.
In an implementation, the first probe packet and the first response packet may be UDP packets; the first probe packet may be transmitted in a multicast form within the local area network or in a broadcast form. It should be understood that the above examples are for the purpose of facilitating the implementation of the present application by those skilled in the art, and are not intended to limit the present application.
Those skilled in the art should understand that, in order to enable the PC or the terminal that receives the first probe packet to identify and return response data, the first probe packet sent by the PC client carries a unique identifier of the PC client in the local area network, where the unique identifier may be an IP address of the PC, or a unique identifier that is allocated by the server for the PC client, such as a randomly generated 32-bit GUID: 2cf2ecc8-166d-43ce-8759-38735f842211 and the like.
In specific implementation, the terminal client determines whether the PC client is associated with the PC client according to the first probe packet by using the following method: when the terminal client receives the first detection data packet, the identification of the sending PC is extracted from the detection data packet, the identification is compared with the identification of the associated PC stored in the terminal client, if the identification is consistent with the identification of the associated PC stored in the terminal client, the PC client sending the first detection data packet is judged to be the associated PC client, and if the identification is not consistent with the identification of the associated PC stored in the terminal client, the PC client sending the first detection data packet is judged not to be the associated PC client. It should be understood that the above examples are for the purpose of facilitating the implementation of the present application by those skilled in the art, and are not intended to limit the present application.
By adopting the method in the embodiment of the application, when the terminal client receives the first detection data packet, the terminal client judges that the associated PC client exists according to the content carried in the data packet, and sends terminal information to the associated PC client so as to trigger the PC client to initiate a wireless connection request; the terminal client can automatically confirm the PC client related to the terminal client and trigger the PC client to initiate the wireless connection request, and the process does not need participation of a user, so that the operation of the user is reduced, and the user experience is improved.
Optionally, confirming that the associated PC client exists in the local area network according to the probe packet specifically includes: sending a second detection data packet in the local area network; and when second response data aiming at the second detection data packet from the associated PC client is received, confirming that the associated PC client exists in the local area network.
If the PC client associated with the terminal client does not exist in the local area network, the terminal client may send the probe packet again after a predetermined time interval, or may not send the probe packet, which is not limited in this application.
In an implementation, the second probe packet and the second response packet may be UDP packets; the terminal client may send the second probe packet in the local area network in a multicast manner, or may send the second probe packet in a broadcast manner. It should be understood that the above examples are for the purpose of facilitating the implementation of the present application by those skilled in the art, and are not intended to limit the present application.
Those skilled in the art should understand that, in order to enable the PC or the terminal that receives the second probe packet to identify and return response data, the second probe packet sent by the terminal client carries a unique identifier of the terminal client in the local area network, where the unique identifier may be an IP address of the terminal, or may be a unique identifier that is allocated by the server to the terminal client, such as a terminal client connection code: GK5R9K, and the like.
In specific implementation, the PC client determines whether the terminal client is associated with the terminal client according to the second probe packet by using the following method: and when the PC client receives the second detection data packet, extracting the identifier of the terminal from the detection data packet, comparing the identifier with the associated terminal identifier stored in the PC client, if the identifier is consistent with the associated terminal identifier stored in the PC client, judging that the terminal client sending the second detection data packet is the associated terminal client, and if the identifier is not consistent with the associated terminal identifier stored in the PC client, judging that the terminal client sending the second detection data packet is not the associated terminal client. It should be understood that the above examples are for the purpose of facilitating the implementation of the present application by those skilled in the art, and are not intended to limit the present application.
By adopting the method in the embodiment of the application, the terminal client sends the second detection data packet in the local area network; when second response data aiming at the second detection data packet from the associated PC client is received, the existence of the associated PC client in the local area network is confirmed; then sending terminal information to the associated PC client to trigger the PC client to inquire whether to connect to the user; the terminal client can automatically confirm the PC client related to the terminal client and trigger the PC client to inquire whether the PC client is connected or not to the user, and the process does not need the participation of the user, so that the operation of the user is reduced, and the user experience is improved.
Preferably, the terminal connecting to the lan triggers the terminal client to send the second probe packet within the lan. In the specific implementation of the present application, the terminal client may immediately send the second probe packet in the local area network after being started, may also immediately send the second probe packet when the terminal starts the WIFI connection, and may also send the second probe packet at any other preset time.
By adopting the scheme in the embodiment of the application, the terminal client immediately triggers the sending of the second detection data packet in the local area network after being connected to the local area network, and can immediately initiate the process of being connected to the terminal after the user is connected to the local area network, so that the user does not need to perform more operations, and the user experience is improved.
Optionally, confirming that the associated PC client exists in the local area network according to the probe packet specifically includes: acquiring the IP address of the PC which is successfully connected in a preset time from the server; sending a third detection data packet to the IP address; when third response data aiming at the third detection data packet is received, confirming that a related PC client exists in the local area network; sending terminal information to the associated PC client, specifically comprising: and sending the terminal information to the PC client corresponding to the IP address sending the third response data.
And if the third response data is not received, judging that the PC client connected within the preset time does not exist locally.
In specific implementation, the terminal client may send the third probe packet in a wireless manner such as WIFI or WAPI.
The IP address obtained by the terminal client from the server may be one, multiple, or none. If the number of the IP addresses is multiple, the terminal client can sequentially send detection data packets to the IP addresses, and for the IP addresses which are not in the local area network, the detection data packets cannot be received, so that the terminal client cannot receive response data packets from the IP addresses; if the response data packet is received, the PC is confirmed to be in the local area network.
The terminal client can immediately acquire preset time from the server after being started, such as an IP address list of a PC successfully connected within 24 hours, or immediately acquire the time from the server when WIFI is started, or acquire the time from the server at any other preset time, and the application is not limited to this.
By adopting the method in the embodiment of the application, the terminal client sends a third detection data packet to the IP address after acquiring the IP address of the PC which is successfully connected in the preset time from the server; when third response data aiming at the third detection data packet is received, confirming that a related PC client exists in the local area network; then sending terminal information to a PC client corresponding to the IP address sending the third response data, and triggering the PC client to initiate a connection request; the process does not need the participation of the user, reduces the operation of the user and improves the user experience.
In the prior art, when a user PC or a terminal does not have a WIFI environment, the connection between the terminal and the PC cannot be realized, so that the user is inconvenient.
Optionally, before determining that the associated terminal client exists in the local area network according to the probe packet, the method further includes: the PC client triggers the PC to establish a WIFI hotspot, and the terminal is connected to the local area network through the hotspot.
The PC can establish a WIFI hotspot through the wireless network card, so that the terminal and the PC can access the same local area network, the connection between the terminal and the PC is realized, and the user experience is improved.
Optionally, before determining that the associated terminal client exists in the local area network according to the probe packet, the method further includes: the terminal client triggers the terminal to establish a WIFI hotspot, and the PC is connected to the local area network through the hotspot.
The terminal can establish a WIFI hotspot through the wireless network card, so that the terminal and the PC can access the same local area network, the connection between the terminal and the PC is realized, and the user experience is improved.
Preferably, before confirming that the associated terminal client exists in the local area network according to the probe packet, the method further includes: prompting whether to connect the PC and the terminal on a PC screen or a terminal screen; the triggering of the wireless connection of the PC to the terminal according to the terminal information specifically comprises: and when the user confirms the connection, triggering the PC to be wirelessly connected to the terminal according to the terminal information.
In specific implementation, whether the terminal is connected or not is prompted on a PC screen or a terminal screen in various ways, for example, a prompt box pops up at the lower right corner of the PC screen; popping up a prompt box in the middle of a PC screen; flashing at the lower right corner of the PC, and popping up a prompt box after a user clicks; popping up a prompt box in the middle of a terminal screen, and the like; it should be understood by those skilled in the art that the above-mentioned modes are only examples and are not intended to limit the present application as long as the prompt is provided for the user.
If the user selects not to connect, closing the prompt box; or if the user does not click the select button, the prompt box is automatically closed after a predetermined time, for example, 10 s.
By adopting the scheme in the embodiment of the application, when the terminal client finds the PC client accessed to the same local area network, the PC client or the terminal client is triggered to inquire whether to be connected or not to the user, and wireless connection/disconnection is carried out according to the selection of the user; the option of whether the PC is connected with the terminal is given to the user, so that unnecessary resource consumption caused by connection of the PC and the terminal under the condition that the user does not need the option is avoided, resources are saved, and user experience is improved.
In the prior art method for connecting the PC and the terminal, after a user scans the two-dimensional code, the terminal sends information to the PC, and requests the PC to establish wireless connection, so that the wireless connection between the PC and the terminal is completed.
By adopting the scheme in the prior art, after the user scans the two-dimensional code to confirm connection, the terminal sends information to the PC, certain time delay can be caused, and the user experience is reduced.
Preferably, the terminal information includes a terminal IP address and a port number. In specific implementation of the present application, the terminal information may further include other information of the terminal, such as a terminal name, a user mobile phone number, and the like.
By adopting the scheme in the embodiment of the application, before the PC client inquires whether to connect to the terminal or not, the terminal sends the IP address and the port number to the PC client so that the PC can prepare for subsequent wireless connection, once the user confirms the connection, the terminal can be quickly connected to the terminal, the time delay caused by obtaining the terminal information after the user confirms the connection is avoided, and the user experience is improved.
Based on the same inventive concept, the embodiment of the present application further provides a device for connecting a PC and a terminal applied to a PC client, and as the principle of solving the problem of the device is similar to the method for connecting the PC and the terminal applied to the PC client, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
Fig. 3 is a schematic structural diagram of a connection device between a PC and a terminal according to a third embodiment of the present application.
As shown in fig. 3, a PC-to-terminal connection apparatus 300 applied to a PC client 30 according to a third embodiment of the present application includes: a first confirmation module 302, configured to confirm that a relevant terminal client exists in the local area network according to the probe packet; an obtaining module 304, configured to obtain terminal information associated with a terminal client; and a first triggering module 306, configured to trigger the PC to wirelessly connect to the terminal according to the terminal information when the user confirms the connection.
By adopting the connecting device of the PC and the terminal in the embodiment of the application, when the related PC and the terminal are confirmed to be in the same local area network according to the detection data packet and the PC can acquire the information of the terminal, the PC is triggered to be wirelessly connected to the terminal; the dependence on the USB cable when the PC is connected with the terminal in the prior art is avoided, so that the connection between the PC and the terminal is more convenient and faster, and the user experience is improved.
Optionally, the first confirming module 302 specifically includes: the first sending submodule is used for sending a first detection data packet in the local area network; the first confirmation submodule is used for confirming that the associated terminal client exists in the local area network when receiving first response data of the associated terminal client in the local area network aiming at the first detection data packet, wherein the first response data carries the terminal information; the obtaining module 304 is further configured to extract the terminal information from the first response data.
Optionally, the first confirming module 302 specifically includes: the first receiving submodule is used for receiving a second detection data packet, wherein the second detection data packet is sent by the terminal client in the local area network; the second confirmation submodule is used for judging whether the terminal client is associated with the terminal client according to the second detection data packet, and if so, confirming that the associated terminal client exists in the local area network; the obtaining module 304 specifically includes: the second sending submodule is used for sending second response data aiming at the second detection data packet to the associated terminal client; and the second receiving submodule is used for receiving the terminal information sent by the terminal client.
By adopting the scheme in the embodiment of the application, the PC client can automatically confirm the terminal client associated with the PC client and carry out wireless connection, the process does not need participation of a user, the operation of the user is reduced, and the user experience is improved.
In the prior art, when a user PC or a terminal does not have a WIFI environment, the connection between the terminal and the PC cannot be realized, so that the user is inconvenient.
Preferably, the connection device applied to the PC client in the embodiment of the present application further includes: the first WIFI hotspot establishing module is used for establishing a WIFI hotspot, and the terminal client is connected to the local area network through the hotspot.
The PC can establish a WIFI hotspot through the wireless network card, so that the terminal and the PC can access the same local area network, the connection between the terminal and the PC is realized, and the user experience is improved.
Preferably, the connection device applied to the PC client in the embodiment of the present application further includes: the first prompting module is used for prompting whether the PC and the terminal are connected or not on a PC screen or a terminal screen; the first triggering module is specifically used for triggering the PC to be wirelessly connected to the terminal according to the terminal information when the user confirms connection.
By adopting the scheme in the embodiment of the application, when the PC client finds the associated terminal clients accessed to the same local area network, the PC client or the terminal client is triggered to inquire whether to connect or not to the user, and wireless connection/disconnection is carried out according to the selection of the user; the option of whether the PC is connected with the terminal is given to the user, so that unnecessary resource consumption caused by connection of the PC and the terminal under the condition that the user does not need the option is avoided, resources are saved, and user experience is improved.
Preferably, the terminal information includes a terminal IP address and a port number.
By adopting the scheme in the embodiment of the application, before inquiring whether the terminal is connected to the user, the IP address and the port number of the terminal information are acquired, preparation is made for subsequent wireless connection, once the user confirms the connection, the terminal can be quickly connected to the user, the time delay caused by acquiring the terminal information after the user confirms the connection is avoided, the connection power after the user confirms the connection can be improved, and the user experience is improved.
Based on the same inventive concept, the embodiment of the present application further provides a device for connecting a PC and a terminal applied to a terminal client, and because the principle of solving the problem of the device is similar to the method for connecting the PC and the terminal applied to the terminal client, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
Fig. 4 is a schematic structural diagram of a PC-to-terminal connection apparatus according to a fourth embodiment of the present application.
As shown in fig. 4, the PC-to-terminal connection apparatus 400 applied to the terminal client 40 according to the fourth embodiment of the present application includes: a second confirmation module 402, configured to confirm that a relevant PC client exists in the local area network according to the probe packet; a sending module 404, configured to send terminal information to the associated PC client; and a second triggering block 406, configured to trigger the terminal to accept a connection establishment request sent by the PC according to the terminal information, so as to establish a wireless connection with the PC.
By adopting the connecting device of the PC and the terminal in the embodiment of the application, when the related PC and the terminal are confirmed to be in the same local area network, the terminal sends terminal information to the PC so as to trigger the PC to initiate a wireless connection request to the terminal and the terminal receives the wireless connection request; the dependence on the USB cable when the PC is connected with the terminal in the prior art is avoided, so that the connection between the PC and the terminal is more convenient and faster, and the user experience is improved.
By adopting the technical scheme of the embodiment of the application, the terminal information is sent to the PC client when the terminal client confirms that the associated PC client exists in the local area network, the PC is triggered to initiate the wireless connection request to the terminal, and the terminal receives the wireless connection request.
Optionally, the second confirming module 402 specifically includes: the third receiving submodule is used for receiving a first detection data packet, wherein the first detection data packet is sent by the PC client in the local area network; the second confirmation submodule is used for judging whether the PC client is associated with the PC client or not according to the first detection data packet; the sending module 404 is further configured to send first response data to the associated PC client, where the first response data carries terminal information.
Optionally, the second confirming module 402 specifically includes: the third sending submodule is used for sending a second detection data packet in the local area network; and the third confirmation submodule is used for confirming that the associated PC client exists in the local area network when receiving second response data aiming at the second detection data packet from the associated PC client.
Optionally, the second confirming module 402 specifically includes: the acquisition submodule is used for acquiring an IP address list of the PC which is successfully connected in preset time from the server; the fourth confirming submodule is used for wirelessly connecting the IP addresses in the IP address list, judging whether the associated PC client exists according to the connection result, and if the connection is successful, confirming that the associated PC client exists in the local area network; the sending module 404 is further configured to send the terminal information to the PC client corresponding to the successfully connected IP address.
By adopting the scheme in the embodiment of the application, the terminal client can automatically confirm the PC client associated with the terminal client and complete wireless connection, and the process does not need participation of a user, so that the operation of the user is reduced, and the user experience is improved.
In the prior art, when a user PC or a terminal does not have a WIFI environment, the connection between the terminal and the PC cannot be realized, so that the user is inconvenient.
Preferably, the connection device applied to the terminal client in the embodiment of the present application further includes: and the second WIFI hotspot establishing module is used for establishing a WIFI hotspot, and the PC client is connected to the local area network through the hotspot.
The terminal can establish the WIFI hotspot through the wireless network card, so that the PC and the terminal can access the same local area network, the connection between the terminal and the PC is realized, and the user experience is improved.
The connection device applied to the terminal client in the embodiment of the application further includes: the second prompting module is used for prompting whether the PC and the terminal are connected or not on a PC screen or a terminal screen; the second triggering module is specifically used for triggering the terminal to receive a wireless connection establishment request sent by the PC according to the terminal information when the user confirms the connection.
By adopting the scheme in the embodiment of the application, when the terminal client finds the PC client accessed to the same local area network, the PC client or the terminal client is triggered to inquire whether to be connected or not to the user, and wireless connection/disconnection is carried out according to the selection of the user; the option of whether the PC is connected with the terminal is given to the user, so that unnecessary resource consumption caused by connection of the PC and the terminal under the condition that the user does not need the option is avoided, resources are saved, and user experience is improved.
Preferably, the terminal information includes a terminal IP address and a port number.
By adopting the scheme in the embodiment of the application, before the PC client inquires whether to connect to the terminal or not, the terminal sends the IP address and the port number to the PC client so that the PC can prepare for subsequent wireless connection, once the user confirms the connection, the terminal can be quickly connected to the terminal, the time delay caused by obtaining the terminal information after the user confirms the connection is avoided, and the user experience is improved.
Based on the same inventive concept, the embodiment of the application also provides a system for connecting the PC and the terminal, and as the principle of solving the problems of the system is similar to the method for connecting the PC and the terminal, the implementation of the system can refer to the implementation of the method, and repeated parts are not described again.
Fig. 5 is a system block diagram of a PC and terminal connection system according to a fifth embodiment of the present application.
As shown in fig. 5, a PC-to-terminal connection system 50 according to the fifth embodiment of the present application includes: a PC client 30 including a wireless connection device 300; an end client 40 comprising a wireless connection means 400.
Preferably, the connection system further comprises: and the server is used for storing the IP address of the PC which is successfully connected by the terminal client within the preset time.
By adopting the connection system of the PC and the terminal in the embodiment of the application, when the related PC and the terminal are in the same local area network, the terminal sends terminal information to the PC so as to trigger the PC to initiate a wireless connection request to the terminal, so that the PC is wirelessly connected with the terminal; the dependence on the USB cable when the PC is connected with the terminal in the prior art is avoided, so that the connection between the PC and the terminal is more convenient and faster, and the user experience is improved.
By adopting the technical scheme of the embodiment of the application, in the process of establishing wireless connection between the PC and the terminal, the association relation between the PC and the terminal is automatically confirmed, and the wireless connection is carried out, so that the user does not need to participate in the whole process, convenience and rapidness are realized, and the user experience is improved.
Fig. 6 is a flowchart of a method for connecting a PC to a terminal according to a sixth embodiment of the present application.
In the sixth embodiment of the present application, a cloud mobile phone assistant client is taken as an example, and a method for connecting a PC and a terminal according to the sixth embodiment of the present application is introduced.
As shown in fig. 6, the process of the method for connecting the PC and the terminal actively triggered by the mobile phone side includes the following steps:
s602, connecting the mobile phone into a WIFI network;
s604, the cloud mobile phone assistant mobile phone client acquires the IP of the PC terminal which is connected recently from the server;
s606, the mobile phone client terminal tries to connect the IPs, and if the connection is successful, S614 is executed; if the connection fails, S608 is performed;
s608, the mobile phone client sends out a network multicast detection data packet and waits for receiving a response data packet from the PC client;
s610, after receiving the detection data packet, the PC client judges whether the detection data packet is the detection data packet sent by the relevant cloud mobile phone assistant client, and if the detection data packet is the detection data packet sent by the relevant cloud mobile phone assistant client, the step S611 is executed; if not, ending the flow;
s611, sending a response data packet;
s612, if the mobile phone client receives the response data packet aiming at the detection data packet within the specified time, executing S614; if the message is not received within the specified time, ending the process;
s614, the mobile phone client sends the mobile phone related information to the cloud mobile phone assistant PC client, and waits for a wireless connection request of the PC;
s616, popping up a prompt window by the PC client;
s618, the user clicks the button of "connect immediately";
and S620, the PC client initiates TCP connection and is connected to the mobile phone client.
By adopting the method for connecting the PC and the terminal in the embodiment of the application, when the related PC and the terminal are in the same local area network, the terminal sends terminal information to the PC so as to trigger the PC client to prompt a user whether to connect a mobile phone, and then when the user confirms the connection, the PC and the terminal are wirelessly connected; the dependence on the USB cable when the PC is connected with the terminal in the prior art is avoided, so that the connection between the PC and the terminal is more convenient and faster, and the user experience is improved.
By adopting the scheme in the embodiment of the application, the option of whether the PC is connected with the terminal or not is given to the user, so that unnecessary resource consumption caused by connection of the PC and the terminal under the condition that the user does not need the PC is avoided, resources are saved, and the user experience is improved.
By adopting the method in the embodiment of the application, the terminal client can automatically confirm the PC client related to the terminal client and trigger the PC client to inquire whether the connection is made to the user, the process does not need the participation of the user, the operation of the user is reduced, and the user experience is improved.
Fig. 7 is a flowchart of a connection method between a PC and a terminal according to a seventh embodiment of the present application.
In the seventh embodiment of the present application, a cloud mobile phone assistant client is taken as an example to introduce a connection method between a PC and a terminal according to the seventh embodiment of the present application.
As shown in fig. 7, the process of the method for connecting the PC and the terminal actively triggered by the PC includes the following steps:
s702, starting a service process of a cloud mobile phone assistant PC client, and sending out a network multicast detection data packet;
s704, after receiving the detection data packet, the mobile phone client judges whether the detection data packet is the detection data packet sent by the related PC client, if so, S705 is executed, and if not, the process is ended;
s705, sending a response data packet;
s706, if the PC client does not receive the corresponding response data packet, ending the process; if the PC client receives the corresponding response data packet, executing S708;
s708, popping up a prompt window by the PC client;
s710, clicking an 'immediate connection' button by a user;
s712, the PC client initiates TCP connection to the mobile phone client.
By adopting the method for connecting the PC and the terminal in the embodiment of the application, when the related PC and the terminal are in the same local area network, the PC client prompts a user whether to connect a mobile phone, and then when the user confirms the connection, the PC and the terminal are wirelessly connected; the dependence on the USB cable when the PC is connected with the terminal in the prior art is avoided, so that the connection between the PC and the terminal is more convenient and faster, and the user experience is improved.
By adopting the scheme in the embodiment of the application, the option of whether the PC is connected with the terminal or not is given to the user, so that unnecessary resource consumption caused by connection of the PC and the terminal under the condition that the user does not need the PC is avoided, resources are saved, and the user experience is improved.
By adopting the method in the embodiment of the application, the PC client can automatically confirm the terminal client associated with the PC client, and the process does not need the participation of a user, so that the operation of the user is reduced, and the user experience is improved.
Fig. 8 is a flowchart of a method for connecting a PC to a terminal according to an eighth embodiment of the present application.
In an eighth embodiment of the present application, a cloud mobile phone assistant client is taken as an example, and a method for connecting a PC and a terminal according to the eighth embodiment of the present application is introduced.
As shown in fig. 8, the process of the method for establishing the WIFI hotspot by the mobile phone and actively triggering the connection between the PC and the terminal by the PC includes the following steps:
s802, a user clicks to establish a WIFI hotspot on an interface of a cloud mobile phone assistant mobile phone client;
s804, the mobile phone client generates a WIFI hotspot, the name of the hotspot is alizhushou, and the password is a 6-bit connection code of the mobile phone client;
s806, the user starts the cloud mobile phone assistant PC client, opens the connection interface of the PC client and selects the associated mobile phone name;
s808, detecting the WIFI hotspot with the current hotspot name of alizhushou by the PC through the wireless gateway, trying to connect the hotspot by using a connection code of the associated mobile phone as a password, executing S810 if the connection is successful, and prompting connection failure and ending the process if the connection is not successful;
s810, the PC client sends a network detection data packet to the connected mobile phone;
s812, after receiving the detection data packet, the mobile phone client judges that the detection data packet comes from the associated PC client, and sends a response data packet to the PC client, wherein the response data packet carries the IP address and the port number of the mobile phone;
s814, after receiving the response data packet, the PC client extracts the IP address and the port number of the mobile phone from the response data packet and initiates TCP connection to the mobile phone;
and S816, after receiving the connection request, the mobile phone client performs connection verification, and after the verification is passed, the mobile phone client establishes connection with the PC.
By adopting the method for connecting the PC and the terminal in the embodiment of the application, the terminal establishes the WIFI hotspot through the wireless network card, so that the PC and the terminal can access the same local area network, a wireless environment is provided for the connection between the subsequent terminal and the PC, and the user experience is improved.
By adopting the method for connecting the PC and the terminal in the embodiment of the application, when the related PC and the terminal are in the same local area network, the PC client is automatically connected with the mobile phone through WIFI; the dependence on the USB cable when the PC is connected with the terminal in the prior art is avoided, so that the connection between the PC and the terminal is more convenient and faster, and the user experience is improved.
By adopting the method in the embodiment of the application, the PC client can automatically confirm the terminal client associated with the PC client, and the process does not need the participation of a user, so that the operation of the user is reduced, and the user experience is improved.
Fig. 9 is a flowchart of a method for connecting a PC to a terminal according to a ninth embodiment of the present application.
Ninth in the embodiment of the present application, a cloud mobile phone assistant client is taken as an example, and a method for connecting a PC and a terminal according to the ninth in the embodiment of the present application is introduced.
As shown in fig. 9, the process of the method for establishing the WIFI hotspot by the PC and connecting the PC and the terminal actively triggered by the mobile phone includes the following steps:
s902, a user opens a PC-side cloud mobile phone assistant connection interface, selects a mobile phone name to be connected in a mobile phone list, and selects intelligent WIFI connection;
s904, the PC client triggers the PC to generate a WIFI hotspot through the wireless network card, wherein the hotspot name is alizhushou; the password is a 6-bit connection code of the selected mobile phone;
s906, the user starts a mobile phone client of the cloud mobile phone assistant and selects WIFI intelligent connection;
s908, the mobile phone client triggers the mobile phone to detect a WIFI hotspot named alizhushou through the wireless network card, and the WIFI hotspot is connected by taking the connection code of the current mobile phone as a password; if the connection is successful, executing S910, if not, prompting failure and ending the process;
s910, the mobile phone client sends a detection data packet;
s912, the PC client receives the detection data packet sent by the mobile phone and judges whether the detection data packet comes from the associated mobile phone; if so, perform S914; if not, ignoring the data packet;
s914, the PC client side initiates a TCP connection request to the mobile phone;
s916, the mobile phone receives the connection request, and the PC establishes connection with the mobile phone.
By adopting the method for connecting the PC and the terminal in the embodiment of the application, the PC establishes the WIFI hotspot through the wireless network card, so that the PC and the terminal can access the same local area network, a wireless environment is provided for the connection between the subsequent terminal and the PC, and the user experience is improved.
By adopting the method for connecting the PC and the terminal in the embodiment of the application, when the related PC and the terminal are in the same local area network, the PC client is automatically connected with the mobile phone through WIFI; the dependence on the USB cable when the PC is connected with the terminal in the prior art is avoided, so that the connection between the PC and the terminal is more convenient and faster, and the user experience is improved.
By adopting the method in the embodiment of the application, the PC client can automatically confirm the terminal client associated with the PC client, and the process does not need the participation of a user, so that the operation of the user is reduced, and the user experience is improved.
For convenience of description, each part of the above-described apparatus is separately described as functionally divided into various parts or units. Of course, the functionality of the various components or units may be implemented in the same or in multiple software or hardware implementations as the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (32)

1. A method for connecting a Personal Computer (PC) and a terminal is applied to a PC client, and is characterized by comprising the following steps:
confirming that the associated terminal client exists in the local area network according to the detection data packet; the associated terminal client is a terminal client having an association relation with the PC client; the incidence relation between the terminal client and the PC client is established in a mode that the terminal where the terminal client is located and the PC where the PC client is located are successfully connected in a wired or wireless mode within preset time, the terminal client and the PC client are logged in by the same account number, or the terminal client and the PC client are logged in by different account numbers belonging to the same user;
acquiring terminal information of the associated terminal client;
and triggering the PC to be wirelessly connected to the terminal according to the terminal information.
2. The connecting method according to claim 1,
according to the detection data packet, confirming that the associated terminal client exists in the local area network specifically comprises the following steps:
sending a first detection data packet in the local area network;
when first response data aiming at the first detection data packet from an associated terminal client in a local area network is received, confirming that the associated terminal client exists in the local area network, wherein the first response data carries the terminal information;
the acquiring of the terminal information of the associated terminal client specifically includes:
and extracting the terminal information from the first response data.
3. The connection method according to claim 2, wherein the PC client initiation triggers the PC client to send a first probe packet within the local area network.
4. The connecting method according to claim 1,
according to the detection data packet, confirming that the associated terminal client exists in the local area network specifically comprises the following steps:
receiving a second detection data packet, wherein the second detection data packet is sent by a terminal client in a local area network;
judging whether the terminal client is associated with the terminal client according to the second detection data packet, and if so, confirming that the associated terminal client exists in the local area network;
the acquiring of the terminal information of the terminal client specifically includes:
sending second response data for the second probe data packet to an associated terminal client;
and receiving the terminal information sent by the terminal client.
5. The connection method according to claim 1, before confirming existence of the associated terminal client in the local area network according to the probe packet, further comprising:
the PC client triggers the PC to establish a wireless fidelity (WIFI) hotspot, and the terminal is connected to the local area network through the hotspot.
6. The connection method according to claim 1, before confirming existence of the associated terminal client in the local area network according to the probe packet, further comprising:
and the terminal client triggers the terminal to establish a WIFI hotspot, and the PC is connected to the local area network through the hotspot.
7. The connection method according to claim 1, before confirming existence of the associated terminal client in the local area network according to the probe packet, further comprising:
prompting whether to connect the PC with the terminal or not on the PC screen or the terminal screen;
triggering the PC to wirelessly connect to the terminal according to the terminal information specifically comprises:
and when the user confirms the connection, triggering the PC to be wirelessly connected to the terminal according to the terminal information.
8. The connection method according to claim 1, wherein the terminal information includes a terminal IP address and a port number.
9. A method for connecting a PC (personal computer) and a terminal is applied to a terminal client, and is characterized by comprising the following steps:
confirming that the associated PC client exists in the local area network according to the detection data packet; the associated PC client is a PC client having an association relation with the terminal client; the incidence relation between the terminal client and the PC client is established in a mode that the terminal where the terminal client is located and the PC where the PC client is located are successfully connected in a wired or wireless mode within preset time, the terminal client and the PC client are logged in by the same account number, or the terminal client and the PC client are logged in by different account numbers belonging to the same user;
sending terminal information to the associated PC client;
and triggering the terminal to receive a wireless connection establishment request sent by the PC according to the terminal information so as to establish wireless connection with the PC.
10. The connecting method according to claim 9,
according to the detection data packet, confirming that the associated PC client exists in the local area network specifically comprises the following steps:
receiving a first detection data packet, wherein the first detection data packet is sent by a PC client in a local area network;
judging whether the PC client is associated with the PC client or not according to the first detection data packet;
if yes, confirming that the associated PC client exists in the local area network;
sending terminal information to the associated PC client, specifically comprising:
and sending first response data to the associated PC client, wherein the first response data carries the terminal information.
11. The connecting method according to claim 9,
according to the detection data packet, confirming that the associated PC client exists in the local area network specifically comprises the following steps:
sending a second probe data packet in the local area network;
and when second response data from the associated PC client to the second detection data packet is received, confirming that the associated PC client exists in the local area network.
12. The connection method according to claim 11, wherein the connection of the terminal to the lan triggers the terminal client to send a second probe packet within the lan.
13. The connecting method according to claim 9,
according to the detection data packet, confirming that the associated PC client exists in the local area network specifically comprises the following steps:
acquiring the IP address of the PC which is successfully connected in a preset time from the server;
sending a third detection data packet to the IP address;
when third response data aiming at the third detection data packet is received, confirming that a related PC client exists in the local area network;
sending terminal information to the associated PC client, specifically comprising:
and sending the terminal information to the PC client corresponding to the IP address sending the third response data.
14. The method according to claim 9, before confirming existence of the associated PC client in the local area network according to the probe packet, further comprising:
and the PC client triggers the PC to establish a WIFI hotspot, and the terminal is connected to the local area network through the hotspot.
15. The method according to claim 9, before confirming existence of the associated PC client in the local area network according to the probe packet, further comprising:
and the terminal client triggers the terminal to establish a WIFI hotspot, and the PC is connected to the local area network through the hotspot.
16. The connection method according to claim 9, before triggering the terminal to accept the wireless connection establishment request sent by the PC according to the terminal information, further comprising:
prompting whether to connect the PC with the terminal or not on the PC screen or the terminal screen;
triggering the terminal to receive the wireless connection establishment request sent by the PC according to the terminal information specifically comprises:
and when the user confirms the connection, triggering the terminal to accept the wireless connection establishment request sent by the PC according to the terminal information.
17. The connection method according to claim 9, wherein the terminal information includes a terminal IP address and a port number.
18. A connecting device of a personal computer PC and a terminal is applied to a PC client, and is characterized by comprising:
the first confirmation module is used for confirming that the associated terminal client exists in the local area network according to the detection data packet; the associated terminal client is a terminal client having an association relation with the PC client; the incidence relation between the terminal client and the PC client is established in a mode that the terminal where the terminal client is located and the PC where the PC client is located are successfully connected in a wired or wireless mode within preset time, the terminal client and the PC client are logged in by the same account number, or the terminal client and the PC client are logged in by different account numbers belonging to the same user;
the acquisition module is used for acquiring the terminal information of the associated terminal client;
and the first triggering module is used for triggering the PC to be wirelessly connected to the terminal according to the terminal information.
19. The connection device of claim 18,
the first confirmation module specifically includes:
the first sending submodule is used for sending a first detection data packet in the local area network;
a first confirmation submodule, configured to, when first response data, for the first probe packet, from an associated terminal client in a local area network is received, confirm that the associated terminal client exists in the local area network, where the first response data carries the terminal information;
the obtaining module is further configured to extract the terminal information from the first response data.
20. The connection device of claim 18,
the first confirmation module specifically includes:
the first receiving submodule is used for receiving a second detection data packet, wherein the second detection data packet is sent by a terminal client in a local area network;
the second confirmation submodule is used for judging whether the terminal client is associated with the terminal client according to the second detection data packet, and if so, confirming that the associated terminal client exists in the local area network;
the acquisition module specifically includes:
a second sending submodule, configured to send second response data for the second probe packet to an associated terminal client;
and the second receiving submodule is used for receiving the terminal information sent by the terminal client.
21. The connection device of claim 18, further comprising:
the first WIFI hotspot establishing module is used for establishing a WIFI hotspot, and the terminal client is connected to the local area network through the hotspot.
22. The connection device of claim 18, further comprising:
the first prompting module is used for prompting whether the PC is connected with the terminal or not on the PC screen or the terminal screen;
the first triggering module is specifically used for triggering the PC to be wirelessly connected to the terminal according to the terminal information when the user confirms connection.
23. The connection apparatus according to claim 18, wherein the terminal information includes a terminal IP address and a port number.
24. A connecting device of a PC and a terminal is applied to a terminal client and is characterized by comprising:
the second confirmation module is used for confirming that the associated PC client exists in the local area network according to the detection data packet; the associated PC client is a PC client having an association relation with the terminal client; the incidence relation between the terminal client and the PC client is established in a mode that the terminal where the terminal client is located and the PC where the PC client is located are successfully connected in a wired or wireless mode within preset time, the terminal client and the PC client are logged in by the same account number, or the terminal client and the PC client are logged in by different account numbers belonging to the same user;
the sending module is used for sending terminal information to the associated PC client;
and the second triggering connection block is used for triggering the terminal to receive a connection establishment request sent by the PC according to the terminal information so as to establish wireless connection with the PC.
25. The connection device of claim 24,
the second confirmation module specifically includes:
a third receiving submodule, configured to receive a first probe packet, where the first probe packet is sent by the PC client in a local area network;
the second confirmation submodule is used for judging whether the PC client is associated with the PC client according to the first detection data packet;
the sending module is further configured to send first response data to the associated PC client, where the first response data carries the terminal information.
26. The connection device according to claim 24, wherein the second confirmation module specifically comprises:
a third sending submodule, configured to send a second probe packet in the local area network;
and the third confirmation submodule is used for confirming that the associated PC client exists in the local area network when receiving second response data aiming at the second detection data packet from the associated PC client.
27. The connection device of claim 24,
the second confirmation module specifically includes:
the acquisition submodule is used for acquiring an IP address list of the PC which is successfully connected in preset time from the server;
the fourth confirming submodule is used for wirelessly connecting the IP addresses in the IP address list, judging whether the associated PC client exists according to the connection result, and if the connection is successful, confirming that the associated PC client exists in the local area network;
and the sending module is also used for sending the terminal information to the PC client corresponding to the IP address with successful connection.
28. The connection device of claim 24, further comprising:
and the second WIFI hotspot establishing module is used for establishing a WIFI hotspot, and the PC client is connected to the local area network through the hotspot.
29. The connection device of claim 24, further comprising:
the second prompting module is used for prompting whether the PC is connected with the terminal or not on the PC screen or the terminal screen;
the second triggering module is specifically configured to trigger the terminal to accept the wireless connection establishment request sent by the PC according to the terminal information when the user confirms connection.
30. The connection apparatus according to claim 24, wherein the terminal information includes a terminal IP address and a port number.
31. A PC and terminal connection system, comprising:
a PC client comprising the wireless connection apparatus of any one of claims 18-23;
an end client comprising the wireless connection device of any of claims 24-30.
32. The connection system of claim 31, further comprising:
and the server is used for storing the IP address of the PC which is successfully connected with the terminal client within the preset time.
CN201510043384.XA 2015-01-28 2015-01-28 Method, device and system for connecting computer and terminal Active CN105991386B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510043384.XA CN105991386B (en) 2015-01-28 2015-01-28 Method, device and system for connecting computer and terminal
PCT/CN2016/071547 WO2016119621A1 (en) 2015-01-28 2016-01-21 Method, device and system for connecting computer and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510043384.XA CN105991386B (en) 2015-01-28 2015-01-28 Method, device and system for connecting computer and terminal

Publications (2)

Publication Number Publication Date
CN105991386A CN105991386A (en) 2016-10-05
CN105991386B true CN105991386B (en) 2020-04-07

Family

ID=56542397

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510043384.XA Active CN105991386B (en) 2015-01-28 2015-01-28 Method, device and system for connecting computer and terminal

Country Status (2)

Country Link
CN (1) CN105991386B (en)
WO (1) WO2016119621A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110809330B (en) * 2019-12-16 2023-07-14 腾讯科技(深圳)有限公司 Multi-terminal connection establishment method and device, storage medium and electronic device
CN113947962A (en) * 2020-07-16 2022-01-18 深圳瞬玩科技有限公司 Network education method and system based on cloud mobile phone

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968118A (en) * 2005-11-19 2007-05-23 腾讯科技(深圳)有限公司 Method for establishing instant communication network neighbor
CN102299809A (en) * 2011-09-16 2011-12-28 迈奔灵动科技(北京)有限公司 Internet protocol (IP)-multicast-technology-based wireless connection method and system
CN102946628A (en) * 2012-10-25 2013-02-27 福州博远无线网络科技有限公司 Method for mobile equipment being in wireless connection with PC through two-dimension codes
CN103987017A (en) * 2014-06-03 2014-08-13 北京奇虎科技有限公司 Method and system for establishing service access in WLAN

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7774464B2 (en) * 2006-12-28 2010-08-10 Nokia Corporation Automatic syncML client profile creation for new servers
CN101252699A (en) * 2008-01-15 2008-08-27 深圳创维-Rgb电子有限公司 System of cluster sending short messages and realizing method thereof
CN102185925B (en) * 2011-05-18 2016-06-22 中兴通讯股份有限公司 A kind of support by the system of computer disposal terminal data, terminal and method
CN103838196A (en) * 2012-11-27 2014-06-04 大连斯马特科技发展有限公司 Wireless monitoring management system
CN103401738B (en) * 2013-07-31 2017-03-01 小米科技有限责任公司 A kind of method and device connecting terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968118A (en) * 2005-11-19 2007-05-23 腾讯科技(深圳)有限公司 Method for establishing instant communication network neighbor
CN102299809A (en) * 2011-09-16 2011-12-28 迈奔灵动科技(北京)有限公司 Internet protocol (IP)-multicast-technology-based wireless connection method and system
CN102946628A (en) * 2012-10-25 2013-02-27 福州博远无线网络科技有限公司 Method for mobile equipment being in wireless connection with PC through two-dimension codes
CN103987017A (en) * 2014-06-03 2014-08-13 北京奇虎科技有限公司 Method and system for establishing service access in WLAN

Also Published As

Publication number Publication date
WO2016119621A1 (en) 2016-08-04
CN105991386A (en) 2016-10-05

Similar Documents

Publication Publication Date Title
CN109690959B (en) File sending method, file receiving method and terminal
CN110300117B (en) IOT device and user binding authentication method, device and medium
KR102060547B1 (en) Method and apparatus for registering wireless device in wireless communication system
EP3151628B1 (en) Method, device and system for accessing a wireless network
US20190129671A1 (en) Method of sharing cloud printer in a cloud print system, cloud server, and cloud print system
EP3640849B1 (en) Electronic device and method of registering personal cloud apparatus in user portal server thereof
EP2999250B1 (en) Method and apparatus for interconnection between terminal device and gateway device
CN104980927A (en) Method and device for sharing WiFi passwords
CN111194067A (en) Network access method, device, related equipment and storage medium
CN111586665B (en) Method and device for accessing wireless network
CN101395850A (en) Supporting an access to a destination network via a wireless access network
CN104584490B (en) Data transmission method for uplink and device
CN107567017B (en) Wireless connection system, device and method
WO2014137734A1 (en) Peer-to-peer pre-association discovery operations
CN107979864B (en) Access method, device and system of access point
WO2018040524A1 (en) Method and device for sharing hotspots
CN105991386B (en) Method, device and system for connecting computer and terminal
CN104918296A (en) Network connection assistance system and method
WO2017185460A1 (en) Network access method, terminal and access point
CN105594292B (en) Method for establishing network connection through WPS and mobile Wi-Fi device
CN107087293B (en) Access method, terminal and server
WO2016145826A1 (en) Wifi hotspot accessing method and device
KR20200002742A (en) Method and apparatus for registering wireless device in wireless communication system
CN108738018B (en) Method, terminal and system for processing authentication information
CN108141906B (en) Mobile data sharing method and mobile 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1229564

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201214

Address after: Room 603, 6 / F, Roche Plaza, 788 Cheung Sha Wan Road, Kowloon, China

Patentee after: Zebra smart travel network (Hong Kong) Limited

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.