WO2015172436A1 - Terminal mutual-discovery method and device - Google Patents

Terminal mutual-discovery method and device Download PDF

Info

Publication number
WO2015172436A1
WO2015172436A1 PCT/CN2014/083296 CN2014083296W WO2015172436A1 WO 2015172436 A1 WO2015172436 A1 WO 2015172436A1 CN 2014083296 W CN2014083296 W CN 2014083296W WO 2015172436 A1 WO2015172436 A1 WO 2015172436A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
information
mac address
contact relationship
contact
Prior art date
Application number
PCT/CN2014/083296
Other languages
French (fr)
Chinese (zh)
Inventor
曾慧鹏
张百胜
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015172436A1 publication Critical patent/WO2015172436A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management

Definitions

  • the invention relates to a smart terminal including an Android (Android) smart phone, a wireless fidelity (Wifi) hotspot, and a cloud server.
  • the smart terminal generally has an Internet access capability and a WiFi function, and the Wifi hotspot has a certain coverage.
  • the scope can be scanned by the intelligent terminal through the 802.11 protocol Probe Request frame, and the hotspot also broadcasts a beacon frame.
  • the cloud server is an Internet-based connection commonly used in mobile Internet.
  • a background server that provides cloud data storage and mining services. BACKGROUND OF THE INVENTION
  • Android smartphones have become very popular, and such terminals have functions such as a call, a Global Positioning System (GPS), a mobile data service, and a WiFi.
  • GPS Global Positioning System
  • WiFi Wireless Fidelity
  • Satellite positioning indoor positioning such as shopping malls, cafes, etc. cannot use satellite positioning;
  • the base station signal is required to be good, and the positioning accuracy is too poor, and the coverage is too large;
  • WiFi positioning It also needs to rely on the Internet connection.
  • the embodiments of the present invention provide a terminal mutual discovery method and device, which can better solve the terminal mutual discovery problem.
  • a terminal mutual discovery method includes:
  • the wireless hotspot obtains terminal information of the terminal within its coverage
  • At least one terminal having the contact relationship is notified, and the terminal information having the contact relationship is carried.
  • the step of the wireless hotspot acquiring the terminal information of the terminal in its coverage includes:
  • the wireless hotspot listening to the terminal broadcast frame sent by the terminal The wireless hotspot listening to the terminal broadcast frame sent by the terminal;
  • the terminal information includes a mutual discovery service identifier and a terminal MAC address
  • the wireless hotspot determines the location according to the mutual discovery service identifier.
  • the terminal is a mutual discovery service terminal, and the terminal MAC address is written into the MAC address pool.
  • the step of searching for a contact relationship between the terminals in the database according to the obtained terminal information includes:
  • the wireless hotspot sends the terminal MAC address in the MAC address pool to the server;
  • the server uses the contact relationship list between the terminals pre-stored in the database to find the terminal MAC address of the contact relationship in the received terminal MAC address, and sends the MAC address of the contact relationship to the wireless hotspot.
  • a terminal mutual discovery method includes:
  • the terminal sends a terminal broadcast frame carrying the terminal information
  • the terminal information having the contact relationship found by the wireless hotspot according to the terminal information that is heard is received.
  • the above method further includes: The terminal searches for the contact information corresponding to the terminal information in the local database, and displays the found contact information.
  • a terminal mutual discovery device applied to a wireless hotspot, includes:
  • a terminal information acquiring module configured to acquire terminal information of a terminal in a coverage area of the wireless hotspot
  • a contact relationship finding module configured to: in the database, look up whether there is a contact relationship between the terminals according to the acquired terminal information;
  • the contact relationship notification module is configured to notify the at least one terminal having the contact relationship when the contact relationship exists, and carry the terminal information having the contact relationship.
  • the terminal information acquiring module is configured to: listen to a terminal broadcast frame sent by the terminal, and parse the intercepted terminal broadcast frame to obtain terminal information of the terminal.
  • the terminal information includes a mutual discovery service identifier and a terminal MAC address
  • the terminal information acquiring module is further configured to: after acquiring terminal information of the terminal in the coverage of the wireless hotspot, according to the mutual discovery service identifier And determining that the terminal is a mutual discovery service terminal, and writing the terminal MAC address to the MAC address pool.
  • the contact relationship searching module sends the terminal MAC address in the MAC address pool to the server, and receives the terminal MAC address of the contact relationship that is found and sent by the server, where the server uses the database.
  • a terminal mutual discovery device applied to a WIFI terminal, includes:
  • a sending module configured to send a terminal broadcast frame carrying the terminal information
  • a receiving module configured to receive terminal information with a contact relationship that is found by the wireless hotspot according to the detected terminal information
  • the above apparatus further includes:
  • the query module is configured to search for contact information corresponding to the terminal information in the local database, and display the found contact information.
  • Embodiments of the present invention also provide a computer program, including program instructions, when the program instructions are When the wireless hotspot is executed, the wireless hotspot is enabled to perform the above method.
  • the embodiment of the invention further provides a computer program, comprising program instructions, when the program instruction is executed by the terminal, so that the terminal can execute the above method.
  • Embodiments of the present invention also provide a carrier carrying the above computer program.
  • the embodiments of the present invention can implement mutual discovery of terminals in a coverage area by using a wireless hotspot.
  • 1 is a first schematic block diagram of a method for mutual discovery of a terminal according to an embodiment of the present invention
  • FIG. 2 is a second schematic block diagram of a method for discovering a mutual terminal of a terminal according to an embodiment of the present invention
  • FIG. 3 is a first block diagram of a terminal mutual discovery device according to an embodiment of the present invention.
  • FIG. 4 is a second block diagram of a terminal mutual discovery device according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a wireless mutual connection-based offline mutual discovery mechanism implemented by multiple Android terminals according to an embodiment of the present invention
  • FIG. 6 is a flowchart of establishing a local (contact) database according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of a framework for implementing a mutual discovery system based on a wireless hotspot without a network according to an embodiment of the present invention
  • FIG. 8 is a flowchart of mutual discovery when there is no network connection according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of a terminal contact discovery interface according to an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a format of a probe request frame for adding a flag flag according to an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of a beacon beacon frame data format extended by adding a Flag flag bit and a MAC address according to an embodiment of the present invention.
  • BEST MODE FOR CARRYING OUT THE INVENTION FIG. 1 is a first schematic block diagram of a method for mutual discovery of a terminal according to an embodiment of the present invention. As shown in FIG. 1 , the method includes:
  • Step S101 The wireless hotspot acquires terminal information of the terminal within its coverage.
  • the wireless hotspot listens to the terminal broadcast frame sent by the terminal, and parses the intercepted terminal broadcast frame to obtain the terminal information of the terminal.
  • the terminal information includes a mutual discovery service identifier and a terminal media access control (MAC) address.
  • the wireless hotspot determines that the terminal is a mutual discovery service terminal according to the mutual discovery service flag, and writes the terminal MAC address into the MAC address pool.
  • Step S102 Search for a contact relationship between the terminals in the database according to the obtained terminal information.
  • the wireless hotspot sends the terminal MAC address in the MAC address pool to the server, and the server uses the contact relationship list between the terminals pre-stored in the database to find the terminal with the contact relationship in the received terminal MAC address.
  • the MAC address and sends the MAC address of the contact relationship to the wireless hotspot.
  • Step S103 If there is a contact relationship, notify at least one terminal having a contact relationship, and carry terminal information having a contact relationship.
  • the wireless hotspot listening terminal A sends a terminal broadcast frame carrying the terminal MAC address in a broadcast form, and finds the terminal B with the contact relationship in the wireless hotspot coverage in the database according to the terminal MAC address of the terminal A.
  • the wireless hotspot broadcasts the found terminal MAC address of the terminal B and the terminal MAC address of the terminal C in the optional extension field of the hotspot broadcast frame, so that the terminal A receives and displays the corresponding contact information.
  • the wireless hotspot may also broadcast the terminal MAC address of the terminal A in an optional extension field of the hotspot broadcast frame, so that the terminal B and/or the terminal C receive and display the contact information corresponding to the terminal A.
  • FIG. 2 is a second schematic block diagram of a method for discovering a mutual terminal of a terminal according to an embodiment of the present invention. As shown in FIG. 2, the steps include:
  • Step S201 The terminal sends a terminal broadcast frame carrying the terminal information.
  • Step S202 Receive terminal information with a contact relationship that is found by the wireless hotspot according to the detected terminal information.
  • the method further includes:
  • Step S203 The terminal searches for the contact information corresponding to the terminal information in the local database, and displays the found contact information.
  • the terminal information includes a mutual discovery service flag and a terminal MAC address.
  • the terminal local database pre-stores the correspondence between the contact information and the terminal MAC address. After the terminal obtains the MAC address of the terminal with the contact relationship, the terminal sends the acquired terminal MAC address with the contact relationship to the contact application through the middle layer service.
  • the contact application finds the corresponding contact information through the correspondence between the pre-stored contact information and the terminal MAC address, and reminds the terminal user through the user interface.
  • FIG. 3 is a first block diagram of a terminal mutual discovery device according to an embodiment of the present invention. As shown in FIG. 3, the terminal information acquiring module 31, the contact relationship searching module 32, and the contact relationship notification module 33 are included. among them:
  • the terminal information acquiring module 31 acquires the terminal information of the terminal in the wireless hotspot coverage area.
  • the terminal information acquiring module 31 listens to the terminal broadcast frame sent by the terminal, and parses the intercepted terminal broadcast frame.
  • the contact relationship searching module 32 searches the database for the contact relationship between the terminals according to the obtained terminal information. Preferably, the contact relationship searching module 32 sets the terminal MAC in the MAC address pool. The address is sent to the server, and the server uses the contact relationship list between the terminals pre-stored in the database to find the terminal MAC address of the contact relationship in the received terminal MAC address, and finds the existing contact relationship. The terminal MAC address is sent to the contact relationship lookup module 32.
  • the contact relationship notification module 33 notifies the at least one terminal having the contact relationship when the contact relationship exists, and carries the terminal information having the contact relationship.
  • 4 is a second block diagram of a terminal mutual discovery device according to an embodiment of the present invention. As shown in FIG. 4, the method includes: a sending module 41, a receiving module 42, and a query module 43, where:
  • the transmitting module 41 transmits a terminal broadcast frame carrying the terminal information.
  • the receiving module 42 receives the terminal information with the contact relationship found by the wireless hotspot according to the detected terminal information.
  • the query module 43 searches the local database for contact information corresponding to the terminal information, and displays the found contact information.
  • the transmitting module 41 transmits a terminal broadcast frame carrying the mutual discovery service flag and the terminal MAC address.
  • the terminal information acquiring module 31 detects the broadcast frame of the terminal, determining, according to the mutual discovery service flag in the broadcast frame of the terminal, that the terminal has or supports the terminal mutual discovery service function, and writes the terminal MAC address.
  • MAC address pool After the terminal information acquiring module 31 detects the broadcast frame of the terminal, determining, according to the mutual discovery service flag in the broadcast frame of the terminal, that the terminal has or supports the terminal mutual discovery service function, and writes the terminal MAC address. MAC address pool.
  • the contact relationship searching module 31 sends the terminal MAC address in the MAC address pool to the server, and the server selects the contact person in the terminal MAC address sent by the wireless hotspot by using the contact relationship list between the terminals prestored in the database.
  • the terminal MAC address of the relationship, and the selected terminal MAC address with the contact relationship is sent to the wireless hotspot.
  • the contact relationship notification module 33 broadcasts the found terminal MAC address having the contact relationship to notify at least one end user having the contact relationship.
  • the query module 43 determines the corresponding contact information by querying the local database, and reminds the terminal user of the contact person located in the vicinity through the user interface.
  • the embodiment of the invention further provides a computer program, comprising program instructions, when the program instruction is executed by a wireless hotspot, so that the wireless hotspot can perform the above method.
  • the embodiment of the invention further provides a computer program, comprising program instructions, when the program instruction is executed by the terminal, so that the terminal can execute the above method.
  • Embodiments of the present invention also provide a carrier carrying the above computer program.
  • Similar technologies include WiFi positioning and base station positioning, but have the disadvantages of relying on network and poor positioning accuracy.
  • the solution to the problem in the embodiment of the present invention is complementary to the current technology, and can fill a function gap.
  • the WiFi scanning function of the terminal can be used to discover a terminal that is related to itself in a scenario where the WiFi is not connected and there is no Internet and no GPS, so as to find nearby friends (ie, the terminal offline mode realizes terminal mutual discovery), such as
  • a plurality of Android terminals shown in FIG. 5 implement a schematic diagram of an offline mutual discovery mechanism based on WiFi connectionless.
  • the program mainly includes the following contents:
  • A. Contact application Responsible for UI display, contact management, and mutual discovery service control.
  • WiFi module transformation Broadcast frames carry mutual discovery service support information.
  • A. Contact cloud server Implement contact registration query and MAC address filtering.
  • Cloud Database Stores all contact information using cloud services.
  • WiFi module modification It can identify the broadcast frame of the client supporting the mutual discovery service and record its MAC address. Support for broadcasting the filtered MAC address.
  • MAC address filtering module and the cloud server query the list of MAC addresses suitable for mutual discovery in the MAC address pool.
  • the terminal holder obtains the contact MAC address data.
  • This process can be carried out at any time during the use of the network with the support of the terminal. It is guaranteed to build a database with a contact list, mobile phone number and MAC address locally, and support offline query.
  • This process does not require a WiFi connection without the support of the Internet and location system, and only discovers other contacts within the same WiFi hotspot coverage through the 802.11 scan discovery protocol. People.
  • the terminal holder obtains the contact MAC address data.
  • Step 6 the local (contact) database is established.
  • the contact person is connected to the cloud server in the environment with the network at home, and the identity and the MAC address obtained from the WiFI driver.
  • Step 1 Initiate registration with the contact cloud server (step 24).
  • the contact cloud server records the user identity and MAC address.
  • the terminal provides the contact ID (phone number), queries the other party's MAC address, and the cloud service synchronizes their contact status. (Step 3456)
  • Step 78 The terminal receives the MAC address of the cloud contact and saves the contact's MAC address list to the local database.
  • the WiFi is turned on.
  • the terminal side carries the mutual discovery service flag and the MAC address in the scan (request) frame through the WiFi broadcast (step 1).
  • the specific implementation method of this step is as shown in FIG. 10, which is a schematic diagram of a probe request frame format for adding a flag flag, and 802.11 defines The mobile terminal uses the Probe Request frame to detect which 802.11 network is currently covered by the request frame.
  • the default Probe Request is already attached with the MAC address of the local device.
  • only the service flag needs to be added, as shown in Figure 10, in the probe Request. Adding the F flag indicates that the terminal has a mutual discovery service.
  • the wireless hotspot determines that the mutual discovery service terminal exists, and writes its MAC address into the MAC address pool (step 2).
  • the MAC address pool collects the Probe Request frame with the F flag bit received in the most recent period (such as 5 minutes). MAC address in . Because the number of MAC addresses that can be collected is high, you may not be able to carry all the data in the MAC address pool when you broadcast the beacon frame. Therefore, you must filter and filter the data in the entire MAC address pool.
  • the filtering process is implemented by the background service of the wireless hotspot, and the background service sends the detected MAC address pool to the cloud server according to a certain frequency (for example, 5 minutes) (step 3), and the latter searches the contact cloud database for the MAC list. There is a contact relationship MAC address and MAC The MAC addresses of the friends in the address pool are filtered out. The resulting MAC address will be very small and can be fed back to the wireless hotspot background service (step 4) for broadcast.
  • a certain frequency for example, 5 minutes
  • the wireless hotspot puts the filtered MAC address set into the optional extension field of the beacon frame.
  • the layout is as shown in FIG. 11 and the beaconframe data format of the extended flag and the MAC address is extended to ensure the broadcast frame is compatible. Ordinary WiFi terminal and the frame size is not too large.
  • the wireless terminal receives the hotspot broadcast frame through the WiFi chip, and collects the MAC address set in the upper frame data, and then reports the result to the contact application through the middle layer service such as wpa-supplicant and WifiService (step 8), the contact application.
  • the program can know which contacts are nearby by querying the local database (step 9), and remind the end user through the UI, as shown in FIG.
  • the embodiment of the present invention utilizes the WiFi scanning function of the intelligent terminal to discover an intelligent terminal that is related to itself in an offline scenario, thereby finding a nearby friend.
  • the embodiment of the present invention can utilize the WiFi function of the WiFi device to realize mutual discovery of the terminal and find nearby contacts.
  • the embodiments of the present invention can implement mutual discovery of terminals in a coverage area through a wireless hotspot.

