CN104955048A - WiFi (wireless fidelity) network login information sharing method, server, terminal and system - Google Patents
WiFi (wireless fidelity) network login information sharing method, server, terminal and system Download PDFInfo
- Publication number
- CN104955048A CN104955048A CN201510377017.3A CN201510377017A CN104955048A CN 104955048 A CN104955048 A CN 104955048A CN 201510377017 A CN201510377017 A CN 201510377017A CN 104955048 A CN104955048 A CN 104955048A
- Authority
- CN
- China
- Prior art keywords
- terminal
- user
- wifi network
- log
- message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/083—Network architectures or network communication protocols for network security for authentication of entities using passwords
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明公开了一种WiFi网络登录信息的分享方法、服务器、终端及系统。其中方法包括:获取第一终端用户预先设置的WiFi网络的登录信息以及所述第一终端用户的用户好友列表;判断请求连接所述WiFi网络的第二终端对应的第二终端用户是否属于所述第一终端用户的用户好友列表,若是,则将所述WiFi网络的登录信息提供给第二终端以供所述第二终端登录所述WiFi网络。相比告知密码后手动输入密码接入、或扫描二维码的方式接入等方式来说,本发明提供的方式更为简便,提升了WiFi网络共享的灵活性。
The invention discloses a WiFi network login information sharing method, server, terminal and system. The method includes: obtaining the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user; judging whether the second terminal user corresponding to the second terminal requesting to connect to the WiFi network belongs to the If it is the user friend list of the first terminal user, provide the login information of the WiFi network to the second terminal for the second terminal to log in the WiFi network. Compared with methods such as manually entering a password after being informed of a password, or scanning a two-dimensional code, the method provided by the present invention is simpler and improves the flexibility of WiFi network sharing.
Description
技术领域technical field
本发明涉及互联网技术领域,具体涉及一种WiFi网络登录信息的分享方法、服务器、终端及系统。The invention relates to the technical field of the Internet, in particular to a method for sharing WiFi network login information, a server, a terminal and a system.
背景技术Background technique
WiFi(Wireless Fidelity,无线保真)是一种将个人电脑、手持设备(如手机、平板电脑)等终端以无线方式互相连接的技术。WiFi上网可以简单理解为无线上网,通常只要接一个无线路由器,就可以把有线信号转换为WiFi信号传输。WiFi (Wireless Fidelity) is a technology that wirelessly connects terminals such as personal computers and handheld devices (such as mobile phones and tablet computers) to each other. WiFi Internet access can be simply understood as wireless Internet access. Usually, as long as a wireless router is connected, the wired signal can be converted into WiFi signal transmission.
一般来说,在相对私有的区域内如家里、公司内的WiFi网络都设置有密码,进入该区域的终端如要连接WiFi网络,必须手动输入密码才能登录WiFi网络。然而,获取密码的方式通常为告知方式、或者通过扫描已登录WiFi网络的终端提供的二维码的方式。对用户来讲这些方式都十分繁琐,也使得WiFi网络的共享方式不够灵活。Generally speaking, WiFi networks in relatively private areas such as homes and companies are equipped with passwords. If a terminal entering this area wants to connect to the WiFi network, it must manually enter the password to log in to the WiFi network. However, the way to obtain the password is usually the way of notification, or by scanning the two-dimensional code provided by the terminal that has logged into the WiFi network. These methods are very cumbersome for the user, and also make the sharing method of the WiFi network not flexible enough.
发明内容Contents of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的WiFi网络登录信息的分享方法、服务器、终端及系统。In view of the above problems, the present invention is proposed to provide a WiFi network login information sharing method, server, terminal and system that overcome the above problems or at least partially solve the above problems.
根据本发明的一个方面,提供了一种WiFi网络登录信息的分享方法,包括:According to one aspect of the present invention, a method for sharing WiFi network login information is provided, including:
获取第一终端用户预先设置的WiFi网络的登录信息以及所述第一终端用户的用户好友列表;Acquiring the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user;
判断请求连接所述WiFi网络的第二终端对应的第二终端用户是否属于所述第一终端用户的用户好友列表,若是,则将所述WiFi网络的登录信息提供给第二终端以供所述第二终端登录所述WiFi网络。judging whether the second terminal user corresponding to the second terminal requesting to connect to the WiFi network belongs to the user friend list of the first terminal user, and if so, providing the login information of the WiFi network to the second terminal for the The second terminal logs into the WiFi network.
可选地,所述第一终端用户的用户好友列表是通过调用所述第一终端上安装的通信录和/或即时通讯软件提供的接口得到的。Optionally, the user friend list of the first terminal user is obtained by calling an interface provided by an address book and/or instant messaging software installed on the first terminal.
可选地,所述获取第一终端用户预先设置的WiFi网络的登录信息以及所述第一终端用户的用户好友列表进一步为:获取所述第一终端上传到服务器端的所述WiFi网络的登录信息以及所述第一终端用户的用户好友列表;Optionally, the obtaining the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user is further: obtaining the login information of the WiFi network uploaded by the first terminal to the server and a user friend list of the first terminal user;
在服务器端获取到所述WiFi网络的登录信息以及所述第一终端用户的用户好友列表之后,所述方法还包括:接收所述第二终端向服务器端发起的连接所述WiFi网络的请求;After the server acquires the login information of the WiFi network and the user friend list of the first terminal user, the method further includes: receiving a request from the second terminal to the server to connect to the WiFi network;
所述将WiFi网络的登录信息提供给第二终端进一步为:由服务器端将WiFi网络的登录信息下发给第二终端。The providing the login information of the WiFi network to the second terminal further includes: the server sends the login information of the WiFi network to the second terminal.
可选地,所述方法还包括:在探测到所述第二终端离开所述WiFi网络覆盖区域时,删除所述第二终端中的所述WiFi网络的登录信息。Optionally, the method further includes: when it is detected that the second terminal leaves the coverage area of the WiFi network, deleting the login information of the WiFi network in the second terminal.
可选地,在所述获取第一终端用户预先设置的WiFi网络的登录信息以及所述第一终端用户的用户好友列表之前,所述方法还包括:接收所述第二终端向服务器端发起的连接所述WiFi网络的请求;根据所述连接WiFi网络的请求向第一终端发送获取WiFi网络的登录信息的请求;Optionally, before the acquisition of the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user, the method further includes: receiving a request from the second terminal to the server A request for connecting to the WiFi network; sending a request for obtaining login information of the WiFi network to the first terminal according to the request for connecting to the WiFi network;
所述获取第一终端用户预先设置的WiFi网络的登录信息以及所述第一终端用户的用户好友列表进一步为:获取所述第一终端响应所述获取WiFi网络的登录信息的请求上传到服务器端的所述WiFi网络的登录信息以及所述第一终端用户的用户好友列表;The obtaining the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user is further: obtaining the first terminal uploaded to the server in response to the request for obtaining the login information of the WiFi network The login information of the WiFi network and the user friend list of the first terminal user;
所述将WiFi网络的登录信息提供给第二终端进一步为:由服务器端将WiFi网络的登录信息下发给第二终端。The providing the login information of the WiFi network to the second terminal further includes: the server sends the login information of the WiFi network to the second terminal.
可选地,所述方法还包括:在探测到所述第二终端离开所述WiFi网络覆盖区域时,删除所述第二终端和服务器端的所述WiFi网络的登录信息。Optionally, the method further includes: when it is detected that the second terminal leaves the coverage area of the WiFi network, deleting the login information of the WiFi network of the second terminal and the server.
可选地,所述将WiFi网络的登录信息提供给第二终端进一步为:由第一终端通过点对点无线传输的方式将WiFi网络的登录信息提供给所述第二终端。Optionally, the providing the login information of the WiFi network to the second terminal further includes: providing the login information of the WiFi network to the second terminal by the first terminal through point-to-point wireless transmission.
根据本发明的另一方面,提供了一种用于分享WiFi网络登录信息的服务器,其包括:According to another aspect of the present invention, there is provided a server for sharing WiFi network login information, which includes:
第一接收模块,适于获取第一终端用户预先设置的WiFi网络的登录信息以及所述第一终端用户的用户好友列表;The first receiving module is adapted to obtain the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user;
判断模块,适于判断请求连接所述WiFi网络的第二终端对应的第二终端用户是否属于所述第一终端用户的用户好友列表;The judging module is adapted to judge whether the second terminal user corresponding to the second terminal requesting to connect to the WiFi network belongs to the user friend list of the first terminal user;
发送模块,适于若所述判断模块判断出所述第二终端用户属于所述第一终端用户的用户好友列表,则将所述WiFi网络的登录信息提供给第二终端以供所述第二终端登录所述WiFi网络。The sending module is adapted to provide the login information of the WiFi network to the second terminal for the second terminal user if the judging module judges that the second terminal user belongs to the user friend list of the first terminal user. The terminal logs into the WiFi network.
可选地,所述服务器还包括:第二接收模块,适于接收所述第二终端向服务器端发起的连接所述WiFi网络的请求。Optionally, the server further includes: a second receiving module adapted to receive a request from the second terminal to the server to connect to the WiFi network.
可选地,所述服务器还包括:请求模块,适于在所述第二接收模块接收到所述第二终端发起的连接所述WiFi网络的请求之后,根据所述连接WiFi网络的请求向第一终端发送获取WiFi网络的登录信息的请求;Optionally, the server further includes: a requesting module, adapted to, after the second receiving module receives the request for connecting to the WiFi network initiated by the second terminal, send a request to the second terminal according to the request for connecting to the WiFi network. A terminal sends a request for obtaining login information of the WiFi network;
所述第一接收模块进一步适于:获取所述第一终端响应所述获取WiFi网络的登录信息的请求上传到服务器端的所述WiFi网络的登录信息以及所述第一终端用户的用户好友列表。The first receiving module is further adapted to: obtain the login information of the WiFi network uploaded to the server by the first terminal in response to the request for obtaining login information of the WiFi network and the user friend list of the first terminal user.
可选地,所述服务器还包括:删除模块,适于在探测到第二终端离开所述WiFi网络覆盖区域时,删除服务器端的所述WiFi网络的登录信息。Optionally, the server further includes: a deletion module adapted to delete the login information of the WiFi network at the server end when it is detected that the second terminal leaves the coverage area of the WiFi network.
根据本发明的另一方面,提供了一种用于分享WiFi网络登录信息的系统,其包括:上述用于分享WiFi网络登录信息的服务器,以及第一终端和第二终端。According to another aspect of the present invention, a system for sharing WiFi network login information is provided, which includes: the above-mentioned server for sharing WiFi network login information, and a first terminal and a second terminal.
可选地,所述第一终端具体适于:通过调用所述第一终端上安装的通信录和/或即时通讯软件提供的接口得到所述第一终端用户的用户好友列表。Optionally, the first terminal is specifically adapted to: obtain the user friend list of the first terminal user by calling an address book installed on the first terminal and/or an interface provided by instant messaging software.
可选地,所述第二终端具体适于:在探测到所述第二终端离开所述WiFi网络覆盖区域时,删除所述第二终端中的所述WiFi网络的登录信息。Optionally, the second terminal is specifically adapted to: delete the login information of the WiFi network in the second terminal when it is detected that the second terminal leaves the coverage area of the WiFi network.
根据本发明的另一方面,提供了一种用于分享WiFi网络登录信息的终端,其包括:According to another aspect of the present invention, a terminal for sharing WiFi network login information is provided, which includes:
获取模块,适于获取第一终端用户预先设置的WiFi网络的登录信息以及所述第一终端用户的用户好友列表;The obtaining module is adapted to obtain the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user;
判断模块,适于判断请求连接所述WiFi网络的第二终端对应的第二终端用户是否属于所述第一终端用户的用户好友列表;The judging module is adapted to judge whether the second terminal user corresponding to the second terminal requesting to connect to the WiFi network belongs to the user friend list of the first terminal user;
发送模块,适于若所述判断模块判断出所述第二终端用户属于所述第一终端用户的用户好友列表,则将所述WiFi网络的登录信息提供给第二终端以供所述第二终端登录所述WiFi网络。The sending module is adapted to provide the login information of the WiFi network to the second terminal for the second terminal user if the judging module judges that the second terminal user belongs to the user friend list of the first terminal user. The terminal logs into the WiFi network.
可选地,所述获取模块进一步适于:通过调用所述第一终端上安装的通信录和/或即时通讯软件提供的接口得到所述第一终端用户的用户好友列表。Optionally, the obtaining module is further adapted to: obtain the user friend list of the first terminal user by invoking an address book installed on the first terminal and/or an interface provided by instant messaging software.
可选地,所述发送模块进一步适于:通过点对点无线传输的方式将WiFi网络的登录信息提供给所述第二终端。Optionally, the sending module is further adapted to: provide the login information of the WiFi network to the second terminal through point-to-point wireless transmission.
根据本发明提供的方案,通过判断第二终端用户是否属于第一终端用户的用户好友列表来决定是否允许第二终端接入WiFi网络,相比告知密码后手动输入密码接入、或扫描二维码的方式接入等方式来说,本发明提供的方式更为简便,提升了WiFi网络共享的灵活性。而且,本发明仅允许用户的好友接入WiFi网络,相当于给予第一终端用户一定程度上的控制权,避免WiFi网络共享后陌生人随意蹭网、占用共享资源。According to the solution provided by the present invention, by judging whether the second terminal user belongs to the user friend list of the first terminal user, it is determined whether to allow the second terminal to access the WiFi network, compared to manually inputting the password to access after being informed of the password, or scanning two-dimensional In terms of methods such as code access and the like, the method provided by the present invention is simpler and improves the flexibility of WiFi network sharing. Moreover, the present invention only allows the user's friends to access the WiFi network, which is equivalent to giving the first terminal user a certain degree of control right, and avoids strangers randomly scrambling on the network and occupying shared resources after the WiFi network is shared.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:
图1示出了本发明提供的WiFi网络登录信息的分享方法实施例一的流程图;Fig. 1 shows the flowchart of Embodiment 1 of the method for sharing WiFi network login information provided by the present invention;
图2示出了本发明提供的WiFi网络登录信息的分享方法实施例二的流程图;Fig. 2 shows the flowchart of Embodiment 2 of the method for sharing WiFi network login information provided by the present invention;
图3示出了本发明提供的WiFi网络登录信息的分享方法实施例三的流程图;Fig. 3 shows the flow chart of Embodiment 3 of the method for sharing WiFi network login information provided by the present invention;
图4示出了本发明提供的WiFi网络登录信息的分享方法实施例四的流程图;Fig. 4 shows the flow chart of Embodiment 4 of the method for sharing WiFi network login information provided by the present invention;
图5示出了本发明提供的用于分享WiFi网络登录信息的服务器实施例的功能框图;FIG. 5 shows a functional block diagram of a server embodiment for sharing WiFi network login information provided by the present invention;
图6示出了本发明提供的用于分享WiFi网络登录信息的系统实施例的功能框图;FIG. 6 shows a functional block diagram of a system embodiment for sharing WiFi network login information provided by the present invention;
图7示出了本发明提供的用于分享WiFi网络登录信息的终端实施例的功能框图。Fig. 7 shows a functional block diagram of a terminal embodiment for sharing WiFi network login information provided by the present invention.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
图1示出了本发明提供的WiFi网络登录信息的分享方法实施例一的流程图。如图1所示,该方法包括如下步骤:FIG. 1 shows a flow chart of Embodiment 1 of the method for sharing WiFi network login information provided by the present invention. As shown in Figure 1, the method includes the following steps:
步骤S100,获取第一终端用户预先设置的WiFi网络的登录信息以及第一终端用户的用户好友列表。Step S100, obtaining the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user.
通常,在创建WiFi网络的过程中,用户会配置WiFi网络的名称和密码,在配置好这些信息之后,如有想要接入该WiFi网络的终端,必须提供密码,密码是WiFi网络的必要登录信息。本实施例中,第一终端属于配置WiFi网络的用户的终端,在第一终端接入WiFi网络时,获取第一终端用户预先设置的WiFi网络的登录信息,以及第一终端用户的用户好友列表。Usually, in the process of creating a WiFi network, the user will configure the name and password of the WiFi network. After configuring these information, if there is a terminal that wants to access the WiFi network, a password must be provided. The password is a necessary login for the WiFi network. information. In this embodiment, the first terminal belongs to the terminal of the user who configures the WiFi network. When the first terminal accesses the WiFi network, the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user are obtained. .
可选地,第一终端用户的用户好友列表是通过调用第一终端上安装的通信录和/或即时通讯软件提供的接口得到的。第一终端上安装的通讯录记录了用户好友的联系方式,可通过调用通讯录的接口getcontactinfo()获得这些用户好友的联系方式作为用户好友列表。另外,第一终端上安装的其它即时通讯软件中也记录了用户好友的联系方式,因此也可通过调用各个即时通讯软件的接口获得这些好友的联系方式写入用户好友列表。Optionally, the user friend list of the first terminal user is obtained by invoking an interface provided by an address book and/or instant messaging software installed on the first terminal. The address book installed on the first terminal records the contact information of the user's friends, and the contact information of the user's friends can be obtained as the user's friend list by calling the interface getcontactinfo() of the address book. In addition, other instant messaging software installed on the first terminal also records the contact information of the user's friends, so the contact information of these friends can also be obtained by calling the interface of each instant messaging software and written into the user's friend list.
步骤S110,判断请求连接WiFi网络的第二终端对应的第二终端用户是否属于第一终端用户的用户好友列表,若是,则执行步骤S120;若否,则方法结束。Step S110, judging whether the second terminal user corresponding to the second terminal requesting to connect to the WiFi network belongs to the user friend list of the first terminal user, if yes, execute step S120; if not, the method ends.
在第二终端请求接入WiFi网络时,本方法查询第二终端用户是否属于第一终端用户的用户好友列表。例如,在第二终端的接入请求中提取第二终端用户的联系方式,判断第一终端用户的用户好友列表中是否记录了该第二终端用户的联系方式,如具有,表明第二终端用户为第一终端用户的好友,执行步骤S120。When the second terminal requests to access the WiFi network, the method inquires whether the second terminal user belongs to the user friend list of the first terminal user. For example, extract the contact information of the second terminal user from the access request of the second terminal, judge whether the contact information of the second terminal user is recorded in the user friend list of the first terminal user, and if so, indicate that the second terminal user For friends of the first terminal user, execute step S120.
步骤S120,将WiFi网络的登录信息提供给第二终端以供第二终端登录WiFi网络。Step S120, providing the login information of the WiFi network to the second terminal for the second terminal to log in to the WiFi network.
根据本实施例提供的WiFi网络登录信息的分享方法,通过判断第二终端用户是否属于第一终端用户的用户好友列表来决定是否允许第二终端接入WiFi网络,相比告知密码后手动输入密码接入、或扫描二维码的方式接入等方式来说,本实施例提供的方式更为简便,提升了WiFi网络共享的灵活性。而且,本方法仅允许用户的好友接入WiFi网络,相当于给予第一终端用户一定程度上的控制权,避免WiFi网络共享后陌生人随意蹭网、占用共享资源。According to the method for sharing WiFi network login information provided in this embodiment, whether to allow the second terminal to access the WiFi network is determined by judging whether the second terminal user belongs to the user friend list of the first terminal user, compared to manually inputting the password after being informed of the password In terms of access, or access by scanning a two-dimensional code, the method provided by this embodiment is more convenient and improves the flexibility of WiFi network sharing. Moreover, this method only allows the user's friends to access the WiFi network, which is equivalent to giving the first terminal user a certain degree of control, preventing strangers from randomly scrambling the Internet and occupying shared resources after the WiFi network is shared.
图2示出了本发明提供的WiFi网络登录信息的分享方法实施例二的流程图。本实施例的方法是通过服务器端共享WiFi网络的登录密码来实现的。如图2所示,该方法包括如下步骤:FIG. 2 shows a flow chart of Embodiment 2 of the method for sharing WiFi network login information provided by the present invention. The method in this embodiment is realized by sharing the login password of the WiFi network on the server side. As shown in Figure 2, the method includes the following steps:
步骤S200,在第一终端接入WiFi网络后,第一终端将第一终端用户预先设置的WiFi网络的登录密码以及第一终端用户的用户好友列表上传到服务器端。Step S200, after the first terminal accesses the WiFi network, the first terminal uploads the login password of the WiFi network preset by the first terminal user and the user friend list of the first terminal user to the server.
在第一终端接入WiFi网络后,第一终端将第一终端用户预先设置的WiFi网络的登录密码以及第一终端用户的用户好友列表上传到服务器端。由于存在WiFi网络的登录密码可能更新、和/或第一终端用户的用户好友列表更新的情况,可以在第一终端每次接入WiFi网络时,都上传一次最新的登录密码和用户好友列表,以保证服务器端随时更新。或者,预设最短时间间隔,如3天,在第一终端接入WiFi网络后,判断上次上传登录密码和用户好友列表的时间距离当前时间的间隔是否超过最短时间间隔,如超过,则重新上传;如未超过,则不上传,以免过多占用第一终端的系统资源。After the first terminal accesses the WiFi network, the first terminal uploads the login password of the WiFi network preset by the first terminal user and the user friend list of the first terminal user to the server. Since the login password of the WiFi network may be updated and/or the user friend list of the first terminal user may be updated, the latest login password and user friend list may be uploaded once each time the first terminal accesses the WiFi network, To ensure that the server side is updated at any time. Or, preset the shortest time interval, such as 3 days, after the first terminal accesses the WiFi network, judge whether the interval between the time of uploading the login password and the user's friend list last time and the current time exceeds the shortest time interval, and if so, restart Upload; if it does not exceed, then do not upload, so as not to occupy too much system resources of the first terminal.
在第一终端上传用户好友列表之前,第一终端调用其上安装的通信录和/或即时通讯软件提供的接口得到第一终端用户的用户好友列表。第一终端上安装的通讯录记录了用户好友的联系方式,可通过调用通讯录的接口getcontactinfo()获得这些用户好友的联系方式作为用户好友列表。另外,第一终端上安装的其它即时通讯软件中也记录了用户好友的联系方式,因此也可通过调用各个即时通讯软件的接口获得这些好友的联系方式写入用户好友列表。Before the first terminal uploads the user's friend list, the first terminal invokes the address book installed on it and/or the interface provided by the instant messaging software to obtain the user's friend list of the first terminal user. The address book installed on the first terminal records the contact information of the user's friends, and the contact information of the user's friends can be obtained as the user's friend list by calling the interface getcontactinfo() of the address book. In addition, other instant messaging software installed on the first terminal also records the contact information of the user's friends, so the contact information of these friends can also be obtained by calling the interface of each instant messaging software and written into the user's friend list.
步骤S210,服务器端保存WiFi网络的登录密码和第一终端用户的用户好友列表。Step S210, the server saves the login password of the WiFi network and the user friend list of the first terminal user.
在每次第一终端接入WiFi网络后上传或第一终端定期上传WiFi网络的登录密码和第一终端用户的用户好友列表,服务器端保存这些信息。The login password of the WiFi network and the user friend list of the first terminal user are uploaded every time the first terminal accesses the WiFi network or the first terminal periodically uploads, and the server side saves these information.
步骤S220,第二终端检测到WiFi网络后,向服务器端发起连接该WiFi网络的请求。Step S220, after the second terminal detects the WiFi network, it initiates a request to the server to connect to the WiFi network.
第二终端进入到WiFi网络覆盖区域时,检测到该WiFi网络,第二终端主动向服务器端发起连接该WiFi网络的请求。When the second terminal enters the coverage area of the WiFi network, the WiFi network is detected, and the second terminal actively initiates a request to the server to connect to the WiFi network.
步骤S230,服务器端判断第二终端对应的第二终端用户是否属于第一终端用户的用户好友列表,若是,则执行步骤S240;若否,则执行步骤S260。Step S230, the server side judges whether the second terminal user corresponding to the second terminal belongs to the user friend list of the first terminal user, if yes, execute step S240; if not, execute step S260.
服务器端在接收到第二终端发起的连接WiFi网络的请求后,查询第二终端用户是否属于第一终端用户的用户好友列表。例如,在第二终端发起的连接WiFi网络的请求中提取第二终端用户的联系方式,判断第一终端用户的用户好友列表中是否记录了该第二终端用户的联系方式,如具有,表明第二终端用户为第一终端用户的好友,执行步骤S240;如不具有,表明第二终端用户不是第一终端用户的好友,执行步骤S260。After receiving the request initiated by the second terminal to connect to the WiFi network, the server inquires whether the second terminal user belongs to the user friend list of the first terminal user. For example, the contact information of the second terminal user is extracted from the request initiated by the second terminal to connect to the WiFi network, and it is judged whether the contact information of the second terminal user is recorded in the user friend list of the first terminal user. If the second terminal user is a friend of the first terminal user, perform step S240; if not, it indicates that the second terminal user is not a friend of the first terminal user, and perform step S260.
步骤S240,服务器端将WiFi网络的登录密码下发给第二终端。Step S240, the server sends the login password of the WiFi network to the second terminal.
若判断出第二终端用户属于第一终端用户的用户好友列表,则服务器端将保存的WiFi网络的登录密码下发给第二终端。If it is determined that the second terminal user belongs to the user friend list of the first terminal user, the server sends the stored WiFi network login password to the second terminal.
步骤S250,第二终端登录WiFi网络。Step S250, the second terminal logs into the WiFi network.
第二终端在接收到WiFi网络的登录密码后,利用该登录密码登录WiFi网络。After receiving the login password of the WiFi network, the second terminal uses the login password to log in to the WiFi network.
步骤S260,服务器端向第二终端返回WiFi网络连接失败信息。Step S260, the server returns the WiFi network connection failure information to the second terminal.
若判断出第二终端用户不属于第一终端用户的用户好友列表,则服务器端向第二终端返回WiFi网络连接失败信息。If it is determined that the second terminal user does not belong to the user friend list of the first terminal user, the server returns a WiFi network connection failure message to the second terminal.
根据本实施例提供的WiFi网络登录信息的分享方法,第一终端在每次接入WiFi网络时或者定期向服务器端上传WiFi网络的登录密码和第一终端用户的用户好友列表,在第二终端请求接入该WiFi网络时,通过判断第二终端用户是否属于第一终端用户的用户好友列表来决定是否允许第二终端接入WiFi网络,相比告知密码后手动输入密码接入、或扫描二维码的方式接入等方式来说,本实施例提供的方式更为简便,提升了WiFi网络共享的灵活性。而且,本方法仅允许用户的好友接入WiFi网络,相当于给予第一终端用户一定程度上的控制权,避免WiFi网络共享后陌生人随意蹭网、占用共享资源。According to the method for sharing WiFi network login information provided in this embodiment, the first terminal uploads the login password of the WiFi network and the user friend list of the first terminal user to the server every time it accesses the WiFi network or periodically, and the second terminal When requesting to access the WiFi network, determine whether to allow the second terminal to access the WiFi network by judging whether the second terminal user belongs to the user friend list of the first terminal user. In terms of methods such as accessing through a QR code, the method provided by this embodiment is more convenient and improves the flexibility of WiFi network sharing. Moreover, this method only allows the user's friends to access the WiFi network, which is equivalent to giving the first terminal user a certain degree of control, preventing strangers from randomly scrambling the Internet and occupying shared resources after the WiFi network is shared.
在一个具体的场景中,第一终端用户为用户A,第二终端用户为用户B。用户A在自己的家中预先创建WiFi网络,并预先为该WiFi网络配置了登录密码,用户A的手机接入到WiFi网络中时,登录密码和用户A的用户好友列表被预存到服务器端,这里用户A的用户好友列表可以是通过读取用户A的通讯录得到的。用户B来到用户A的家中做客时,用户B的手机检测到该WiFi网络,用户B的手机向服务器端发起接入WiFi网络的请求,服务器端判断用户B的手机号码是否属于用户A的用户好友列表,该步骤实际在检查用户B的手机号码是否记录在用户A的通讯录中,若是,则表明用户B是用户A的好友,服务器端将WiFi网络的登录密码发送给用户B的手机,用户B的手机依据该登录密码成功接入WiFi网络。从这个具体的场景中也可以看出,用户B在无感知的情况下就能接入用户A家中的WiFi网络,而不需要向用户A询问登录密码,也不用采取扫描二维码等其它繁琐的方式,提升了WiFi网络共享的简便性和灵活性。同时,用户B获取登录密码的过程对用户A也是无感知的,用户A预先选择了将WiFi网络的登录密码上传的服务器端,默认了共享家中的WiFi网络,但它并不允许任何进入到该WiFi网络覆盖区域的手机都能接入该WiFi网络,而是仅允许用户A的好友接入WiFi网络,相当于给予用户A一定程度上的控制权,避免WiFi网络共享后陌生人随意蹭网、占用共享资源。In a specific scenario, the first end user is user A, and the second end user is user B. User A pre-creates a WiFi network in his home, and pre-configures a login password for the WiFi network. When user A's mobile phone is connected to the WiFi network, the login password and user A's user friend list are pre-stored on the server. Here User A's user friend list may be obtained by reading user A's address book. When user B comes to user A's home as a guest, user B's mobile phone detects the WiFi network, user B's mobile phone initiates a request to the server to access the WiFi network, and the server determines whether user B's mobile phone number belongs to user A's user Friends list, this step actually checks whether the mobile phone number of user B is recorded in the address book of user A, if so, it indicates that user B is a friend of user A, and the server sends the login password of the WiFi network to the mobile phone of user B, User B's mobile phone successfully accesses the WiFi network according to the login password. It can also be seen from this specific scenario that user B can access the WiFi network of user A's home without being aware of it, without asking user A for the login password, and without taking other tedious steps such as scanning QR codes. The method improves the simplicity and flexibility of WiFi network sharing. At the same time, the process of user B obtaining the login password is also insensitive to user A. User A pre-selects the server to upload the login password of the WiFi network, and shares the WiFi network at home by default, but it does not allow anyone to enter the server. All mobile phones in the WiFi network coverage area can access the WiFi network, but only allow user A's friends to access the WiFi network, which is equivalent to giving user A a certain degree of control, preventing strangers from randomly surfing the Internet after sharing the WiFi network. Occupy shared resources.
进一步的,在上述步骤S250之后,还可包括:在探测到第二终端离开WiFi网络覆盖区域时,删除第二终端中的WiFi网络的登录信息。Further, after the above step S250, the method may further include: when it is detected that the second terminal leaves the coverage area of the WiFi network, deleting the login information of the WiFi network in the second terminal.
为了避免第二终端强制记录WiFi网络的登录历史信息,在第二终端离开WiFi网络覆盖区域时,删除第二终端中该WiFi网络的登录信息。In order to prevent the second terminal from forcibly recording the login history information of the WiFi network, when the second terminal leaves the coverage area of the WiFi network, the login information of the WiFi network in the second terminal is deleted.
图3示出了本发明提供的WiFi网络登录信息的分享方法实施例三的流程图。本实施例的方法是通过服务器端共享WiFi网络的登录密码来实现的,与图2所示的实施例的区别在于,本实施例是在第二终端请求接入WiFi网络时,第一终端才向服务器端上传WiFi网络的登录信息。如图3所示,该方法包括如下步骤:FIG. 3 shows a flow chart of Embodiment 3 of the method for sharing WiFi network login information provided by the present invention. The method in this embodiment is realized by sharing the login password of the WiFi network on the server side. The difference from the embodiment shown in FIG. 2 is that in this embodiment, when the second terminal requests to access the WiFi network, the first terminal Upload the login information of the WiFi network to the server. As shown in Figure 3, the method includes the following steps:
步骤S300,第二终端检测到WiFi网络后,向服务器端发起连接该WiFi网络的请求。Step S300, after the second terminal detects the WiFi network, it initiates a request to the server to connect to the WiFi network.
步骤S310,服务器端根据连接WiFi网络的请求向第一终端发送获取WiFi网络的登录密码的请求。In step S310, the server sends a request for obtaining a login password of the WiFi network to the first terminal according to the request for connecting to the WiFi network.
服务器端在接收到第二终端连接WiFi网络的请求后,根据其保存的WiFi网络的注册信息可以获知WiFi网络的注册者是第一终端用户,则向第一终端发送获取WiFi网络的登录密码的请求。After receiving the request from the second terminal to connect to the WiFi network, the server side can know that the registrant of the WiFi network is the first terminal user according to the registered information of the WiFi network saved by it, and then send a request to the first terminal to obtain the login password of the WiFi network. ask.
步骤S320,第一终端响应获取WiFi网络的登录密码的请求,将第一终端用户预先设置的WiFi网络的登录密码以及第一终端用户的用户好友列表上传到服务器端。In step S320, the first terminal responds to the request for obtaining the login password of the WiFi network, and uploads the login password of the WiFi network preset by the first terminal user and the user friend list of the first terminal user to the server.
第一终端接收到服务器端发送的获取WiFi网络的登录密码的请求之后,响应该请求将第一终端用户预先设置的WiFi网络的登录密码以及第一终端用户的用户好友列表上传到服务器端。After receiving the request from the server to acquire the login password of the WiFi network, the first terminal uploads the login password of the WiFi network preset by the first terminal user and the user friend list of the first terminal user to the server in response to the request.
本实施例中,第一终端用户的用户好友列表也是通过调用第一终端上安装的通信录和/或即时通讯软件提供的接口得到的。第一终端上安装的通讯录记录了用户好友的联系方式,可通过调用通讯录的接口getcontactinfo()获得这些用户好友的联系方式作为用户好友列表。另外,第一终端上安装的其它即时通讯软件中也记录了用户好友的联系方式,因此也可通过调用各个即时通讯软件的接口获得这些好友的联系方式写入用户好友列表。In this embodiment, the user friend list of the first terminal user is also obtained by invoking an address book installed on the first terminal and/or an interface provided by instant messaging software. The address book installed on the first terminal records the contact information of the user's friends, and the contact information of the user's friends can be obtained as the user's friend list by calling the interface getcontactinfo() of the address book. In addition, other instant messaging software installed on the first terminal also records the contact information of the user's friends, so the contact information of these friends can also be obtained by calling the interface of each instant messaging software and written into the user's friend list.
步骤S330,服务器端判断第二终端对应的第二终端用户是否属于第一终端用户的用户好友列表,若是,则执行步骤S340;若否,则执行步骤S360。Step S330, the server side judges whether the second terminal user corresponding to the second terminal belongs to the user friend list of the first terminal user, if yes, execute step S340; if not, execute step S360.
服务器端查询第二终端用户是否属于第一终端用户的用户好友列表。例如,在第二终端发起的连接WiFi网络的请求中提取第二终端用户的联系方式,判断第一终端用户的用户好友列表中是否记录了该第二终端用户的联系方式,如具有,表明第二终端用户为第一终端用户的好友,执行步骤S340;如不具有,表明第二终端用户不是第一终端用户的好友,执行步骤S360。The server side inquires whether the second terminal user belongs to the user friend list of the first terminal user. For example, the contact information of the second terminal user is extracted from the request initiated by the second terminal to connect to the WiFi network, and it is judged whether the contact information of the second terminal user is recorded in the user friend list of the first terminal user. If the second terminal user is a friend of the first terminal user, perform step S340; if not, it indicates that the second terminal user is not a friend of the first terminal user, and perform step S360.
步骤S340,服务器端将WiFi网络的登录密码下发给第二终端。Step S340, the server sends the login password of the WiFi network to the second terminal.
若判断出第二终端用户属于第一终端用户的用户好友列表,则服务器端将第一终端上传的WiFi网络的登录密码下发给第二终端。If it is determined that the second terminal user belongs to the user friend list of the first terminal user, the server sends the login password of the WiFi network uploaded by the first terminal to the second terminal.
步骤S350,第二终端登录WiFi网络。Step S350, the second terminal logs into the WiFi network.
第二终端在接收到WiFi网络的登录密码后,利用该登录密码登录WiFi网络。After receiving the login password of the WiFi network, the second terminal uses the login password to log in to the WiFi network.
步骤S360,服务器端向第二终端返回WiFi网络连接失败信息。In step S360, the server returns the WiFi network connection failure information to the second terminal.
若判断出第二终端用户不属于第一终端用户的用户好友列表,则服务器端向第二终端返回WiFi网络连接失败信息。If it is determined that the second terminal user does not belong to the user friend list of the first terminal user, the server returns a WiFi network connection failure message to the second terminal.
根据本实施例提供的WiFi网络登录信息的分享方法,在第二终端请求接入该WiFi网络时,服务端请求第一终端上传WiFi网络的登录密码和用户好友列表,通过判断第二终端用户是否属于第一终端用户的用户好友列表来决定是否允许第二终端接入WiFi网络,相比告知密码后手动输入密码接入、或扫描二维码的方式接入等方式来说,本实施例提供的方式更为简便,提升了WiFi网络共享的灵活性。而且,本方法仅允许用户的好友接入WiFi网络,相当于给予第一终端用户一定程度上的控制权,避免WiFi网络共享后陌生人随意蹭网、占用共享资源。According to the WiFi network login information sharing method provided in this embodiment, when the second terminal requests to access the WiFi network, the server requests the first terminal to upload the login password of the WiFi network and the user friend list, and judges whether the second terminal user The friend list of the user belonging to the first terminal user determines whether to allow the second terminal to access the WiFi network. Compared with the way of manually entering the password after being informed of the password or scanning the QR code, this embodiment provides The method is simpler and improves the flexibility of WiFi network sharing. Moreover, this method only allows the user's friends to access the WiFi network, which is equivalent to giving the first terminal user a certain degree of control, preventing strangers from randomly scrambling the Internet and occupying shared resources after the WiFi network is shared.
在一个具体的场景中,第一终端用户为用户A,第二终端用户为用户B。用户A在自己的家中预先创建WiFi网络,并预先为该WiFi网络配置了登录密码,服务器端记录用户A的WiFi网络的注册信息。用户B来到用户A的家中做客时,用户B的手机检测到该WiFi网络,用户B的手机向服务器端发起接入WiFi网络的请求,服务器端查询到WiFi网络的注册者为用户A,则向用户A的手机发送获取WiFi网络的登录密码的请求,用户A的手机响应该请求,将WiFi网络的登录密码和用户A的用户好友列表上传到服务器端,这里用户A的用户好友列表可以是通过读取用户A的通讯录得到的。服务器端判断用户B的手机号码是否属于用户A的用户好友列表,该步骤实际在检查用户B的手机号码是否记录在用户A的通讯录中,若是,则表明用户B是用户A的好友,服务器端将WiFi网络的登录密码发送给用户B的手机,用户B的手机依据该登录密码成功接入WiFi网络。从这个具体的场景中也可以看出,用户B在无感知的情况下就能接入用户A家中的WiFi网络,而不需要向用户A询问登录密码,也不用采取扫描二维码等其它繁琐的方式,提升了WiFi网络共享的简便性和灵活性。同时,用户B获取登录密码的过程对用户A也是无感知的,但用户A不允许任何进入到该WiFi网络覆盖区域的手机都能接入该WiFi网络,而是仅允许用户A的好友接入WiFi网络,相当于给予用户A一定程度上的控制权,避免WiFi网络共享后陌生人随意蹭网、占用共享资源。In a specific scenario, the first end user is user A, and the second end user is user B. User A pre-creates a WiFi network in his home, and pre-configures a login password for the WiFi network, and the server records the registration information of user A's WiFi network. When user B comes to user A's home as a guest, user B's mobile phone detects the WiFi network, user B's mobile phone initiates a request to the server to access the WiFi network, and the server finds that the registrant of the WiFi network is user A, then Send a request to obtain the login password of the WiFi network to the mobile phone of user A. In response to the request, the mobile phone of user A uploads the login password of the WiFi network and the user friend list of user A to the server. Here, the user friend list of user A can be Obtained by reading user A's address book. The server side judges whether the mobile phone number of user B belongs to the user friend list of user A. This step actually checks whether the mobile phone number of user B is recorded in the address book of user A. If so, it indicates that user B is a friend of user A, and the server The terminal sends the login password of the WiFi network to the mobile phone of user B, and the mobile phone of user B successfully accesses the WiFi network according to the login password. It can also be seen from this specific scenario that user B can access the WiFi network of user A's home without being aware of it, without asking user A for the login password, and without taking other tedious steps such as scanning QR codes. The method improves the simplicity and flexibility of WiFi network sharing. At the same time, the process of user B obtaining the login password is also insensitive to user A, but user A does not allow any mobile phone that enters the coverage area of the WiFi network to access the WiFi network, but only allows user A's friends to access The WiFi network is equivalent to giving user A a certain degree of control, so as to prevent strangers from randomly surfing the Internet and occupying shared resources after the WiFi network is shared.
进一步的,在上述步骤S350之后,还可包括:在探测到第二终端离开WiFi网络覆盖区域时,删除第二终端和服务器端的WiFi网络的登录信息。Further, after the above step S350, the method may further include: when it is detected that the second terminal leaves the coverage area of the WiFi network, deleting the login information of the WiFi network of the second terminal and the server.
为了避免第二终端和服务器强制记录WiFi网络的登录历史信息,在第二终端离开WiFi网络覆盖区域时,删除第二终端和服务器端该WiFi网络的登录信息。In order to prevent the second terminal and the server from forcibly recording the login history information of the WiFi network, when the second terminal leaves the coverage area of the WiFi network, the login information of the WiFi network on the second terminal and the server side is deleted.
图4示出了本发明提供的WiFi网络登录信息的分享方法实施例四的流程图。本实施例的方法具体是通过终端之间点对点的无线传输方式共享WiFi网络的登录密码。这里所采用的点对点的无线传输技术可以是近距离无线通信技术(Near Field Communication,简称NFC)、蓝牙技术、ad-hoc技术等,本发明对此不做限制。在方法执行前,第一终端和第二终端预先建立点对点的无线传输通道。FIG. 4 shows a flow chart of Embodiment 4 of the method for sharing WiFi network login information provided by the present invention. The method of this embodiment specifically shares the login password of the WiFi network through point-to-point wireless transmission between terminals. The point-to-point wireless transmission technology adopted here may be Near Field Communication (NFC for short), Bluetooth technology, ad-hoc technology, etc., which is not limited in the present invention. Before the method is executed, the first terminal and the second terminal establish a point-to-point wireless transmission channel in advance.
如图4所示,该方法包括如下步骤:As shown in Figure 4, the method includes the following steps:
步骤S400,第二终端检测到WiFi网络后,向第一终端发起连接该WiFi网络的请求。具体的,第二终端通过点对点无线传输通道向第一终端发送该请求。Step S400, after the second terminal detects the WiFi network, it initiates a request to the first terminal to connect to the WiFi network. Specifically, the second terminal sends the request to the first terminal through a point-to-point wireless transmission channel.
步骤S410,第一终端响应第一终端发起的连接WiFi网络的请求,获取第一终端用户预先设置的WiFi网络的登录密码以及第一终端用户的用户好友列表。Step S410, the first terminal responds to the request initiated by the first terminal to connect to the WiFi network, and obtains the login password of the WiFi network preset by the first terminal user and the user friend list of the first terminal user.
第一终端调用其上安装的通信录和/或即时通讯软件提供的接口得到第一终端用户的用户好友列表。第一终端上安装的通讯录记录了用户好友的联系方式,可通过调用通讯录的接口getcontactinfo()获得这些用户好友的联系方式作为用户好友列表。另外,第一终端上安装的其它即时通讯软件中也记录了用户好友的联系方式,因此也可通过调用各个即时通讯软件的接口获得这些好友的联系方式写入用户好友列表。The first terminal calls the interface provided by the address book and/or instant messaging software installed on it to obtain the user friend list of the first terminal user. The address book installed on the first terminal records the contact information of the user's friends, and the contact information of the user's friends can be obtained as the user's friend list by calling the interface getcontactinfo() of the address book. In addition, other instant messaging software installed on the first terminal also records the contact information of the user's friends, so the contact information of these friends can also be obtained by calling the interface of each instant messaging software and written into the user's friend list.
步骤S420,第一终端判断第二终端对应的第二终端用户是否属于第一终端用户的用户好友列表,若是,则执行步骤S430;若否,则执行步骤S450。Step S420, the first terminal judges whether the second terminal user corresponding to the second terminal belongs to the user friend list of the first terminal user, if yes, execute step S430; if not, execute step S450.
第一终端查询第二终端用户是否属于第一终端用户的用户好友列表。例如,在第二终端发起的连接WiFi网络的请求中提取第二终端用户的联系方式,判断第一终端用户的用户好友列表中是否记录了该第二终端用户的联系方式,如具有,表明第二终端用户为第一终端用户的好友,执行步骤S430;如不具有,表明第二终端用户不是第一终端用户的好友,执行步骤S450。The first terminal queries whether the second terminal user belongs to the user friend list of the first terminal user. For example, the contact information of the second terminal user is extracted from the request initiated by the second terminal to connect to the WiFi network, and it is judged whether the contact information of the second terminal user is recorded in the user friend list of the first terminal user. If the second terminal user is a friend of the first terminal user, perform step S430; if not, it indicates that the second terminal user is not a friend of the first terminal user, and perform step S450.
步骤S430,由第一终端通过点对点无线传输的方式将WiFi网络的登录信息提供给第二终端。Step S430, the first terminal provides the login information of the WiFi network to the second terminal through point-to-point wireless transmission.
若判断出第二终端用户属于第一终端用户的用户好友列表,则第一终端将WiFi网络的登录密码发送给第二终端。If it is determined that the second terminal user belongs to the user friend list of the first terminal user, the first terminal sends the login password of the WiFi network to the second terminal.
步骤S440,第二终端登录WiFi网络。Step S440, the second terminal logs into the WiFi network.
第二终端在接收到WiFi网络的登录密码后,利用该登录密码登录WiFi网络。After receiving the login password of the WiFi network, the second terminal uses the login password to log in to the WiFi network.
步骤S450,第一终端向第二终端返回WiFi网络连接失败信息。Step S450, the first terminal returns the WiFi network connection failure information to the second terminal.
若判断出第二终端用户不属于第一终端用户的用户好友列表,则第一终端向第二终端返回WiFi网络连接失败信息。If it is determined that the second terminal user does not belong to the user friend list of the first terminal user, the first terminal returns a WiFi network connection failure message to the second terminal.
根据本实施例提供的WiFi网络登录信息的分享方法,第一终端和第二终端之间预先建立了点对点的无线传输通道,在第二终端请求接入WiFi网络时,第一终端通过判断第二终端用户是否属于第一终端用户的用户好友列表来决定是否允许第二终端接入WiFi网络,若允许,则通过点对点无线传输的方式将WiFi网络的登录信息提供给第二终端,相比告知密码后手动输入密码接入、或扫描二维码的方式接入等方式来说,本实施例提供的方式更为简便,提升了WiFi网络共享的灵活性。而且,本方法仅允许用户的好友接入WiFi网络,相当于给予第一终端用户一定程度上的控制权,避免WiFi网络共享后陌生人随意蹭网、占用共享资源。According to the WiFi network login information sharing method provided in this embodiment, a point-to-point wireless transmission channel is pre-established between the first terminal and the second terminal. When the second terminal requests to access the WiFi network, the first terminal judges the second Whether the terminal user belongs to the user friend list of the first terminal user determines whether to allow the second terminal to access the WiFi network. If allowed, the login information of the WiFi network is provided to the second terminal through point-to-point wireless transmission. Compared with telling the password In terms of methods such as manually entering a password or scanning a two-dimensional code, the method provided by this embodiment is more convenient and improves the flexibility of WiFi network sharing. Moreover, this method only allows the user's friends to access the WiFi network, which is equivalent to giving the first terminal user a certain degree of control, preventing strangers from randomly scrambling the Internet and occupying shared resources after the WiFi network is shared.
在一个具体的场景中,第一终端用户为用户A,第二终端用户为用户B。用户A在自己的家中预先创建WiFi网络,并预先为该WiFi网络配置了登录密码。用户B来到用户A的家中做客时,用户B的手机与用户A的手机建立点对点的无线传输通道,如蓝牙通道。用户B的手机检测到WiFi网络后向用户A的手机发起接入WiFi网络的请求。用户A的手机响应该请求,通过读取用户A的手机通讯录得到用户好友列表,判断用户B的手机号码是否属于用户A的用户好友列表,该步骤实际在检查用户B的手机号码是否记录在用户A的通讯录中,若是,则表明用户B是用户A的好友,用户A的手机通过蓝牙传输方式将WiFi网络的登录密码发送给用户B的手机,用户B的手机依据该登录密码成功接入WiFi网络。从这个具体的场景中也可以看出,在用户A和用户B的手机建立点对点的无线传输通道的前提下,用户B在无感知的情况下就能接入用户A家中的WiFi网络,而不需要向用户A询问登录密码,也不用采取扫描二维码等其它繁琐的方式,提升了WiFi网络共享的简便性和灵活性。同时,用户B获取登录密码的过程对用户A也是无感知的,但用户A不允许任何进入到该WiFi网络覆盖区域的手机都能接入该WiFi网络,而是仅允许用户A的好友接入WiFi网络,相当于给予用户A一定程度上的控制权,避免WiFi网络共享后陌生人随意蹭网、占用共享资源。In a specific scenario, the first end user is user A, and the second end user is user B. User A pre-creates a WiFi network in his home, and pre-configures a login password for the WiFi network. When user B comes to user A's home as a guest, user B's mobile phone and user A's mobile phone establish a point-to-point wireless transmission channel, such as a Bluetooth channel. After the mobile phone of user B detects the WiFi network, it sends a request to the mobile phone of user A to access the WiFi network. User A's mobile phone responds to the request, reads user A's mobile phone address book to obtain the user's friend list, and judges whether user B's mobile phone number belongs to user A's user friend list. This step actually checks whether user B's mobile phone number is recorded in In the address book of user A, if it is, it means that user B is a friend of user A. User A's mobile phone sends the login password of the WiFi network to user B's mobile phone through Bluetooth transmission, and user B's mobile phone successfully connects according to the login password. into the WiFi network. It can also be seen from this specific scenario that under the premise that the mobile phone of user A and user B establishes a point-to-point wireless transmission channel, user B can access the WiFi network of user A's home without awareness, without It is necessary to ask user A for the login password, and there is no need to scan QR codes and other cumbersome methods, which improves the simplicity and flexibility of WiFi network sharing. At the same time, the process of user B obtaining the login password is also insensitive to user A, but user A does not allow any mobile phone that enters the coverage area of the WiFi network to access the WiFi network, but only allows user A's friends to access The WiFi network is equivalent to giving user A a certain degree of control, so as to prevent strangers from randomly surfing the Internet and occupying shared resources after the WiFi network is shared.
进一步的,在上述步骤S440之后,还可包括:在探测到第二终端离开WiFi网络覆盖区域时,删除第二终端中的WiFi网络的登录信息。Further, after the above step S440, the method may further include: when it is detected that the second terminal leaves the coverage area of the WiFi network, deleting the login information of the WiFi network in the second terminal.
为了避免第二终端强制记录WiFi网络的登录历史信息,在第二终端离开WiFi网络覆盖区域时,删除第二终端中该WiFi网络的登录信息。In order to prevent the second terminal from forcibly recording the login history information of the WiFi network, when the second terminal leaves the coverage area of the WiFi network, the login information of the WiFi network in the second terminal is deleted.
图5示出了本发明提供的用于分享WiFi网络登录信息的服务器500实施例的功能框图。如图5所示,该服务器500包括:第一接收模块510、判断模块520以及发送模块530。FIG. 5 shows a functional block diagram of an embodiment of a server 500 for sharing WiFi network login information provided by the present invention. As shown in FIG. 5 , the server 500 includes: a first receiving module 510 , a judging module 520 and a sending module 530 .
第一接收模块510适于获取第一终端用户预先设置的WiFi网络的登录信息以及第一终端用户的用户好友列表。The first receiving module 510 is adapted to obtain the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user.
在创建WiFi网络的过程中,用户会配置WiFi网络的名称和密码,在配置好这些信息之后,如有想要接入该WiFi网络的终端,必须提供密码,密码是WiFi网络的必要登录信息。本实施例中,第一终端属于配置WiFi网络的用户的终端,在第一终端接入WiFi网络时,第一接收模块510接收第一终端用户预先设置的WiFi网络的登录信息,以及第一终端用户的用户好友列表。In the process of creating a WiFi network, the user will configure the name and password of the WiFi network. After configuring these information, if there is a terminal that wants to access the WiFi network, a password must be provided. The password is the necessary login information for the WiFi network. In this embodiment, the first terminal belongs to the terminal of the user configuring the WiFi network. When the first terminal accesses the WiFi network, the first receiving module 510 receives the login information of the WiFi network preset by the first terminal user, and the first terminal The user's friend list for the user.
可选地,第一终端用户的用户好友列表是通过调用第一终端上安装的通信录和/或即时通讯软件提供的接口得到的。第一终端上安装的通讯录记录了用户好友的联系方式,可通过调用通讯录的接口getcontactinfo()获得这些用户好友的联系方式作为用户好友列表。另外,第一终端上安装的其它即时通讯软件中也记录了用户好友的联系方式,因此也可通过调用各个即时通讯软件的接口获得这些好友的联系方式写入用户好友列表。Optionally, the user friend list of the first terminal user is obtained by invoking an interface provided by an address book and/or instant messaging software installed on the first terminal. The address book installed on the first terminal records the contact information of the user's friends, and the contact information of the user's friends can be obtained as the user's friend list by calling the interface getcontactinfo() of the address book. In addition, other instant messaging software installed on the first terminal also records the contact information of the user's friends, so the contact information of these friends can also be obtained by calling the interface of each instant messaging software and written into the user's friend list.
第一接收模块510是每次第一终端接入WiFi网络时接收或者定期接收第一终端上传的WiFi网络的登录信息和第一终端用户的用户好友列表。由于存在WiFi网络的登录密码可能更新、和/或第一终端用户的用户好友列表更新的情况,可以在第一终端每次接入WiFi网络时,都上传一次最新的登录密码和用户好友列表,以保证服务器端随时更新。或者,预设最短时间间隔,如3天,在第一终端接入WiFi网络后,判断上次上传登录密码和用户好友列表的时间距离当前时间的间隔是否超过最短时间间隔,如超过,则重新上传;如未超过,则不上传,以免过多占用第一终端的系统资源。The first receiving module 510 receives or regularly receives the login information of the WiFi network uploaded by the first terminal and the user friend list of the first terminal user each time the first terminal accesses the WiFi network. Since the login password of the WiFi network may be updated and/or the user friend list of the first terminal user may be updated, the latest login password and user friend list may be uploaded once each time the first terminal accesses the WiFi network, To ensure that the server side is updated at any time. Or, preset the shortest time interval, such as 3 days, after the first terminal accesses the WiFi network, judge whether the interval between the time of uploading the login password and the user's friend list last time and the current time exceeds the shortest time interval, and if so, restart Upload; if it does not exceed, then do not upload, so as not to occupy too much system resources of the first terminal.
判断模块520适于判断请求连接WiFi网络的第二终端对应的第二终端用户是否属于第一终端用户的用户好友列表。The judging module 520 is adapted to judge whether the second terminal user corresponding to the second terminal requesting to connect to the WiFi network belongs to the user friend list of the first terminal user.
在第二终端请求接入WiFi网络时,判断模块520查询第二终端用户是否属于第一终端用户的用户好友列表。例如,在第二终端的接入请求中提取第二终端用户的联系方式,判断第一终端用户的用户好友列表中是否记录了该第二终端用户的联系方式,如具有,表明第二终端用户为第一终端用户的好友。When the second terminal requests to access the WiFi network, the judging module 520 inquires whether the second terminal user belongs to the user friend list of the first terminal user. For example, extract the contact information of the second terminal user from the access request of the second terminal, judge whether the contact information of the second terminal user is recorded in the user friend list of the first terminal user, and if so, indicate that the second terminal user Be friends of the first terminal user.
发送模块530适于若判断模块520判断出第二终端用户属于第一终端用户的用户好友列表,则将WiFi网络的登录信息提供给第二终端以供第二终端登录WiFi网络。The sending module 530 is adapted to provide the login information of the WiFi network to the second terminal for the second terminal to log into the WiFi network if the judging module 520 determines that the second terminal user belongs to the user friend list of the first terminal user.
可选地,服务器还包括:第二接收模块540,适于接收第二终端向服务器端发起的连接WiFi网络的请求。Optionally, the server further includes: a second receiving module 540 adapted to receive a request from the second terminal to the server to connect to the WiFi network.
可选地,本发明的服务器也可以在第二终端请求接入WiFi网络时,请求第一终端上传WiFi网络的登录信息。具体地说,服务器还包括:请求模块550,适于在第二接收模块540接收到第二终端发起的连接WiFi网络的请求之后,根据连接WiFi网络的请求向第一终端发送获取WiFi网络的登录信息的请求。第一接收模块510进一步适于:获取第一终端响应获取WiFi网络的登录信息的请求上传到服务器端的WiFi网络的登录信息以及第一终端用户的用户好友列表。Optionally, the server of the present invention may also request the first terminal to upload the login information of the WiFi network when the second terminal requests to access the WiFi network. Specifically, the server further includes: a request module 550, adapted to send a login request for obtaining a WiFi network to the first terminal according to the request for connecting to the WiFi network after the second receiving module 540 receives the request for connecting to the WiFi network initiated by the second terminal. Information Request. The first receiving module 510 is further adapted to: obtain the login information of the WiFi network uploaded to the server by the first terminal in response to the request for obtaining login information of the WiFi network and the user friend list of the first terminal user.
可选地,服务器还包括:删除模块560,适于在探测到第二终端离开WiFi网络覆盖区域时,删除服务器端的WiFi网络的登录信息。Optionally, the server further includes: a deletion module 560, adapted to delete the login information of the WiFi network at the server end when it is detected that the second terminal leaves the coverage area of the WiFi network.
图6示出了本发明提供的用于分享WiFi网络登录信息的系统实施例的功能框图。如图6所示,该系统包括:服务器500、第一终端610和第二终端620。Fig. 6 shows a functional block diagram of an embodiment of a system for sharing WiFi network login information provided by the present invention. As shown in FIG. 6 , the system includes: a server 500 , a first terminal 610 and a second terminal 620 .
第一终端610具体适于:通过调用第一终端上安装的通信录和/或即时通讯软件提供的接口得到第一终端用户的用户好友列表。第一终端610每次接入WiFi网络时或者定期向服务器500上传WiFi网络的登录信息和用户好友列表。可选地,第一终端610也可以在接收到服务器500发送的获取WiFi网络的登录信息的请求之后,向服务器500上传WiFi网络的登录信息和用户好友列表。The first terminal 610 is specifically adapted to: obtain the user friend list of the first terminal user by invoking an address book installed on the first terminal and/or an interface provided by instant messaging software. The first terminal 610 uploads the login information of the WiFi network and the user friend list to the server 500 each time it accesses the WiFi network or periodically. Optionally, the first terminal 610 may also upload the login information of the WiFi network and the user friend list to the server 500 after receiving the request sent by the server 500 to obtain the login information of the WiFi network.
第二终端620具体适于:向服务器500发送连接WiFi网络的请求,并在接收到服务器500返回的WiFi网络的登录信息之后,接入该WiFi网络;以及,在探测到第二终端离开WiFi网络覆盖区域时,删除第二终端中的WiFi网络的登录信息。The second terminal 620 is specifically adapted to: send a request to connect to the WiFi network to the server 500, and access the WiFi network after receiving the login information of the WiFi network returned by the server 500; and, after detecting that the second terminal leaves the WiFi network When the area is covered, the login information of the WiFi network in the second terminal is deleted.
根据本实施例提供的用于分享WiFi网络登录信息的服务器及系统,由服务器判断第二终端用户是否属于第一终端用户的用户好友列表来决定是否允许第二终端接入WiFi网络,相比告知密码后手动输入密码接入、或扫描二维码的方式接入等方式来说,本实施例提供的方式更为简便,提升了WiFi网络共享的灵活性。而且,本系统仅允许用户的好友接入WiFi网络,相当于给予第一终端用户一定程度上的控制权,避免WiFi网络共享后陌生人随意蹭网、占用共享资源。According to the server and system for sharing WiFi network login information provided in this embodiment, the server judges whether the second terminal user belongs to the user friend list of the first terminal user to determine whether to allow the second terminal to access the WiFi network. In terms of methods such as manually entering a password after a password or scanning a two-dimensional code, the method provided by this embodiment is more convenient and improves the flexibility of WiFi network sharing. Moreover, this system only allows the user's friends to access the WiFi network, which is equivalent to giving the first terminal user a certain degree of control, preventing strangers from randomly scrambling the Internet and occupying shared resources after the WiFi network is shared.
图7示出了本发明提供的用于分享WiFi网络登录信息的终端实施例的功能框图。图7所示的终端具体为上面图4实施例所描述的第一终端,该终端通过点对点的无线传输方式共享WiFi网络的登录信息。这里所采用的点对点的无线传输技术可以是近距离无线通信技术(Near Field Communication,简称NFC)、蓝牙技术、ad-hoc技术等,本发明对此不做限制。如图7所示,该终端包括:获取模块710、判断模块720以及发送模块730。Fig. 7 shows a functional block diagram of a terminal embodiment for sharing WiFi network login information provided by the present invention. The terminal shown in FIG. 7 is specifically the first terminal described in the embodiment of FIG. 4 above, and the terminal shares the login information of the WiFi network through point-to-point wireless transmission. The point-to-point wireless transmission technology adopted here may be Near Field Communication (NFC for short), Bluetooth technology, ad-hoc technology, etc., which is not limited in the present invention. As shown in FIG. 7 , the terminal includes: an acquiring module 710 , a judging module 720 and a sending module 730 .
获取模块710适于获取第一终端用户预先设置的WiFi网络的登录信息以及第一终端用户的用户好友列表。The obtaining module 710 is adapted to obtain the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user.
判断模块720适于判断请求连接WiFi网络的第二终端对应的第二终端用户是否属于第一终端用户的用户好友列表。The judging module 720 is adapted to judge whether the second terminal user corresponding to the second terminal requesting to connect to the WiFi network belongs to the user friend list of the first terminal user.
发送模块730适于若判断模块720判断出第二终端用户属于第一终端用户的用户好友列表,则将WiFi网络的登录信息提供给第二终端以供第二终端登录WiFi网络。The sending module 730 is adapted to provide the login information of the WiFi network to the second terminal for the second terminal to log in the WiFi network if the judging module 720 determines that the second terminal user belongs to the user friend list of the first terminal user.
获取模块710进一步适于:通过调用第一终端上安装的通信录和/或即时通讯软件提供的接口得到第一终端用户的用户好友列表。第一终端上安装的通讯录记录了用户好友的联系方式,可通过调用通讯录的接口getcontactinfo()获得这些用户好友的联系方式作为用户好友列表。另外,第一终端上安装的其它即时通讯软件中也记录了用户好友的联系方式,因此也可通过调用各个即时通讯软件的接口获得这些好友的联系方式写入用户好友列表。The obtaining module 710 is further adapted to: obtain the user friend list of the first terminal user by invoking an address book installed on the first terminal and/or an interface provided by instant messaging software. The address book installed on the first terminal records the contact information of the user's friends, and the contact information of the user's friends can be obtained as the user's friend list by calling the interface getcontactinfo() of the address book. In addition, other instant messaging software installed on the first terminal also records the contact information of the user's friends, so the contact information of these friends can also be obtained by calling the interface of each instant messaging software and written into the user's friend list.
发送模块730进一步适于:通过点对点无线传输的方式将WiFi网络的登录信息提供给第二终端。The sending module 730 is further adapted to: provide the login information of the WiFi network to the second terminal through point-to-point wireless transmission.
根据本实施例提供的用于分享WiFi网络登录信息的终端,终端之间预先建立了点对点的无线传输通道,在第二终端请求接入WiFi网络时,第一终端通过判断第二终端用户是否属于第一终端用户的用户好友列表来决定是否允许第二终端接入WiFi网络,若允许,则通过点对点无线传输的方式将WiFi网络的登录信息提供给第二终端,相比告知密码后手动输入密码接入、或扫描二维码的方式接入等方式来说,本实施例提供的方式更为简便,提升了WiFi网络共享的灵活性。而且,本方案仅允许用户的好友接入WiFi网络,相当于给予第一终端用户一定程度上的控制权,避免WiFi网络共享后陌生人随意蹭网、占用共享资源。According to the terminal for sharing WiFi network login information provided in this embodiment, a point-to-point wireless transmission channel is pre-established between the terminals. When the second terminal requests to access the WiFi network, the first terminal judges whether the second terminal user belongs to The user friend list of the first terminal user determines whether to allow the second terminal to access the WiFi network. If allowed, the login information of the WiFi network is provided to the second terminal through point-to-point wireless transmission. Compared with manually entering the password after being informed of the password In terms of access, or access by scanning a two-dimensional code, the method provided by this embodiment is more convenient and improves the flexibility of WiFi network sharing. Moreover, this solution only allows the user's friends to access the WiFi network, which is equivalent to giving the first terminal user a certain degree of control, preventing strangers from randomly scrambling the Internet and occupying shared resources after the WiFi network is shared.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的用于分享WiFi网络登录信息的终端、服务器及系统中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the terminals, servers and systems for sharing WiFi network login information according to embodiments of the present invention Some or all of the features of the component. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.
本发明公开了:The present invention discloses:
A1、一种WiFi网络登录信息的分享方法,其包括:A1, a method for sharing WiFi network login information, which includes:
获取第一终端用户预先设置的WiFi网络的登录信息以及所述第一终端用户的用户好友列表;Acquiring the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user;
判断请求连接所述WiFi网络的第二终端对应的第二终端用户是否属于所述第一终端用户的用户好友列表,若是,则将所述WiFi网络的登录信息提供给第二终端以供所述第二终端登录所述WiFi网络。Judging whether the second terminal user corresponding to the second terminal requesting to connect to the WiFi network belongs to the user friend list of the first terminal user, and if so, providing the login information of the WiFi network to the second terminal for the The second terminal logs into the WiFi network.
A2、根据A1所述的方法,其中,所述第一终端用户的用户好友列表是通过调用所述第一终端上安装的通信录和/或即时通讯软件提供的接口得到的。A2. The method according to A1, wherein the user friend list of the first terminal user is obtained by calling an interface provided by an address book and/or instant messaging software installed on the first terminal.
A3、根据A1或A2所述的方法,其中,所述获取第一终端用户预先设置的WiFi网络的登录信息以及所述第一终端用户的用户好友列表进一步为:获取所述第一终端上传到服务器端的所述WiFi网络的登录信息以及所述第一终端用户的用户好友列表;A3. The method according to A1 or A2, wherein the obtaining the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user is further: obtaining the first terminal uploaded to The login information of the WiFi network at the server end and the user friend list of the first terminal user;
在服务器端获取到所述WiFi网络的登录信息以及所述第一终端用户的用户好友列表之后,所述方法还包括:接收所述第二终端向服务器端发起的连接所述WiFi网络的请求;After the server acquires the login information of the WiFi network and the user friend list of the first terminal user, the method further includes: receiving a request from the second terminal to the server to connect to the WiFi network;
所述将WiFi网络的登录信息提供给第二终端进一步为:由服务器端将WiFi网络的登录信息下发给第二终端。The providing the login information of the WiFi network to the second terminal further includes: the server sends the login information of the WiFi network to the second terminal.
A4、根据A3所述的方法,其中,所述方法还包括:在探测到所述第二终端离开所述WiFi网络覆盖区域时,删除所述第二终端中的所述WiFi网络的登录信息。A4. The method according to A3, wherein the method further includes: deleting the login information of the WiFi network in the second terminal when it is detected that the second terminal leaves the coverage area of the WiFi network.
A5、根据A1或A2所述的方法,其中,在所述获取第一终端用户预先设置的WiFi网络的登录信息以及所述第一终端用户的用户好友列表之前,所述方法还包括:接收所述第二终端向服务器端发起的连接所述WiFi网络的请求;根据所述连接WiFi网络的请求向第一终端发送获取WiFi网络的登录信息的请求;A5. The method according to A1 or A2, wherein, before acquiring the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user, the method further includes: receiving the A request for connecting to the WiFi network initiated by the second terminal to the server; sending a request for obtaining login information of the WiFi network to the first terminal according to the request for connecting to the WiFi network;
所述获取第一终端用户预先设置的WiFi网络的登录信息以及所述第一终端用户的用户好友列表进一步为:获取所述第一终端响应所述获取WiFi网络的登录信息的请求上传到服务器端的所述WiFi网络的登录信息以及所述第一终端用户的用户好友列表;The obtaining the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user is further: obtaining the first terminal uploaded to the server in response to the request for obtaining the login information of the WiFi network The login information of the WiFi network and the user friend list of the first terminal user;
所述将WiFi网络的登录信息提供给第二终端进一步为:由服务器端将WiFi网络的登录信息下发给第二终端。The providing the login information of the WiFi network to the second terminal further includes: the server sends the login information of the WiFi network to the second terminal.
A6、根据A5所述的方法,其中,所述方法还包括:在探测到所述第二终端离开所述WiFi网络覆盖区域时,删除所述第二终端和服务器端的所述WiFi网络的登录信息。A6. The method according to A5, wherein the method further includes: when detecting that the second terminal leaves the coverage area of the WiFi network, deleting the login information of the WiFi network of the second terminal and the server .
A7、根据A1或A2所述的方法,其中,所述将WiFi网络的登录信息提供给第二终端进一步为:由第一终端通过点对点无线传输的方式将WiFi网络的登录信息提供给所述第二终端。A7. The method according to A1 or A2, wherein the providing the login information of the WiFi network to the second terminal is further: the first terminal provides the login information of the WiFi network to the second terminal through point-to-point wireless transmission Two terminals.
本发明还公开了:The invention also discloses:
B8、一种用于分享WiFi网络登录信息的服务器,其包括:B8. A server for sharing WiFi network login information, which includes:
第一接收模块,适于获取第一终端用户预先设置的WiFi网络的登录信息以及所述第一终端用户的用户好友列表;The first receiving module is adapted to obtain the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user;
判断模块,适于判断请求连接所述WiFi网络的第二终端对应的第二终端用户是否属于所述第一终端用户的用户好友列表;The judging module is adapted to judge whether the second terminal user corresponding to the second terminal requesting to connect to the WiFi network belongs to the user friend list of the first terminal user;
发送模块,适于若所述判断模块判断出所述第二终端用户属于所述第一终端用户的用户好友列表,则将所述WiFi网络的登录信息提供给第二终端以供所述第二终端登录所述WiFi网络。The sending module is adapted to provide the login information of the WiFi network to the second terminal for the second terminal user if the judging module judges that the second terminal user belongs to the user friend list of the first terminal user. The terminal logs into the WiFi network.
B9、根据B8所述的服务器,其中,还包括:第二接收模块,适于接收所述第二终端向服务器端发起的连接所述WiFi网络的请求。B9. The server according to B8, further comprising: a second receiving module adapted to receive a request from the second terminal to the server to connect to the WiFi network.
B10、根据B9所述的服务器,其中,还包括:请求模块,适于在所述第二接收模块接收到所述第二终端发起的连接所述WiFi网络的请求之后,根据所述连接WiFi网络的请求向第一终端发送获取WiFi网络的登录信息的请求;B10. The server according to B9, further comprising: a requesting module adapted to, according to the connection to the WiFi network, after the second receiving module receives the request initiated by the second terminal to connect to the WiFi network sending a request to the first terminal to obtain the login information of the WiFi network;
所述第一接收模块进一步适于:获取所述第一终端响应所述获取WiFi网络的登录信息的请求上传到服务器端的所述WiFi网络的登录信息以及所述第一终端用户的用户好友列表。The first receiving module is further adapted to: obtain the login information of the WiFi network uploaded to the server by the first terminal in response to the request for obtaining login information of the WiFi network and the user friend list of the first terminal user.
B11、根据B10所述的服务器,其中,还包括:删除模块,适于在探测到第二终端离开所述WiFi网络覆盖区域时,删除服务器端的所述WiFi网络的登录信息。B11. The server according to B10, further comprising: a deletion module adapted to delete the login information of the WiFi network at the server end when it is detected that the second terminal leaves the coverage area of the WiFi network.
本发明还公开了:The invention also discloses:
C12、一种用于分享WiFi网络登录信息的系统,其包括:B8-B11任一项所述的用于分享WiFi网络登录信息的服务器,以及第一终端和第二终端。C12. A system for sharing WiFi network login information, which includes: the server for sharing WiFi network login information described in any one of B8-B11, and a first terminal and a second terminal.
C13、根据C12所述的系统,其中,所述第一终端具体适于:通过调用所述第一终端上安装的通信录和/或即时通讯软件提供的接口得到所述第一终端用户的用户好友列表。C13. The system according to C12, wherein the first terminal is specifically adapted to: obtain the user name of the first terminal user by invoking the interface provided by the address book and/or instant messaging software installed on the first terminal Friends List.
C14、根据C12所述的系统,其中,所述第二终端具体适于:在探测到所述第二终端离开所述WiFi网络覆盖区域时,删除所述第二终端中的所述WiFi网络的登录信息。C14. The system according to C12, wherein the second terminal is specifically adapted to: delete the WiFi network in the second terminal when it is detected that the second terminal leaves the coverage area of the WiFi network login information.
本发明还公开了:The invention also discloses:
D15、一种用于分享WiFi网络登录信息的终端,其包括:D15. A terminal for sharing WiFi network login information, comprising:
获取模块,适于获取第一终端用户预先设置的WiFi网络的登录信息以及所述第一终端用户的用户好友列表;The obtaining module is adapted to obtain the login information of the WiFi network preset by the first terminal user and the user friend list of the first terminal user;
判断模块,适于判断请求连接所述WiFi网络的第二终端对应的第二终端用户是否属于所述第一终端用户的用户好友列表;The judging module is adapted to judge whether the second terminal user corresponding to the second terminal requesting to connect to the WiFi network belongs to the user friend list of the first terminal user;
发送模块,适于若所述判断模块判断出所述第二终端用户属于所述第一终端用户的用户好友列表,则将所述WiFi网络的登录信息提供给第二终端以供所述第二终端登录所述WiFi网络。The sending module is adapted to provide the login information of the WiFi network to the second terminal for the second terminal user if the judging module judges that the second terminal user belongs to the user friend list of the first terminal user. The terminal logs into the WiFi network.
D16、根据D15所述的终端,其中,所述获取模块进一步适于:通过调用所述第一终端上安装的通信录和/或即时通讯软件提供的接口得到所述第一终端用户的用户好友列表。D16. The terminal according to D15, wherein the obtaining module is further adapted to: obtain the user friends of the first terminal user by invoking an address book installed on the first terminal and/or an interface provided by instant messaging software list.
D17、根据D15所述的终端,其中,所述发送模块进一步适于:通过点对点无线传输的方式将WiFi网络的登录信息提供给所述第二终端。D17. The terminal according to D15, wherein the sending module is further adapted to: provide the login information of the WiFi network to the second terminal through point-to-point wireless transmission.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510377017.3A CN104955048A (en) | 2015-06-30 | 2015-06-30 | WiFi (wireless fidelity) network login information sharing method, server, terminal and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510377017.3A CN104955048A (en) | 2015-06-30 | 2015-06-30 | WiFi (wireless fidelity) network login information sharing method, server, terminal and system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN104955048A true CN104955048A (en) | 2015-09-30 |
Family
ID=54169323
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510377017.3A Pending CN104955048A (en) | 2015-06-30 | 2015-06-30 | WiFi (wireless fidelity) network login information sharing method, server, terminal and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104955048A (en) |
Cited By (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105188024A (en) * | 2015-10-29 | 2015-12-23 | 小米科技有限责任公司 | Method, apparatus and system for accessing network |
| CN105227561A (en) * | 2015-10-14 | 2016-01-06 | 上海斐讯数据通信技术有限公司 | A kind of network access authentication is anti-rubs network method and device |
| CN105516170A (en) * | 2015-12-24 | 2016-04-20 | 北京金山安全软件有限公司 | Wi-Fi hotspot information sharing and connecting method and device and electronic equipment |
| CN105792197A (en) * | 2016-02-26 | 2016-07-20 | 上海斐讯数据通信技术有限公司 | WIFI password sharing method and system |
| CN105873049A (en) * | 2016-01-18 | 2016-08-17 | 上海连尚网络科技有限公司 | Method and equipment for obtaining shared wireless access point |
| CN105898705A (en) * | 2016-06-24 | 2016-08-24 | 维沃移动通信有限公司 | Method for controlling scanning frequency of wireless local area network and mobile terminal |
| CN107071690A (en) * | 2015-10-16 | 2017-08-18 | 联想(新加坡)私人有限公司 | Automatic network for authorized personal device is shared |
| CN107295517A (en) * | 2017-07-26 | 2017-10-24 | 上海斐讯数据通信技术有限公司 | A kind of wireless network connecting method and system, wireless router |
| CN108156647A (en) * | 2017-12-19 | 2018-06-12 | 北京小米移动软件有限公司 | Password acquisition methods and device |
| CN108391270A (en) * | 2018-03-20 | 2018-08-10 | 上海与德科技有限公司 | The sharing method and system of a kind of data processing method, WIFI passwords |
| CN109302705A (en) * | 2018-11-27 | 2019-02-01 | 深圳声笑科技有限公司 | WiFi sharing method, device and storage medium based on block chain |
| CN109660986A (en) * | 2017-10-10 | 2019-04-19 | 昆山研达电脑科技有限公司 | The sharing apparatus and method of WiFi network log-on message |
| CN110691397A (en) * | 2018-07-05 | 2020-01-14 | 腾讯科技(深圳)有限公司 | WIFI sharing method, WIFI connection device and computer-readable storage medium |
| CN111901445A (en) * | 2020-09-08 | 2020-11-06 | 上海连尚网络科技有限公司 | Method and equipment for inquiring password of wireless access point |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103327644A (en) * | 2013-05-24 | 2013-09-25 | 华为技术有限公司 | Method and equipment for wireless connection |
| US20140010225A1 (en) * | 2011-03-12 | 2014-01-09 | Alexander Puregger | Method and system for providing a distributed wireless network service |
| CN104159226A (en) * | 2014-07-24 | 2014-11-19 | 小米科技有限责任公司 | Network connection method and device |
| CN104468565A (en) * | 2014-12-08 | 2015-03-25 | 农革 | WiFi hot spot login method and system |
-
2015
- 2015-06-30 CN CN201510377017.3A patent/CN104955048A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20140010225A1 (en) * | 2011-03-12 | 2014-01-09 | Alexander Puregger | Method and system for providing a distributed wireless network service |
| CN103327644A (en) * | 2013-05-24 | 2013-09-25 | 华为技术有限公司 | Method and equipment for wireless connection |
| CN104159226A (en) * | 2014-07-24 | 2014-11-19 | 小米科技有限责任公司 | Network connection method and device |
| CN104468565A (en) * | 2014-12-08 | 2015-03-25 | 农革 | WiFi hot spot login method and system |
Cited By (20)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105227561A (en) * | 2015-10-14 | 2016-01-06 | 上海斐讯数据通信技术有限公司 | A kind of network access authentication is anti-rubs network method and device |
| CN107071690A (en) * | 2015-10-16 | 2017-08-18 | 联想(新加坡)私人有限公司 | Automatic network for authorized personal device is shared |
| CN107071690B (en) * | 2015-10-16 | 2021-09-07 | 联想(新加坡)私人有限公司 | Automatic network sharing for authorized personal devices |
| CN105188024A (en) * | 2015-10-29 | 2015-12-23 | 小米科技有限责任公司 | Method, apparatus and system for accessing network |
| CN105188024B (en) * | 2015-10-29 | 2019-06-14 | 小米科技有限责任公司 | Access the method, apparatus and system of network |
| CN105516170A (en) * | 2015-12-24 | 2016-04-20 | 北京金山安全软件有限公司 | Wi-Fi hotspot information sharing and connecting method and device and electronic equipment |
| US10299191B2 (en) | 2016-01-18 | 2019-05-21 | Shanghai Lianshang Network Technology Co., Ltd. | Method and device for establishing wireless connection |
| CN105873049A (en) * | 2016-01-18 | 2016-08-17 | 上海连尚网络科技有限公司 | Method and equipment for obtaining shared wireless access point |
| CN105873049B (en) * | 2016-01-18 | 2017-12-22 | 上海连尚网络科技有限公司 | A kind of method, equipment, system and storage medium for being used to share WAP |
| CN105792197A (en) * | 2016-02-26 | 2016-07-20 | 上海斐讯数据通信技术有限公司 | WIFI password sharing method and system |
| CN105898705A (en) * | 2016-06-24 | 2016-08-24 | 维沃移动通信有限公司 | Method for controlling scanning frequency of wireless local area network and mobile terminal |
| CN105898705B (en) * | 2016-06-24 | 2019-06-07 | 维沃移动通信有限公司 | A kind of method and mobile terminal of the scan frequency controlling WLAN |
| CN107295517A (en) * | 2017-07-26 | 2017-10-24 | 上海斐讯数据通信技术有限公司 | A kind of wireless network connecting method and system, wireless router |
| CN109660986A (en) * | 2017-10-10 | 2019-04-19 | 昆山研达电脑科技有限公司 | The sharing apparatus and method of WiFi network log-on message |
| CN108156647A (en) * | 2017-12-19 | 2018-06-12 | 北京小米移动软件有限公司 | Password acquisition methods and device |
| CN108391270A (en) * | 2018-03-20 | 2018-08-10 | 上海与德科技有限公司 | The sharing method and system of a kind of data processing method, WIFI passwords |
| CN110691397A (en) * | 2018-07-05 | 2020-01-14 | 腾讯科技(深圳)有限公司 | WIFI sharing method, WIFI connection device and computer-readable storage medium |
| CN110691397B (en) * | 2018-07-05 | 2021-10-22 | 腾讯科技(深圳)有限公司 | WIFI sharing method, WIFI connection device and computer-readable storage medium |
| CN109302705A (en) * | 2018-11-27 | 2019-02-01 | 深圳声笑科技有限公司 | WiFi sharing method, device and storage medium based on block chain |
| CN111901445A (en) * | 2020-09-08 | 2020-11-06 | 上海连尚网络科技有限公司 | Method and equipment for inquiring password of wireless access point |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104955048A (en) | WiFi (wireless fidelity) network login information sharing method, server, terminal and system | |
| US8032925B2 (en) | Method for enabling login and establishing session for wireless communication terminal | |
| CN104135563B (en) | A kind of communication processing method and system | |
| KR101512109B1 (en) | Apparatuses, methods, and computer-readable media for providing context information | |
| US10334397B2 (en) | Interaction tracking and organizing system | |
| US10129412B1 (en) | Establishing and maintaining a VOIP call | |
| US20130290494A1 (en) | Session management for communication in a heterogeneous network | |
| CN105813071B (en) | Traffic sharing method, device and terminal | |
| CN102257839A (en) | Method and system for providing wireless communication between user equipments | |
| CN105898181A (en) | Video conversation system and method and related equipment | |
| US9276964B2 (en) | Method and user terminal for supporting provision of capabilities | |
| CN104935500B (en) | Friend recommendation method and device based on network call | |
| CN104967995A (en) | A method, client and server for obtaining WIFI network password | |
| EP3245802B1 (en) | Method and device for facilitating restricted proximity discovery of an application user | |
| US20160294833A1 (en) | Social communication system and method thereof | |
| JP4287363B2 (en) | IP telephone system and communication control method thereof | |
| KR101641166B1 (en) | Apparatus and system for providing lettering service | |
| CN105228024A (en) | Set-top box users exchange method | |
| JP5453063B2 (en) | Access control device and representative number incoming call control system | |
| CN110809330A (en) | Multi-terminal connection establishing method and device, storage medium and electronic device | |
| KR20150062256A (en) | Method for contents sharing service and server applied to the same | |
| US10142277B2 (en) | Posting and consultation of messages by users of social networks | |
| WO2016146036A1 (en) | Information sharing method, mobile terminal and information sharing system | |
| TWI760384B (en) | Electronic device recognizing system, method and electronic device | |
| CN117082478A (en) | Bluetooth connection switching method, electronic equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150930 |
|
| RJ01 | Rejection of invention patent application after publication |