[go: up one dir, main page]

HK1229564B - Connection method and device for computer and terminal - Google Patents

Connection method and device for computer and terminal Download PDF

Info

Publication number
HK1229564B
HK1229564B HK17102969.4A HK17102969A HK1229564B HK 1229564 B HK1229564 B HK 1229564B HK 17102969 A HK17102969 A HK 17102969A HK 1229564 B HK1229564 B HK 1229564B
Authority
HK
Hong Kong
Prior art keywords
terminal
client
area network
local area
data packet
Prior art date
Application number
HK17102969.4A
Other languages
Chinese (zh)
Other versions
HK1229564A1 (en
HK1229564A (en
Inventor
徐俊
吴总路
姜剑
Original Assignee
斑马智行网络(香港)有限公司
Filing date
Publication date
Application filed by 斑马智行网络(香港)有限公司 filed Critical 斑马智行网络(香港)有限公司
Publication of HK1229564A1 publication Critical patent/HK1229564A1/en
Publication of HK1229564A publication Critical patent/HK1229564A/en
Publication of HK1229564B publication Critical patent/HK1229564B/en

Links

Description

计算机与终端的连接方法、装置及系统Computer and terminal connection method, device and system

技术领域Technical Field

本申请涉及计算机通信技术,特别涉及一种计算机与终端的连接方法、装置及系统。The present application relates to computer communication technology, and in particular to a method, device and system for connecting a computer to a terminal.

背景技术Background Art

现有技术中,用户通常通过USB(Universal Serial Bus,通用串行总线)线连接PC(Personal Computer,个人计算机)与移动终端(例如,智能手机、平板电脑等),从而能够通过PC对移动终端进行控制,并且能够在PC和移动终端之间进行高速率的数据传输。In the prior art, users usually connect a PC (Personal Computer) to a mobile terminal (e.g., a smartphone, tablet computer, etc.) via a USB (Universal Serial Bus) cable, so that they can control the mobile terminal through the PC and perform high-speed data transmission between the PC and the mobile terminal.

采用现有技术中的PC和终端的连接方法,用户需要随身携带USB线,如果用户未携带USB线,则不能实现PC与终端的连接,导致用户非常不便。When using the connection method between a PC and a terminal in the prior art, a user needs to carry a USB cable with him/her. If the user does not carry the USB cable, the connection between the PC and the terminal cannot be achieved, which causes great inconvenience to the user.

发明内容Summary of the Invention

本申请实施例中提供了一种计算机与终端的连接方法、装置及系统,用于解决现有技术中PC与终端连接时依赖USB线导致的不便。The embodiments of the present application provide a method, device, and system for connecting a computer and a terminal, which are used to solve the inconvenience caused by relying on a USB cable when connecting a PC and a terminal in the prior art.

根据本申请实施例的第一个方面,提供了一种个人计算机PC与终端的连接方法,应用于PC客户端,包括:根据探测数据包,确认本地局域网内存在关联终端客户端;获取关联终端客户端的终端信息;触发PC根据终端信息无线连接至终端。According to the first aspect of the embodiment of the present application, a method for connecting a personal computer PC to a terminal is provided, which is applied to a PC client, including: confirming the existence of an associated terminal client in a local area network based on a detection data packet; obtaining terminal information of the associated terminal client; and triggering the PC to wirelessly connect to the terminal based on the terminal information.

根据本申请实施例的第二个方面,提供了一种PC与终端的连接方法,应用于终端客户端,包括:根据探测数据包,确认本地局域网内存在关联PC客户端;向关联PC客户端发送终端信息;触发终端接受PC根据终端信息发送的无线连接建立请求,以与PC建立无线连接。According to a second aspect of an embodiment of the present application, a method for connecting a PC to a terminal is provided, which is applied to a terminal client and includes: confirming the existence of an associated PC client in a local area network based on a detection data packet; sending terminal information to the associated PC client; and triggering the terminal to accept a wireless connection establishment request sent by the PC based on the terminal information to establish a wireless connection with the PC.

根据本申请实施例的第三个方面,提供了一种个人计算机PC与终端的连接装置,应用于PC客户端,包括:第一确认模块,用于根据探测数据包,确认本地局域网内存在关联终端客户端;获取模块,用于获取关联终端客户端的终端信息;第一触发模块,用于触发PC根据终端信息无线连接至终端。According to a third aspect of an embodiment of the present application, a device for connecting a personal computer (PC) to a terminal is provided, which is applied to a PC client and includes: a first confirmation module for confirming the existence of an associated terminal client in a local area network based on a detection data packet; an acquisition module for obtaining terminal information of the associated terminal client; and a first triggering module for triggering the PC to wirelessly connect to the terminal based on the terminal information.

根据本申请实施例的第四个方面,提供了一种PC与终端的连接装置,应用于终端客户端,包括:第二确认模块,用于根据探测数据包,确认本地局域网内存在关联PC客户端;发送模块,用于向关联PC客户端发送终端信息;第二触发接块,用于触发终端接受PC根据终端信息发送的连接建立请求,以与PC建立无线连接。According to a fourth aspect of an embodiment of the present application, a device for connecting a PC to a terminal is provided, which is applied to a terminal client and includes: a second confirmation module, used to confirm the existence of an associated PC client in a local area network based on a detection data packet; a sending module, used to send terminal information to the associated PC client; and a second triggering module, used to trigger the terminal to accept a connection establishment request sent by the PC based on the terminal information, so as to establish a wireless connection with the PC.

根据本申请实施例的第五个方面,提供了一种PC与终端的连接系统,包括:包括如前述应用于PC客户端的无线连接装置的PC客户端;包括如前述应用于终端客户端的无线连接装置的终端客户端According to a fifth aspect of the embodiment of the present application, a system for connecting a PC to a terminal is provided, comprising: a PC client including the wireless connection device as described above for use with the PC client; a terminal client including the wireless connection device as described above for use with the terminal client

采用本申请实施例中的PC与终端的连接方法、装置和系统,在通过探测数据包确认关联的PC与终端处在同一个局域网中且PC获取终端的信息后,触发PC无线连接至终端;避免了现有技术中在PC与终端连接时对USB线的依赖,使得PC与终端的连接更方便快捷,提升了用户体验。By using the method, device and system for connecting a PC and a terminal in the embodiments of the present application, after confirming through a detection data packet that the associated PC and terminal are in the same local area network and the PC obtains the information of the terminal, the PC is triggered to be wirelessly connected to the terminal; this avoids the reliance on a USB cable when connecting the PC and the terminal in the prior art, making the connection between the PC and the terminal more convenient and quick, and improving the user experience.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

图1为本申请实施例一所示的PC与终端的无线连接方法的流程图;FIG1 is a flow chart of a method for wirelessly connecting a PC and a terminal as shown in Embodiment 1 of the present application;

图2是根据本申请实施例二的PC与终端的连接方法的流程图;FIG2 is a flow chart of a method for connecting a PC and a terminal according to a second embodiment of the present application;

图3是根据本申请实施例三的PC与终端的连接装置的结构示意图;FIG3 is a schematic structural diagram of a device for connecting a PC and a terminal according to a third embodiment of the present application;

图4是根据本申请实施例四的PC与终端的连接装置的结构示意图;FIG4 is a schematic structural diagram of a device for connecting a PC and a terminal according to a fourth embodiment of the present application;

图5是根据本申请实施例五的PC与终端的连接系统的系统框图;5 is a system block diagram of a system for connecting a PC and a terminal according to a fifth embodiment of the present application;

图6是根据本申请实施例六的PC与终端的连接方法的流程图;6 is a flowchart of a method for connecting a PC and a terminal according to a sixth embodiment of the present application;

图7是根据本申请实施例七的PC与终端的连接方法的流程图;7 is a flowchart of a method for connecting a PC and a terminal according to Embodiment 7 of the present application;

图8是根据本申请实施例八的PC与终端的连接方法的流程图;8 is a flowchart of a method for connecting a PC and a terminal according to Embodiment 8 of the present application;

图9是根据本申请实施例九的PC与终端的连接方法的流程图。FIG9 is a flowchart of a method for connecting a PC and 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 clearly understood, the exemplary embodiments of the present application are further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, and are not an exhaustive list of all the embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other unless they conflict.

图1为本申请实施例一所示的PC与终端的无线连接方法的流程图。FIG1 is a flowchart of a method for wirelessly connecting a PC and a terminal shown in Embodiment 1 of the present application.

根据本申请实施例一所示的应用于PC客户端的PC与终端的连接方法包括以下步骤:The method for connecting a PC and a terminal applied to a PC client according to the first embodiment of the present application includes the following steps:

S102,根据探测数据包,确认本地局域网内存在关联终端客户端;S102, confirming the existence of an associated terminal client in the local area network based on the detection data packet;

S104,获取关联终端客户端的终端信息;S104, obtaining terminal information of the associated terminal client;

S106,触发PC根据终端信息无线连接至终端。S106 , triggering the PC to wirelessly connect to the terminal according to the terminal information.

本领域技术人员应当理解,PC客户端即安装在PC上的客户端;终端客户端即为安装在终端上的客户端。终端客户端可以安装在例如手机、平板电脑等能够接入无线局域网的移动终端上;终端信息是用于标识该移动终端的信息。Those skilled in the art will understand that a PC client is a client installed on a PC, while a terminal client is a client installed on a terminal. A terminal client can be installed on a mobile terminal capable of accessing a wireless local area network, such as a mobile phone or tablet computer. Terminal information is information used to identify the mobile terminal.

PC客户端本地局域网是指PC当前接入的局域网;该局域网内存在关联终端客户端是指关联终端客户端所在的终端接入该局域网。在具体实施时,PC可以通过无线的方式接入局域网,也可以通过有线的方式接入局域网;终端通常通过无线的方式接入局域网。本领域技术人员可以理解,为实现PC与终端的无线连接,PC与终端均具备如无线网卡的无线通信模块。The PC client's local LAN refers to the LAN to which the PC is currently connected; the presence of an associated terminal client within the LAN means that the terminal to which the associated terminal client belongs is connected to the LAN. In specific implementations, the PC can access the LAN wirelessly or via a wired connection; the terminal typically accesses the LAN wirelessly. Those skilled in the art will appreciate that to achieve a wireless connection between the PC and the terminal, both the PC and the terminal must include a wireless communication module, such as a wireless network card.

在具体实施时,终端客户端与PC客户端之间的关联关系可以通过该终端客户端所在的终端与PC客户端所在的PC成功在预定时间内有线或无线连接过、该终端客户端与PC客户端登录的是同一账号、或者是终端客户端与PC客户端登录的是属于同一用户的不同账号等方式建立;本领域技术人员应当理解,只要能将终端客户端与PC客户端关联,并在终端客户端和PC客户端上建立彼此之间的关联关系即可。更具体地,本领域技术人员可以采取在PC客户端/终端客户端上记录最新成功连接过的终端/PC的唯一标识等方式建立终端客户端和PC客户端的关联关系。为避免混淆,通常在一个局域网内,一个PC客户端仅与一个终端客户端相互关联。优选地,PC与终端的无线连接方式是WIFI(Wireless-Fidelity,无线保真)连接。In a specific implementation, the association relationship between the terminal client and the PC client can be established by the terminal where the terminal client is located and the PC where the PC client is located being successfully connected wired or wirelessly within a predetermined time, the terminal client and the PC client being logged into the same account, or the terminal client and the PC client being logged into different accounts belonging to the same user; those skilled in the art should understand that as long as the terminal client and the PC client can be associated and an association relationship between them can be established on the terminal client and the PC client. More specifically, those skilled in the art can establish an association relationship between the terminal client and the PC client by recording the unique identifier of the most recently successfully connected terminal/PC on the PC client/terminal client. To avoid confusion, usually within a local area network, a PC client is associated with only one terminal client. Preferably, the wireless connection method between the PC and the terminal is a WIFI (Wireless-Fidelity) connection.

根据无线网卡使用的标准不同,WIFI的速度也有所不同。其中IEEE802.11b最高为11Mbps,IEEE802.11a为54Mbps、IEEE802.11g也为54Mbps,Netgear SUPER g技术可以将速度提升到108Mbps。Wi-Fi speeds vary depending on the wireless network card standard used. IEEE802.11b has a maximum speed of 11 Mbps, IEEE802.11a has a maximum speed of 54 Mbps, and IEEE802.11g also has a maximum speed of 54 Mbps. Netgear SUPER g technology can increase the speed to 108 Mbps.

在具体实施时,PC与终端之间还可以采用如WAPI(Wireless LAN Authenticationand Privacy Infrastructure,无线局域网鉴别与保密基础结构)的无线方式进行连接。In specific implementation, the PC and the terminal may also be connected by a wireless method such as WAPI (Wireless LAN Authentication and Privacy Infrastructure).

因此,用户通过WIFI或WAPI等的无线方式实现PC和终端的连接,能够使用户不依赖USB线而方便快捷的体验PC与终端之间的高数据传输速率。Therefore, users can connect the PC and the terminal wirelessly through WIFI or WAPI, which enables users to experience the high data transmission rate between the PC and the terminal conveniently and quickly without relying on USB cables.

采用本申请实施例中的PC与终端的连接方法,根据探测数据包确认关联的PC与终端处在同一个局域网中且PC获取终端的信息后,触发PC无线连接至终端;避免了现有技术中在PC与终端连接时对USB线的依赖,使得PC与终端的连接更方便快捷,提升了用户体验。By adopting the method for connecting a PC and a terminal in an embodiment of the present application, after confirming that the associated PC and the terminal are in the same local area network according to the detection data packet and the PC obtains the information of the terminal, the PC is triggered to be wirelessly connected to the terminal; this avoids the reliance on a USB cable when connecting the PC and the terminal in the prior art, making the connection between the PC and the terminal more convenient and quick, and improving the user experience.

在现有技术的PC与终端的连接方法中,用户需要首先启动PC客户端,然后在PC客户端主界面上点击进入手机连接界面,进入手机连接界面后,PC客户端触发PC扫描PC本地局域网内是否存在安装有手机助手终端客户端的手机;如果有,则列出,由用户从列出的手机列表中确认与自己的PC客户端相关联的手机,然后PC客户端执行后续操作,使PC无线连接到手机。In the existing method of connecting a PC to a terminal, the user needs to first start the PC client, and then click on the main interface of the PC client to enter the mobile phone connection interface. After entering the mobile phone connection interface, the PC client triggers the PC to scan whether there is a mobile phone with a mobile assistant terminal client installed in the local area network of the PC; if there is, it is listed, and the user confirms the mobile phone associated with his or her PC client from the listed mobile phone list, and then the PC client performs subsequent operations to connect the PC wirelessly to the mobile phone.

采用现有技术中的方案,由用户来选择与PC客户端相关联的手机,如果在本地局域网内存在多个安装有手机助手终端客户端的手机,那么用户将需要花费好几秒的时间才能找到自己想要连接的手机,导致用户体验下降。With the solution in the prior art, the user selects the mobile phone associated with the PC client. If there are multiple mobile phones with the mobile assistant terminal client installed in the local area network, it will take the user several seconds to find the mobile phone they want to connect to, resulting in a poor user experience.

可选地,根据探测数据包,确认本地局域网内存在关联终端客户端具体包括:PC客户端在本地局域网内发送第一探测数据包;接收到来自本地局域网内的关联终端客户端针对第一探测数据包的第一响应数据时,确认本地局域网内存在关联终端客户端,其中,第一响应数据携带终端信息;获取终端客户端的终端信息具体包括:从第一响应数据中提取终端信息。Optionally, based on the detection data packet, confirming the existence of an associated terminal client in the local local area network specifically includes: the PC client sends a first detection data packet in the local local area network; when receiving first response data from the associated terminal client in the local local area network to the first detection data packet, confirming the existence of an associated terminal client in the local local area network, wherein the first response data carries terminal information; obtaining the terminal information of the terminal client specifically includes: extracting the terminal information from the first response data.

如果该局域网内不存在与该PC客户端关联的终端客户端,则PC客户端可以在预定时间间隔后再次发送探测数据包,也可以不再发送探测数据包,本申请对此不作限制。If there is no terminal client associated with the PC client in the local area network, the PC client may send the detection data packet again after a predetermined time interval, or may not send the detection data packet again. This application does not impose any restrictions on this.

在具体实施时,该第一探测数据包和第一响应数据可以是UDP(User DatagramProtocol,用户数据报协议)数据包;PC客户端可以以组播的形式在本地局域网内发送第一探测数据包,也可以以广播的形式发送。应当理解,上述示例均是为便于本领域技术人员实施本申请的目的而示出,并不用于限制本申请。In a specific implementation, the first probe data packet and the first response data packet may be UDP (User Datagram Protocol) data packets; the PC client may send the first probe data packet in a multicast manner within the local area network, or may send it in a broadcast manner. It should be understood that the above examples are provided 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.

本领域技术人员应当理解,为了使接收到该第一探测数据包的PC或终端能够识别并返回响应数据,PC客户端发送的第一探测数据包中携带该PC客户端在本地局域网中的唯一标识,该唯一标识可以是PC的IP地址,也可以是服务器端为该PC客户端分配的唯一标识,如随机生成的32位GUID(Globally Unique Identifier,全局唯一标识体符):2cf2ecc8-166d-43ce-8759-38735f842211等。Those skilled in the art should understand that in order to enable the PC or terminal that receives the first detection data packet to identify and return response data, the first detection data packet sent by the PC client carries the unique identifier of the PC client in the local area network. The unique identifier can be the IP address of the PC or the unique identifier assigned to the PC client by the server, such as a randomly generated 32-bit GUID (Globally Unique Identifier): 2cf2ecc8-166d-43ce-8759-38735f842211, etc.

在具体实施时,终端客户端根据第一探测数据包判断PC客户端是否关联PC客户端可以采用如下方式:终端客户端接收到第一探测数据包时,从探测数据包中提取PC的标识,并将该标识与终端客户端存储的关联PC的标识进行对比,如果一致,则判断发送该第一探测数据包的PC客户端是关联PC客户端,如果不一致,则认为不是。应当理解,上述示例均是为便于本领域技术人员实施本申请的目的而示出,并不用于限制本申请。In a specific implementation, the terminal client can determine whether the PC client is an associated PC client based on the first probe packet in the following manner: upon receiving the first probe packet, the terminal client extracts the PC identifier from the probe packet and compares the identifier with the identifier of the associated PC stored by the terminal client. If the identifiers match, the PC client that sent the first probe packet is determined to be an associated PC client; if the identifiers do not match, the PC client is deemed not to be an associated PC client. It should be understood that the above examples are provided to facilitate implementation of the present application by persons skilled in the art and are not intended to limit the present application.

采用本申请实施例中的方法,通过PC客户端在本地局域网发送网络探测包、关联终端客户端回复响应数据的形式使得PC客户端能够自动确认与其关联的终端客户端,该过程不需要用户的参与,减少了用户的操作,提升了用户体验。By adopting the method in the embodiment of the present application, the PC client sends a network detection packet in the local area network, and the associated terminal client replies with response data, so that the PC client can automatically confirm the terminal client associated with it. This process does not require user participation, reduces user operations, and improves user experience.

优选地,PC客户端启动触发PC客户端在局域网内发送第一探测数据包。在具体实施本申请时,PC客户端也可以在启动后,在检测到PC已连接至局域网后再进行发送,也可以在其他任意预置时刻发送。Preferably, the PC client starts triggering the PC client to send a first detection data packet in the local area network. When the present application is specifically implemented, the PC client can also send the first detection data packet after starting up and detecting that the PC has been connected to the local area network, or can send the first detection data packet at any other preset time.

采用本申请实施例中的方案,PC客户端在启动后立即触发在本地局域网内发送第一探测数据包,能够在用户启动该PC客户端后,立即发起连接至终端的流程,无须用户进行更多操作,提升了用户体验。By adopting the solution in the embodiment of the present application, the PC client immediately triggers the sending of the first detection data packet within the local area network after startup. After the user starts the PC client, the process of connecting to the terminal can be immediately initiated without the user having to perform further operations, thereby improving the user experience.

可选地,根据探测数据包,确认本地局域网内存在关联终端客户端具体包括:接收第二探测数据包,其中,第二探测数据包是终端客户端在本地局域网内发送的;根据第二探测数据包判断终端客户端是否关联终端客户端,如果是,则确认本地局域网内存在关联终端客户端;获取终端客户端的终端信息具体包括:向关联终端客户端发送针对第二探测数据包的第二响应数据;接收终端客户端发送的终端信息。Optionally, confirming the existence of an associated terminal client in the local local area network based on the detection data packet specifically includes: receiving a second detection data packet, wherein the second detection data packet is sent by the terminal client in the local local area network; judging whether the terminal client is associated with the terminal client based on the second detection data packet, and if so, confirming the existence of an associated terminal client in the local local area network; obtaining the terminal information of the terminal client specifically includes: sending second response data for the second detection data packet to the associated terminal client; and receiving the terminal information sent by the terminal client.

在具体实施时,该第二探测数据包和第二响应数据可以是UDP(User DatagramProtocol,用户数据报协议)数据包;第二探测数据包可以是以组播的形式在本地局域网内发送的,也可以以广播的形式发送。应当理解,上述示例均是为便于本领域技术人员实施本申请的目的而示出,并不用于限制本申请。In a specific implementation, the second probe data packet and the second response data can be UDP (User Datagram Protocol) data packets; the second probe data packet can be sent in a multicast manner within the local area network, or can be sent in a broadcast manner. It should be understood that the above examples are provided 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.

本领域技术人员应当理解,为了使接收到该第二探测数据包的PC或终端能够识别并返回响应数据,终端客户端发送的第二探测数据包中携带该终端客户端在本地局域网中的唯一标识,该唯一标识可以是终端的IP地址,也可以是服务器端为该终端客户端分配的唯一标识,如终端客户端连接码:GK5R9K等。Those skilled in the art should understand that in order to enable the PC or terminal that receives the second detection data packet to identify and return response data, the second detection data packet sent by the terminal client carries the unique identifier of the terminal client in the local area network. The unique identifier can be the IP address of the terminal or the unique identifier assigned to the terminal client by the server, such as the terminal client connection code: GK5R9K, etc.

在具体实施时,PC客户端根据第二探测数据包判断终端客户端是否关联终端客户端可以采用如下方式:PC客户端接收到第二探测数据包时,从探测数据包中提取发送终端的标识,并将该标识与PC客户端存储的关联终端的标识进行对比,如果一致,则判断发送该第二探测数据包的终端客户端是关联终端客户端,如果不一致,则认为不是。应当理解,上述示例均是为便于本领域技术人员实施本申请的目的而示出,并不用于限制本申请。In a specific implementation, the PC client can determine whether the terminal client is an associated terminal client based on the second probe packet in the following manner: when the PC client receives the second probe packet, it extracts the identifier of the sending terminal from the probe packet and compares the identifier with the identifier of the associated terminal stored on the PC client. If the identifiers match, the terminal client that sent the second probe packet is determined to be an associated terminal client; if the identifiers do not match, the terminal client is deemed not to be an associated terminal client. It should be understood that the above examples are provided for the purpose of facilitating the implementation of the present application by persons skilled in the art and are not intended to limit the present application.

采用本申请实施例中的方法,PC客户端收到第二探测数据包时,根据该数据包中携带的内容判断出存在关联终端客户端,使得PC客户端能够自动确认与其关联的终端客户端,该过程不需要用户的参与,减少了用户的操作,提升了用户体验。By using the method in the embodiment of the present application, when the PC client receives the second detection data packet, it determines the existence of an associated terminal client based on the content carried in the data packet, so that the PC client can automatically confirm the terminal client associated with it. This process does not require user participation, reduces user operations, and improves user experience.

在现有技术中,在用户PC或终端没有WIFI环境时,将无法实现终端与PC的连接,导致用户不便。In the prior art, when the user's PC or terminal does not have a WIFI environment, the connection between the terminal and the PC cannot be achieved, causing inconvenience to the user.

可选地,在根据探测数据包,确认本地局域网内存在关联终端客户端之前,还包括:PC客户端触发PC建立WIFI热点,终端通过热点连接至局域网。Optionally, before confirming the existence of the associated terminal client in the local area network according to the detection data packet, the method further includes: the PC client triggering the PC to establish a WIFI hotspot, and the terminal is connected to the local area network through the hotspot.

PC能够通过无线网卡,建立WIFI热点(软AP),使终端和PC能够接入同一局域网,从而实现终端与PC的连接,提升了用户体验。The PC can establish a WIFI hotspot (soft AP) through a wireless network card, allowing the terminal and PC to access the same local area network, thereby realizing the connection between the terminal and the PC and improving the user experience.

可选地,在根据探测数据包,确认本地局域网内存在关联终端客户端之前,还包括:终端客户端触发终端建立WIFI热点,PC通过热点连接至局域网。Optionally, before confirming the existence of an associated terminal client in the local area network according to the detection data packet, the method further includes: the terminal client triggering the terminal to establish a WIFI hotspot, and the PC is connected to the local area network through the hotspot.

终端能够通过无线网卡,建立WIFI热点,使终端和PC能够接入同一局域网,从而实现终端与PC的连接,提升了用户体验。The terminal can establish a WIFI hotspot through the wireless network card, allowing the terminal and PC to access the same local area network, thereby realizing the connection between the terminal and the PC and improving the user experience.

优选地,在根据探测数据包,确认本地局域网内存在关联终端客户端之前,还包括:在PC屏幕或终端屏幕上提示是否连接PC与终端;触发PC根据终端信息无线连接至终端具体包括:在用户确认连接时,触发PC根据终端信息无线连接至终端。Preferably, before confirming the existence of an associated terminal client in the local area network based on the detection data packet, it also includes: prompting on the PC screen or the terminal screen whether to connect the PC and the terminal; triggering the PC to wirelessly connect to the terminal according to the terminal information specifically includes: when the user confirms the connection, triggering the PC to wirelessly connect to the terminal according to the terminal information.

在具体实施时,在PC屏幕或终端屏幕上提示是否连接到终端可以采用多种方式,例如,在PC屏幕右下角弹出提示框;在PC屏幕中间弹出提示框;在PC右下角闪烁,并在用户点击后弹出提示框;在终端屏幕中间弹出提示框等;本领域技术人员应当理解,只要能对用户进行提示即可,上述方式仅作为示例,并不用于限定本申请。In specific implementation, there are many ways to prompt on the PC screen or terminal screen whether the connection to the terminal is made, for example, a prompt box pops up in the lower right corner of the PC screen; a prompt box pops up in the middle of the PC screen; a prompt box flashes in the lower right corner of the PC and pops up after the user clicks it; a prompt box pops up in the middle of the terminal screen, etc.; those skilled in the art should understand that as long as the user can be prompted, the above methods are only examples and are not used to limit this application.

如果用户选择的是不连接,则关闭该提示框;或者如果用户不点击选择按钮,则在预定时间,例如10s后自动关闭该提示框。If the user chooses not to connect, the prompt box is closed; or if the user does not click the selection button, the prompt box is automatically closed after a predetermined time, for example, 10 seconds.

以接入同一无线局域网的PC与手机的WIFI连接过程为例,在PC开机接入无线局域网并自动登录PC客户端后,PC客户端发现用户的手机也接入了同一无线局域网;PC获取手机相关信息;然后PC客户端弹出提示框,向用户询问“你是否需要连接你的手机?”,如果用户点击“是”按钮,PC客户端触发PC启动无线通信模块,并通过WIFI连接至手机;如果用户点击“否”,PC客户端关闭该提示框;或者如果用户不点击提示按钮,则在10s后自动关闭该提示框。Taking the Wi-Fi connection process between a PC and a mobile phone connected to the same wireless LAN as an example, after the PC is turned on and connected to the wireless LAN and automatically logs in to the PC client, the PC client discovers that the user's mobile phone is also connected to the same wireless LAN; the PC obtains relevant information about the mobile phone; then the PC client pops up a prompt box and asks the user "Do you want to connect your mobile phone?" If the user clicks "Yes", the PC client triggers the PC to start the wireless communication module and connect to the mobile phone via Wi-Fi; 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 automatically closes after 10 seconds.

采用本申请实施例中的方案,在PC客户端发现接入同一局域网的关联终端客户端时,触发终端客户端或PC客户端向用户进行询问是否连接,并根据用户的选择进行无线连接/不连接;将PC与终端连接与否的选择权交至用户手里,避免了在用户不需要的情况下PC与终端连接导致的不必要的资源消耗,节省了资源,提升了用户体验。By adopting the solution in the embodiment of the present application, when the PC client finds an associated terminal client connected to the same local area network, the terminal client or the PC client is triggered to ask the user whether to connect, and wirelessly connect/not connect according to the user's choice; the choice of whether to connect the PC and the terminal is given to the user, avoiding unnecessary resource consumption caused by connecting the PC and the terminal when the user does not need it, saving resources, and improving the user experience.

在现有技术的PC与终端的连接方法中,在用户从列出的手机列表中确认与自己的PC客户端相关联的手机后,PC获取该手机的手机信息后,再无线连接到手机。In the conventional method of connecting a PC to a terminal, after a user confirms a mobile phone associated with his/her PC client from a list of listed mobile phones, the PC obtains the mobile phone information of the mobile phone and then wirelessly connects to the mobile phone.

采用现有技术中的方案,在用户确认连接后,PC会再去获取终端信息,即使获取成功,也会存一定的延时,如果获取失败,还将连接不成功,与用户期望不一致,都将导致用户体验下降。With the solution in the existing technology, after the user confirms the connection, the PC will try to obtain the terminal information again. Even if the acquisition is successful, there will be a certain delay. If the acquisition fails, the connection will also be unsuccessful, which is inconsistent with the user's expectations and will lead to a decline in user experience.

优选地,终端信息包括终端IP地址及端口号。在具体实施本申请时,该终端信息还可以进一步包括如终端名称、用户手机号等终端的其他信息。Preferably, the terminal information includes the terminal IP address and port number. In the specific implementation of this application, the terminal information may further include other terminal information such as the terminal name, user mobile phone number, etc.

采用本申请实施例中的方案,在向用户询问是否连接至终端之前,已经获取到终端信息的IP地址和端口号,为后续无线连接作好准备,一旦用户确认连接,则能够快速连接至终端,避免了在用户确认连接后,再去获取终端信息带来的延时,也能提升用户确认连接后的连接成功率,提升了用户体验。By adopting the solution in the embodiment of the present application, the IP address and port number of the terminal information have been obtained before asking the user whether to connect to the terminal, preparing for the subsequent wireless connection. Once the user confirms the connection, it can be quickly connected to the terminal, avoiding the delay caused by obtaining the terminal information after the user confirms the connection, and also improving the connection success rate after the user confirms the connection, thereby improving the user experience.

图2是根据本申请实施例二的PC与终端的连接方法的流程图。FIG2 is a flow chart of a method for connecting a PC and a terminal according to a second embodiment of the present application.

如图2所示,根据本申请实施例二的应用于终端客户端的PC与终端的连接方法包括如下步骤:As shown in FIG2 , 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,根据探测数据包,确认本地局域网内存在关联PC客户端;S202, confirming the existence of an associated PC client in the local area network based on the detection data packet;

S204,向关联PC客户端发送终端信息;S204, sending terminal information to the associated PC client;

S206,触发终端接受PC根据终端信息发送的无线连接建立请求,以与PC建立无线连接。S206 , triggering the terminal to accept the wireless connection establishment request sent by the PC according to the terminal information, so as to establish a wireless connection with the PC.

本领域技术人员应当理解,终端客户端即为安装在终端上的客户端;PC客户端即安装在PC上的客户端。终端客户端可以安装在例如手机、平板电脑等能够接入无线局域网的移动终端上;终端信息是用于标识该移动终端的信息。Those skilled in the art will understand that a terminal client is a client installed on a terminal, and a PC client is a client installed on a PC. A terminal client can be installed on a mobile terminal capable of accessing a wireless local area network, such as a mobile phone or tablet computer. Terminal information is information used to identify the mobile terminal.

PC客户端本地局域网是指PC当前接入的局域网;该局域网内存在关联终端客户端是指关联终端客户端所在的终端接入该局域网。在具体实施时,PC可以通过无线的方式接入局域网,也可以通过有线的方式接入局域网;终端通常通过无线的方式接入局域网。本领域技术人员可以理解,为实现PC与终端的无线连接,PC与终端均具备如无线网卡的无线通信模块。The PC client's local LAN refers to the LAN to which the PC is currently connected; the presence of an associated terminal client within the LAN means that the terminal to which the associated terminal client belongs is connected to the LAN. In specific implementations, the PC can access the LAN wirelessly or via a wired connection; the terminal typically accesses the LAN wirelessly. Those skilled in the art will appreciate that to achieve a wireless connection between the PC and the terminal, both the PC and the terminal must include a wireless communication module, such as a wireless network card.

在具体实施时,终端客户端与PC客户端之间的关联关系可以通过该终端客户端所在的终端与PC客户端所在的PC成功在预定时间内有线或无线连接过、该终端客户端与PC客户端登录的是同一账号、或者是属于同一用户的不同账号等方式建立;本领域技术人员应当理解,只要能将终端客户端与PC客户端关联,并在终端客户端和PC客户端上建立彼此之间的关联关系即可。更具体地,本领域技术人员可以采取在PC客户端/终端客户端上记录最新成功连接过的终端/PC的唯一标识等方式建立终端客户端和PC客户端的关联关系。为避免混淆,通常在一个局域网内,一个PC客户端仅与一个终端客户端相互关联。In specific implementations, the association between a terminal client and a PC client can be established by successfully connecting the terminal where the terminal client resides to the PC where the PC client resides, either wired or wirelessly, within a predetermined timeframe, or by logging into the same account as the terminal client and the PC client, or logging into different accounts belonging to the same user. Those skilled in the art will appreciate that as long as the terminal client and the PC client can be associated and an association established between them, it will suffice. More specifically, those skilled in the art can establish the association between the terminal client and the PC client by recording the unique identifier of the most recently successfully connected terminal/PC on the PC client/terminal client. To avoid confusion, typically within a local area network, a PC client is associated with only one terminal client.

优选地,终端接受的无线连接建立请求是WIFI连接建立请求。Preferably, the wireless connection establishment request received by the terminal is a WIFI connection establishment request.

在具体实施时,PC与终端之间还可以采用如WAPI的无线方式进行连接。During specific implementation, the PC and the terminal may also be connected using a wireless method such as WAPI.

因此,用户通过WIFI进行PC和终端的连接,能够使用户不依赖USB线而方便快捷的体验PC与终端之间的高数据传输速率。Therefore, users can connect the PC and the terminal via WIFI, which enables users to experience the high data transmission rate between the PC and the terminal conveniently and quickly without relying on USB cables.

以接入同一无线局域网的PC与手机的WIFI连接过程为例,在手机开机接入无线局域网并自动登录终端客户端后,终端客户端发现用户的PC也接入了同一无线局域网;终端客户端向PC客户端发送手机相关信息后;等待PC端发送无线连接建立请求;如果收到该请求,则接受;如果未收到请求,则不进行处理。Taking the Wi-Fi connection process between a PC and a mobile phone connected to the same wireless LAN as an example, after the mobile phone is turned on and connected to the wireless LAN and automatically logs in to the terminal client, the terminal client discovers that the user's PC is also connected to the same wireless LAN; the terminal client sends mobile phone related information to the PC client; waits for the PC to send a wireless connection establishment request; if the request is received, it is accepted; if not, no processing is performed.

采用本申请实施例中的PC与终端的连接方法,在根据探测数据包确认关联的PC与终端处在同一个局域网中时,终端向PC发送终端信息,然后接受PC发送的无线连接建立请求以建立终端与PC之间的无线连接;避免了现有技术中在PC与终端连接时对USB线的依赖,使得PC与终端的连接更方便快捷,提升了用户体验。By adopting the method for connecting a PC and a terminal in an embodiment of the present application, when it is confirmed based on a detection data packet that the associated PC and the terminal are in the same local area network, the terminal sends terminal information to the PC, and then accepts a wireless connection establishment request sent by the PC to establish a wireless connection between the terminal and the PC; this avoids the reliance on a USB cable when connecting the PC and the terminal in the prior art, making the connection between the PC and the terminal more convenient and quick, and improving the user experience.

在现有技术的PC与终端的连接方法中,如果用户希望从终端侧触发PC与终端之间建立无线连接,需要用户打开PC客户端的主界面,然后进入二维码连接界面,生成二维码,同时打开终端的二维码扫描工具,扫描此二维码,扫描完成后,终端向PC请求建立无线连接,完成PC与终端之间的无线连接。In the existing method of connecting a PC and a terminal, if a user wants to trigger a wireless connection between the PC and the terminal from the terminal side, the user needs to open the main interface of the PC client, then enter the QR code connection interface, generate a QR code, and open the QR code scanning tool of the terminal at the same time to scan the QR code. After the scanning is completed, the terminal requests the PC to establish a wireless connection, thereby completing the wireless connection between the PC and the terminal.

采用现有技术中的方案,用户需要同时打开PC客户端和终端客户端,多次点击操作后,还需要扫描二维码进行连接,操作繁琐,对于对智能终端不熟悉的用户来说,很难顺利完成。With the solution in the existing technology, users need to open the PC client and the terminal client at the same time, click multiple times, and then scan the QR code to connect. The operation is cumbersome and difficult to complete smoothly for users who are not familiar with smart terminals.

而采用本申请实施例的技术方案,终端客户端在确认本地局域网内存在关联PC客户端时,向该PC客户端发送终端信息,触发PC侧发起无线连接请求,在该过程中,用户无须任何操作即可完成PC与终端的无线连接,方便快捷,提升了用户体验。By adopting the technical solution of the embodiment of the present application, when the terminal client confirms that there is an associated PC client in the local area network, it sends terminal information to the PC client, triggering the PC side to initiate a wireless connection request. In this process, the user can complete the wireless connection between the PC and the terminal without any operation, which is convenient and fast, and improves the user experience.

可选地,根据探测数据包,确认本地局域网内存在关联PC客户端具体包括:接收第一探测数据包,其中,第一探测数据包是PC客户端在本地局域网内发送的;根据第一探测数据包判断PC客户端是否关联PC客户端;如果是,则确认本地局域网内存在关联PC客户端;向关联PC客户端发送终端信息,具体包括:向关联PC客户端发送第一响应数据,第一响应数据携带终端信息。Optionally, confirming the existence of an associated PC client in the local LAN based on the detection data packet specifically includes: receiving a first detection data packet, wherein the first detection data packet is sent by the PC client in the local LAN; determining whether the PC client is associated with the PC client based on the first detection data packet; if so, confirming the existence of an associated PC client in the local LAN; sending terminal information to the associated PC client specifically includes: sending first response data to the associated PC client, the first response data carrying terminal information.

在具体实施时,该第一探测数据包和第一响应数据可以是UDP数据包;第一探测数据包可以是以组播的形式在本地局域网内发送的,也可以以广播的形式发送。应当理解,上述示例均是为便于本领域技术人员实施本申请的目的而示出,并不用于限制本申请。In a specific implementation, the first probe data packet and the first response data packet may be UDP data packets; the first probe data packet may be sent in a multicast manner within the local area network, or may be sent in a broadcast manner. It should be understood that the above examples are provided to facilitate those skilled in the art in implementing the present application and are not intended to limit the present application.

本领域技术人员应当理解,为了使接收到该第一探测数据包的PC或终端能够识别并返回响应数据,PC客户端发送的第一探测数据包中携带该PC客户端在本地局域网中的唯一标识,该唯一标识可以是PC的IP地址,也可以是服务器端为该PC客户端分配的唯一标识,如随机生成的32位GUID:2cf2ecc8-166d-43ce-8759-38735f842211等。Those skilled in the art should understand that in order to enable the PC or terminal that receives the first detection data packet to identify and return response data, the first detection data packet sent by the PC client carries a unique identifier of the PC client in the local area network. The unique identifier can be the IP address of the PC or a unique identifier assigned to the PC client by the server, such as a randomly generated 32-bit GUID: 2cf2ecc8-166d-43ce-8759-38735f842211, etc.

在具体实施时,终端客户端根据第一探测数据包判断PC客户端是否关联PC客户端可以采用如下方式:终端客户端接收到第一探测数据包时,从探测数据包中提取发送PC的标识,并将该标识与终端客户端存储的关联PC的标识进行对比,如果一致,则判断发送该第一探测数据包的PC客户端是关联PC客户端,如果不一致,则认为不是。应当理解,上述示例均是为便于本领域技术人员实施本申请的目的而示出,并不用于限制本申请。In a specific implementation, the terminal client can determine whether the PC client is an associated PC client based on the first probe packet in the following manner: upon receiving the first probe packet, the terminal client extracts the identifier of the sending PC from the probe packet and compares the identifier with the identifier of the associated PC stored by the terminal client. If the identifiers match, the PC client that sent the first probe packet is determined to be an associated PC client; if the identifiers do not match, the PC client is deemed not to be an associated PC client. It should be understood that the above examples are provided to facilitate implementation of the present application by persons skilled in the art and are not intended to limit the present application.

采用本申请实施例中的方法,终端客户端收到第一探测数据包时,根据该数据包中携带的内容判断出存在关联PC客户端,并向该关联PC客户端发送终端信息,以触发PC客户端发起无线连接请求;使得终端客户端能够自动确认与其关联的PC客户端,并触发PC客户端发起无线连接请求,该过程不需要用户的参与,减少了用户的操作,提升了用户体验。By using the method in the embodiment of the present application, when the terminal client receives the first detection data packet, it determines the existence of an associated PC client based on the content carried in the data packet, and sends terminal information to the associated PC client to trigger the PC client to initiate a wireless connection request; so that the terminal client can automatically confirm the PC client associated with it and trigger the PC client to initiate a wireless connection request. This process does not require user participation, reduces user operations, and improves user experience.

可选地,根据探测数据包,确认本地局域网内存在关联PC客户端具体包括:在局域网内发送第二探测数据包;接收到来自关联PC客户端针对第二探测数据包的第二响应数据时,确认本地局域网内存在关联PC客户端。Optionally, confirming the existence of the associated PC client in the local area network according to the detection data packet specifically includes: sending a second detection data packet in the local area network; and confirming the existence of the associated PC client in the local area network when receiving second response data from the associated PC client in response to the second detection data packet.

如果该局域网内不存在与该终端客户端关联的PC客户端,则终端客户端可以在预定时间间隔后再次发送探测数据包,也可以不再发送探测数据包,本申请对此不作限制。If there is no PC client associated with the terminal client in the local area network, the terminal client may send the detection data packet again after a predetermined time interval, or may not send the detection data packet at all. This application does not impose any restrictions on this.

在具体实施时,该第二探测数据包和第二响应数据可以是UDP数据包;终端客户端可以以组播的形式在本地局域网内发送第二探测数据包,也可以以广播的形式发送。应当理解,上述示例均是为便于本领域技术人员实施本申请的目的而示出,并不用于限制本申请。In a specific implementation, the second probe data packet and the second response data can be UDP data packets; the terminal client can send the second probe data packet in the local area network in a multicast manner or in a broadcast manner. It should be understood that the above examples are provided 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.

本领域技术人员应当理解,为了使接收到该第二探测数据包的PC或终端能够识别并返回响应数据,终端客户端发送的第二探测数据包中携带该终端客户端在本地局域网中的唯一标识,该唯一标识可以是终端的IP地址,也可以是服务器端为该终端客户端分配的唯一标识,如终端客户端连接码:GK5R9K等。Those skilled in the art should understand that in order to enable the PC or terminal that receives the second detection data packet to identify and return response data, the second detection data packet sent by the terminal client carries the unique identifier of the terminal client in the local area network. The unique identifier can be the IP address of the terminal or the unique identifier assigned to the terminal client by the server, such as the terminal client connection code: GK5R9K, etc.

在具体实施时,PC客户端根据第二探测数据包判断终端客户端是否关联终端客户端可以采用如下方式:PC客户端接收到第二探测数据包时,从探测数据包中提取终端的标识,并将该标识与PC客户端存储的关联终端标识进行对比,如果一致,则判断发送该第二探测数据包的终端客户端是关联终端客户端,如果不一致,则认为不是。应当理解,上述示例均是为便于本领域技术人员实施本申请的目的而示出,并不用于限制本申请。In a specific implementation, the PC client can determine whether the terminal client is an associated terminal client based on the second probe packet in the following manner: when the PC client receives the second probe packet, it extracts the terminal identifier from the probe packet and compares the identifier with the associated terminal identifier stored on the PC client. If the identifiers match, it is determined that the terminal client sending the second probe packet is an associated terminal client; if the identifiers do not match, it is determined that the terminal client is not an associated terminal client. It should be understood that the above examples are provided for the purpose of facilitating the implementation of the present application by persons skilled in the art and are not intended to limit the present application.

采用本申请实施例中的方法,终端客户端在局域网内发送第二探测数据包;在接收到来自关联PC客户端针对第二探测数据包的第二响应数据时,确认本地局域网内存在关联PC客户端;然后向该关联PC客户端发送终端信息,以触发PC客户端向用户询问是否连接;使得终端客户端能够自动确认与其关联的PC客户端,并触发PC客户端向用户询问是否连接,该过程不需要用户的参与,减少了用户的操作,提升了用户体验。Using the method in the embodiment of the present application, the terminal client sends a second detection data packet within the local area network; when receiving second response data from the associated PC client in response to the second detection data packet, it confirms that the associated PC client exists in the local area network; then, terminal information is sent to the associated PC client to trigger the PC client to ask the user whether to connect; so that the terminal client can automatically confirm the PC client associated with it and trigger the PC client to ask the user whether to connect. This process does not require user participation, reduces user operations, and improves user experience.

优选地,终端连接到局域网触发终端客户端在局域网内发送第二探测数据包。在具体实施本申请时,终端客户端可以在启动后立即在本地局域网内发送第二探测数据包,也可以在终端启动WIFI连接时立即发送,也可以在其他任意预置时刻发送。Preferably, the terminal is connected to the local area network triggering the terminal client to send the second detection data packet in the local area network. When the present application is implemented, the terminal client can send the second detection data packet in the local area network immediately after startup, or immediately when the terminal starts the WIFI connection, or at any other preset time.

采用本申请实施例中的方案,终端客户端在连接到局域网后立即触发在本地局域网内发送第二探测数据包,能够在用户连接到局域网后,立即发起连接至终端的流程,无须用户进行更多操作,提升了用户体验。By adopting the solution in the embodiment of the present application, the terminal client immediately triggers the sending of a second detection data packet within the local area network after connecting to the local area network. After the user connects to the local area network, the process of connecting to the terminal can be initiated immediately without the user having to perform more operations, thereby improving the user experience.

可选地,根据探测数据包,确认本地局域网内存在关联PC客户端具体包括:向服务器获取预定时间内连接成功的PC的IP地址;向该IP地址发送第三探测数据包;在接收到针对该第三探测数据包的第三响应数据时,确认本地局域网内存在关联PC客户端;向关联PC客户端发送终端信息,具体包括:向发送第三响应数据的IP地址对应的PC客户端发送所述终端信息。Optionally, based on the detection data packet, confirming the existence of an associated PC client in the local area network specifically includes: obtaining the IP address of a PC that has successfully connected within a predetermined time from the server; sending a third detection data packet to the IP address; when receiving third response data for the third detection data packet, confirming the existence of an associated PC client in the local area network; sending terminal information to the associated PC client specifically includes: sending the terminal information to the PC client corresponding to the IP address that sends the third response data.

如果未接收到第三响应数据,则判断本地不存在预定时间内连接过的PC客户端。If the third response data is not received, it is determined that there is no PC client connected within the predetermined time locally.

在具体实施时,终端客户端可以通过WIFI或WAPI等无线方式发送第三探测数据包。During specific implementation, the terminal client may send the third detection data packet via wireless means such as WIFI or WAPI.

终端客户端从服务器获取的IP地址可以是一个,也可以是多个,也可能没有。如果是多个,则终端客户端可以向这些IP地址依次发送探测数据包,对于不在本地局域网内的IP地址,将无法收到探测数据包,所以终端客户端也不会收到来自该IP地址的响应数据包;如果收到响应数据包,则确认该PC处于本地局域网中。The IP address obtained by the terminal client from the server can be one, multiple, or none. If there are multiple IP addresses, the terminal client can send probe packets to these IP addresses in sequence. If the IP address is not in the local area network, the probe packet will not be received by the terminal client, so the terminal client will not receive the response packet from the IP address. If a response packet is received, it is confirmed that the PC is in the local area network.

终端客户端可以在启动后立即向服务器获取预定时间,如24小时内成功连接过的PC的IP地址列表,也可以在启动WIFI时立即向服务器获取,也可以在其他任意预置时刻向服务器获取,本申请对此不作限制。The terminal client can obtain the scheduled time from the server immediately after startup, such as the IP address list of PCs that have successfully connected within 24 hours, or obtain it from the server immediately when starting WIFI, or obtain it from the server at any other preset time. This application does not impose any restrictions on this.

采用本申请实施例中的方法,终端客户端在向服务器获取在预定时间内成功连接过的PC的IP地址后,向该IP地址发送第三探测数据包;在接收到针对该第三探测数据包的第三响应数据时,确认本地局域网内存在关联PC客户端;然后向发送第三响应数据的IP地址对应的PC客户端发送终端信息,触发PC客户端发起连接请求;该过程不需要用户的参与,减少了用户的操作,提升了用户体验。Using the method in the embodiment of the present application, after the terminal client obtains the IP address of a PC that has been successfully connected within a predetermined time from the server, it sends a third detection data packet to the IP address; when receiving the third response data for the third detection data packet, it confirms that there is an associated PC client in the local area network; then, terminal information is sent to the PC client corresponding to the IP address that sent the third response data, triggering the PC client to initiate a connection request; this process does not require user participation, reduces user operations, and improves user experience.

在现有技术中,在用户PC或终端没有WIFI环境时,将无法实现终端与PC的连接,导致用户不便。In the prior art, when the user's PC or terminal does not have a WIFI environment, the connection between the terminal and the PC cannot be achieved, causing inconvenience to the user.

可选地,在根据探测数据包,确认本地局域网内存在关联终端客户端之前,还包括:PC客户端触发PC建立WIFI热点,终端通过热点连接至局域网。Optionally, before confirming the existence of the associated terminal client in the local area network according to the detection data packet, the method further includes: the PC client triggering the PC to establish a WIFI hotspot, and the terminal is connected to the local area network through the hotspot.

PC能够通过无线网卡,建立WIFI热点,使终端和PC能够接入同一局域网,从而实现终端与PC的连接,提升了用户体验。The PC can establish a WIFI hotspot through a wireless network card, allowing the terminal and PC to access the same local area network, thereby realizing the connection between the terminal and the PC and improving the user experience.

可选地,在根据探测数据包,确认本地局域网内存在关联终端客户端之前,还包括:终端客户端触发终端建立WIFI热点,PC通过热点连接至局域网。Optionally, before confirming the existence of an associated terminal client in the local area network according to the detection data packet, the method further includes: the terminal client triggering the terminal to establish a WIFI hotspot, and the PC is connected to the local area network through the hotspot.

终端能够通过无线网卡,建立WIFI热点,使终端和PC能够接入同一局域网,从而实现终端与PC的连接,提升了用户体验。The terminal can establish a WIFI hotspot through the wireless network card, allowing the terminal and PC to access the same local area network, thereby realizing the connection between the terminal and the PC and improving the user experience.

优选地,在根据探测数据包,确认本地局域网内存在关联终端客户端之前,还包括:在PC屏幕或终端屏幕上提示是否连接PC与终端;触发PC根据终端信息无线连接至终端具体包括:在用户确认连接时,触发PC根据终端信息无线连接至终端。Preferably, before confirming the existence of an associated terminal client in the local area network based on the detection data packet, it also includes: prompting on the PC screen or the terminal screen whether to connect the PC and the terminal; triggering the PC to wirelessly connect to the terminal according to the terminal information specifically includes: when the user confirms the connection, triggering the PC to wirelessly connect to the terminal according to the terminal information.

在具体实施时,在PC屏幕或终端屏幕上提示是否连接到终端可以采用多种方式,例如,在PC屏幕右下角弹出提示框;在PC屏幕中间弹出提示框;在PC右下角闪烁,并在用户点击后弹出提示框;在终端屏幕中间弹出提示框等;本领域技术人员应当理解,只要能对用户进行提示即可,上述方式仅作为示例,并不用于限定本申请。In specific implementation, there are many ways to prompt on the PC screen or terminal screen whether the connection to the terminal is made, for example, a prompt box pops up in the lower right corner of the PC screen; a prompt box pops up in the middle of the PC screen; a prompt box flashes in the lower right corner of the PC and pops up after the user clicks it; a prompt box pops up in the middle of the terminal screen, etc.; those skilled in the art should understand that as long as the user can be prompted, the above methods are only examples and are not used to limit this application.

如果用户选择的是不连接,则关闭该提示框;或者如果用户不点击选择按钮,则在预定时间,例如10s后自动关闭该提示框。If the user chooses not to connect, the prompt box is closed; or if the user does not click the selection button, the prompt box is automatically closed after a predetermined time, for example, 10 seconds.

采用本申请实施例中的方案,终端客户端发现接入同一局域网的PC客户端时,触发PC客户端或终端客户端向用户进行询问是否连接,并根据用户的选择进行无线连接/不连接;将PC与终端连接与否的选择权交至用户手里,避免了在用户不需要的情况下PC与终端连接导致的不必要的资源消耗,节省了资源,提升了用户体验。By adopting the solution in the embodiment of the present application, when the terminal client finds a PC client connected to the same local area network, the PC client or the terminal client is triggered to ask the user whether to connect, and wirelessly connect/disconnect according to the user's choice; the choice of whether to connect the PC and the terminal is given to the user, avoiding unnecessary resource consumption caused by connecting the PC and the terminal when the user does not need it, saving resources, and improving the user experience.

在现有技术的PC与终端的连接方法中,在用户扫描二维码后,终端将信息发送至PC,并向PC请求建立无线连接,完成PC与终端之间的无线连接。In the conventional method of connecting a PC and a terminal, after a user scans a QR code, the terminal sends information to the PC and requests the PC to establish a wireless connection, thereby completing the wireless connection between the PC and the terminal.

采用现有技术中的方案,在用户扫描二维码以确认连接后,终端再将信息发送至PC,会存一定的延时,导致用户体验下降。With the solution in the prior art, after the user scans the QR code to confirm the connection, the terminal sends the information to the PC, which causes a certain delay and reduces the user experience.

优选地,终端信息包括终端IP地址及端口号。在具体实施本申请时,该终端信息还可以进一步包括如终端名称、用户手机号等终端的其他信息。Preferably, the terminal information includes the terminal IP address and port number. In the specific implementation of this application, the terminal information may further include other terminal information such as the terminal name, user mobile phone number, etc.

采用本申请实施例中的方案,在PC客户端向用户询问是否连接至终端之前,终端已经将IP地址和端口号发送至PC客户端,以便PC为后续无线连接作好准备,一旦用户确认连接,则能够快速连接至终端,避免了在用户确认连接后,再去获取终端信息带来的延时,提升了用户体验。By adopting the solution in the embodiment of the present application, before the PC client asks the user whether to connect to the terminal, the terminal has already sent the IP address and port number to the PC client, so that the PC is ready for subsequent wireless connection. Once the user confirms the connection, it can be quickly connected to the terminal, avoiding the delay caused by obtaining terminal information after the user confirms the connection, thereby improving the user experience.

基于同一发明构思,本申请实施例中还提供了一种应用于PC客户端的PC与终端的连接装置,由于该装置解决问题的原理与应用于PC客户端的PC与终端的连接方法相似,因此该装置的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, an embodiment of the present application also provides a device for connecting a PC and a terminal applied to a PC client. Since the principle of solving the problem by the device is similar to the method for connecting a PC and a terminal applied to a PC client, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

图3是根据本申请实施例三的PC与终端的连接装置的结构示意图。FIG3 is a schematic structural diagram of a device for connecting a PC and a terminal according to a third embodiment of the present application.

如图3所示,根据本申请实施例三的应用于PC客户端30的PC与终端的连接装置300包括:第一确认模块302,用于根据探测数据包,确认本地局域网内存在关联终端客户端;获取模块304,用于获取关联终端客户端的终端信息;第一触发模块306,用于在用户确认连接时,触发PC根据终端信息无线连接至终端。As shown in Figure 3, the PC and terminal connection device 300 applied to the PC client 30 according to the third embodiment of the present application includes: a first confirmation module 302, which is used to confirm the existence of an associated terminal client in the local area network based on a detection data packet; an acquisition module 304, which is used to obtain terminal information of the associated terminal client; and a first trigger module 306, which is used to trigger the PC to wirelessly connect to the terminal according to the terminal information when the user confirms the connection.

采用本申请实施例中的PC与终端的连接装置,在根据探测数据包确认关联的PC与终端处在同一个局域网中且PC能够获取终端的信息时,触发PC无线连接至终端;避免了现有技术中在PC与终端连接时对USB线的依赖,使得PC与终端的连接更方便快捷,提升了用户体验。By using the device for connecting a PC and a terminal in an embodiment of the present application, when it is confirmed based on a detection data packet that the associated PC and the terminal are in the same local area network and the PC can obtain the information of the terminal, the PC is triggered to be wirelessly connected to the terminal; this avoids the reliance on a USB cable when connecting the PC and the terminal in the prior art, making the connection between the PC and the terminal more convenient and quick, and improving the user experience.

可选地,第一确认模块302具体包括:第一发送子模块,用于在局域网内发送第一探测数据包;第一确认子模块,用于在接收到来自本地局域网内的关联终端客户端针对第一探测数据包的第一响应数据时,确认本地局域网内存在关联终端客户端,其中,第一响应数据携带所述终端信息;获取模块304,还用于从第一响应数据中提取终端信息。Optionally, the first confirmation module 302 specifically includes: a first sending submodule, used to send a first detection data packet within the local area network; a first confirmation submodule, used to confirm the existence of an associated terminal client in the local area network when receiving a first response data from the associated terminal client in the local area network to the first detection data packet, wherein the first response data carries the terminal information; and an acquisition module 304, further used to extract terminal information from the first response data.

可选地,第一确认模块302具体包括:第一接收子模块,用于接收第二探测数据包,其中,第二探测数据包是终端客户端在本地局域网内发送的;第二确认子模块,用于根据第二探测数据包判断终端客户端是否关联终端客户端,如果是,则确认本地局域网内存在关联终端客户端;获取模块304具体包括:第二发送子模块,用于向关联终端客户端发送针对第二探测数据包的第二响应数据;第二接收子模块,用于接收终端客户端发送的终端信息。Optionally, the first confirmation module 302 specifically includes: a first receiving submodule, used to receive a second detection data packet, wherein the second detection data packet is sent by the terminal client in the local LAN; a second confirmation submodule, used to determine whether the terminal client is associated with the terminal client based on the second detection data packet, and if so, confirm that the associated terminal client exists in the local LAN; the acquisition module 304 specifically includes: a second sending submodule, used to send second response data for the second detection data packet to the associated terminal client; and a second receiving submodule, used to receive terminal information sent by the terminal client.

采用本申请实施例中的方案,使得PC客户端能够自动确认与其关联的终端客户端并进行无线连接,该过程不需要用户的参与,减少了用户的操作,提升了用户体验。By adopting the solution in the embodiment of the present application, the PC client can automatically confirm the terminal client associated with it and establish a wireless connection. This process does not require user participation, reduces user operations, and improves user experience.

在现有技术中,在用户PC或终端没有WIFI环境时,将无法实现终端与PC的连接,导致用户不便。In the prior art, when the user's PC or terminal does not have a WIFI environment, the connection between the terminal and the PC cannot be achieved, causing inconvenience to the user.

优选地,本申请实施例中的应用于PC客户端的连接装置还包括:第一WIFI热点建立模块,用于建立WIFI热点,终端客户端通过热点连接至局域网。Preferably, the connection device applied to the PC client in the embodiment of the present application further includes: a first WIFI hotspot establishing module, which is used to establish a WIFI hotspot, and the terminal client is connected to the local area network through the hotspot.

PC能够通过无线网卡,建立WIFI热点,使终端和PC能够接入同一局域网,从而实现终端与PC的连接,提升了用户体验。The PC can establish a WIFI hotspot through a wireless network card, allowing the terminal and PC to access the same local area network, thereby realizing the connection between the terminal and the PC and improving the user experience.

优选地,本申请实施例中的应用于PC客户端的连接装置还包括:第一提示模块,用于在PC屏幕或终端屏幕上提示是否连接PC与终端;第一触发模块具体用于在用户确认连接时,触发PC根据终端信息无线连接至终端。Preferably, the connection device applied to the PC client in the embodiment of the present application also includes: a first prompt module, used to prompt on the PC screen or the terminal screen whether to connect the PC and the terminal; the first trigger module is specifically used to trigger the PC to wirelessly connect to the terminal according to the terminal information when the user confirms the connection.

采用本申请实施例中的方案,在PC客户端发现接入同一局域网的关联终端客户端时,触发PC客户端或终端客户端向用户进行询问是否连接,并根据用户的选择进行无线连接/不连接;将PC与终端连接与否的选择权交至用户手里,避免了在用户不需要的情况下PC与终端连接导致的不必要的资源消耗,节省了资源,提升了用户体验。By adopting the solution in the embodiment of the present application, when the PC client finds an associated terminal client connected to the same local area network, the PC client or the terminal client is triggered to ask the user whether to connect, and wirelessly connect/not connect according to the user's choice; the choice of whether to connect the PC and the terminal is given to the user, avoiding unnecessary resource consumption caused by connecting the PC and the terminal when the user does not need it, saving resources, and improving the user experience.

优选地,终端信息包括终端IP地址及端口号。Preferably, the terminal information includes the terminal IP address and port number.

采用本申请实施例中的方案,在向用户询问是否连接至终端之前,已经获取到终端信息的IP地址和端口号,为后续无线连接作好准备,一旦用户确认连接,则能够快速连接至终端,避免了在用户确认连接后,再去获取终端信息带来的延时,也能提升用户确认连接后的连接成功率,提升了用户体验。By adopting the solution in the embodiment of the present application, the IP address and port number of the terminal information have been obtained before asking the user whether to connect to the terminal, preparing for the subsequent wireless connection. Once the user confirms the connection, it can be quickly connected to the terminal, avoiding the delay caused by obtaining the terminal information after the user confirms the connection, and also improving the connection success rate after the user confirms the connection, thereby improving the user experience.

基于同一发明构思,本申请实施例还提供了一种应用于终端客户端的PC与终端的连接装置,由于该装置解决问题的原理与应用于终端客户端的PC与终端的连接方法相似,因此该装置的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, an embodiment of the present application also provides a device for connecting a PC and a terminal applied to a terminal client. Since the principle of solving the problem by the device is similar to the method for connecting a PC and a terminal applied to a terminal client, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

图4是根据本申请实施例四的PC与终端的连接装置的结构示意图。FIG4 is a schematic structural diagram of a device for connecting a PC and a terminal according to a fourth embodiment of the present application.

如图4所示,根据本申请实施例四的应用于终端客户端40的PC与终端的连接装置400包括:第二确认模块402,用于根据探测数据包,确认本地局域网内存在关联PC客户端;发送模块404,用于向关联PC客户端发送终端信息;第二触发接块406,用于触发终端接受PC根据终端信息发送的连接建立请求,以与PC建立无线连接。As shown in Figure 4, the connection device 400 between the PC and the terminal applied to the terminal client 40 according to the fourth embodiment of the present application includes: a second confirmation module 402, which is used to confirm the existence of an associated PC client in the local area network based on the detection data packet; a sending module 404, which is used to send terminal information to the associated PC client; and a second triggering block 406, which is used to trigger the terminal to accept the connection establishment request sent by the PC based on the terminal information to establish a wireless connection with the PC.

采用本申请实施例中的PC与终端的连接装置,在确认关联的PC与终端处在同一个局域网中时,终端向PC发送终端信息,以触发PC向终端发起无线连接请求且终端接收该无线连接请求;避免了现有技术中在PC与终端连接时对USB线的依赖,使得PC与终端的连接更方便快捷,提升了用户体验。By using the PC-terminal connection device in the embodiment of the present application, when it is confirmed that the associated PC and terminal are in the same local area network, the terminal sends terminal information to the PC to trigger the PC to initiate a wireless connection request to the terminal and the terminal receives the wireless connection request; this avoids the reliance on a USB cable when connecting the PC and the terminal in the prior art, making the connection between the PC and the terminal more convenient and quick, and improving the user experience.

采用本申请实施例的技术方案,终端客户端在确认本地局域网内存在关联PC客户端时,向该PC客户端发送终端信息,触发PC向终端发起无线连接请求且终端接收该无线连接请求,在该过程中,用户无须任何操作即可实现PC与终端的无线连接,方便快捷,提升了用户体验。By adopting the technical solution of the embodiment of the present application, when the terminal client confirms that there is an associated PC client in the local area network, it sends terminal information to the PC client, triggering the PC to initiate a wireless connection request to the terminal and the terminal receives the wireless connection request. In this process, the user can achieve wireless connection between the PC and the terminal without any operation, which is convenient and fast, and improves the user experience.

可选地,第二确认模块402具体包括:第三接收子模块,用于接收第一探测数据包,其中,第一探测数据包是PC客户端在本地局域网内发送的;第二确认子模块,用于根据第一探测数据包判断PC客户端是否关联PC客户端;发送模块404,还用于向关联PC客户端发送第一响应数据,该第一响应数据携带终端信息。Optionally, the second confirmation module 402 specifically includes: a third receiving submodule, used to receive a first detection data packet, wherein the first detection data packet is sent by the PC client within the local area network; a second confirmation submodule, used to determine whether the PC client is associated with the PC client based on the first detection data packet; and a sending module 404, further used to send a first response data to the associated PC client, wherein the first response data carries terminal information.

可选地,第二确认模块402具体包括:第三发送子模块,用于在局域网内发送第二探测数据包;第三确认子模块,用于在接收到来自关联PC客户端针对第二探测数据包的第二响应数据时,确认本地局域网内存在关联PC客户端。Optionally, the second confirmation module 402 specifically includes: a third sending submodule, used to send a second detection data packet in the local area network; a third confirmation submodule, used to confirm the existence of the associated PC client in the local area network when receiving second response data from the associated PC client to the second detection data packet.

可选地,第二确认模块402具体包括:获取子模块,用于向服务器获取预定时间内连接成功的PC的IP地址列表;第四确认子模块,用于无线连接IP地址列表中的IP地址,并根据连接结果判断是否存在关联PC客户端,如果连接成功,则确认本地局域网内存在关联PC客户端;发送模块404,还用于向连接成功的IP地址对应的PC客户端发送终端信息。Optionally, the second confirmation module 402 specifically includes: an acquisition submodule, used to obtain a list of IP addresses of PCs that have successfully connected within a predetermined time from the server; a fourth confirmation submodule, used to wirelessly connect to the IP address in the IP address list, and determine whether there is an associated PC client based on the connection result. If the connection is successful, it is confirmed that the associated PC client exists in the local area network; and a sending module 404, further used to send terminal information to the PC client corresponding to the successfully connected IP address.

采用本申请实施例中的方案,使得终端客户端能够自动确认与其关联的PC客户端并完成无线连接,该过程不需要用户的参与,减少了用户的操作,提升了用户体验。By adopting the solution in the embodiment of the present application, the terminal client can automatically confirm the PC client associated with it and complete the wireless connection. This process does not require user participation, reduces user operations, and improves user experience.

在现有技术中,在用户PC或终端没有WIFI环境时,将无法实现终端与PC的连接,导致用户不便。In the prior art, when the user's PC or terminal does not have a WIFI environment, the connection between the terminal and the PC cannot be achieved, causing inconvenience to the user.

优选地,本申请实施例中应用于终端客户端的连接装置还包括:第二WIFI热点建立模块,用于建立WIFI热点,PC客户端通过热点连接至局域网。Preferably, the connection device applied to the terminal client in the embodiment of the present application further includes: a second WIFI hotspot establishment module, which is used to establish a WIFI hotspot, and the PC client is connected to the local area network through the hotspot.

终端能够通过无线网卡,建立WIFI热点,使PC与终端能够接入同一局域网,从而实现终端与PC的连接,提升了用户体验。The terminal can establish a WIFI hotspot through the wireless network card, allowing the PC and the terminal to access the same local area network, thereby realizing the connection between the terminal and the PC and improving the user experience.

本申请实施例中应用于终端客户端的连接装置还包括:第二提示模块,用于在PC屏幕或终端屏幕上提示是否连接PC与终端;第二触发模块具体用于在用户确认连接时,触发终端接受PC根据终端信息发送的无线连接建立请求。In the embodiment of the present application, the connection device applied to the terminal client also includes: a second prompt module, which is used to prompt on the PC screen or the terminal screen whether to connect the PC and the terminal; and a second trigger module which is specifically used to trigger the terminal to accept the wireless connection establishment request sent by the PC according to the terminal information when the user confirms the connection.

采用本申请实施例中的方案,终端客户端发现接入同一局域网的PC客户端时,触发PC客户端或终端客户端向用户进行询问是否连接,并根据用户的选择进行无线连接/不连接;将PC与终端连接与否的选择权交至用户手里,避免了在用户不需要的情况下PC与终端连接导致的不必要的资源消耗,节省了资源,提升了用户体验。By adopting the solution in the embodiment of the present application, when the terminal client finds a PC client connected to the same local area network, the PC client or the terminal client is triggered to ask the user whether to connect, and wirelessly connect/disconnect according to the user's choice; the choice of whether to connect the PC and the terminal is given to the user, avoiding unnecessary resource consumption caused by connecting the PC and the terminal when the user does not need it, saving resources, and improving the user experience.

优选地,终端信息包括终端IP地址及端口号。Preferably, the terminal information includes the terminal IP address and port number.

采用本申请实施例中的方案,在PC客户端向用户询问是否连接至终端之前,终端已经将IP地址和端口号发送至PC客户端,以便PC为后续无线连接作好准备,一旦用户确认连接,则能够快速连接至终端,避免了在用户确认连接后,再去获取终端信息带来的延时,提升了用户体验。By adopting the solution in the embodiment of the present application, before the PC client asks the user whether to connect to the terminal, the terminal has already sent the IP address and port number to the PC client, so that the PC is ready for subsequent wireless connection. Once the user confirms the connection, it can be quickly connected to the terminal, avoiding the delay caused by obtaining terminal information after the user confirms the connection, thereby improving the user experience.

基于同一发明构思,本申请实施例中还提供了一种PC与终端的连接系统,由于该系统解决问题的原理与PC与终端的连接方法相似,因此该系统的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, an embodiment of the present application also provides a system for connecting a PC and a terminal. Since the principle of solving the problem by the system is similar to the method for connecting a PC and a terminal, the implementation of the system can refer to the implementation of the method, and the repeated parts will not be repeated.

图5是根据本申请实施例五的PC与终端的连接系统的系统框图。FIG5 is a system block diagram of a system for connecting a PC and a terminal according to a fifth embodiment of the present application.

如图5所示,根据本申请实施例五的PC与终端的连接系统50包括:包括无线连接装置300的PC客户端30;包括无线连接装置400的终端客户端40。As shown in FIG5 , a system 50 for connecting a PC and a terminal according to a fifth embodiment of the present application includes: a PC client 30 including a wireless connection device 300 ; and a terminal client 40 including a wireless connection device 400 .

优选地,该连接系统还包括:服务器,用于存储终端客户端在预定时间内连接成功的PC的IP地址。Preferably, the connection system further comprises: a server for storing the IP addresses of the PCs to which the terminal client successfully connects within a predetermined time.

采用本申请实施例中的PC与终端的连接系统,在关联的PC与终端处在同一个局域网中时,终端向PC发送终端信息,以触发PC向终端发起无线连接请求,使PC和终端无线连接;避免了现有技术中在PC与终端连接时对USB线的依赖,使得PC与终端的连接更方便快捷,提升了用户体验。By using the PC-terminal connection system in the embodiment of the present application, when the associated PC and terminal are in the same local area network, the terminal sends terminal information to the PC to trigger the PC to initiate a wireless connection request to the terminal, thereby enabling the PC and terminal to be connected wirelessly; this avoids the reliance on a USB cable when connecting the PC and the terminal in the prior art, making the connection between the PC and the terminal more convenient and quick, and improving the user experience.

采用本申请实施例的技术方案,在PC与终端建立无线连接的过程中,PC与终端之间自动确认彼此的关联关系,并进行无线连接,全程无须用户参与,方便快捷,提升了用户体验。By adopting the technical solution of the embodiment of the present application, during the process of establishing a wireless connection between the PC and the terminal, the PC and the terminal automatically confirm their association with each other and establish a wireless connection. There is no need for user participation throughout the process, which is convenient and fast, and improves the user experience.

图6是根据本申请实施例六的PC与终端的连接方法的流程图。FIG6 is a flowchart of a method for connecting a PC and a terminal according to a sixth embodiment of the present application.

本申请实施例六以云手机助手客户端为例,对根据本申请实施例六的PC与终端的连接方法进行介绍。Example 6 of the present application takes the cloud phone assistant client as an example to introduce the connection method between the PC and the terminal according to Example 6 of the present application.

如图6所示,由手机侧主动触发的PC与终端的连接方法流程包括如下步骤:As shown in Figure 6, the connection method between the PC and the terminal, which is actively triggered by the mobile phone side, includes the following steps:

S602,手机连接入WIFI网络;S602, the mobile phone is connected to the WIFI network;

S604,云手机助手手机客户端向服务器获取最近连接过的PC端IP;S604, the cloud phone assistant mobile client obtains the most recently connected PC IP from the server;

S606,手机客户端尝试连接这些IP,如果连接成功,则执行S614;如果连接失败,则执行S608;S606, the mobile client attempts to connect to these IPs. If the connection is successful, execute S614; if the connection fails, execute S608;

S608,手机客户端发出网络组播探测数据包,并等待接收来自PC客户端的响应数据包;S608, the mobile client sends a network multicast detection data packet and waits to receive a response data packet from the PC client;

S610,PC客户端收到探测数据包后,判断是否是相关的云手机助手客户端的发送的探测数据包,如果是,则执行步骤S611;如果否,则结束流程;S610: After receiving the detection data packet, the PC client determines whether it is a detection data packet sent by the relevant cloud phone assistant client. If so, step S611 is executed; if not, the process ends;

S611,发送响应数据包;S611, sending a response data packet;

S612,手机客户端如果在规定时间内,收到针对该探测数据包的响应数据包,则执行S614;如果在规定时间内没有收到,则结束流程;S612: If the mobile client receives a response data packet to the probe data packet within the specified time, S614 is executed; if no response data packet is received within the specified time, the process ends;

S614,手机客户端发送手机相关信息给云手机助手PC客户端,并等待PC的无线连接请求;S614, the mobile client sends mobile phone related information to the cloud mobile assistant PC client and waits for the PC's wireless connection request;

S616,PC客户端弹出提示窗口;S616, a prompt window pops up on the PC client;

S618,用户点击“立即连接”按钮;S618, the user clicks the "Connect Now" button;

S620,PC客户端发起TCP连接,连接到手机客户端。S620: The PC client initiates a TCP connection to the mobile client.

采用本申请实施例中的PC与终端的连接方法,在关联的PC与终端处在同一个局域网中时,终端向PC发送终端信息,以触发PC客户端向用户提示是否需要连接手机,然后在用户确认连接时,使PC和终端无线连接;避免了现有技术中在PC与终端连接时对USB线的依赖,使得PC与终端的连接更方便快捷,提升了用户体验。By adopting the method for connecting a PC and a terminal in an embodiment of the present application, when the associated PC and the terminal are in the same local area network, the terminal sends terminal information to the PC to trigger the PC client to prompt the user whether a mobile phone needs to be connected, and then when the user confirms the connection, the PC and the terminal are wirelessly connected; this avoids the reliance on a USB cable when connecting the PC and the terminal in the prior art, making the connection between the PC and the terminal more convenient and quick, and improving the user experience.

采用本申请实施例中的方案,还将PC与终端连接与否的选择权交至用户手里,避免了在用户不需要的情况下PC与终端连接导致的不必要的资源消耗,节省了资源,提升了用户体验。By adopting the solution in the embodiment of the present application, the user is given the choice of whether to connect the PC to the terminal, thereby avoiding unnecessary resource consumption caused by connecting the PC to the terminal when the user does not need it, saving resources and improving the user experience.

采用本申请实施例中的方法,终端客户端能够自动确认与其关联的PC客户端,并触发PC客户端向用户询问是否连接,该过程不需要用户的参与,减少了用户的操作,提升了用户体验。By adopting the method in the embodiment of the present application, the terminal client can automatically confirm the PC client associated with it and trigger the PC client to ask the user whether to connect. This process does not require user participation, reduces user operations, and improves user experience.

图7是根据本申请实施例七的PC与终端的连接方法的流程图。FIG7 is a flowchart of a method for connecting a PC and a terminal according to a seventh embodiment of the present application.

本申请实施例七以云手机助手客户端为例,对根据本申请实施例七的PC与终端的连接方法进行介绍。Example 7 of the present application takes the cloud phone assistant client as an example to introduce the connection method between the PC and the terminal according to Example 7 of the present application.

如图7所示,由PC主动触发的PC与终端的连接方法流程包括如下步骤:As shown in FIG7 , the connection method between the PC and the terminal, which is triggered by the PC, includes the following steps:

S702,云手机助手PC客户端服务进程启动,发出网络组播探测数据包;S702: The cloud phone assistant PC client service process starts and sends a network multicast detection data packet;

S704,手机客户端收到探测数据包后,判断是否是相关的PC客户端的发送的探测数据包,如果是,则执行S705,如果否,则结束流程;S704, after receiving the detection data packet, the mobile client determines whether it is the detection data packet sent by the related PC client. If so, execute S705; if not, end the process;

S705,发送响应数据包;S705, sending a response data packet;

S706,如果PC客户端没有收到相应的响应数据包,则结束流程;如果PC客户端收到相应的响应数据包,则执行S708;S706: If the PC client does not receive the corresponding response data packet, the process ends; if the PC client receives the corresponding response data packet, execute S708;

S708,PC客户端弹出提示窗口;S708, a prompt window pops up on the PC client;

S710,用户点击“立即连接”按钮;S710, the user clicks the "Connect Now" button;

S712,PC客户端发起TCP连接,到手机客户端。S712: The PC client initiates a TCP connection to the mobile client.

采用本申请实施例中的PC与终端的连接方法,在关联的PC与终端处在同一个局域网中时,PC客户端向用户提示是否需要连接手机,然后在用户确认连接时,PC和终端无线连接;避免了现有技术中在PC与终端连接时对USB线的依赖,使得PC与终端的连接更方便快捷,提升了用户体验。By adopting the method for connecting a PC and a terminal in an embodiment of the present application, when the associated PC and the terminal are in the same local area network, the PC client prompts the user whether the mobile phone needs to be connected, and then when the user confirms the connection, the PC and the terminal are wirelessly connected; this avoids the reliance on a USB cable when connecting the PC and the terminal in the prior art, making the connection between the PC and the terminal more convenient and quick, and improving the user experience.

采用本申请实施例中的方案,还将PC与终端连接与否的选择权交至用户手里,避免了在用户不需要的情况下PC与终端连接导致的不必要的资源消耗,节省了资源,提升了用户体验。By adopting the solution in the embodiment of the present application, the user is given the choice of whether to connect the PC to the terminal, thereby avoiding unnecessary resource consumption caused by connecting the PC to the terminal when the user does not need it, saving resources and improving the user experience.

采用本申请实施例中的方法,PC客户端能够自动确认与其关联的终端客户端,该过程不需要用户的参与,减少了用户的操作,提升了用户体验。By adopting the method in the embodiment of the present application, the PC client can automatically confirm the terminal client associated with it. This process does not require user participation, reduces user operations, and improves user experience.

图8是根据本申请实施例八的PC与终端的连接方法的流程图。FIG8 is a flowchart of a method for connecting a PC and a terminal according to an eighth embodiment of the present application.

本申请实施例八以云手机助手客户端为例,对根据本申请实施例八的PC与终端的连接方法进行介绍。Example 8 of the present application takes the cloud phone assistant client as an example to introduce the connection method between the PC and the terminal according to Example 8 of the present application.

如图8所示,手机建立WIFI热点、由PC主动触发的PC与终端的连接方法流程包括如下步骤:As shown in FIG8 , the process of establishing a WIFI hotspot by a mobile phone and connecting the PC and the terminal actively triggered by the PC includes the following steps:

S802,用户在云手机助手手机客户端的界面上,点击建立WIFI热点;S802, the user clicks on the interface of the Cloud Phone Assistant mobile client to create a WIFI hotspot;

S804,手机客户端生成WIFI热点,热点名称为alizhushou,密码为该手机客户端的6位连接码;S804, the mobile client generates a WIFI hotspot, the hotspot name is alizhushou, and the password is the 6-digit connection code of the mobile client;

S806,用户启动云手机助手PC客户端,并打开PC客户端的连接界面,选择关联的手机名称;S806, the user starts the cloud phone assistant PC client, opens the connection interface of the PC client, and selects the name of the associated mobile phone;

S808,PC通过无线网关检测当前热点名称为alizhushou的WIFI热点,并用关联手机的连接码作为密码尝试连接该热点,如果连接成功,则执行S810,如果未连接成功,则提示连接失败并结束流程;S808, the PC detects the current WIFI hotspot named alizhushou through the wireless gateway and attempts to connect to the hotspot using the connection code of the associated mobile phone as the password. If the connection is successful, S810 is executed. If the connection is not successful, a prompt indicating connection failure is given and the process ends;

S810,PC客户端向连接的手机发送网络探测数据包;S810, the PC client sends a network detection data packet to the connected mobile phone;

S812,手机客户端接收到该探测数据包后,判断来自关联PC客户端,向PC客户端发送响应数据包,该响应数据包中携带手机IP地址及端口号;S812: After receiving the detection data packet, the mobile client determines that it comes from the associated PC client and sends a response data packet to the PC client. The response data packet carries the mobile IP address and port number.

S814,PC客户端收到该响应数据包后,从中提取手机IP地址及端口号,并向手机发起TCP连接;S814, after receiving the response data packet, the PC client extracts the mobile phone IP address and port number from it and initiates a TCP connection to the mobile phone;

S816,手机客户端接收到该连接请求后,进行连接校验,校验通过后,建立与PC的连接。S816: After receiving the connection request, the mobile client performs a connection verification. After the verification passes, a connection with the PC is established.

采用本申请实施例中的PC与终端的连接方法,终端通过无线网卡建立WIFI热点,使PC与终端能够接入同一局域网,从而为后续终端与PC的连接提供无线环境,提升了用户体验。By adopting the connection method between PC and terminal in the embodiment of the present application, the terminal establishes a WIFI hotspot through the wireless network card, so that the PC and the terminal can access the same local area network, thereby providing a wireless environment for subsequent connections between the terminal and the PC, and improving the user experience.

采用本申请实施例中的PC与终端的连接方法,在关联的PC与终端处在同一个局域网中时,PC客户端与手机自动通过WIFI连接;避免了现有技术中在PC与终端连接时对USB线的依赖,使得PC与终端的连接更方便快捷,提升了用户体验。By adopting the PC and terminal connection method in the embodiment of the present application, when the associated PC and terminal are in the same local area network, the PC client and the mobile phone are automatically connected via WIFI; this avoids the reliance on USB cables when connecting the PC and the terminal in the prior art, making the connection between the PC and the terminal more convenient and quick, and improving the user experience.

采用本申请实施例中的方法,PC客户端能够自动确认与其关联的终端客户端,该过程不需要用户的参与,减少了用户的操作,提升了用户体验。By adopting the method in the embodiment of the present application, the PC client can automatically confirm the terminal client associated with it. This process does not require user participation, reduces user operations, and improves user experience.

图9是根据本申请实施例九的PC与终端的连接方法的流程图。FIG9 is a flowchart of a method for connecting a PC and a terminal according to a ninth embodiment of the present application.

本申请实施例九以云手机助手客户端为例,对根据本申请实施例九的PC与终端的连接方法进行介绍。Example 9 of the present application takes the cloud phone assistant client as an example to introduce the connection method between the PC and the terminal according to Example 9 of the present application.

如图9所示,PC建立WIFI热点、由手机主动触发的PC与终端的连接方法流程包括如下步骤:As shown in FIG9 , the process of establishing a WIFI hotspot on a PC and connecting the PC and the terminal actively triggered by a mobile phone includes the following steps:

S902,用户打开PC端云手机助手连接界面,并在手机列表中选择想要连接的手机名称,并选择智能WIFI连接;S902, the user opens the PC-side cloud phone assistant connection interface, selects the name of the phone to be connected in the phone list, and selects smart WIFI connection;

S904,PC客户端触发PC通过无线网卡生成WIFI热点,热点名称为alizhushou;密码为被选择的手机的6位连接码;S904, the PC client triggers the PC to generate a WIFI hotspot through the wireless network card. The hotspot name is alizhushou; the password is the 6-digit connection code of the selected mobile phone;

S906,用户启动云手机助手的手机客户端,并选择WIFI智能连接;S906, the user starts the mobile client of the cloud phone assistant and selects WIFI smart connection;

S908,手机客户端触发手机通过无线网卡检测到名称为alizhushou的WIFI热点,并通过当前手机的连接码作为密码进行连接;如果连接成功,则执行S910,如果不成功,则提示失败并结束流程;S908, the mobile client triggers the mobile phone to detect the WIFI hotspot named alizhushou through the wireless network card and connects using the current mobile phone's connection code as the password; if the connection is successful, S910 is executed; if not, a failure prompt is given and the process ends;

S910,手机客户端发送探测数据包;S910, the mobile client sends a detection data packet;

S912,PC客户端接收到手机发送的探测数据包,判断是否来自关联手机;如果是,则执行S914;如果否,则忽略该数据包;S912: The PC client receives the detection data packet sent by the mobile phone and determines whether it comes from the associated mobile phone; if so, execute S914; if not, ignore the data packet;

S914,PC客户端向手机发起TCP连接请求;S914: The PC client initiates a TCP connection request to the mobile phone.

S916,手机接受该连接请求,PC与手机建立连接。S916: The mobile phone accepts the connection request, and a connection is established between the PC and the mobile phone.

采用本申请实施例中的PC与终端的连接方法,PC通过无线网卡建立WIFI热点,使PC与终端能够接入同一局域网,从而为后续终端与PC的连接提供无线环境,提升了用户体验。By adopting the connection method between PC and terminal in the embodiment of the present application, the PC establishes a WIFI hotspot through the wireless network card, so that the PC and the terminal can access the same local area network, thereby providing a wireless environment for subsequent connection between the terminal and the PC, and improving the user experience.

采用本申请实施例中的PC与终端的连接方法,在关联的PC与终端处在同一个局域网中时,PC客户端与手机自动通过WIFI连接;避免了现有技术中在PC与终端连接时对USB线的依赖,使得PC与终端的连接更方便快捷,提升了用户体验。By adopting the PC and terminal connection method in the embodiment of the present application, when the associated PC and terminal are in the same local area network, the PC client and the mobile phone are automatically connected via WIFI; this avoids the reliance on USB cables when connecting the PC and the terminal in the prior art, making the connection between the PC and the terminal more convenient and quick, and improving the user experience.

采用本申请实施例中的方法,PC客户端能够自动确认与其关联的终端客户端,该过程不需要用户的参与,减少了用户的操作,提升了用户体验。By adopting the method in the embodiment of the present application, the PC client can automatically confirm the terminal client associated with it. This process does not require user participation, reduces user operations, and improves user experience.

为了描述的方便,以上所述装置的各部分以功能分为各种部件或单元分别描述。当然,在实施本申请时可以把各部件或单元的功能在同一个或多个软件或硬件中实现。For the convenience of description, the various parts of the above-mentioned device are divided into various components or units according to their functions and described separately. Of course, when implementing this application, the functions of each component or unit can be implemented in the same or multiple software or hardware.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to the flow chart and/or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each flow process and/or box in the flow chart and/or block diagram and the combination of the flow process and/or box in the flow chart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processing machine or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart flow or multiple flows and/or one box or multiple boxes of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.

尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims (32)

1.一种个人计算机PC与终端的连接方法,应用于PC客户端,其特征在于,包括:1. A method for connecting a personal computer (PC) to a terminal, applied to a PC client, characterized in that it includes: 根据探测数据包,确认本地局域网内存在关联终端客户端;所述关联终端客户端是指与所述PC客户端具有关联关系的终端客户端;所述终端客户端与PC客户端之间的关联关系通过该终端客户端所在的终端与PC客户端所在的PC成功在预定时间内有线或无线连接过、该终端客户端与PC客户端登录的是同一账号、或者是终端客户端与PC客户端登录的是属于同一用户的不同账号的方式建立;Based on the probe data packets, it is confirmed that there is an associated terminal client in the local area network; the associated terminal client refers to a terminal client that is associated with the PC client; the association between the terminal client and the PC client is established by means of the terminal client being connected to the PC client via wired or wireless connection within a predetermined time, the terminal client and the PC client being logged into the same account, or the terminal client and the PC client being logged into different accounts belonging to the same user; 获取所述关联终端客户端的终端信息;Obtain the terminal information of the associated terminal client; 触发所述PC根据所述终端信息无线连接至所述终端。The PC is triggered to wirelessly connect to the terminal based on the terminal information. 2.根据权利要求1所述的连接方法,其特征在于,2. The connection method according to claim 1, characterized in that, 根据探测数据包,确认本地局域网内存在关联终端客户端具体包括:Based on the probe data packets, the specific associated terminal clients confirmed to exist within the local area network include: 在所述局域网内发送第一探测数据包;Send the first probe data packet within the local area network; 接收到来自本地局域网内的关联终端客户端针对所述第一探测数据包的第一响应数据时,确认本地局域网内存在关联终端客户端,其中,所述第一响应数据携带所述终端信息;When a first response data is received from an associated terminal client within the local area network in response to the first probe data packet, it is confirmed that an associated terminal client exists within the local area network, wherein the first response data carries the terminal information; 获取所述关联终端客户端的终端信息具体包括:Obtaining the terminal information of the associated terminal client specifically includes: 从所述第一响应数据中提取所述终端信息。The terminal information is extracted from the first response data. 3.根据权利要求2所述的连接方法,其特征在于,所述PC客户端启动触发所述PC客户端在所述局域网内发送第一探测数据包。3. The connection method according to claim 2, wherein the PC client initiates a trigger to send a first probe data packet within the local area network. 4.根据权利要求1所述的连接方法,其特征在于,4. The connection method according to claim 1, characterized in that, 根据探测数据包,确认本地局域网内存在关联终端客户端具体包括:Based on the probe data packets, the specific associated terminal clients confirmed to exist within the local area network include: 接收第二探测数据包,其中,所述第二探测数据包是终端客户端在本地局域网内发送的;Receive a second probe data packet, wherein the second probe data packet is sent by the terminal client within the local area network; 根据所述第二探测数据包判断所述终端客户端是否关联终端客户端,如果是,则确认本地局域网内存在关联终端客户端;The second probe data packet is used to determine whether the terminal client is associated with another terminal client. If so, it is confirmed that an associated terminal client exists in the local area network. 获取所述终端客户端的终端信息具体包括:Obtaining the terminal information of the terminal client specifically includes: 向关联终端客户端发送针对所述第二探测数据包的第二响应数据;Send a second response data to the associated terminal client in response to the second probe data packet; 接收所述终端客户端发送的所述终端信息。Receive the terminal information sent by the terminal client. 5.根据权利要求1所述的连接方法,其特征在于,在根据探测数据包,确认本地局域网内存在关联终端客户端之前,还包括:5. The connection method according to claim 1, characterized in that, before confirming the existence of an associated terminal client in the local area network based on the probe data packet, it further includes: 所述PC客户端触发所述PC建立无线保真WIFI热点,所述终端通过所述热点连接至所述局域网。The PC client triggers the PC to establish a Wi-Fi hotspot, and the terminal connects to the local area network through the hotspot. 6.根据权利要求1所述的连接方法,其特征在于,在根据探测数据包,确认本地局域网内存在关联终端客户端之前,还包括:6. The connection method according to claim 1, characterized in that, before confirming the existence of an associated terminal client in the local area network based on the probe data packet, it further includes: 所述终端客户端触发所述终端建立WIFI热点,所述PC通过所述热点连接至所述局域网。The terminal client triggers the terminal to establish a WIFI hotspot, and the PC connects to the local area network through the hotspot. 7.根据权利要求1所述的连接方法,其特征在于,在根据探测数据包,确认本地局域网内存在关联终端客户端之前,还包括:7. The connection method according to claim 1, characterized in that, before confirming the existence of an associated terminal client in the local area network based on the probe data packet, it further includes: 在所述PC屏幕或所述终端屏幕上提示是否连接所述PC与所述终端;The PC screen or the terminal screen will prompt whether to connect the PC and the terminal; 触发所述PC根据所述终端信息无线连接至所述终端具体包括:Triggering the PC to wirelessly connect to the terminal based on the terminal information specifically includes: 在用户确认连接时,触发所述PC根据所述终端信息无线连接至所述终端。When the user confirms the connection, the PC is triggered to wirelessly connect to the terminal based on the terminal information. 8.根据权利要求1所述的连接方法,其特征在于,所述终端信息包括终端IP地址及端口号。8. The connection method according to claim 1, wherein the terminal information includes the terminal IP address and port number. 9.一种PC与终端的连接方法,应用于终端客户端,其特征在于,包括:9. A method for connecting a PC to a terminal, applied to a terminal client, characterized in that it includes: 根据探测数据包,确认本地局域网内存在关联PC客户端;所述关联PC客户端是指与所述终端客户端具有关联关系的PC客户端;所述终端客户端与PC客户端之间的关联关系通过该终端客户端所在的终端与PC客户端所在的PC成功在预定时间内有线或无线连接过、该终端客户端与PC客户端登录的是同一账号、或者是终端客户端与PC客户端登录的是属于同一用户的不同账号的方式建立;Based on the probe data packet, it is confirmed that an associated PC client exists in the local area network; the associated PC client refers to a PC client that has an association relationship with the terminal client; the association relationship between the terminal client and the PC client is established by means of the terminal client being connected to the PC client via wired or wireless connection within a predetermined time, the terminal client and the PC client being logged into the same account, or the terminal client and the PC client being logged into different accounts belonging to the same user; 向所述关联PC客户端发送终端信息;Send terminal information to the associated PC client; 触发所述终端接受所述PC根据所述终端信息发送的无线连接建立请求,以与所述PC建立无线连接。The terminal is triggered to accept the wireless connection establishment request sent by the PC based on the terminal information, so as to establish a wireless connection with the PC. 10.根据权利要求9所述的连接方法,其特征在于,10. The connection method according to claim 9, characterized in that, 根据探测数据包,确认本地局域网内存在关联PC客户端具体包括:Based on the probe data packets, it was confirmed that the associated PC clients exist within the local area network, specifically including: 接收第一探测数据包,其中,所述第一探测数据包是PC客户端在本地局域网内发送的;Receive a first probe data packet, wherein the first probe data packet is sent by the PC client within the local area network; 根据所述第一探测数据包判断所述PC客户端是否关联PC客户端;Determine whether the PC client is associated with another PC client based on the first probe data packet; 如果是,则确认本地局域网内存在关联PC客户端;If so, confirm that the associated PC client exists on the local area network; 向所述关联PC客户端发送终端信息,具体包括:Sending terminal information to the associated PC client specifically includes: 向关联PC客户端发送第一响应数据,所述第一响应数据携带所述终端信息。Send first response data to the associated PC client, the first response data carrying the terminal information. 11.根据权利要求9所述的连接方法,其特征在于,11. The connection method according to claim 9, characterized in that, 根据探测数据包,确认本地局域网内存在关联PC客户端具体包括:Based on the probe data packets, it was confirmed that the associated PC clients exist within the local area network, specifically including: 在所述局域网内发送第二探测数据包;Send a second probe data packet within the local area network; 接收到来自关联PC客户端针对所述第二探测数据包的第二响应数据时,确认本地局域网内存在关联PC客户端。Upon receiving the second response data from the associated PC client in response to the second probe data packet, it is confirmed that the associated PC client exists in the local area network. 12.根据权利要求11所述的连接方法,其特征在于,所述终端连接到所述局域网触发所述终端客户端在所述局域网内发送第二探测数据包。12. The connection method according to claim 11, wherein the terminal connects to the local area network, triggering the terminal client to send a second probe data packet within the local area network. 13.根据权利要求9所述的连接方法,其特征在于,13. The connection method according to claim 9, characterized in that, 根据探测数据包,确认本地局域网内存在关联PC客户端具体包括:Based on the probe data packets, it was confirmed that the associated PC clients exist within the local area network, specifically including: 向服务器获取预定时间内连接成功的PC的IP地址;Obtain the IP addresses of PCs that successfully connect within the scheduled time from the server; 向所述IP地址发送第三探测数据包;Send a third probe data packet to the IP address; 在接收到针对该第三探测数据包的第三响应数据时,确认本地局域网内存在关联PC客户端;Upon receiving the third response data in response to the third probe data packet, it is confirmed that an associated PC client exists within the local area network; 向所述关联PC客户端发送终端信息,具体包括:Sending terminal information to the associated PC client specifically includes: 向发送所述第三响应数据的IP地址对应的PC客户端发送所述终端信息。Send the terminal information to the PC client corresponding to the IP address that sent the third response data. 14.根据权利要求9所述的连接方法,其特征在于,在根据探测数据包,确认本地局域网内存在关联PC客户端之前,还包括:14. The connection method according to claim 9, characterized in that, before confirming the existence of an associated PC client in the local area network based on the probe data packet, it further includes: 所述PC客户端触发所述PC建立WIFI热点,所述终端通过所述热点连接至所述局域网。The PC client triggers the PC to establish a WIFI hotspot, and the terminal connects to the local area network through the hotspot. 15.根据权利要求9所述的连接方法,其特征在于,在根据探测数据包,确认本地局域网内存在关联PC客户端之前,还包括:15. The connection method according to claim 9, characterized in that, before confirming the existence of an associated PC client in the local area network based on the probe data packet, it further includes: 所述终端客户端触发所述终端建立WIFI热点,所述PC通过所述热点连接至所述局域网。The terminal client triggers the terminal to establish a WIFI hotspot, and the PC connects to the local area network through the hotspot. 16.根据权利要求9所述的连接方法,其特征在于,在触发所述终端接受所述PC根据所述终端信息发送的无线连接建立请求之前,还包括:16. The connection method according to claim 9, characterized in that, before triggering the terminal to accept the wireless connection establishment request sent by the PC according to the terminal information, it further includes: 在所述PC屏幕或所述终端屏幕上提示是否连接所述PC与所述终端;The PC screen or the terminal screen will prompt whether to connect the PC and the terminal; 触发所述终端接受所述PC根据所述终端信息发送的无线连接建立请求具体包括:Triggering the terminal to accept the wireless connection establishment request sent by the PC based on the terminal information specifically includes: 在用户确认连接时,触发所述终端接受所述PC根据所述终端信息发送的无线连接建立请求。When the user confirms the connection, the terminal is triggered to accept the wireless connection establishment request sent by the PC based on the terminal information. 17.根据权利要求9所述的连接方法,其特征在于,所述终端信息包括终端IP地址及端口号。17. The connection method according to claim 9, wherein the terminal information includes the terminal IP address and port number. 18.一种个人计算机PC与终端的连接装置,应用于PC客户端,其特征在于,包括:18. A connection device between a personal computer (PC) and a terminal, applied to a PC client, characterized in that it comprises: 第一确认模块,用于根据探测数据包,确认本地局域网内存在关联终端客户端;所述关联终端客户端是指与所述PC客户端具有关联关系的终端客户端;所述终端客户端与PC客户端之间的关联关系通过该终端客户端所在的终端与PC客户端所在的PC成功在预定时间内有线或无线连接过、该终端客户端与PC客户端登录的是同一账号、或者是终端客户端与PC客户端登录的是属于同一用户的不同账号的方式建立;The first confirmation module is used to confirm the existence of an associated terminal client in the local area network based on the probe data packet; the associated terminal client refers to a terminal client that is associated with the PC client; the association between the terminal client and the PC client is established by means of the terminal client being connected to the PC client via wired or wireless connection within a predetermined time, the terminal client and the PC client being logged into the same account, or the terminal client and the PC client being logged into different accounts belonging to the same user; 获取模块,用于获取所述关联终端客户端的终端信息;The acquisition module is used to acquire the terminal information of the associated terminal client; 第一触发模块,用于触发所述PC根据所述终端信息无线连接至所述终端。The first trigger module is used to trigger the PC to wirelessly connect to the terminal based on the terminal information. 19.根据权利要求18所述的连接装置,其特征在于,19. The connecting device according to claim 18, characterized in that, 所述第一确认模块具体包括:The first confirmation module specifically includes: 第一发送子模块,用于在所述局域网内发送第一探测数据包;The first transmitting submodule is used to transmit the first probe data packet within the local area network; 第一确认子模块,用于在接收到来自本地局域网内的关联终端客户端针对所述第一探测数据包的第一响应数据时,确认本地局域网内存在关联终端客户端,其中,所述第一响应数据携带所述终端信息;The first confirmation submodule is used to confirm the existence of an associated terminal client in the local area network when it receives first response data from an associated terminal client in response to the first probe data packet, wherein the first response data carries the terminal information. 所述获取模块,还用于从所述第一响应数据中提取所述终端信息。The acquisition module is further configured to extract the terminal information from the first response data. 20.根据权利要求18所述的连接装置,其特征在于,20. The connecting device according to claim 18, characterized in that, 所述第一确认模块具体包括:The first confirmation module specifically includes: 第一接收子模块,用于接收第二探测数据包,其中,所述第二探测数据包是终端客户端在本地局域网内发送的;The first receiving submodule is used to receive the second probe data packet, wherein the second probe data packet is sent by the terminal client within the local area network; 第二确认子模块,用于根据所述第二探测数据包判断所述终端客户端是否关联终端客户端,如果是,则确认本地局域网内存在关联终端客户端;The second confirmation submodule is used to determine whether the terminal client is associated with another terminal client based on the second probe data packet. If so, it is confirmed that an associated terminal client exists in the local area network. 所述获取模块具体包括:The acquisition module specifically includes: 第二发送子模块,用于向关联终端客户端发送针对所述第二探测数据包的第二响应数据;The second sending submodule is used to send second response data in response to the second probe data packet to the associated terminal client; 第二接收子模块,用于接收所述终端客户端发送的所述终端信息。The second receiving submodule is used to receive the terminal information sent by the terminal client. 21.根据权利要求18所述的连接装置,其特征在于,还包括:21. The connecting device according to claim 18, characterized in that it further comprises: 第一WIFI热点建立模块,用于建立WIFI热点,所述终端客户端通过所述热点连接至所述局域网。The first WIFI hotspot creation module is used to create a WIFI hotspot, through which the terminal client connects to the local area network. 22.根据权利要求18所述的连接装置,其特征在于,还包括:22. The connecting device according to claim 18, characterized in that it further comprises: 第一提示模块,用于在所述PC屏幕或所述终端屏幕上提示是否连接所述PC与所述终端;The first prompting module is used to prompt on the PC screen or the terminal screen whether to connect the PC and the terminal; 所述第一触发模块具体用于在用户确认连接时,触发所述PC根据所述终端信息无线连接至所述终端。The first triggering module is specifically used to trigger the PC to wirelessly connect to the terminal based on the terminal information when the user confirms the connection. 23.根据权利要求18所述的连接装置,其特征在于,所述终端信息包括终端IP地址及端口号。23. The connection device according to claim 18, wherein the terminal information includes a terminal IP address and a port number. 24.一种PC与终端的连接装置,应用于终端客户端,其特征在于,包括:24. A connection device between a PC and a terminal, applied to a terminal client, characterized in that it comprises: 第二确认模块,用于根据探测数据包,确认本地局域网内存在关联PC客户端;所述关联PC客户端是指与所述终端客户端具有关联关系的PC客户端;所述终端客户端与PC客户端之间的关联关系通过该终端客户端所在的终端与PC客户端所在的PC成功在预定时间内有线或无线连接过、该终端客户端与PC客户端登录的是同一账号、或者是终端客户端与PC客户端登录的是属于同一用户的不同账号的方式建立;The second confirmation module is used to confirm the existence of an associated PC client in the local area network based on the probe data packet; the associated PC client refers to a PC client that has an association relationship with the terminal client; the association relationship between the terminal client and the PC client is established by means of the terminal client being connected to the PC client via wired or wireless connection within a predetermined time, the terminal client and the PC client being logged into the same account, or the terminal client and the PC client being logged into different accounts belonging to the same user; 发送模块,用于向所述关联PC客户端发送终端信息;The sending module is used to send terminal information to the associated PC client; 第二触发接块,用于触发所述终端接受所述PC根据所述终端信息发送的连接建立请求,以与所述PC建立无线连接。The second trigger block is used to trigger the terminal to accept the connection establishment request sent by the PC based on the terminal information, so as to establish a wireless connection with the PC. 25.根据权利要求24所述的连接装置,其特征在于,25. The connecting device according to claim 24, characterized in that, 所述第二确认模块具体包括:The second confirmation module specifically includes: 第三接收子模块,用于接收第一探测数据包,其中,所述第一探测数据包是所述PC客户端在本地局域网内发送的;The third receiving submodule is used to receive the first probe data packet, wherein the first probe data packet is sent by the PC client within the local area network; 第二确认子模块,用于根据所述第一探测数据包判断所述PC客户端是否关联PC客户端;The second confirmation submodule is used to determine whether the PC client is associated with the PC client based on the first probe data packet; 所述发送模块,还用于向关联PC客户端发送第一响应数据,所述第一响应数据携带所述终端信息。The sending module is further configured to send first response data to the associated PC client, the first response data carrying the terminal information. 26.根据权利要求24所述的连接装置,其特征在于,所述第二确认模块具体包括:26. The connection device according to claim 24, wherein the second confirmation module specifically includes: 第三发送子模块,用于在所述局域网内发送第二探测数据包;The third sending submodule is used to send the second probe data packet within the local area network; 第三确认子模块,用于在接收到来自关联PC客户端针对所述第二探测数据包的第二响应数据时,确认本地局域网内存在关联PC客户端。The third confirmation submodule is used to confirm the existence of an associated PC client in the local area network when it receives a second response data from the associated PC client in response to the second probe data packet. 27.根据权利要求24所述的连接装置,其特征在于,27. The connecting device according to claim 24, characterized in that, 所述第二确认模块具体包括:The second confirmation module specifically includes: 获取子模块,用于向服务器获取预定时间内连接成功的PC的IP地址列表;The `get` submodule is used to retrieve a list of IP addresses of PCs that have successfully connected within a predetermined time from the server. 第四确认子模块,用于无线连接所述IP地址列表中的IP地址,并根据连接结果判断是否存在关联PC客户端,如果连接成功,则确认本地局域网内存在关联PC客户端;The fourth confirmation submodule is used to wirelessly connect to the IP addresses in the IP address list and determine whether there is an associated PC client based on the connection result. If the connection is successful, it confirms that there is an associated PC client in the local area network. 所述发送模块,还用于向连接成功的IP地址对应的PC客户端发送所述终端信息。The sending module is also used to send the terminal information to the PC client corresponding to the successfully connected IP address. 28.根据权利要求24所述的连接装置,其特征在于,还包括:28. The connecting device according to claim 24, characterized in that it further comprises: 第二WIFI热点建立模块,用于建立WIFI热点,所述PC客户端通过所述热点连接至所述局域网。The second WIFI hotspot creation module is used to create a WIFI hotspot, through which the PC client connects to the local area network. 29.根据权利要求24所述的连接装置,其特征在于,还包括:29. The connecting device according to claim 24, characterized in that it further comprises: 第二提示模块,用于在所述PC屏幕或所述终端屏幕上提示是否连接所述PC与所述终端;The second prompting module is used to prompt on the PC screen or the terminal screen whether to connect the PC and the terminal; 所述第二触发模块具体用于在用户确认连接时,触发所述终端接受所述PC根据所述终端信息发送的无线连接建立请求。The second triggering module is specifically used to trigger the terminal to accept the wireless connection establishment request sent by the PC based on the terminal information when the user confirms the connection. 30.根据权利要求24所述的连接装置,其特征在于,所述终端信息包括终端IP地址及端口号。30. The connection device according to claim 24, wherein the terminal information includes a terminal IP address and a port number. 31.一种PC与终端的连接系统,其特征在于,包括:31. A PC-terminal connection system, characterized in that it comprises: 包括如权利要求18-23中任一项所述的无线连接装置的PC客户端;A PC client including the wireless connection device as described in any one of claims 18-23; 包括如权利要求24-30中任一项所述的无线连接装置的终端客户端。A terminal client including the wireless connection device as described in any one of claims 24-30. 32.根据权利要求31所述的连接系统,其特征在于,还包括:32. The connection system according to claim 31, characterized in that it further comprises: 服务器,用于存储所述终端客户端在预定时间内连接成功的PC的IP地址。The server is used to store the IP addresses of PCs that the terminal client successfully connects to within a predetermined time.
HK17102969.4A 2017-03-23 Connection method and device for computer and terminal HK1229564B (en)

Publications (3)

Publication Number Publication Date
HK1229564A1 HK1229564A1 (en) 2017-11-17
HK1229564A HK1229564A (en) 2017-11-17
HK1229564B true HK1229564B (en) 2021-03-26

Family

ID=

Similar Documents

Publication Publication Date Title
CN110300117B (en) IOT device and user binding authentication method, device and medium
EP3425566B1 (en) Electronic device and method of registering personal cloud apparatus in user portal server thereof
EP3151628B1 (en) Method, device and system for accessing a wireless network
CN111866998A (en) Bluetooth distribution network method, device and storage medium
CN102638797A (en) Method and terminal for accessing wireless network, access network node and authentication server
EP2999250B1 (en) Method and apparatus for interconnection between terminal device and gateway device
CN111194067A (en) Network access method, device, related equipment and storage medium
CN104717225B (en) A kind of things-internet gateway access authentication method and system
CN107567017B (en) Wireless connection system, device and method
CN107979864B (en) Access method, device and system of access point
WO2017185460A1 (en) Network access method, terminal and access point
US10419543B2 (en) Method and system for establishing a connection between a seeker device and a target device
US20150358575A1 (en) Wireless camera, wireless network video recorder (nvr), and method for registering wireless camera with wireless nvr
CN109194722A (en) By method, equipment and the storage medium of user account number and image forming apparatus binding
CN112689316B (en) Binding method and device of intelligent equipment, storage medium and electronic device
EP3665921B1 (en) Virtual profile for bluetooth
CN110856145A (en) IOT device and user binding method, device and medium based on near field authentication
CN107113281A (en) Content shared method, terminal, server and system
CN103179224B (en) Method, client side and server for configuring IP (internet protocol) addresses
CN106165497A (en) Determine method and corresponding terminal, computer program and storage medium
CN105991386B (en) Method, device and system for connecting computer and terminal
WO2016145826A1 (en) Wifi hotspot accessing method and device
CN106789843B (en) Method, PORTAL server and system for sharing internet access
CN114501406A (en) Method and system for realizing rapid interconnection of equipment based on NFC
CN107534859B (en) Network authentication method, client, terminal equipment and platform