Abstract

Disclosed in an embodiment of the present invention are a terminal mutual-discovery method and device, the method comprising: a WiFi hot spot acquires the terminal information of terminals within the coverage of the hot spot (S101); according to the obtained terminal information, searching a database to determine whether a contact person relationship exists between the terminals (S102); if yes, then notifying at least one terminal having the contact person relationship, and carrying the terminal information having the contact person relationships (S103). Via the WiFi scanning function of a terminal, the embodiment of the present invention enables the terminal to discover nearby smart terminals having relationships therewith in an offline scenario, thus finding nearby friends.

Description

一种终端互发现方法及装置 技术领域  Terminal mutual discovery method and device
本发明涉及包括安卓( Android )智能手机等智能终端、无线保真( Wireless Fidelity, Wifi ) 热点、 云服务器, 其中, 所述智能终端普遍具备互联网接入 能力和 WiFi功能, Wifi热点具备一定的覆盖范围,可以被智能终端通过 802.11 协议的探测请求( Probe Request )帧扫描到, 同时热点也会发信标帧(beacon frame )广播自己, 云服务器是目前移动互联网普遍应用的一种基于互联网连 接的后台服务器, 它提供云端的数据存储和挖掘服务。 背景技术 目前 Android智能手机已经非常普及, 此类终端具备通话、 全球定位系 统( Global Positioning System, GPS ) 、 移动数据业务、 WiFi等功能。 智能 终端上也普遍拥有通过互联网和 GPS定位构建的联系人发现服务, 如微信的 雷达服务。  The invention relates to a smart terminal including an Android (Android) smart phone, a wireless fidelity (Wifi) hotspot, and a cloud server. The smart terminal generally has an Internet access capability and a WiFi function, and the Wifi hotspot has a certain coverage. The scope can be scanned by the intelligent terminal through the 802.11 protocol Probe Request frame, and the hotspot also broadcasts a beacon frame. The cloud server is an Internet-based connection commonly used in mobile Internet. A background server that provides cloud data storage and mining services. BACKGROUND OF THE INVENTION Currently, Android smartphones have become very popular, and such terminals have functions such as a call, a Global Positioning System (GPS), a mobile data service, and a WiFi. Contact discovery services built through the Internet and GPS positioning, such as WeChat radar services, are also commonly available on smart terminals.
由于移动数据业务资费的原因, 在很多用户外出后会关闭移动数据业 务, 外界的 WiFi上网需要复杂的配置步骤, 所以互联网是一个不容易获得的 前提条件。  Due to the mobile data service tariff, many users will turn off the mobile data service after going out. The external WiFi access requires complicated configuration steps, so the Internet is a prerequisite that is not easy to obtain.
目前的 GPS技术包括卫星定位, 基站定位和 WiFi定位, 他们各自具有 如下局限性:  Current GPS technologies include satellite positioning, base station positioning, and WiFi positioning, each with the following limitations:
卫星定位: 商场, 咖啡厅等室内场景无法使用卫星定位;  Satellite positioning: indoor positioning such as shopping malls, cafes, etc. cannot use satellite positioning;
基站定位: 要求基站信号好, 且定位精确性太差, 覆盖范围太大; Base station positioning: The base station signal is required to be good, and the positioning accuracy is too poor, and the coverage is too large;
WiFi定位: 也是需要依赖互联网连接的。 WiFi positioning: It also needs to rely on the Internet connection.
综上所述, 目前没有一项技术可以弥补在商场,咖啡厅等室内场景下(离 线)发现其他朋友的技术。 而目前在商场, 咖啡厅的无线 WiFi热点确非常普 及。 发明内容 本发明实施例提供一种终端互发现方法及装置, 能更好地解决终端互发 现问题。 In summary, there is currently no technology that can compensate for the discovery of other friends' technologies in offline scenes such as shopping malls and cafes. At the current shopping malls, the wireless WiFi hotspots in the cafes are very popular. Summary of the invention The embodiments of the present invention provide a terminal mutual discovery method and device, which can better solve the terminal mutual discovery problem.
一种终端互发现方法, 包括:  A terminal mutual discovery method includes:
无线热点获取其覆盖范围内的终端的终端信息;  The wireless hotspot obtains terminal information of the terminal within its coverage;
根据所获取的终端信息, 在数据库中查找所述终端之间是否存在联系人 关系;  Searching, in the database, whether there is a contact relationship between the terminals according to the obtained terminal information;
若存在联系人关系, 则通知具有联系人关系的至少一方终端, 并携带具 有联系人关系的终端信息。  If there is a contact relationship, at least one terminal having the contact relationship is notified, and the terminal information having the contact relationship is carried.
较佳地, 所述的无线热点获取其覆盖范围内的终端的终端信息的步骤包 括:  Preferably, the step of the wireless hotspot acquiring the terminal information of the terminal in its coverage includes:
无线热点侦听终端发送的终端广播帧;  The wireless hotspot listening to the terminal broadcast frame sent by the terminal;
对侦听到的终端广播帧进行解析, 获取终端的终端信息。  Parsing the detected terminal broadcast frame to obtain the terminal information of the terminal.
较佳地, 所述终端信息包括互发现服务标志和终端 MAC地址, 在所述 的无线热点获取其覆盖范围内的终端的终端信息的步骤之后, 无线热点根据 所述互发现服务标志, 确定所述终端是互发现服务终端, 并将所述终端 MAC 地址写入 MAC地址池。  Preferably, the terminal information includes a mutual discovery service identifier and a terminal MAC address, and after the wireless hotspot acquires terminal information of the terminal within the coverage of the wireless hotspot, the wireless hotspot determines the location according to the mutual discovery service identifier. The terminal is a mutual discovery service terminal, and the terminal MAC address is written into the MAC address pool.
较佳地, 所述的根据所获取的终端信息, 在数据库中查找所述终端之间 是否存在联系人关系的步骤包括:  Preferably, the step of searching for a contact relationship between the terminals in the database according to the obtained terminal information includes:
无线热点将 MAC地址池中的终端 MAC地址发送至服务器;  The wireless hotspot sends the terminal MAC address in the MAC address pool to the server;
服务器利用其数据库中预存的终端之间的联系人关系列表, 查找其收到 的终端 MAC地址中存在联系人关系的终端 MAC地址,并将存在联系人关系 的 MAC地址发送至无线热点。  The server uses the contact relationship list between the terminals pre-stored in the database to find the terminal MAC address of the contact relationship in the received terminal MAC address, and sends the MAC address of the contact relationship to the wireless hotspot.
一种终端互发现方法, 包括:  A terminal mutual discovery method includes:
终端发送携带有终端信息的终端广播帧;  The terminal sends a terminal broadcast frame carrying the terminal information;
接收无线热点根据侦听到的所述终端信息而找到的具有联系人关系的终 端信息。  The terminal information having the contact relationship found by the wireless hotspot according to the terminal information that is heard is received.
较佳地, 上述方法还包括: 终端在本地数据库中查找与所述终端信息对应的联系人信息, 并对所找 到的联系人信息进行显示。 Preferably, the above method further includes: The terminal searches for the contact information corresponding to the terminal information in the local database, and displays the found contact information.
一种终端互发现装置, 应用于无线热点, 包括:  A terminal mutual discovery device, applied to a wireless hotspot, includes:
终端信息获取模块, 其设置为获取无线热点覆盖范围内的终端的终端信 息;  a terminal information acquiring module, configured to acquire terminal information of a terminal in a coverage area of the wireless hotspot;
联系人关系查找模块, 其设置为根据所获取的终端信息, 在数据库中查 找所述终端之间是否存在联系人关系; 以及  a contact relationship finding module, configured to: in the database, look up whether there is a contact relationship between the terminals according to the acquired terminal information;
联系人关系通知模块, 其设置为在存在联系人关系时, 通知所述具有联 系人关系的至少一方终端, 并携带具有联系人关系的终端信息。  The contact relationship notification module is configured to notify the at least one terminal having the contact relationship when the contact relationship exists, and carry the terminal information having the contact relationship.
较佳地, 所述终端信息获取模块是设置为: 侦听终端发送的终端广播帧, 并对侦听到的终端广播帧进行解析, 获取终端的终端信息。  Preferably, the terminal information acquiring module is configured to: listen to a terminal broadcast frame sent by the terminal, and parse the intercepted terminal broadcast frame to obtain terminal information of the terminal.
较佳地, 所述终端信息包括互发现服务标志和终端 MAC地址, 所述终 端信息获取模块还设置为: 在获取无线热点覆盖范围内的终端的终端信息的 之后, 根据所述互发现服务标志, 确定所述终端是互发现服务终端, 并将所 述终端 MAC地址写入 MAC地址池。  Preferably, the terminal information includes a mutual discovery service identifier and a terminal MAC address, and the terminal information acquiring module is further configured to: after acquiring terminal information of the terminal in the coverage of the wireless hotspot, according to the mutual discovery service identifier And determining that the terminal is a mutual discovery service terminal, and writing the terminal MAC address to the MAC address pool.
较佳地,所述联系人关系查找模块将 MAC地址池中的终端 MAC地址发 送至服务器, 并接收所述服务器找到并发送的存在联系人关系的终端 MAC 地址, 其中, 所述服务器利用其数据库中预存的终端之间的联系人关系列表, 查找其收到的终端 MAC地址中存在联系人关系的终端 MAC地址。  Preferably, the contact relationship searching module sends the terminal MAC address in the MAC address pool to the server, and receives the terminal MAC address of the contact relationship that is found and sent by the server, where the server uses the database. A list of contact relationships between the pre-stored terminals, and finds the terminal MAC address of the contact relationship in the received terminal MAC address.
一种终端互发现装置, 应用于 WIFI终端, 包括:  A terminal mutual discovery device, applied to a WIFI terminal, includes:
发送模块, 其设置为发送携带有终端信息的终端广播帧; 以及  a sending module, configured to send a terminal broadcast frame carrying the terminal information;
接收模块, 其设置为接收无线热点根据侦听到的所述终端信息而找到的 具有联系人关系的终端信息;  a receiving module, configured to receive terminal information with a contact relationship that is found by the wireless hotspot according to the detected terminal information;
较佳地, 上述装置还包括:  Preferably, the above apparatus further includes:
查询模块, 其设置为在本地数据库中查找与所述终端信息对应的联系人 信息, 并对所找到的联系人信息进行显示。  The query module is configured to search for contact information corresponding to the terminal information in the local database, and display the found contact information.
本发明实施例还提供一种计算机程序, 包括程序指令, 当该程序指令被 无线热点执行时, 使得该无线热点可执行上述方法。 Embodiments of the present invention also provide a computer program, including program instructions, when the program instructions are When the wireless hotspot is executed, the wireless hotspot is enabled to perform the above method.
本发明实施例还提供一种计算机程序, 包括程序指令, 当该程序指令被 终端执行时, 使得该终端可执行上述法。  The embodiment of the invention further provides a computer program, comprising program instructions, when the program instruction is executed by the terminal, so that the terminal can execute the above method.
本发明实施例还提供一种载有上述计算机程序的载体。  Embodiments of the present invention also provide a carrier carrying the above computer program.
本发明实施例能够通过无线热点实现覆盖范围内的终端互发现。 附图概述 图 1是本发明实施例提供的终端互发现方法第一原理框图; The embodiments of the present invention can implement mutual discovery of terminals in a coverage area by using a wireless hotspot. 1 is a first schematic block diagram of a method for mutual discovery of a terminal according to an embodiment of the present invention;
图 2是本发明实施例提供的终端互发现方法第二原理框图;  2 is a second schematic block diagram of a method for discovering a mutual terminal of a terminal according to an embodiment of the present invention;
图 3是本发明实施例提供的终端互发现装置第一框图;  3 is a first block diagram of a terminal mutual discovery device according to an embodiment of the present invention;
图 4是本发明实施例提供的终端互发现装置第二框图;  4 is a second block diagram of a terminal mutual discovery device according to an embodiment of the present invention;
图 5是本发明实施例提供的多个 Android终端实现基于 WiFi无连接的离 线互发现机制示意图;  FIG. 5 is a schematic diagram of a wireless mutual connection-based offline mutual discovery mechanism implemented by multiple Android terminals according to an embodiment of the present invention; FIG.
图 6是本发明实施例提供的本地 (联系人)数据库的建立流程图; 图 7是本发明实施例提供的无网络下基于无线热点的互发现系统实现框 架示意图;  6 is a flowchart of establishing a local (contact) database according to an embodiment of the present invention; FIG. 7 is a schematic diagram of a framework for implementing a mutual discovery system based on a wireless hotspot without a network according to an embodiment of the present invention;
图 8是本发明实施例提供的无网络连接时互发现流程图;  FIG. 8 is a flowchart of mutual discovery when there is no network connection according to an embodiment of the present invention;
图 9是本发明实施例提供的终端联系人发现界面示意图;  FIG. 9 is a schematic diagram of a terminal contact discovery interface according to an embodiment of the present invention;
图 10是本发明实施例提供的增加 Flag标志位的 probe request帧格式示意 图;  FIG. 10 is a schematic diagram of a format of a probe request frame for adding a flag flag according to an embodiment of the present invention; FIG.
图 11 是本发明实施例提供的扩展过加入 Flag标志位和 MAC地址的 beacon信标帧数据格式示意图。 本发明的较佳实施方式 以下结合附图对本发明的优选实施例进行详细说明, 需要说明的是, 在 不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互任意组合。 图 1是本发明实施例提供的终端互发现方法第一原理框图,如图 1所示, 包括: FIG. 11 is a schematic diagram of a beacon beacon frame data format extended by adding a Flag flag bit and a MAC address according to an embodiment of the present invention. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings, In the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other. FIG. 1 is a first schematic block diagram of a method for mutual discovery of a terminal according to an embodiment of the present invention. As shown in FIG. 1 , the method includes:
步骤 S 101: 无线热点获取其覆盖范围内的终端的终端信息。  Step S101: The wireless hotspot acquires terminal information of the terminal within its coverage.
该步骤中, 无线热点侦听终端发送的终端广播帧, 并对侦听到的终端广 播帧进行解析, 获取终端的终端信息。 其中, 所述终端信息包括互发现服务 标志和终端媒体接入控制 (Media Access Control, MAC )地址。 无线热点根 据所述互发现服务标志, 确定所述终端是互发现服务终端, 并将所述终端 MAC地址写入 MAC地址池。  In this step, the wireless hotspot listens to the terminal broadcast frame sent by the terminal, and parses the intercepted terminal broadcast frame to obtain the terminal information of the terminal. The terminal information includes a mutual discovery service identifier and a terminal media access control (MAC) address. The wireless hotspot determines that the terminal is a mutual discovery service terminal according to the mutual discovery service flag, and writes the terminal MAC address into the MAC address pool.
步骤 S102: 根据所获取的终端信息, 在数据库中查找所述终端之间是否 存在联系人关系。  Step S102: Search for a contact relationship between the terminals in the database according to the obtained terminal information.
该步骤中, 无线热点将 MAC地址池中的终端 MAC地址发送至服务器, 服务器利用其数据库中预存的终端之间的联系人关系列表, 查找其收到的终 端 MAC地址中存在联系人关系的终端 MAC地址, 并将存在联系人关系的 MAC地址发送至无线热点。  In this step, the wireless hotspot sends the terminal MAC address in the MAC address pool to the server, and the server uses the contact relationship list between the terminals pre-stored in the database to find the terminal with the contact relationship in the received terminal MAC address. The MAC address, and sends the MAC address of the contact relationship to the wireless hotspot.
步骤 S103:若存在联系人关系,则通知具有联系人关系的至少一方终端, 并携带具有联系人关系的终端信息。  Step S103: If there is a contact relationship, notify at least one terminal having a contact relationship, and carry terminal information having a contact relationship.
例如, 无线热点侦听终端 A以广播形式发送的携带有终端 MAC地址的 终端广播帧, 根据所述终端 A的终端 MAC地址, 在数据库中找到无线热点 覆盖范围内的具有联系人关系的终端 B 的终端 MAC地址和终端 C的终端 MAC地址。此时, 无线热点将所找到的终端 B的终端 MAC地址和终端 C的 终端 MAC地址携带在热点广播帧的可选扩展字段中广播出去, 以供终端 A 接收并显示相应的联系人信息。 无线热点还可以将终端 A的终端 MAC地址 携带在热点广播帧的可选扩展字段中广播出去,以供终端 B和 /或终端 C接收 并显示终端 A对应的联系人信息。  For example, the wireless hotspot listening terminal A sends a terminal broadcast frame carrying the terminal MAC address in a broadcast form, and finds the terminal B with the contact relationship in the wireless hotspot coverage in the database according to the terminal MAC address of the terminal A. Terminal MAC address and terminal C's terminal MAC address. At this time, the wireless hotspot broadcasts the found terminal MAC address of the terminal B and the terminal MAC address of the terminal C in the optional extension field of the hotspot broadcast frame, so that the terminal A receives and displays the corresponding contact information. The wireless hotspot may also broadcast the terminal MAC address of the terminal A in an optional extension field of the hotspot broadcast frame, so that the terminal B and/or the terminal C receive and display the contact information corresponding to the terminal A.
图 2是本发明实施例提供的终端互发现方法第二原理框图,如图 2所示, 步骤包括:  2 is a second schematic block diagram of a method for discovering a mutual terminal of a terminal according to an embodiment of the present invention. As shown in FIG. 2, the steps include:
步骤 S201 : 终端发送携带有终端信息的终端广播帧。 步骤 S202: 接收无线热点根据侦听到的所述终端信息而找到的具有联系 人关系的终端信息。 Step S201: The terminal sends a terminal broadcast frame carrying the terminal information. Step S202: Receive terminal information with a contact relationship that is found by the wireless hotspot according to the detected terminal information.
较佳地, 在所述步骤 S202之后, 还包括:  Preferably, after the step S202, the method further includes:
步骤 S203:终端在本地数据库中查找与所述终端信息对应的联系人信息, 并对所找到的联系人信息进行显示。  Step S203: The terminal searches for the contact information corresponding to the terminal information in the local database, and displays the found contact information.
上述终端信息包括互发现服务标志和终端 MAC地址。  The terminal information includes a mutual discovery service flag and a terminal MAC address.
终端本地数据库中预存有联系人信息和终端 MAC地址的对应关系, 终 端获取具有联系人关系的终端 MAC地址后, 通过中间层服务将所获取的具 有联系人关系的终端 MAC地址发送至联系人应用, 联系人应用通过预存的 联系人信息和终端 MAC地址的对应关系, 找到对应的联系人信息, 并通过 用户界面提醒终端用户。  The terminal local database pre-stores the correspondence between the contact information and the terminal MAC address. After the terminal obtains the MAC address of the terminal with the contact relationship, the terminal sends the acquired terminal MAC address with the contact relationship to the contact application through the middle layer service. The contact application finds the corresponding contact information through the correspondence between the pre-stored contact information and the terminal MAC address, and reminds the terminal user through the user interface.
图 3是本发明实施例提供的终端互发现装置第一框图, 如图 3所示, 包 括终端信息获取模块 31、联系人关系查找模块 32和联系人关系通知模块 33。 其中:  FIG. 3 is a first block diagram of a terminal mutual discovery device according to an embodiment of the present invention. As shown in FIG. 3, the terminal information acquiring module 31, the contact relationship searching module 32, and the contact relationship notification module 33 are included. among them:
所述终端信息获取模块 31获取无线热点覆盖范围内的终端的终端信息, 较佳地, 所述终端信息获取模块 31侦听终端发送的终端广播帧, 并对侦听到 的终端广播帧进行解析, 获取终端的终端信息, 其中, 所述终端信息包括互 发现服务标志和终端 MAC地址, 无线热点根据所述互发现服务标志, 确定 所述终端是互发现服务终端, 即该终端支持或具有互发现服务功能, 并将所 述终端 MAC地址写入 MAC地址池。  The terminal information acquiring module 31 acquires the terminal information of the terminal in the wireless hotspot coverage area. Preferably, the terminal information acquiring module 31 listens to the terminal broadcast frame sent by the terminal, and parses the intercepted terminal broadcast frame. Obtaining terminal information of the terminal, where the terminal information includes a mutual discovery service identifier and a terminal MAC address, and the wireless hotspot determines, according to the mutual discovery service identifier, that the terminal is a mutual discovery service terminal, that is, the terminal supports or has mutual Discover the service function and write the terminal MAC address to the MAC address pool.
所述联系人关系查找模块 32根据所获取的终端信息,在数据库中查找所 述终端之间是否存在联系人关系, 较佳地, 所述联系人关系查找模块 32将 MAC地址池中的终端 MAC地址发送至服务器, 所述服务器利用其数据库中 预存的终端之间的联系人关系列表, 查找其收到的终端 MAC地址中存在联 系人关系的终端 MAC地址,并将所找到的存在联系人关系的终端 MAC地址 发送至所述联系人关系查找模块 32。  The contact relationship searching module 32 searches the database for the contact relationship between the terminals according to the obtained terminal information. Preferably, the contact relationship searching module 32 sets the terminal MAC in the MAC address pool. The address is sent to the server, and the server uses the contact relationship list between the terminals pre-stored in the database to find the terminal MAC address of the contact relationship in the received terminal MAC address, and finds the existing contact relationship. The terminal MAC address is sent to the contact relationship lookup module 32.
所述联系人关系通知模块 33在存在联系人关系时,通知所述具有联系人 关系的至少一方终端, 并携带具有联系人关系的终端信息。 图 4是本发明实施例提供的终端互发现装置第二框图, 如图 4所示, 包 括: 发送模块 41、 接收模块 42和查询模块 43 , 其中: The contact relationship notification module 33 notifies the at least one terminal having the contact relationship when the contact relationship exists, and carries the terminal information having the contact relationship. 4 is a second block diagram of a terminal mutual discovery device according to an embodiment of the present invention. As shown in FIG. 4, the method includes: a sending module 41, a receiving module 42, and a query module 43, where:
所述发送模块 41发送携带有终端信息的终端广播帧。  The transmitting module 41 transmits a terminal broadcast frame carrying the terminal information.
所述接收模块 42接收无线热点根据侦听到的所述终端信息而找到的具 有联系人关系的终端信息。  The receiving module 42 receives the terminal information with the contact relationship found by the wireless hotspot according to the detected terminal information.
所述查询模块 43 在本地数据库中查找与所述终端信息对应的联系人信 息, 并对所找到的联系人信息进行显示。  The query module 43 searches the local database for contact information corresponding to the terminal information, and displays the found contact information.
发送模块 41 发送携带有互发现服务标志和终端 MAC地址的终端广播 帧。 终端信息获取模块 31侦听到所述终端广播帧后, 根据所述终端广播帧中 的互发现服务标志, 确定所述终端具有或支持终端互发现服务功能, 并将所 述终端 MAC地址写入 MAC地址池。 联系人关系查找模块 31将 MAC地址 池中的终端 MAC地址发送至服务器, 服务器利用其数据库中预存的终端之 间的联系人关系列表, 在所述无线热点发送的终端 MAC地址中选取具有联 系人关系的终端 MAC地址,并将所选取的具有联系人关系的终端 MAC地址 发送至无线热点。联系人关系通知模块 33将所找到的具有联系人关系的终端 MAC地址广播出去, 以通知具有联系人关系的至少一方终端用户。接收模块 42收到具有联系人关系的终端 MAC地址后,查询模块 43通过查询本地数据 库, 确定相应的联系人信息, 并通过用户界面提醒终端用户位于其附近的联 系人。  The transmitting module 41 transmits a terminal broadcast frame carrying the mutual discovery service flag and the terminal MAC address. After the terminal information acquiring module 31 detects the broadcast frame of the terminal, determining, according to the mutual discovery service flag in the broadcast frame of the terminal, that the terminal has or supports the terminal mutual discovery service function, and writes the terminal MAC address. MAC address pool. The contact relationship searching module 31 sends the terminal MAC address in the MAC address pool to the server, and the server selects the contact person in the terminal MAC address sent by the wireless hotspot by using the contact relationship list between the terminals prestored in the database. The terminal MAC address of the relationship, and the selected terminal MAC address with the contact relationship is sent to the wireless hotspot. The contact relationship notification module 33 broadcasts the found terminal MAC address having the contact relationship to notify at least one end user having the contact relationship. After the receiving module 42 receives the terminal MAC address with the contact relationship, the query module 43 determines the corresponding contact information by querying the local database, and reminds the terminal user of the contact person located in the vicinity through the user interface.
本发明实施例还提供一种计算机程序, 包括程序指令, 当该程序指令被 无线热点执行时, 使得该无线热点可执行上述方法。  The embodiment of the invention further provides a computer program, comprising program instructions, when the program instruction is executed by a wireless hotspot, so that the wireless hotspot can perform the above method.
本发明实施例还提供一种计算机程序, 包括程序指令, 当该程序指令被 终端执行时, 使得该终端可执行上述法。  The embodiment of the invention further provides a computer program, comprising program instructions, when the program instruction is executed by the terminal, so that the terminal can execute the above method.
本发明实施例还提供一种载有上述计算机程序的载体。  Embodiments of the present invention also provide a carrier carrying the above computer program.
目前类似的技术包括 WiFi定位和基站定位,但具有依赖网络和定位精度 差的缺点, 本发明实施例解决问题的场景和目前的技术是互补的, 可以填补 一个功能空缺。 At present, similar technologies include WiFi positioning and base station positioning, but have the disadvantages of relying on network and poor positioning accuracy. The solution to the problem in the embodiment of the present invention is complementary to the current technology, and can fill a function gap.
下面以终端未连接 WIFI、 且无 GPS无互联网的应用场景为例, 结合图 5 至图 11对本发明的实施例做进一步说明。 The following is an example of an application scenario in which the terminal is not connected to WIFI and there is no GPS and no Internet. The embodiment of the present invention will be further described with reference to FIG.
本实施例可以利用终端的 WiFi扫描功能实现在 WiFi未连接且无互联网 无 GPS的场景下, 发现附近和自己有关系的终端, 从而找到附近的朋友 (即 终端离线模式实现终端互发现) , 如图 5所示的多个 Android终端实现基于 WiFi无连接的离线互发现机制示意图。  In this embodiment, the WiFi scanning function of the terminal can be used to discover a terminal that is related to itself in a scenario where the WiFi is not connected and there is no Internet and no GPS, so as to find nearby friends (ie, the terminal offline mode realizes terminal mutual discovery), such as A plurality of Android terminals shown in FIG. 5 implement a schematic diagram of an offline mutual discovery mechanism based on WiFi connectionless.
该方案主要包括如下内容:  The program mainly includes the following contents:
1. 终端模块  Terminal module
A. 联系人应用: 负责 UI显示, 联系人管理, 互发现服务控制。  A. Contact application: Responsible for UI display, contact management, and mutual discovery service control.
B. 联系人云接口: 负责和云服务器交互, 注册个人信息和 MAC地址, 查询联系人信息和 MAC地址。  B. Contact Cloud Interface: Responsible for interacting with the cloud server, registering personal information and MAC addresses, and querying contact information and MAC addresses.
C. 联系人数据库: 存储联系人和 MAC地址。  C. Contact database: Store contacts and MAC addresses.
D. WiFi模块改造: 广播帧携带互发现服务支持信息。  D. WiFi module transformation: Broadcast frames carry mutual discovery service support information.
2. 云服务器模块  2. Cloud server module
A. 联系人云服务端: 实现联系人注册查询和 MAC地址过滤功能。  A. Contact cloud server: Implement contact registration query and MAC address filtering.
B. 云数据库: 存储所有使用云服务的联系人信息。  B. Cloud Database: Stores all contact information using cloud services.
3. 无线热点模块  3. Wireless hotspot module
A. WiFi模块改造:可以辨别支持互发现服务的客户端的广播帧并记录其 MAC地址。 支持将过滤后的 MAC地址广播出来。  A. WiFi module modification: It can identify the broadcast frame of the client supporting the mutual discovery service and record its MAC address. Support for broadcasting the filtered MAC address.
B. MAC地址过滤模块: 和云服务器查询 MAC地址池中适合互发现的 MAC地址列表。  B. MAC address filtering module: and the cloud server query the list of MAC addresses suitable for mutual discovery in the MAC address pool.
以下以如下两个阶段分别介绍实现流程:  The implementation process is described in the following two stages:
1 )终端持有人获得联系人 MAC地址数据。  1) The terminal holder obtains the contact MAC address data.
这个流程可以在终端有网络支持的使用过程中随时进行, 保证本地构建 一个具有联系人名单, 手机号和 MAC地址的数据库, 支持离线下查询。  This process can be carried out at any time during the use of the network with the support of the terminal. It is guaranteed to build a database with a contact list, mobile phone number and MAC address locally, and support offline query.
2 )在商场无网络无 GPS连接的情况下, 找寻商场热点覆盖范围内的其 他联系人。  2) Look for other contacts within the coverage of the store's hotspots in the absence of a network-free GPS connection.
这个流程在没有互联网和定位系统的支持下, 也不需要 WiFi的连接, 仅 通过 802.11 的扫描发现协议来发现在同一 WiFi热点覆盖范围内的其他联系 人。 This process does not require a WiFi connection without the support of the Internet and location system, and only discovers other contacts within the same WiFi hotspot coverage through the 802.11 scan discovery protocol. People.
实施方式及其模块: Implementation and its modules:
1、 终端持有人获得联系人 MAC地址数据  1. The terminal holder obtains the contact MAC address data.
1.1、 联系人注册: 如图 6所示的本地(联系人)数据库的建立流程图, 联系人在家中有网络的环境下, 主动连接云服务器, 将自己的身份和从 WiFI 驱动获得的 MAC地址 (步骤①)向联系人云服务器发起注册 (步骤②④) 。 联系人云服务器记录用户身份和 MAC地址。  1.1, contact registration: As shown in Figure 6, the local (contact) database is established. The contact person is connected to the cloud server in the environment with the network at home, and the identity and the MAC address obtained from the WiFI driver. (Step 1) Initiate registration with the contact cloud server (step 24). The contact cloud server records the user identity and MAC address.
1.2、查找其他联系人: 终端提供联系人的 ID (手机号), 查询对方的 MAC 地址, 云服务同步他们的联系人状态。 (步骤③④⑤⑥)  1.2. Find other contacts: The terminal provides the contact ID (phone number), queries the other party's MAC address, and the cloud service synchronizes their contact status. (Step 3456)
1.3、 保存联系人 MAC地址: 终端接收云端联系人的 MAC地址, 保存 联系人的 MAC地址列表到本地数据库。 (步骤⑦⑧)  1.3. Save contact MAC address: The terminal receives the MAC address of the cloud contact and saves the contact's MAC address list to the local database. (Step 78)
2、 离线搜寻联系人  2, search for contacts offline
2.1、 如图 7所示的无网络下基于无线热点的互发现系统实现框架示意图 和图 8所示的无网络连接时互发现流程图, 联系人模块使能互发现模式后, 打开 WiFi。终端侧通过 WiFi广播附带互发现服务标志和 MAC地址于扫描(请 求)帧内 (步骤①), 此步骤的具体实施方法如图 10所示的增加 Flag标志位 的 probe request帧格式示意图, 802.11定义移动终端利用 Probe Request帧来 探查请求帧所覆盖区域目前有哪些 802.11网络,默认的 Probe Request已经附 带了本机的 MAC地址,这里只需要增加服务标志即可,如图 10所示,在 probe Request加入 F这个标志位, 表明此终端是具有互发现服务的。  2.1, as shown in Figure 7, the wireless hotspot-based mutual discovery system implementation framework diagram shown in Figure 7 and the networkless mutual discovery flow diagram shown in Figure 8, after the contact module enables the mutual discovery mode, the WiFi is turned on. The terminal side carries the mutual discovery service flag and the MAC address in the scan (request) frame through the WiFi broadcast (step 1). The specific implementation method of this step is as shown in FIG. 10, which is a schematic diagram of a probe request frame format for adding a flag flag, and 802.11 defines The mobile terminal uses the Probe Request frame to detect which 802.11 network is currently covered by the request frame. The default Probe Request is already attached with the MAC address of the local device. Here, only the service flag needs to be added, as shown in Figure 10, in the probe Request. Adding the F flag indicates that the terminal has a mutual discovery service.
2.2、 无线热点判断到互发现服务终端存在, 将其 MAC地址写入 MAC 地址池 (步骤②) , 这个 MAC地址池收集最近一段时间 (如 5分钟)收到 的具有 F标志位的 Probe Request帧中的 MAC地址。因为可能收集到的 MAC 地址较多,所以可能无法在广播 beacon frame的时候都把 MAC地址池中所有 的数据都携带, 所以必须对整个 MAC地址池中的数据做筛选过滤。  2.2. The wireless hotspot determines that the mutual discovery service terminal exists, and writes its MAC address into the MAC address pool (step 2). The MAC address pool collects the Probe Request frame with the F flag bit received in the most recent period (such as 5 minutes). MAC address in . Because the number of MAC addresses that can be collected is high, you may not be able to carry all the data in the MAC address pool when you broadcast the beacon frame. Therefore, you must filter and filter the data in the entire MAC address pool.
2.3、 过滤的过程通过无线热点的后台服务实现, 后台服务按照一定的频 率(如 5分钟)将检测到 MAC地址池发送给云端服务器 (步骤③) , 后者 在联系人云数据库中查找 MAC列表中有联系人关系的 MAC地址,并将 MAC 地址池中相互有好友关系的 MAC地址过滤出来,这个结果产生的 MAC地址 将会很少, 可以反馈给无线热点后台服务(步骤④)进行广播。 2.3. The filtering process is implemented by the background service of the wireless hotspot, and the background service sends the detected MAC address pool to the cloud server according to a certain frequency (for example, 5 minutes) (step 3), and the latter searches the contact cloud database for the MAC list. There is a contact relationship MAC address and MAC The MAC addresses of the friends in the address pool are filtered out. The resulting MAC address will be very small and can be fed back to the wireless hotspot background service (step 4) for broadcast.
2.4、 无线热点将过滤后的 MAC地址集放入 beacon frame的可选扩展字 段中, layout如图 11所示的扩展过力口入 Flag标志位和 MAC地址的 beaconframe 数据格式示意图, 保证广播帧兼容普通 WiFi终端且帧大小不会太大。 (步骤 ⑤⑥⑦)  2.4. The wireless hotspot puts the filtered MAC address set into the optional extension field of the beacon frame. The layout is as shown in FIG. 11 and the beaconframe data format of the extended flag and the MAC address is extended to ensure the broadcast frame is compatible. Ordinary WiFi terminal and the frame size is not too large. (Step 567)
2.5、 无线终端通过 WiFi 芯片接收热点广播帧, 并收取其上帧数据中的 MAC地址集,然后通过中间层服务如 wpa— supplicant和 WifiService把结果上 报给联系人应用 (步骤⑧) , 联系人应用程序通过查询本地数据库可知有哪 些联系人在附近(步骤⑨) , 通过 UI提醒终端用户, 如图 9所示。  2.5. The wireless terminal receives the hotspot broadcast frame through the WiFi chip, and collects the MAC address set in the upper frame data, and then reports the result to the contact application through the middle layer service such as wpa-supplicant and WifiService (step 8), the contact application. The program can know which contacts are nearby by querying the local database (step 9), and remind the end user through the UI, as shown in FIG.
2.6终端用户发现附近的联系人以后,可以通过图 9的界面直接呼叫联系 人。  2.6 After the end user finds a nearby contact, he can directly call the contact through the interface of Figure 9.
本发明实施例利用智能终端的 WiFi扫描功能实现在离线场景下,发现附 近和自己有关系的智能终端, 从而找到附近的朋友。  The embodiment of the present invention utilizes the WiFi scanning function of the intelligent terminal to discover an intelligent terminal that is related to itself in an offline scenario, thereby finding a nearby friend.
综上所述, 本发明实施例能够利用 WiFi设备的 WiFi功能, 实现终端互 发现, 找到附近联系人。  In summary, the embodiment of the present invention can utilize the WiFi function of the WiFi device to realize mutual discovery of the terminal and find nearby contacts.
尽管上文对本发明实施例进行了详细说明, 但是本发明不限于此, 本技 本发明实施例的原理所作的修改, 都应当理解为落入本发明的保护范围。  Although the embodiments of the present invention have been described in detail above, the present invention is not limited thereto, and modifications of the principles of the embodiments of the present invention should be understood as falling within the scope of the present invention.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。  One of ordinary skill in the art will appreciate that all or a portion of the above steps may be accomplished by a program instructing the associated hardware, such as a read-only memory, a magnetic disk, or an optical disk. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the above embodiment may be implemented in the form of hardware or in the form of a software function module. The invention is not limited to any specific form of combination of hardware and software.
工业实用性 本发明实施例能够通过无线热点实现覆盖范围内的终端互发现。 Industrial Applicability The embodiments of the present invention can implement mutual discovery of terminals in a coverage area through a wireless hotspot.

Claims

权 利 要 求 书 Claim
1、 一种终端互发现方法, 包括:  1. A terminal mutual discovery method, comprising:
无线热点获取其覆盖范围内的终端的终端信息;  The wireless hotspot obtains terminal information of the terminal within its coverage;
根据所获取的终端信息, 在数据库中查找所述终端之间是否存在联系人 关系; 以及  Searching, in the database, whether there is a contact relationship between the terminals according to the obtained terminal information;
若存在联系人关系, 则通知具有联系人关系的至少一方终端, 并携带具 有联系人关系的终端信息。  If there is a contact relationship, at least one terminal having the contact relationship is notified, and the terminal information having the contact relationship is carried.
2、 根据权利要求 1所述的方法, 其中, 所述的无线热点获取其覆盖范围 内的终端的终端信息的步骤包括:  2. The method according to claim 1, wherein the step of the wireless hotspot acquiring the terminal information of the terminal in its coverage area comprises:
无线热点侦听终端发送的终端广播帧;  The wireless hotspot listening to the terminal broadcast frame sent by the terminal;
对侦听到的终端广播帧进行解析, 获取终端的终端信息。  Parsing the detected terminal broadcast frame to obtain the terminal information of the terminal.
3、 根据权利要求 1或 2所述的方法, 其中, 所述终端信息包括互发现服 务标志和终端媒体接入控制 (MAC )地址, 在所述的无线热点获取其覆盖范 围内的终端的终端信息的步骤之后,所述无线热点根据所述互发现服务标志, 确定所述终端是互发现服务终端,并将所述终端 MAC地址写入 MAC地址池。  The method according to claim 1 or 2, wherein the terminal information comprises a mutual discovery service indicator and a terminal medium access control (MAC) address, and the terminal of the terminal within the coverage area is obtained by the wireless hotspot. After the step of information, the wireless hotspot determines, according to the mutual discovery service identifier, that the terminal is a mutual discovery service terminal, and writes the terminal MAC address into a MAC address pool.
4、 根据权利要求 3所述的方法, 其中, 所述的根据所获取的终端信息, 在数据库中查找所述终端之间是否存在联系人关系的步骤包括:  The method according to claim 3, wherein the step of searching for a contact relationship between the terminals in the database according to the obtained terminal information includes:
所述无线热点将 MAC地址池中的终端 MAC地址发送至服务器; 所述无线热点接收所述服务器发送的存在联系人关系的终端 MAC地址, 所述存在联系人关系的终端 MAC地址是所述服务器利用其数据库中预存的 终端之间的联系人关系列表查找到的。  The wireless hotspot sends the terminal MAC address in the MAC address pool to the server; the wireless hotspot receives the terminal MAC address of the contact relationship sent by the server, and the terminal MAC address of the contact relationship is the server It is found using the contact relationship list between terminals pre-stored in its database.
5、 一种终端互发现方法, 包括:  5. A terminal mutual discovery method, including:
终端发送携带有终端信息的终端广播帧;  The terminal sends a terminal broadcast frame carrying the terminal information;
所述终端接收无线热点根据侦听到的所述终端信息而找到的具有联系人 关系的终端信息。  The terminal receives the terminal information of the contact relationship that the wireless hotspot finds according to the detected terminal information.
6、 根据权利要求 5所述的方法, 还包括:  6. The method of claim 5, further comprising:
所述终端在本地数据库中查找与所述终端信息对应的联系人信息, 并对 所找到的联系人信息进行显示。 The terminal searches for a contact information corresponding to the terminal information in a local database, and The found contact information is displayed.
7、 一种终端互发现装置, 应用于无线热点, 包括:  7. A terminal mutual discovery device, applied to a wireless hotspot, comprising:
终端信息获取模块, 其设置为: 获取无线热点覆盖范围内的终端的终端 信息;  a terminal information acquiring module, configured to: acquire terminal information of a terminal in a coverage area of the wireless hotspot;
联系人关系查找模块, 其设置为: 根据所获取的终端信息, 在数据库中 查找所述终端之间是否存在联系人关系; 以及  a contact relationship finding module, configured to: find, according to the obtained terminal information, whether a contact relationship exists between the terminals in a database;
联系人关系通知模块, 其设置为: 在存在联系人关系时, 通知具有联系 人关系的至少一方终端, 并携带具有联系人关系的终端信息。  The contact relationship notification module is configured to: notify the at least one terminal having the contact relationship when the contact relationship exists, and carry the terminal information having the contact relationship.
8、根据权利要求 7所述的装置,其中,所述终端信息获取模块是设置为: 侦听终端发送的终端广播帧, 并对侦听到的终端广播帧进行解析, 获取终端 的终端信息。  The device according to claim 7, wherein the terminal information acquiring module is configured to: listen to a terminal broadcast frame sent by the terminal, and parse the intercepted terminal broadcast frame to obtain terminal information of the terminal.
9、 根据权利要求 7或 8所述的装置, 其中, 所述终端信息包括互发现服 务标志和终端媒体接入控制(MAC )地址, 所述终端信息获取模块还设置为: 在获取无线热点覆盖范围内的终端的终端信息的之后, 根据所述互发现服务 标志, 确定所述终端是互发现服务终端, 并将所述终端 MAC地址写入 MAC 地址池。  The device according to claim 7 or 8, wherein the terminal information comprises a mutual discovery service indicator and a terminal medium access control (MAC) address, and the terminal information acquiring module is further configured to: acquire wireless hotspot coverage After the terminal information of the terminal in the range, according to the mutual discovery service flag, it is determined that the terminal is a mutual discovery service terminal, and the terminal MAC address is written into the MAC address pool.
10、 根据权利要求 9所述的装置, 其中, 所述联系人关系查找模块是设 置为: 将 MAC地址池中的终端 MAC地址发送至服务器, 并接收所述服务器 找到并发送的存在联系人关系的终端 MAC地址, 其中, 存在联系人关系的 终端 MAC地址是所述服务器利用其数据库中预存的终端之间的联系人关系 列表查找到的。  10. The device according to claim 9, wherein the contact relationship searching module is configured to: send a terminal MAC address in a MAC address pool to a server, and receive an existing contact relationship that is found and sent by the server. The terminal MAC address, wherein the terminal MAC address in which the contact relationship exists is found by the server using a contact relationship list between terminals pre-stored in its database.
11、 一种终端互发现装置, 应用于无线保真(WIFI )终端, 包括: 发送模块, 其设置为: 发送携带有终端信息的终端广播帧; 以及 接收模块, 其设置为: 接收无线热点根据侦听到的所述终端信息而找到 的具有联系人关系的终端信息。  A terminal mutual discovery device, which is applied to a wireless fidelity (WIFI) terminal, comprising: a sending module, configured to: send a terminal broadcast frame carrying terminal information; and a receiving module, configured to: receive a wireless hotspot according to The terminal information having the contact relationship found by the detected terminal information.
12、 根据权利要求 11所述的装置, 还包括:  12. The apparatus according to claim 11, further comprising:
查询模块, 其设置为: 在本地数据库中查找与所述终端信息对应的联系 人信息, 并对所找到的联系人信息进行显示。 The query module is configured to: find the contact information corresponding to the terminal information in the local database, and display the found contact information.
13、 一种计算机程序, 包括程序指令, 当该程序指令被无线热点执行时, 使得该无线热点可执行权利要求 1-4任一项所述的方法。 13. A computer program comprising program instructions which, when executed by a wireless hotspot, cause the wireless hotspot to perform the method of any of claims 1-4.
14、 一种载有权利要求 13所述计算机程序的载体。  14. A carrier carrying the computer program of claim 13.
15、 一种计算机程序, 包括程序指令, 当该程序指令被终端执行时, 使 得该终端可执行权利要求 5-6任一项所述的方法。  15. A computer program comprising program instructions which, when executed by a terminal, cause the terminal to perform the method of any of claims 5-6.
16、 一种载有权利要求 15所述计算机程序的载体。  16. A carrier carrying the computer program of claim 15.
PCT/CN2014/083296 2014-05-15 2014-07-30 Terminal mutual-discovery method and device WO2015172436A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410204577.4 2014-05-15
CN201410204577.4A CN104093137B (en) 2014-05-15 2014-05-15 A kind of terminal mutual discovery method and device

Publications (1)

Publication Number Publication Date
WO2015172436A1 true WO2015172436A1 (en) 2015-11-19

Family

ID=51640808

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/083296 WO2015172436A1 (en) 2014-05-15 2014-07-30 Terminal mutual-discovery method and device

Country Status (2)

Country Link
CN (1) CN104093137B (en)
WO (1) WO2015172436A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106162541B (en) * 2015-04-14 2021-04-13 Tcl科技集团股份有限公司 Method and system for inquiring nearby terminal equipment
CN106789415A (en) * 2016-12-12 2017-05-31 东软集团股份有限公司 The acquisition method of facility information, apparatus and system
CN110475234A (en) * 2018-05-11 2019-11-19 上海鸥新软件有限公司 A kind of system and method for the SSID broadcast message building character relation based on WIFI

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742641A (en) * 2008-11-21 2010-06-16 英华达(西安)通信科技有限公司 Communication method for prompting approaching contact
CN102347847A (en) * 2011-09-26 2012-02-08 深圳中兴网信科技有限公司 Contact state releasing method and system
CN102791014A (en) * 2012-07-18 2012-11-21 诚迈科技(南京)有限公司 Short-distance pairing method of wifi (wireless fidelity) mobile terminal
CN102892094A (en) * 2011-07-19 2013-01-23 米特尔网络公司 Systems and methods for determining a network relationship between mobile devices

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7129891B2 (en) * 2003-11-21 2006-10-31 Xerox Corporation Method for determining proximity of devices in a wireless network
CN102780514A (en) * 2011-05-10 2012-11-14 宏碁股份有限公司 Electronic equipment, near-end network system and connection method for near-end network system
KR101964077B1 (en) * 2011-09-16 2019-04-02 삼성전자주식회사 Apparatus and method for connecting bluetooth device in portable terminal
CN102547567A (en) * 2012-01-18 2012-07-04 北京友录在线科技发展有限公司 Method for searching persons
CN102946591A (en) * 2012-11-15 2013-02-27 天津黑米网络科技有限公司 Method for instantly releasing information by utilizing WiFi (Wireless Fidelity)
CN103067457B (en) * 2012-12-14 2016-07-06 清华大学 The contact sequencing method of mobile terminal, system and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742641A (en) * 2008-11-21 2010-06-16 英华达(西安)通信科技有限公司 Communication method for prompting approaching contact
CN102892094A (en) * 2011-07-19 2013-01-23 米特尔网络公司 Systems and methods for determining a network relationship between mobile devices
CN102347847A (en) * 2011-09-26 2012-02-08 深圳中兴网信科技有限公司 Contact state releasing method and system
CN102791014A (en) * 2012-07-18 2012-11-21 诚迈科技(南京)有限公司 Short-distance pairing method of wifi (wireless fidelity) mobile terminal

Also Published As

Publication number Publication date
CN104093137A (en) 2014-10-08
CN104093137B (en) 2018-07-24

Similar Documents

Publication Publication Date Title
US9338633B2 (en) Wi-Fi service method and system for Wi-Fi devices
EP2901799B1 (en) Method and system for establishing wireless fidelity direct(wfd) connection in a wfd network environment
CN105472778B (en) Establish the method and device being wirelessly connected
EP2770795A1 (en) Method, apparatus and system for establishing device-to-device connection
US10772140B2 (en) Communications device connection method, terminal device, and server system
WO2013127305A1 (en) Information push method, device and system based on wireless local area network
US20100113001A1 (en) Systems and Method for Triggering Proximity Detection
US10111164B2 (en) Wireless communication system and wireless communication method
TW201218845A (en) Methods and apparatus to discover network capabilities available via wireless networks
KR20130142394A (en) Connecting method between terminals in wi-fi p2p network and terminal thereof
AU2010307479A1 (en) Apparatus and method for establishing a personal network for providing a CPNS service
CN104937907A (en) Systems and methods for the discovery of services on a wireless network
CN109246658B (en) Method and equipment for transmitting no-flow data
WO2013140384A2 (en) Hot spot detection
EP3451719B1 (en) Device discovery using neighbour awareness network (nan) functions
WO2015104452A1 (en) Service data provision
WO2020063229A1 (en) Resource pool configuration method, resource pool use method, configuration device and terminal
WO2011140906A1 (en) Network accessing method and apparatus for device in wireless sensor network
CN105933469B (en) Network access method and device for intelligent equipment and intelligent equipment
US9491202B2 (en) Device and method capable of searching for available service
US20230180178A1 (en) Paging processing method and apparatus, user equipment, base station, and storage medium
US9686648B2 (en) Method, a server and a computer program for local discovery
US20200059977A1 (en) Method of providing 5glan service and terminal device and server using the same
US20170346891A1 (en) Communication method
WO2014082512A1 (en) Service information providing method, server and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14891662

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14891662

Country of ref document: EP

Kind code of ref document: A1