WO2022160670A1 - Wi-fi network recognition method and wi-fi network recognition apparatus - Google Patents

Wi-fi network recognition method and wi-fi network recognition apparatus Download PDF

Info

Publication number
WO2022160670A1
WO2022160670A1 PCT/CN2021/113087 CN2021113087W WO2022160670A1 WO 2022160670 A1 WO2022160670 A1 WO 2022160670A1 CN 2021113087 W CN2021113087 W CN 2021113087W WO 2022160670 A1 WO2022160670 A1 WO 2022160670A1
Authority
WO
WIPO (PCT)
Prior art keywords
wireless
network
network connection
connection record
subgraph
Prior art date
Application number
PCT/CN2021/113087
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 WO2022160670A1 publication Critical patent/WO2022160670A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Definitions

  • the terminal is connected to the wireless AP of the wireless access point through the Wi-Fi network, and the network connection record includes the session identifier of the session in which the wireless AP participates, and the basic service to which the wireless AP belongs.
  • the determining a roaming connection record in the network connection record includes:
  • the original network connection record includes the terminal identifier of the terminal, the basic service set identifier BSSID of the basic service set to which the wireless AP connected by the terminal through the Wi-Fi network belongs, and all the connection time when the terminal is connected to the wireless AP;
  • an electronic device including:
  • An embodiment of the present disclosure proposes a method for identifying a Wi-Fi network, which determines a roaming connection record generated by a terminal roaming between different wireless APs by using information such as a session identifier, BSSID, and ESSID included in the network connection record reported by the terminal.
  • At least one connectivity subgraph representing the Wi-Fi network is generated according to the roaming connection record, and the Wi-Fi network and its wireless AP are respectively marked with the SSID and BSSID of the roaming network connection record corresponding to the connectivity subgraph.
  • the wireless AP 12-14 is used to provide a wireless network for the mobile phone 15-17 for the mobile phone 15-17 to connect to the corresponding network.
  • any of the above wireless APs can be implemented as a BSS and belong to an ESS.
  • any wireless AP can form an ESS independently, or multiple wireless APs can form an ESS through networking (for example, the wireless AP 12 can form an ESS1 independently, and the wireless APs 13-14 can form a network to form an ESS2, etc., which are not shown in the figure. ).
  • the wireless APs installed on different floors of the shopping mall belong to the same ESS (that is, have the same SSID), and the user walks between different floors of the shopping mall with a mobile phone. Then the terminal can report the network connection record 1 corresponding to time 1 to the server; at time 2 after a period of time, the user walks to the second floor, and the mobile phone connects to the wireless AP2 located on the second floor, and then the mobile phone can report the network corresponding to time 2 to the server. Connection record 2. At this time, it can be considered that the wireless AP connected to the terminal is switched between the wireless AP1 and the wireless AP2, that is, the terminal performs network roaming behavior between the wireless AP1 and the wireless AP2.
  • the first network connection record includes the first BSSID representing the first wireless AP
  • the second network connection record includes the second wireless AP.
  • the network connection record includes a BSSID representing a certain wireless AP
  • the network connection record has a corresponding relationship with the wireless AP.
  • Connection record 1 corresponds to AP1.
  • the network connection record corresponds to the wireless AP
  • the network connection record includes the BSSID that characterizes the wireless AP.
  • the network connection record 1 includes: BSSID1 characterizing AP1.
  • Node sequences corresponding to each session identifier can be generated based on the above moving process. As shown in (b) of FIG. 4, the node sequences A1-A2-A3, B1-B2, A4-A2, and B2-C1 can be generated. Wherein, each node in the node sequence represents each wireless AP corresponding to the BSSID included in the network connection record, and each connection line in the node sequence represents the roaming connection record in the foregoing embodiment.
  • the Wi-Fi network corresponding to the connected subgraph formed by A1, A2, A3 and A4 includes four wireless APs, A1, A2, A3 and A4.
  • A4 is connected to wireless AP A2 (at this time, wireless AP A2 may be the main wireless AP in the Wi-Fi network, responsible for network load balancing or wireless AP coordination).
  • the Wi-Fi network corresponding to the connectivity subgraph formed by B1 and B2 includes two wireless APs B1 and B2; and wireless AP C1 constitutes an independent Wi-Fi network.
  • wireless APs A1-A4 constitute Wi-Fi network A
  • wireless APs B1-B2 constitute Wi-Fi network B
  • wireless AP C1 constitutes Wi-Fi network C.
  • the movement trajectory of the terminal participating in the session identified as H1 session is A1 ⁇ A2 ⁇ A3
  • the movement trajectory of the terminal participating in the session identified as H2 session is A4 ⁇ A2.
  • the above movement process does not exceed the BSA of Wi-Fi network A.
  • the movement trajectory of the terminal participating in the session identified as the H3 session is B1 ⁇ B2, and the movement process does not exceed the BSA of the Wi-Fi network B.
  • the movement trajectory of the terminal participating in the session identified as the H4 session is B2 ⁇ C1, and the movement process passes through the BSAs of the Wi-Fi network B and the Wi-Fi network C in sequence.
  • the movement trajectory corresponding to the above-mentioned movement process is shown as a dotted line with an arrow in FIG. 5 . So far, the identification process of the network structure of the Wi-Fi network is completed.
  • entries 1-4 all correspond to Wi-Fi network A with SSID A, and are used to characterize the four wireless APs that constitute Wi-Fi network A; similarly, entries 5-6 correspond to Wi-Fi network B with SSID B is used to characterize the two wireless APs that constitute Wi-Fi network B; entry 7 corresponds to Wi-Fi network C with SSID C, which is used to characterize the Wi-Fi network. 1 wireless AP of C.
  • Step 312 the server generates a second connected subgraph according to the updated network connection record.
  • Embodiments of the present disclosure also provide an electronic device, including:
  • Multimedia component 708 includes a screen that provides an output interface between electronic device 700 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP).
  • the screen may be implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action.
  • multimedia component 708 includes a front-facing camera and/or a rear-facing camera. When the electronic device 700 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data.
  • Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.

Landscapes

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

Abstract

The present disclosure relates to the field of wireless communications. Disclosed are a Wi-Fi network recognition method and apparatus, and an electronic device and a storage medium. The method comprises: acquiring a network connection record of a terminal, wherein the terminal is connected to a wireless access point (AP) by means of a Wi-Fi network, and the network connection record contains a session identifier of a session in which the wireless AP participates, and a BSSID and an SSID of the wireless AP; determining roaming connection records in the network connection record, wherein any multiple groups of roaming connection records contain the same session identifier and different BSSIDs; generating at least one first connected sub-graph according to the roaming connection records; and marking, by using the SSID contained in the roaming connection records for generating the first connected sub-graph, a first Wi-Fi network represented by the first connected sub-graph, and marking a wireless AP of the first Wi-Fi network by using the BSSIDs contained in the roaming connection records for generating the first connected sub-graph.

Description

Wi-Fi网络的识别方法和Wi-Fi网络的识别装置Wi-Fi network identification method and Wi-Fi network identification device
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请基于申请号为202110130166.5、申请日为2021年01月29日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on the Chinese patent application with the application number of 202110130166.5 and the filing date of January 29, 2021, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is incorporated herein by reference.
技术领域technical field
本公开涉及无线通信领域,尤其涉及Wi-Fi网络的识别方法、装置、终端和存储介质。The present disclosure relates to the field of wireless communication, and in particular, to a method, device, terminal and storage medium for identifying a Wi-Fi network.
背景技术Background technique
在相关技术中,可以使用SSID(Service Set Identifier,服务集标识)结合地理位置信息识别并标识Wi-Fi网络(或称无线保真网络),例如将终端所连接Wi-Fi网络的地理位置信息映射为地理区域,如geohash块(地理散列)或者行政区划等,从而通过地理区域标识Wi-Fi网络。然而,一方面,该方式需要获取终端的位置信息,因此不可避免的存在用户隐私方面的安全隐患;另一方面,对终端上报的定位数据具有较强的依赖性,不仅对定位数据的准确性要求比较高,而且因为需要预先划定地理区域而导致识别过程繁琐。因此亟待提出一种新的Wi-Fi网络识别方法,以在保证Wi-Fi网络识别精度的前提下简化标识过程。In the related art, SSID (Service Set Identifier, Service Set Identifier) can be used in combination with geographic location information to identify and identify a Wi-Fi network (or wireless fidelity network), for example, the geographic location information of the Wi-Fi network to which the terminal is connected Map to geographic areas, such as geohash blocks (geo-hashing) or administrative divisions, etc., thereby identifying Wi-Fi networks by geographic areas. However, on the one hand, this method needs to obtain the location information of the terminal, so there is an inevitable security risk in terms of user privacy; on the other hand, it has a strong dependence on the positioning data reported by the terminal, which not only affects the accuracy of the positioning data The requirements are relatively high, and the identification process is cumbersome due to the need to pre-define the geographical area. Therefore, it is urgent to propose a new Wi-Fi network identification method to simplify the identification process on the premise of ensuring the accuracy of Wi-Fi network identification.
发明内容SUMMARY OF THE INVENTION
本公开提供了Wi-Fi网络的识别方法、装置、终端和存储介质。The present disclosure provides a Wi-Fi network identification method, device, terminal and storage medium.
根据本公开实施例的第一方面,提出一种Wi-Fi网络的识别方法,包括:According to a first aspect of the embodiments of the present disclosure, a method for identifying a Wi-Fi network is proposed, including:
获取终端的网络连接记录,所述终端通过Wi-Fi网络连接至无线接入点无线AP,所述网络连接记录中包含所述无线AP所参与会话的会话标识、所述无线AP所归属基本服务集的基本服务集标识BSSID以及所述无线AP所归属扩展服务集的服务集标识SSID;Obtain the network connection record of the terminal, the terminal is connected to the wireless AP of the wireless access point through the Wi-Fi network, and the network connection record includes the session identifier of the session in which the wireless AP participates, and the basic service to which the wireless AP belongs. The basic service set identifier BSSID of the set and the service set identifier SSID of the extended service set to which the wireless AP belongs;
确定所述网络连接记录中的漫游连接记录,任意多组所述漫游连接记录包含的会话标识相同、BSSID不同;Determine the roaming connection records in the network connection records, and any multiple groups of the roaming connection records contain the same session identifier and different BSSIDs;
根据所述漫游连接记录生成至少一个第一连通子图,其中,用于生成第一连通子图的漫游连接记录包含的SSID相同,不同第一连通子图用于表征不同的Wi-Fi网络;Generate at least one first connected subgraph according to the roaming connection record, wherein the roaming connection record used to generate the first connected subgraph contains the same SSID, and different first connected subgraphs are used to represent different Wi-Fi networks;
使用生成第一连通子图的漫游连接记录包含的SSID标记所述第一连通子图所表征的第一Wi-Fi网络,并使用生成所述第一连通子图的漫游连接记录包含的BSSID标记所述第一Wi-Fi网络的无线AP。Mark the first Wi-Fi network represented by the first connected subgraph using the SSID included in the roaming connection record that generates the first connected subgraph, and use the BSSID included in the roaming connection record that generates the first connected subgraph to mark The wireless AP of the first Wi-Fi network.
在一些实施例中,所述获取终端的网络连接记录,包括:In some embodiments, the obtaining the network connection record of the terminal includes:
获取终端的至少一条原始网络连接记录,所述原始网络连接记录包括所述终端的终 端标识、所述终端通过Wi-Fi网络连接的无线AP所归属基本服务集的基本服务集标识BSSID,以及所述终端连接至无线AP的连接时刻;Acquire at least one original network connection record of the terminal, where the original network connection record includes the terminal identifier of the terminal, the basic service set identifier BSSID of the basic service set to which the wireless AP connected by the terminal through the Wi-Fi network belongs, and all the connection time when the terminal is connected to the wireless AP;
在第一原始网络连接记录与第二原始网络连接记录包括的终端标识相同、连接时刻相同且BSSID不同的情况下,则从所述第一原始网络连接记录与第二原始网络连接记录中选取一条原始网络连接记录作为所述终端标识所表征终端的网络连接记录,所述第一原始网络连接记录为所述至少一条原始网络连接记录中的任一条连接记录,所述第二原始网络连接记录为所述至少一条原始网络连接记录中除所述第一原始网络连接记录之外的连接记录。In the case that the first original network connection record and the second original network connection record include the same terminal identifier, the same connection time, and different BSSIDs, select one from the first original network connection record and the second original network connection record The original network connection record is used as the network connection record of the terminal represented by the terminal identifier, the first original network connection record is any one of the at least one original network connection record, and the second original network connection record is Connection records other than the first original network connection record in the at least one original network connection record.
在一些实施例中,所述确定所述网络连接记录中的漫游连接记录,包括:In some embodiments, the determining a roaming connection record in the network connection record includes:
从各个所述网络连接记录中提取所述终端连接至无线AP的连接时刻,并按照所述连接时刻对各个所述网络连接记录进行排序;Extract the connection time when the terminal is connected to the wireless AP from each of the network connection records, and sort each of the network connection records according to the connection time;
在排序后的所述网络连接记录中,在相邻的多条网络连接记录包含的会话标识相同、BSSID不同的情况下,则确定所述多条网络连接记录为漫游连接记录。In the sorted network connection records, if the session identifiers contained in the adjacent multiple network connection records are the same but the BSSIDs are different, the multiple network connection records are determined as roaming connection records.
在一些实施例中,所述漫游连接记录包含第一BSSID和第二BSSID,所述第一BSSID用于表征第一无线AP,所述第二BSSID表征第二无线AP,所述漫游连接记录用于表征所述终端从所述第一无线AP漫游至所述第二无线AP,所述根据所述漫游连接记录生成至少一个第一连通子图,包括:In some embodiments, the roaming connection record includes a first BSSID and a second BSSID, the first BSSID is used to represent the first wireless AP, the second BSSID is used to represent the second wireless AP, and the roaming connection record is used for In order to characterize that the terminal roams from the first wireless AP to the second wireless AP, the generating at least one first connectivity subgraph according to the roaming connection record includes:
将所述漫游连接记录中的BSSID表征的各个无线AP作为子图节点;Each wireless AP represented by the BSSID in the roaming connection record is used as a subgraph node;
连接所述各个无线AP中的相邻无线AP,所述相邻无线AP之间的连接线作为子图边,所述相邻无线AP为所述漫游连接记录中相邻的网络连接记录的BSSID表征的无线AP;Connect the adjacent wireless APs in each wireless AP, the connection lines between the adjacent wireless APs are used as subgraph edges, and the adjacent wireless APs are the BSSIDs of the adjacent network connection records in the roaming connection record. Characterized wireless AP;
对于任意两组漫游连接记录,在前一组漫游连接记录中任一BSSID与后一组漫游连接记录中的任一BSSID表征同一无线AP的情况下,则将该无线AP作为所述两组漫游连接记录分别对应的子图边的公共子图节点。For any two groups of roaming connection records, if any BSSID in the former group of roaming connection records and any BSSID in the latter group of roaming connection records represent the same wireless AP, the wireless AP is regarded as the two groups of roaming connections. Connect the common subgraph nodes that record the corresponding subgraph edges respectively.
在一些实施例中,还包括:In some embodiments, it also includes:
按照预设的间隔时长,获取更新后的网络连接记录并生成用于表征第二Wi-Fi网络的第二连通子图;According to the preset interval duration, obtain the updated network connection record and generate a second connected subgraph for characterizing the second Wi-Fi network;
在所述第二连通子图与所述第一连通子图之间的子图差异大于预设的差异阈值的情况下,则使用区别于已有SSID的网络标识标记所述第二连通子图表征的所述第二Wi-Fi网络,所述已有SSID被用于标记已识别出的所述第一Wi-Fi网络。When the subgraph difference between the second connected subgraph and the first connected subgraph is greater than a preset difference threshold, the second connected subgraph is marked with a network identifier different from the existing SSID The characterized second Wi-Fi network, the existing SSID is used to tag the identified first Wi-Fi network.
在一些实施例中,通过下述方式确定所述子图差异:In some embodiments, the subgraph difference is determined by:
确定所述第二连通子图相对于所述第一连通子图新增或减少的变更节点个数;Determining the number of new or decreased changed nodes in the second connected subgraph relative to the first connected subgraph;
将所述变更节点个数确定为所述子图差异、或者将所述变更节点个数与所述第一连通子图中的子图节点个数的比值确定为所述子图差异。The number of changed nodes is determined as the subgraph difference, or the ratio of the number of changed nodes to the number of subgraph nodes in the first connected subgraph is determined as the subgraph difference.
根据本公开实施例的第二方面,提出一种Wi-Fi网络的识别装置,包括:According to a second aspect of the embodiments of the present disclosure, an apparatus for identifying a Wi-Fi network is provided, including:
获取单元,被配置为获取终端的网络连接记录,所述终端通过Wi-Fi网络连接至无 线接入点无线AP,所述网络连接记录中包含所述无线AP所参与会话的会话标识、所述无线AP所归属基本服务集的基本服务集标识BSSID以及所述无线AP所归属扩展服务集的服务集标识SSID;an acquiring unit, configured to acquire a network connection record of a terminal, the terminal is connected to a wireless AP of a wireless access point through a Wi-Fi network, the network connection record includes a session identifier of a session in which the wireless AP participates, the The basic service set identifier BSSID of the basic service set to which the wireless AP belongs and the service set identifier SSID of the extended service set to which the wireless AP belongs;
确定单元,被配置为确定所述网络连接记录中的漫游连接记录,任意多组所述漫游连接记录包含的会话标识相同、BSSID不同;a determining unit, configured to determine a roaming connection record in the network connection record, and any multiple groups of the roaming connection record contain the same session identifier and different BSSIDs;
生成单元,被配置为根据所述漫游连接记录生成至少一个第一连通子图,其中,用于生成第一连通子图的漫游连接记录包含的SSID相同,不同第一连通子图用于表征不同的Wi-Fi网络;The generating unit is configured to generate at least one first connected subgraph according to the roaming connection record, wherein the SSID included in the roaming connection record used to generate the first connected subgraph is the same, and different first connected subgraphs are used to represent different Wi-Fi network;
标识单元,被配置为使用生成第一连通子图的漫游连接记录包含的SSID标记所述第一连通子图所表征的第一Wi-Fi网络,并使用生成所述第一连通子图的漫游连接记录包含的BSSID标记所述第一Wi-Fi网络的无线AP。The identification unit is configured to use the SSID included in the roaming connection record for generating the first connected subgraph to mark the first Wi-Fi network represented by the first connected subgraph, and use the roaming to generate the first connected subgraph The BSSID contained in the connection record marks the wireless AP of the first Wi-Fi network.
在一些实施例中,所述获取单元还被配置为:In some embodiments, the obtaining unit is further configured to:
获取终端的至少一条原始网络连接记录,所述原始网络连接记录包括所述终端的终端标识、所述终端通过Wi-Fi网络连接的无线AP所归属基本服务集的基本服务集标识BSSID,以及所述终端连接至无线AP的连接时刻;Acquire at least one original network connection record of the terminal, where the original network connection record includes the terminal identifier of the terminal, the basic service set identifier BSSID of the basic service set to which the wireless AP connected by the terminal through the Wi-Fi network belongs, and all the connection time when the terminal is connected to the wireless AP;
在第一原始网络连接记录与第二原始网络连接记录包括的终端标识相同、连接时刻相同且BSSID不同的情况下,则从所述第一原始网络连接记录与第二原始网络连接记录中选取一条原始网络连接记录作为所述终端标识所表征终端的网络连接记录,所述第一原始网络连接记录为所述至少一条原始网络连接记录中的任一条连接记录,所述第二原始网络连接记录为所述至少一条原始网络连接记录中除所述第一原始网络连接记录之外的连接记录。In the case that the first original network connection record and the second original network connection record include the same terminal identifier, the same connection time, and different BSSIDs, select one from the first original network connection record and the second original network connection record The original network connection record is used as the network connection record of the terminal represented by the terminal identifier, the first original network connection record is any one of the at least one original network connection record, and the second original network connection record is Connection records other than the first original network connection record in the at least one original network connection record.
在一些实施例中,所述确定单元还被配置为:In some embodiments, the determining unit is further configured to:
从各个所述网络连接记录中提取所述终端连接至无线AP的连接时刻,并按照所述连接时刻对各个所述网络连接记录进行排序;Extract the connection time when the terminal is connected to the wireless AP from each of the network connection records, and sort each of the network connection records according to the connection time;
在排序后的所述网络连接记录中,在相邻的多条网络连接记录包含的会话标识相同、BSSID不同的情况下,则确定所述多条网络连接记录为漫游连接记录。In the sorted network connection records, if the session identifiers contained in the adjacent multiple network connection records are the same but the BSSIDs are different, the multiple network connection records are determined as roaming connection records.
在一些实施例中,所述漫游连接记录包含第一BSSID和第二BSSID,所述第一BSSID用于表征第一无线AP,所述第二BSSID表征第二无线AP,所述漫游连接记录用于表征所述终端从所述第一无线AP漫游至所述第二无线AP,所述生成单元还被配置为:In some embodiments, the roaming connection record includes a first BSSID and a second BSSID, the first BSSID is used to represent the first wireless AP, the second BSSID is used to represent the second wireless AP, and the roaming connection record is used for In order to characterize that the terminal roams from the first wireless AP to the second wireless AP, the generating unit is further configured to:
将所述漫游连接记录中的BSSID表征的各个无线AP作为子图节点;Each wireless AP represented by the BSSID in the roaming connection record is used as a subgraph node;
连接所述各个无线AP中的相邻无线AP,所述相邻无线AP之间的连接线作为子图边,所述相邻无线AP为所述漫游连接记录中相邻的网络连接记录的BSSID表征的无线AP;Connect the adjacent wireless APs in each wireless AP, the connection lines between the adjacent wireless APs are used as subgraph edges, and the adjacent wireless APs are the BSSIDs of the adjacent network connection records in the roaming connection record. Characterized wireless AP;
对于任意两组漫游连接记录,在前一组漫游连接记录中任一BSSID与后一组漫游连接记录中的任一BSSID表征同一无线AP的情况下,则将该无线AP作为所述两组漫 游连接记录分别对应的子图边的公共子图节点。For any two groups of roaming connection records, if any BSSID in the former group of roaming connection records and any BSSID in the latter group of roaming connection records represent the same wireless AP, the wireless AP is regarded as the two groups of roaming connections. Connect the common subgraph nodes that record the corresponding subgraph edges respectively.
在一些实施例中,还包括:In some embodiments, it also includes:
子图更新单元,被配置为按照预设的间隔时长,获取更新后的网络连接记录并生成用于表征第二Wi-Fi网络的第二连通子图;a subgraph updating unit, configured to obtain the updated network connection record according to a preset interval duration and generate a second connected subgraph for characterizing the second Wi-Fi network;
标识更新单元,被配置为在所述第二连通子图与所述第一连通子图之间的子图差异大于预设的差异阈值的情况下,则使用区别于已有SSID的网络标识标记所述第二连通子图表征的所述第二Wi-Fi网络,所述已有SSID被用于标记已识别出的所述第一Wi-Fi网络。An identification update unit, configured to use a network identification mark different from the existing SSID when the subgraph difference between the second connected subgraph and the first connected subgraph is greater than a preset difference threshold For the second Wi-Fi network represented by the second connectivity subgraph, the existing SSID is used to mark the identified first Wi-Fi network.
在一些实施例中,所述标识更新单元还被配置为:In some embodiments, the identity update unit is further configured to:
确定所述第二连通子图相对于所述第一连通子图新增或减少的变更节点个数;Determining the number of new or decreased changed nodes in the second connected subgraph relative to the first connected subgraph;
将所述变更节点个数确定为所述子图差异、或者将所述变更节点个数与所述第一连通子图中的子图节点个数的比值确定为所述子图差异。The number of changed nodes is determined as the subgraph difference, or the ratio of the number of changed nodes to the number of subgraph nodes in the first connected subgraph is determined as the subgraph difference.
根据本公开实施例的第三方面,提出一种电子设备,包括:According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, including:
处理器;processor;
用于存储所述处理器可执行指令的存储器;a memory for storing the processor-executable instructions;
其中,所述处理器被配置为执行所述指令,以实现如上述第一方面中任一实施例所述的Wi-Fi网络的识别方法。Wherein, the processor is configured to execute the instructions, so as to implement the method for identifying a Wi-Fi network according to any one of the embodiments of the first aspect.
根据本公开实施例的第四方面,提出一种存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行上述第一方面中任一实施例所述的Wi-Fi网络的识别方法。According to a fourth aspect of the embodiments of the present disclosure, there is provided a storage medium, when an instruction in the storage medium is executed by a processor of an electronic device, the electronic device can execute any one of the embodiments of the first aspect above. How to identify a Wi-Fi network.
根据本公开实施例的第五方面,提供一种计算机程序产品,所述计算机程序产品被配置为执行上述第一方面中任一实施例所述的Wi-Fi网络的识别方法。According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, the computer program product being configured to execute the method for identifying a Wi-Fi network according to any one of the embodiments of the first aspect above.
根据本公开的实施例,首先获取终端与Wi-Fi网络实现无线连接产生的网络连接记录,然后从其中确定终端在不同无线AP之间实现网络漫游所产生的漫游连接记录,并根据漫游连接记录生成对应于Wi-Fi网络的至少一个连通子图,最后分别使用连通子图所对应漫游网络连接记录的SSID和BSSID分别标记Wi-Fi网络和及其无线AP。因为生成的连通子图能够表征Wi-Fi网络中包含的无线AP以及各个无线AP之间的连接关系,所以该连通子图能够体现Wi-Fi网络的内部结构,从而实现对Wi-Fi网络结构的有效识别,进而保证无线AP标识的准确度。该方式无需终端的定位数据,从根本上避免了用户隐私方面可能存在的安全隐患;而且仅需要使用终端产生的包含会话标识、BSSID和SSID的网络连接记录,因而能够适用于通过Wi-Fi网络实现联网的多种应用场景。According to the embodiment of the present disclosure, first obtain the network connection record generated by the terminal and the Wi-Fi network implementing wireless connection, and then determine the roaming connection record generated by the terminal implementing network roaming between different wireless APs from the roaming connection record, and according to the roaming connection record At least one connectivity subgraph corresponding to the Wi-Fi network is generated, and finally the Wi-Fi network and its wireless APs are respectively marked with the SSID and BSSID of the roaming network connection record corresponding to the connectivity subgraph. Because the generated connectivity subgraph can represent the wireless APs included in the Wi-Fi network and the connection relationship between each wireless AP, the connectivity subgraph can reflect the internal structure of the Wi-Fi network, so as to realize the structure of the Wi-Fi network. It can effectively identify the wireless AP and ensure the accuracy of the wireless AP identification. This method does not require the positioning data of the terminal, which fundamentally avoids potential security risks in terms of user privacy; and only needs to use the network connection record generated by the terminal including the session ID, BSSID and SSID, so it can be applied to the Wi-Fi network. Realize various application scenarios of networking.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,并不构成对本公开的不当限定。The accompanying drawings, which are incorporated into and constitute a part of this specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure and do not unduly limit the present disclosure.
图1是一示例性实施例提供的一种Wi-Fi网络的识别系统的架构示意图;1 is a schematic structural diagram of a Wi-Fi network identification system provided by an exemplary embodiment;
图2是根据本公开的实施例示出的一种Wi-Fi网络的识别方法流程图;2 is a flowchart of a method for identifying a Wi-Fi network according to an embodiment of the present disclosure;
图3是根据本公开的实施例示出的另一种Wi-Fi网络的识别方法流程图;3 is a flowchart of another method for identifying a Wi-Fi network according to an embodiment of the present disclosure;
图4是根据本公开的实施例示出的一种Wi-Fi网络的识别过程示意图;4 is a schematic diagram of an identification process of a Wi-Fi network according to an embodiment of the present disclosure;
图5是根据本公开的实施例示出的一种Wi-Fi网络的识别结果示意图;FIG. 5 is a schematic diagram showing the identification result of a Wi-Fi network according to an embodiment of the present disclosure;
图6是根据本公开的实施例示出的一种Wi-Fi网络的识别装置的示意框图;6 is a schematic block diagram of an apparatus for identifying a Wi-Fi network according to an embodiment of the present disclosure;
图7是根据本公开的实施例示出的一种电子设备的结构图。FIG. 7 is a structural diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实施例中的技术方案进行清楚、完整地描述。In order to make those skilled in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。It should be noted that the terms "first", "second" and the like in the description and claims of the present disclosure and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as recited in the appended claims.
通过连接Wi-Fi网络实现联网,是当前终端进行无线联网的常用方式。Wi-Fi网络通常由至少一个无线AP(Access Point,接入点)所构成的ESS(Extend Service Set,扩展服务集)提供,各个无线AP分别相当于BSS(Basic Service Set,基本服务集)。用于提供任一Wi-Fi网络的ESS对外具有唯一的SSID(Service Set Identifier,服务集标识),其内部的多个BSS各自具有唯一的BSSID(Basic Service Set Identifier,基本服务集标识)。通常来说,Wi-Fi网络中的任一无线AP同时归属于BSS和ESS,相应的,Wi-Fi网络可通过SSID进行标识,该Wi-Fi中的任一无线AP可通过BSSID进行标识,在本方案中,可认为AP与标识该AP的BSSID/SSID相对应。Networking by connecting to a Wi-Fi network is a common method for wireless networking of current terminals. A Wi-Fi network is usually provided by an ESS (Extend Service Set) composed of at least one wireless AP (Access Point, access point), and each wireless AP is equivalent to a BSS (Basic Service Set, basic service set). The ESS used to provide any Wi-Fi network has a unique SSID (Service Set Identifier, service set identifier) to the outside, and multiple BSSs inside it each have a unique BSSID (Basic Service Set Identifier, basic service set identifier). Generally speaking, any wireless AP in the Wi-Fi network belongs to both the BSS and the ESS. Correspondingly, the Wi-Fi network can be identified by the SSID, and any wireless AP in the Wi-Fi network can be identified by the BSSID. In this solution, the AP can be considered to correspond to the BSSID/SSID that identifies the AP.
IEEE802.11允许多个无线信号提供设备构成一个任意大小和复杂的无线网络,即上述ESS。ESS有一个标识的名称,即SSID,其可以为Wi-Fi网络的网络名称。任一ESS可以包含若干个无线AP,其中每一无线AP作为BSS,且可以使用无线AP的MAC(Media Access Control Address,媒体访问控制地址)地址作为该BSS的BSSID。BSS的信号覆盖范围称为基本服务区(Basic Service Area,BSA)或是蜂窝(Cellular)。IEEE802.11 allows multiple wireless signal providing devices to form a wireless network of any size and complexity, namely the above-mentioned ESS. The ESS has an identifying name, the SSID, which can be the network name of the Wi-Fi network. Any ESS may include several wireless APs, where each wireless AP serves as a BSS, and the MAC (Media Access Control Address) address of the wireless AP may be used as the BSSID of the BSS. The signal coverage of BSS is called Basic Service Area (BSA) or Cellular.
本公开实施例提出一种Wi-Fi网络的识别方法,通过终端上报的网络连接记录中包含的会话标识、BSSID及ESSID等信息,确定终端在不同无线AP之间漫游所产生的漫游连接记录,并根据漫游连接记录生成表征Wi-Fi网络的至少一个连通子图,使用连通子图所对应漫游网络连接记录的SSID和BSSID分别标记Wi-Fi网络和及其无线AP。An embodiment of the present disclosure proposes a method for identifying a Wi-Fi network, which determines a roaming connection record generated by a terminal roaming between different wireless APs by using information such as a session identifier, BSSID, and ESSID included in the network connection record reported by the terminal. At least one connectivity subgraph representing the Wi-Fi network is generated according to the roaming connection record, and the Wi-Fi network and its wireless AP are respectively marked with the SSID and BSSID of the roaming network connection record corresponding to the connectivity subgraph.
图1是一示例性实施例提供的一种Wi-Fi网络的识别系统的架构示意图,本公开实施例的所述的识别方法即可应用于该系统。如图1所示,该系统可以包括网络10、服务器11、若干无线AP,如无线AP 12、无线AP 13、无线AP 14等,若干电子设备,比如手机15、手机16和手机17等。其中,无线AP 12、无线AP 13、无线AP 14用于发送无线信号,并在各自周围空间构成Wi-Fi网络,用户使用的终端设备可以接入该Wi-Fi网络。FIG. 1 is a schematic structural diagram of a Wi-Fi network identification system provided by an exemplary embodiment, and the identification method described in the embodiment of the present disclosure can be applied to the system. As shown in Figure 1, the system may include a network 10, a server 11, several wireless APs, such as wireless AP 12, wireless AP 13, wireless AP 14, etc., and several electronic devices, such as mobile phone 15, mobile phone 16, and mobile phone 17, etc. Among them, the wireless AP 12, the wireless AP 13, and the wireless AP 14 are used to transmit wireless signals, and form a Wi-Fi network in their respective surrounding spaces, and the terminal equipment used by the user can access the Wi-Fi network.
服务器11可以为包含一独立主机的物理服务器,或者该服务器11可以为虚拟服务器。在运行过程中,服务器11可以运行某一应用的服务器侧的程序,以实现该应用的相关业务功能,比如在该服务器11运行Wi-Fi网络的识别程序的情况下,可以实现为该识别程序对应的服务器。而在本说明书一个或多个实施例的技术方案中,可由服务器11通过与无线AP 12-14及手机15-17上运行的客户端进行配合,以实现下述的Wi-Fi网络的识别方案。The server 11 may be a physical server containing an independent host, or the server 11 may be a virtual server. During the running process, the server 11 can run a program on the server side of an application to realize the relevant service functions of the application. For example, in the case where the server 11 runs a Wi-Fi network identification program, it can be implemented as the identification program the corresponding server. In the technical solutions of one or more embodiments of this specification, the following Wi-Fi network identification solution can be implemented by the server 11 by cooperating with the clients running on the wireless APs 12-14 and the mobile phones 15-17 .
在本公开的实施例中,上述识别系统不仅可以通过Wi-Fi网络为终端提供无线联网功能,还可以作为诸多其他功能的集成化功能平台,比如获取原始网络连接记录、筛选网络连接记录、确定漫游连接记录、对网络连接记录进行排序、生成连通子图、计算第一连通子图和第二连通子图的子图差异、为第二连通子图分配网络标识等。In the embodiments of the present disclosure, the above-mentioned identification system can not only provide wireless networking functions for terminals through a Wi-Fi network, but also serve as an integrated functional platform for many other functions, such as obtaining original network connection records, screening network connection records, determining Roaming connection records, sorting network connection records, generating connected subgraphs, calculating subgraph differences between the first connected subgraph and the second connected subgraph, assigning network identifiers to the second connected subgraph, etc.
无线AP 12-14用于为手机15-17提供无线网络,以供手机15-17连接至相应网络。其中,上述任一无线AP可以实现为一BSS,并归属于一ESS。例如,任一无线AP可以独立构成ESS,或多个无线AP通过组网构成一ESS(如无线AP 12可以独立构成ESS1,无线AP 13-14可以组网构成ESS2等,图中并未示出)。例如,手机15连接至无线AP12,则手机15通过与无线AP 12之间的无线连接实现联网的过程中,其可以向服务器11上报自身的网络连接记录,以便服务器11根据该网络连接记录对Wi-Fi网络进行识别,即实现本说明书的下述方案。The wireless AP 12-14 is used to provide a wireless network for the mobile phone 15-17 for the mobile phone 15-17 to connect to the corresponding network. Wherein, any of the above wireless APs can be implemented as a BSS and belong to an ESS. For example, any wireless AP can form an ESS independently, or multiple wireless APs can form an ESS through networking (for example, the wireless AP 12 can form an ESS1 independently, and the wireless APs 13-14 can form a network to form an ESS2, etc., which are not shown in the figure. ). For example, when the mobile phone 15 is connected to the wireless AP 12, the mobile phone 15 can report its own network connection record to the server 11 in the process of realizing the networking through the wireless connection with the wireless AP 12, so that the server 11 can record the Wi-Fi connection according to the network connection record. -Fi network to identify, that is, to implement the following solutions in this specification.
手机15-17是用户可以使用的一种类型的电子设备。实际上,用户显然还可以使用诸如下述类型的电子设备:平板设备、笔记本电脑、掌上电脑(PDAs,Personal Digital Assistants)、可穿戴设备(如智能眼镜、智能手表等)等。在运行过程中,该电子设备可以运行某一应用的客户端侧的程序,以实现该应用的相关业务功能,比如在该电子设备15运行于具有上报网络连接记录这一功能的应用程序的情况下,可以实现为该应用程序对应的客户端,从而将自身与相应无线AP之间的连接记录上报至服务器11。Cell phones 15-17 are one type of electronic device available to users. In fact, users can obviously also use electronic devices such as tablet devices, notebook computers, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.), etc. During the running process, the electronic device can run the program on the client side of an application to realize the relevant business functions of the application. For example, when the electronic device 15 runs on an application with the function of reporting network connection records It can be implemented as a client corresponding to the application, so as to report the connection record between itself and the corresponding wireless AP to the server 11 .
需要指出的是:用于上报网络连接记录的应用程序可以被预先安装在电子设备上,使得该应用程序可以在该电子设备上被启动并运行,例如可以以集成在其他应用程序中的SDK(Software Development Kit,软件开发工具包)的形式运行于电子设备中。当然,在采用诸如HTML5技术的在线“客户端”的情况下,无需在电子设备上安装相应的应用程序,即可获得并运行该程序。It should be pointed out that the application for reporting network connection records can be pre-installed on the electronic device, so that the application can be started and run on the electronic device, for example, the SDK ( Software Development Kit, software development kit) runs in electronic devices. Of course, in the case of an online "client" such as HTML5 technology, the program can be obtained and run without installing the corresponding application program on the electronic device.
对于无线AP 12-14与服务器11之间进行交互的网络10,可以包括多种类型的有线或无线网络,对于无线AP 12-14与手机15-17之间进行交互的网络,即为无线AP在其 周围空间形成的无线网络。The network 10 for the interaction between the wireless AP 12-14 and the server 11 may include various types of wired or wireless networks, and the network for the interaction between the wireless AP 12-14 and the mobile phone 15-17 is the wireless AP A wireless network formed in the space around it.
图2是本说明书一示例性实施例示出的一种Wi-Fi网络的识别方法的流程图。图2所示的Wi-Fi网络的识别方法可由任意具有Wi-Fi网络识别功能的电子设备执行。电子设备可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。如图2所示,该方法应用于服务器,可以包括以下步骤202-208。FIG. 2 is a flowchart of a method for identifying a Wi-Fi network according to an exemplary embodiment of this specification. The Wi-Fi network identification method shown in FIG. 2 can be performed by any electronic device having a Wi-Fi network identification function. Electronic devices may be mobile phones, computers, digital broadcast terminals, messaging devices, game consoles, tablet devices, medical devices, fitness devices, personal digital assistants, and the like. As shown in FIG. 2, the method is applied to a server, and may include the following steps 202-208.
步骤202,获取终端的网络连接记录,所述终端通过Wi-Fi网络连接至无线接入点无线AP,所述网络连接记录中包含所述无线AP所参与会话的会话标识、所述无线AP所归属基本服务集的基本服务集标识BSSID以及所述无线AP所归属扩展服务集的服务集标识SSID。Step 202: Obtain a network connection record of the terminal, the terminal is connected to the wireless AP of the wireless access point through the Wi-Fi network, and the network connection record includes the session identifier of the session in which the wireless AP participates, the session ID of the wireless AP The basic service set identifier BSSID of the home basic service set and the service set identifier SSID of the extended service set to which the wireless AP belongs.
在本公开的实施例中,连接至任一无线AP的终端中运行有联网应用程序,该应用程序中可以具有用于上报网络连接记录的功能。例如,用于上报网络连接记录的程序可以预先部署在终端中,或者运行在HTML5页面等在线客户端中。终端通过无线AP与服务器实现通信,例如传输数据、会话消息等。但需要说明的是,本公开实施例所述的会话消息,并不局限于即时通讯会话等过程中产生的通讯消息,也可以为多媒体资源传输过程中产生的数据传输消息,如资源请求消息、数据传输消息、数据校验消息等,不再赘述。In the embodiment of the present disclosure, a terminal connected to any wireless AP runs a networking application, and the application may have a function for reporting network connection records. For example, a program for reporting network connection records can be pre-deployed in a terminal, or run in an online client such as an HTML5 page. The terminal communicates with the server through the wireless AP, such as transmitting data and session messages. However, it should be noted that the session messages described in the embodiments of the present disclosure are not limited to communication messages generated in the process of instant messaging sessions, etc., but may also be data transmission messages generated in the process of multimedia resource transmission, such as resource request messages, Data transmission messages, data verification messages, etc., are not repeated here.
在终端与无线AP连接后,上述应用程序可以在终端参与会话的过程中向服务器上报网络连接记录,该网络连接记录中可以包括终端当前参与会话的会话标识、该无线AP对应的BSSID和SSID。其中,上述会话标识可以包含在会话对应的SESSION(会话控制)中,该SESSION中还可以包括终端连接无线AP的时刻(下称联网时刻)。After the terminal is connected to the wireless AP, the above-mentioned application may report a network connection record to the server during the process of the terminal participating in the session, and the network connection record may include the session identifier of the terminal currently participating in the session, and the corresponding BSSID and SSID of the wireless AP. Wherein, the above-mentioned session identifier may be included in a session corresponding to the session (session control), and the session may also include the time when the terminal connects to the wireless AP (hereinafter referred to as the networking time).
在一实施例中,终端可以通过多种方式向服务器上报网络连接记录,。例如,终端可以在联网状态下周期性上报上述网络连接记录;或者,也可以监测终端的联网状态,并在终端所连接的无线AP发生变更的情况下,上报变更后的无线AP对应的网络连接记录,从而有效减少网络连接记录的上报次数,避免网络拥堵。当然,服务器也可以主动向终端请求获取网络连接记录,从而终端可以在接收到服务器的请求后向其返回相应的网络连接记录。In an embodiment, the terminal can report the network connection record to the server in various ways. For example, the terminal may periodically report the above-mentioned network connection record in the networking state; alternatively, it may monitor the networking state of the terminal, and report the network connection corresponding to the changed wireless AP when the wireless AP connected to the terminal changes. Records, thereby effectively reducing the number of reported network connection records and avoiding network congestion. Of course, the server can also actively request the terminal to obtain the network connection record, so that the terminal can return the corresponding network connection record to the server after receiving the request.
在一实施例中,由于无线AP可能连接有非法终端、恶意终端(如非法终端盗用合法终端的终端标识)等,所以可能存在同一终端标识对应的多个终端在同一时刻分别连接至多个无线AP的异常情况,因此可以对终端上报的网络连接记录(称之为原始网络连接记录)进行清洗。例如,服务器可以获取终端的至少一条原始网络连接记录,该原始网络连接记录中可以记录终端的终端标识、终端通过Wi-Fi网络连接的无线AP所归属基本服务集的基本服务集标识BSSID、以及终端连接至无线AP的连接时刻,在第一原始网络连接记录与第二原始网络连接记录包括的终端标识相同、连接时刻相同且BSSID不同的情况下,则可以从第一原始网络连接记录与第二原始网络连接记录中选取一条原始网络连接记录作为该终端标识所表征终端的网络连接记录,其中,第一原始网 络连接记录为上述至少一条原始网络连接记录中的任一条连接记录,第二原始网络连接记录为上述至少一条原始网络连接记录中除第一原始网络连接记录之外的连接记录。在选取时,可以随机选取一条原始网络连接记录作为该终端的网络连接记录,或者将联网时刻距离当前时刻最近的一条作为该终端的网络连接记录,以保证任一时刻的网络连接记录与终端的唯一对应。实际上,从上述终端标识、连接时刻均相同且BSSID不同的多条原始网络连接记录中选取的一条,无论对应的真实终端是否合法,只需保证任一终端标识的在任一时刻仅对应一条网络连接记录即可。In one embodiment, since the wireless AP may be connected to an illegal terminal, a malicious terminal (such as an illegal terminal stealing the terminal identification of a legitimate terminal), etc., there may be multiple terminals corresponding to the same terminal identification respectively connected to multiple wireless APs at the same time. Therefore, the network connection record (called the original network connection record) reported by the terminal can be cleaned. For example, the server may acquire at least one original network connection record of the terminal, and the original network connection record may record the terminal identifier of the terminal, the basic service set identifier BSSID of the basic service set to which the wireless AP connected by the terminal through the Wi-Fi network belongs, and When the terminal is connected to the wireless AP, if the first original network connection record and the second original network connection record include the same terminal identifier, the same connection time, and different BSSIDs, the first original network connection record and the second original network connection record can be obtained from the first original network connection record. One original network connection record is selected from the two original network connection records as the network connection record of the terminal represented by the terminal identifier, wherein the first original network connection record is any one of the above at least one original network connection record, and the second original network connection record is any one of the above at least one original network connection record. The network connection record is a connection record other than the first original network connection record in the above at least one original network connection record. When selecting, an original network connection record can be randomly selected as the terminal's network connection record, or the one closest to the current moment when the networking time is connected can be used as the terminal's network connection record, so as to ensure that the network connection record at any time is consistent with the terminal's network connection record. unique correspondence. In fact, one selected from the above-mentioned multiple original network connection records with the same terminal identification and connection time and different BSSIDs, regardless of whether the corresponding real terminal is legal or not, only needs to ensure that any terminal identification corresponds to only one network at any time. The connection record can be.
通过该方式能够从服务器接收到的多条原始网络连接记录中,确定出同一终端在同一时刻连接至不同无线AP的多条原始网络连接记录,并将这部分记录中的其中一条记录作为网络连接记录,用于后续处理过程。在实际场景中,表明同一终端在同一时刻连接至不同无线AP的多条原始网络连接记录往往由黑产、盗号等非法手段产生,所以该方式能够有效避免上述非法终端的网络连接记录参与后续的识别处理,以提升Wi-Fi网络的识别准确度。In this way, from the multiple original network connection records received by the server, it is possible to determine multiple original network connection records that the same terminal is connected to different wireless APs at the same time, and use one of these records as the network connection. record for subsequent processing. In actual scenarios, multiple original network connection records indicating that the same terminal is connected to different wireless APs at the same time are often generated by illegal means such as hacking and number theft, so this method can effectively prevent the network connection records of the above illegal terminals from participating in subsequent Identification processing to improve the identification accuracy of Wi-Fi networks.
另外还可以根据风控规则、反作弊规则等业务安全规则进一步制定记录筛选规则,并按照该规则对原始网络连接记录进行筛选,从而在保证筛选后任一网络连接记录对应于唯一的无线AP的同时,尽量保证网络连接记录的安全性及网络识别的准确性。In addition, you can further formulate record screening rules according to business security rules such as risk control rules and anti-cheating rules, and screen the original network connection records according to the rules, so as to ensure that any network connection record after screening corresponds to a unique wireless AP at the same time. , try to ensure the security of network connection records and the accuracy of network identification.
对于经过筛选的任一网络连接记录,其所包含的BSSID对应于唯一的无线AP,其所包含的SSID用于标识该无线AP构建的Wi-Fi网络。一个实施例中,该SSID可以为该Wi-Fi网络的网络名称,例如,可以为预设的默认网络名称(如“品牌名称#1”等),也可以为用户自定义的网络名称(如“AA家的网络”等)。For any filtered network connection record, the included BSSID corresponds to a unique wireless AP, and the included SSID is used to identify the Wi-Fi network constructed by the wireless AP. In one embodiment, the SSID may be the network name of the Wi-Fi network, for example, may be a preset default network name (such as "brand name #1", etc.), or may be a user-defined network name (such as "AA home network", etc.).
步骤204,确定所述网络连接记录中的漫游连接记录,任意多组所述漫游连接记录包含的会话标识相同、BSSID不同。Step 204: Determine the roaming connection records in the network connection records, and any plurality of groups of the roaming connection records contain the same session ID but different BSSIDs.
在本公开的实施例中,持有终端的用户可能携带终端在多个无线AP之间移动,由于Wi-Fi网络具有自动搜索连接的固有特性(前提是无线AP所在Wi-Fi网络为开放式网络,或者终端记录有相应Wi-Fi网络的连接密码并设置为允许自动连接状态),因此随着用户走动导致终端的空间位置发生变化,终端所连接的无线AP可能会在相邻无线AP之间切换,即终端发生网络漫游行为。例如,随着用户走动,终端从某一无线AP的BSA进入相邻的另一无线AP的BSA,相应的,终端会自动切换所连接的无线AP。In the embodiment of the present disclosure, the user holding the terminal may carry the terminal to move between multiple wireless APs, because the Wi-Fi network has the inherent characteristic of automatically searching for connections (provided that the Wi-Fi network where the wireless AP is located is open network, or the terminal records the connection password of the corresponding Wi-Fi network and is set to allow automatic connection), so as the user moves around, the spatial position of the terminal changes, and the wireless AP connected to the terminal may be located between adjacent wireless APs. In other words, the terminal performs network roaming behavior. For example, as the user moves, the terminal enters the BSA of another adjacent wireless AP from the BSA of a certain wireless AP, and accordingly, the terminal automatically switches the connected wireless AP.
如商场的不同楼层安装的无线AP构成归属于同一ESS(即具有相同的SSID),用户手持手机在商场的不同楼层之间走动,在终端在时刻1连接位于一楼的无线AP1的情况下,则终端可以向服务器上报对应于时刻1的网络连接记录1;在一段时间后的时刻2用户走动到二楼,手机连接位于二楼的无线AP2,进而手机可以向服务器上报对应于时刻2的网络连接记录2。此时,可以认为终端所连接的无线AP在无线AP1和无线AP2之间发生切换,即终端在无线AP1和无线AP2之间发生网络漫游行为。For example, the wireless APs installed on different floors of the shopping mall belong to the same ESS (that is, have the same SSID), and the user walks between different floors of the shopping mall with a mobile phone. Then the terminal can report the network connection record 1 corresponding to time 1 to the server; at time 2 after a period of time, the user walks to the second floor, and the mobile phone connects to the wireless AP2 located on the second floor, and then the mobile phone can report the network corresponding to time 2 to the server. Connection record 2. At this time, it can be considered that the wireless AP connected to the terminal is switched between the wireless AP1 and the wireless AP2, that is, the terminal performs network roaming behavior between the wireless AP1 and the wireless AP2.
在一实施例中,服务器可以从各个网络连接记录中提取终端连接至无线AP的连接时刻,并按照提取到的连接时刻对各个网络连接记录进行排序,在排序后的网络连接记 录中,在相邻的多条网络连接记录包含的会话标识相同、BSSID不同的情况下,则可以确定上述多条网络连接记录为漫游连接记录。例如,上述网络连接记录1和网络连接记录2包含相同的会话标识H和相同的SSID,因为终端在时刻1和时刻2分别连接至无线AP1和无线AP2,所以网络连接记录1包含无线AP1的BSSID1,网络连接记录2包含无线AP2的BSSID2。可见,这两条网络连接记录各自包含的会话标识和SSID相同、各自包含的BSSID不同,所以可以将上述网络连接记录1和网络连接记录2确定为一组漫游连接记录。当然,任意一组漫游连接记录也可以包括两条以上的网络连接记录,例如在终端依次连接至A、B、C和D这4个无线AP的情况下,则相应的产生网络连接记录A(表征终端连接的无线AP为A)、网络连接记录B(表征终端连接的无线AP为B)、网络连接记录C(表征终端连接的无线AP为C)、网络连接记录D(表征终端连接的无线AP为D)这4条网络连接记录,该4条网络连接记录构成一组漫游连接记录。In one embodiment, the server may extract the connection time when the terminal is connected to the wireless AP from each network connection record, and sort each network connection record according to the extracted connection time. In the case that the session identifiers contained in the multiple neighboring network connection records are the same but the BSSIDs are different, it can be determined that the multiple network connection records are roaming connection records. For example, the above network connection record 1 and network connection record 2 contain the same session identifier H and the same SSID. Because the terminal is connected to wireless AP1 and wireless AP2 at time 1 and time 2, respectively, network connection record 1 contains the BSSID1 of wireless AP1 , the network connection record 2 contains the BSSID2 of the wireless AP2. It can be seen that the two network connection records respectively contain the same session ID and SSID, and each contain different BSSIDs, so the above network connection record 1 and network connection record 2 can be determined as a group of roaming connection records. Of course, any group of roaming connection records may also include more than two network connection records. For example, when the terminal is connected to the four wireless APs A, B, C, and D in turn, the corresponding network connection records A ( The wireless AP that represents the terminal connection is A), the network connection record B (the wireless AP that represents the terminal connection is B), the network connection record C (the wireless AP that represents the terminal connection is C), and the network connection record D (the wireless AP that represents the terminal connection is C) AP is D) these 4 network connection records, and the 4 network connection records constitute a group of roaming connection records.
在其他实施例中,漫游连接记录以网络连接记录对的形式表示,以体现终端连接的无线AP的切换过程,例如,漫游连接记录包括“网络连接记录A-B”(表征终端连接的无线AP从A切换为B,下同)、“网络连接记录B-C”和“网络连接记录C-D”这3组漫游连接记录。在该实施例中,按照网络连接记录对应的连接时刻对网络连接记录进行排序,并根据排序后的网络连接记录确定漫游连接记录,从而通过会话过程中连接不同无线AP的先后顺序,保证了确定出的漫游连接记录的准确性,即漫游连接记录能够真实反映终端在不同无线AP的BSA之间的移动以及所连接无线AP的切换行为,所以漫游连接记录能够准确反映无线AP之间的相邻关系。In other embodiments, the roaming connection record is represented in the form of a pair of network connection records to reflect the handover process of the wireless AP connected to the terminal. Switch to B, the same below), "network connection record B-C" and "network connection record C-D" three groups of roaming connection records. In this embodiment, the network connection records are sorted according to the connection times corresponding to the network connection records, and the roaming connection records are determined according to the sorted network connection records, so that the order of connecting different wireless APs in the session process ensures the determination of roaming connection records. The accuracy of the roaming connection records obtained, that is, the roaming connection records can truly reflect the movement of the terminal between the BSAs of different wireless APs and the handover behavior of the connected wireless APs, so the roaming connection records can accurately reflect the adjacent wireless APs. relation.
步骤206,根据所述漫游连接记录生成至少一个第一连通子图,其中,用于生成第一连通子图的漫游连接记录包含的SSID相同,不同第一连通子图用于表征不同的Wi-Fi网络。 Step 206, generate at least one first connected subgraph according to the roaming connection record, wherein the SSIDs included in the roaming connection record used to generate the first connected subgraph are the same, and different first connected subgraphs are used to represent different Wi- Fi network.
在一实施例中,服务器确定出的任一漫游连接记录包括同一终端在不同时刻的多条网络连接记录,其中,多条网络连接记录被按照各自对应的联网时刻排序,相邻的两条网络连接记录用于表征终端的一次漫游行为。在一组漫游连接记录包含的多条网络连接记录中,第一条网络连接记录包含的第一BSSID用于表征第一无线AP、最后一条网络连接记录包含的第二BSSID用于表征第二无线AP,则该组漫游连接记录用于表征终端从上述第一无线AP漫游至第二无线AP。可以理解的是,在同一漫游连接记录包含两条网络连接记录的情况下,在第一条网络连接记录包括表征第一无线AP的第一BSSID,第二条网络连接记录包括表征第二无线AP的第二BSSID的情况下,则认为终端从第一无线AP漫游至第二无线AP。在本公开实施列中,网络连接记录包括表征某一无线AP的BSSID,则可以认为该网络连接记录与该无线AP有对应关系,例如,网络连接记录1中包括表征AP1的BSSID1,则认为网络连接记录1与AP1对应。相应的,在网络连接记录与无线AP对应的情况下,则说明该网络连接记录包括表征该无线AP的BSSID,例如,在网络连接记录1与AP1对应的情况下,则网络连接记录1中包括表征AP1的 BSSID1。In one embodiment, any roaming connection record determined by the server includes multiple network connection records of the same terminal at different times, wherein the multiple network connection records are sorted according to their corresponding networking times, and the two adjacent network connection records are sorted according to their corresponding networking times. The connection record is used to characterize a roaming behavior of the terminal. Among multiple network connection records included in a group of roaming connection records, the first BSSID included in the first network connection record is used to characterize the first wireless AP, and the second BSSID included in the last network connection record is used to characterize the second wireless AP. AP, the group of roaming connection records is used to represent that the terminal roams from the first wireless AP to the second wireless AP. It can be understood that, in the case where the same roaming connection record includes two network connection records, the first network connection record includes the first BSSID representing the first wireless AP, and the second network connection record includes the second wireless AP. In the case of the second BSSID, it is considered that the terminal roams from the first wireless AP to the second wireless AP. In the embodiment of the present disclosure, if the network connection record includes a BSSID representing a certain wireless AP, it can be considered that the network connection record has a corresponding relationship with the wireless AP. Connection record 1 corresponds to AP1. Correspondingly, in the case that the network connection record corresponds to the wireless AP, it means that the network connection record includes the BSSID that characterizes the wireless AP. For example, in the case that the network connection record 1 corresponds to AP1, the network connection record 1 includes: BSSID1 characterizing AP1.
而在一组漫游连接记录包含两条以上网络连接记录的情况下,其中的第一条网络连接记录与第一无线AP对应,最后一条网络连接记录与第二无线AP对应,而中间的各条网络连接记录对应的无线AP为中间无线AP,此时该组漫游连接记录用于表征终端从第一无线AP依次经过各个中间无线AP最终漫游至第二无线AP。例如,终端依次连接至A、B、C和D这4个无线AP的情况,此时A和D分别为第一无线AP和第二无线AP,C和D均为中间无线AP,终端依次从A漫游至B、从B漫游至C、从C漫游至D,从而此时的漫游连接记录包括网络连接记录A、B、C、D这4条网络连接记录,用于表征终端从A漫游至D的完整过程。When a group of roaming connection records includes more than two network connection records, the first network connection record corresponds to the first wireless AP, the last network connection record corresponds to the second wireless AP, and the middle The wireless AP corresponding to the network connection record is an intermediate wireless AP. At this time, the group of roaming connection records is used to represent that the terminal roams from the first wireless AP to the second wireless AP through each intermediate wireless AP in sequence. For example, when the terminal connects to four wireless APs A, B, C, and D in sequence, A and D are the first wireless AP and the second wireless AP respectively, C and D are both intermediate wireless APs, and the terminal starts from A roams to B, roams from B to C, and roams from C to D, so the roaming connection record at this time includes 4 network connection records A, B, C, and D, which are used to represent the terminal roaming from A to D. The complete process of D.
在上述漫游连接记录的基础上,服务器可以通过下述方式生成第一连通子图:将漫游连接记录中的BSSID表征的各个无线AP作为子图节点,连接各个无线AP中的相邻无线AP作为子图边,相邻无线AP为漫游连接记录中相邻的网络连接记录的BSSID表征的无线AP;并且,对于任意两组漫游连接记录,在前一组漫游连接记录中任一BSSID与后一组漫游连接记录中的任一BSSID表征同一无线AP的情况下,则将该无线AP作为两组漫游连接记录分别对应的子图边的公共子图节点。本公开实施例根据终端的任意一组漫游连接记录(包含多条网络连接记录)生成的第一连通子图,可以用于表征该组漫游连接记录对应的Wi-Fi网络;因为同一组漫游连接记录中的多条网络连接记录包含相同的SSID,所以该Wi-Fi网络可以使用其中任一网络连接记录所包含的SSID进行标识。而该第一连通子图中的各个节点,即表征该Wi-Fi网络中的各个无线AP;各个节点之间的连线(即子图边)即表征各个无线AP之间的相邻关系,也就是说,在两节点相连的情况下,则表明这两节点各自对应的无线AP相邻,终端在这两个无线AP之间有过漫游行为。通过该方式确定的子图节点和子图边生成的第一连通子图,能够充分反映Wi-Fi网络的网络结构,以保证网络结构识别的准确性。On the basis of the above-mentioned roaming connection record, the server can generate the first connected subgraph in the following manner: each wireless AP represented by the BSSID in the roaming connection record is used as a subgraph node, and the adjacent wireless APs in each wireless AP are connected as On the subgraph side, the adjacent wireless AP is the wireless AP represented by the BSSID of the adjacent network connection record in the roaming connection record; If any BSSID in the group roaming connection record represents the same wireless AP, the wireless AP is regarded as the common subgraph node of the subgraph edges corresponding to the two groups of roaming connection records respectively. The first connectivity subgraph generated by the embodiment of the present disclosure according to any group of roaming connection records (including multiple network connection records) of the terminal can be used to represent the Wi-Fi network corresponding to the group of roaming connection records; because the same group of roaming connection records Multiple network connection records in the record contain the same SSID, so the Wi-Fi network can be identified by the SSID contained in any of the network connection records. Each node in the first connected subgraph represents each wireless AP in the Wi-Fi network; the connection between each node (i.e., the subgraph edge) represents the adjacent relationship between each wireless AP, That is to say, when two nodes are connected, it means that the wireless APs corresponding to the two nodes are adjacent, and the terminal has roamed between the two wireless APs. The first connected subgraph generated by the subgraph nodes and subgraph edges determined in this way can fully reflect the network structure of the Wi-Fi network, so as to ensure the accuracy of network structure identification.
因为在服务器获取到的全部网络连接记录中,可能确定出多组漫游连接记录,所以通过上述方式可以根据多组漫游连接记录生成至少一个第一连通子图,其中每一第一连通子图即用于表征一个Wi-Fi网络。一个实施例中,对于服务器获取到的全部网络连接记录,其中未被确定为漫游连接记录的网络连接记录为独立网络连接记录,其对应的无线AP被确定为独立无线AP。某无线AP被确定为独立无线AP,即表明终端未在该无线AP与相同Wi-Fi网络内的其他无线AP之间发生漫游行为。因此该无线AP可能单独构成Wi-Fi网络,或者与其他无线AP节点属于同一Wi-Fi网络但是距离其他无线AP较远(用户不便于或不愿意在该无线AP与其他无线AP之间移动)。因此对于上述任一独立无线AP,其对应的网络连接记录的第一连通子图仅包括一个节点,该节点表示该独立无线AP,即认为该节点自己构成一个Wi-Fi网络。Since multiple groups of roaming connection records may be determined from all the network connection records obtained by the server, at least one first connected subgraph can be generated according to the multiple groups of roaming connection records in the above manner, wherein each first connected subgraph is Used to characterize a Wi-Fi network. In one embodiment, for all the network connection records acquired by the server, the network connection records that are not determined as roaming connection records are independent network connection records, and the corresponding wireless APs are determined as independent wireless APs. A wireless AP is determined to be an independent wireless AP, which means that the terminal does not roam between the wireless AP and other wireless APs in the same Wi-Fi network. Therefore, the wireless AP may constitute a Wi-Fi network by itself, or belong to the same Wi-Fi network as other wireless AP nodes but are far away from other wireless APs (the user is inconvenient or unwilling to move between the wireless AP and other wireless APs) . Therefore, for any of the above independent wireless APs, the first connectivity subgraph of the corresponding network connection record includes only one node, and the node represents the independent wireless AP, that is, the node itself is considered to constitute a Wi-Fi network.
步骤208,使用生成第一连通子图的漫游连接记录包含的SSID标记所述第一连通子图所表征的第一Wi-Fi网络,并使用生成所述第一连通子图的漫游连接记录包含的BSSID标记所述第一Wi-Fi网络的无线AP。 Step 208, use the SSID included in the roaming connection record for generating the first connected subgraph to mark the first Wi-Fi network represented by the first connected subgraph, and use the roaming connection record for generating the first connected subgraph to include The BSSID marks the wireless AP of the first Wi-Fi network.
在生成上述第一连通子图后,可以使用第一连通子图对应的网络连接记录中记录的信息标记该第一连通子图表征的Wi-Fi网络和该Wi-Fi网络中的各个无线AP。在一些实施例中,可以使用生成第一连通子图的漫游连接记录(中的任一网络连接记录)包含的SSID标记该第一连通子图所表征的Wi-Fi网络(下称第一Wi-Fi网络),并使用各个网络连接记录所包含的BSSID标记构建该第一Wi-Fi网络的各个无线AP。一个实施例中,可以使用上述独立网络连接记录包含的SSID表征其对应的独立Wi-Fi网络,并使用其包含的BSSID表征该构建该独立Wi-Fi网络的独立无线AP。After the above-mentioned first connected subgraph is generated, the information recorded in the network connection record corresponding to the first connected subgraph can be used to mark the Wi-Fi network represented by the first connected subgraph and each wireless AP in the Wi-Fi network . In some embodiments, the Wi-Fi network represented by the first connectivity subgraph (hereinafter referred to as the first Wi-Fi network) may be marked with the SSID included in the roaming connection record (any of the network connection records) generating the first connectivity subgraph. -Fi network), and each wireless AP of the first Wi-Fi network is constructed using the BSSID mark contained in each network connection record. In one embodiment, the SSID contained in the above-mentioned independent network connection record may be used to characterize the corresponding independent Wi-Fi network, and the BSSID contained in the independent network connection record may be used to characterize the independent wireless AP that constructs the independent Wi-Fi network.
在一实施例中,服务器使用SSID标记Wi-Fi网络,使用BSSID标记无线AP的过程,可以为建立标识关系表的过程。例如,该标识关系表的任一表项可以包括SSID和BSSID,任意多条SSID相同的表项用于表征该SSID对应的Wi-Fi网络;或者,任一表项的一级字段可以包括SSID,二级字段可以包括两个BSSID,这两个BSSID用于表征该Wi-Fi网络中相邻的两个无线AP,例如对于相邻的两个无线AP,其中一个BSSID表示一个无线AP,另一个BSSID表征另外一个无线AP。当然,服务器也可以为首次识别出的新的Wi-Fi网络分配新的网络标识(如“N240”等编号),或者为已识别出的Wi-Fi网络中新识别出的无线AP分配新的无线AP标识(如“无线AP860”等编号);或者,上述标识关系表中也可以使用还可以有其他标识方式,不再赘述。In an embodiment, the server uses the SSID to mark the Wi-Fi network, and the process of using the BSSID to mark the wireless AP may be a process of establishing an identification relationship table. For example, any entry in the identification relationship table may include SSID and BSSID, and any multiple entries with the same SSID are used to represent the Wi-Fi network corresponding to the SSID; or, the first-level field of any entry may include SSID , the secondary field may include two BSSIDs, which are used to characterize two adjacent wireless APs in the Wi-Fi network, for example, for two adjacent wireless APs, one of the BSSIDs represents a wireless AP, and the other A BSSID characterizes another wireless AP. Of course, the server can also assign a new network identifier (such as a number such as "N240") to the new Wi-Fi network identified for the first time, or assign a new network identifier to the newly identified wireless AP in the identified Wi-Fi network. A wireless AP identifier (such as a serial number such as "wireless AP860"); or, other identification methods may also be used in the above identification relationship table, which will not be repeated here.
在一实施例中,在生成上述第一连通子图后,服务器还可以按照预设的间隔时长,获取更新后的网络连接记录并生成用于表征第二Wi-Fi网络的第二连通子图,在第二连通子图与第一连通子图之间的子图差异大于预设的差异阈值的情况下,则可以使用区别于已有SSID的网络标识标记第二连通子图表征的第二Wi-Fi网络,其中,已有SSID被用于标记已识别出的第一Wi-Fi网络。其中,上述方式确定出的第二连通子图可以认为是更新后的第一连通子图,例如,上述间隔时长可以为24h,相应的,根据第一天00:00-24:00中任一时刻的网络连接记录确定的上述第一连通子图用于反映第一天的网络结构,根据第二天00:00-24:00中的网络连接记录确定的上述第二连通子图用于反映第二天的网络结构,因此通过第二连通子图与第一连通子图计算得到的子图差异能够反映Wi-Fi网络在相邻两天内的结构变化。In one embodiment, after generating the above-mentioned first connected subgraph, the server may also obtain the updated network connection record according to a preset interval and generate a second connected subgraph for representing the second Wi-Fi network. , in the case that the subgraph difference between the second connected subgraph and the first connected subgraph is greater than the preset difference threshold, then a network identifier different from the existing SSID can be used to mark the second connected subgraph represented by the second connected subgraph. Wi-Fi network, wherein an existing SSID is used to mark the identified first Wi-Fi network. Wherein, the second connected subgraph determined in the above manner may be regarded as the updated first connected subgraph. For example, the above-mentioned interval duration may be 24h. Correspondingly, according to any one of the first day 00:00-24:00 The above-mentioned first connected subgraph determined by the network connection record at the moment is used to reflect the network structure of the first day, and the above-mentioned second connected subgraph determined according to the network connection record in the next day 00:00-24:00 is used to reflect the The network structure of the second day, so the difference between the subgraphs calculated by the second connected subgraph and the first connected subgraph can reflect the structural changes of the Wi-Fi network in the two adjacent days.
使用区别于已有SSID的网络标识标记第二连通子图表征的第二Wi-Fi网络,实际上即将第二连通子图对应的SSID对应的Wi-Fi网络判定为一个新的网络。例如,在第二天识别出第一天未识别出的第二Wi-Fi网络的情况下,可以使用新识别出的该第二Wi-Fi网络的SSID标记该Wi-Fi网络;或者,也可以为该Wi-Fi网络分配新的网络编号等。Marking the second Wi-Fi network represented by the second connected subgraph with a network identifier different from the existing SSID actually determines the Wi-Fi network corresponding to the SSID corresponding to the second connected subgraph as a new network. For example, in the case where a second Wi-Fi network that was not identified on the first day is identified on the second day, the Wi-Fi network can be marked with the SSID of the newly identified second Wi-Fi network; or, also This Wi-Fi network can be assigned a new network number, etc.
在一实施例中,上述子图差异可以采用多种方式进行计算,例如,可以将第二连通子图中(相对于第一连通子图)新增或减少的变更节点个数作为上述子图差异,其中,该节点个数可以理解为绝对个数或者个数比例等。例如,服务器可以确定第二连通子图相对于第一连通子图新增或减少的变更节点个数,然后将该变更节点个数确定为子图差异、或者将变更节点个数与第一连通子图中的子图节点个数的比值确定为子图差异。可 以理解的是,由于Wi-Fi网络内部的无线AP可能发生增加、减少、更改名称、更换地址等变化,通过上述方式能够及时识别出Wi-Fi网络的上述结构变化。另外,随着时间增加获取到的关于Wi-Fi网络的网络连接记录会逐渐增多,也使得对于Wi-Fi网络的网络结构的识别结果更加准确。In an embodiment, the above-mentioned subgraph difference can be calculated in various ways. For example, the number of newly added or decreased changed nodes in the second connected subgraph (relative to the first connected subgraph) can be used as the above-mentioned subgraph. Difference, where the number of nodes can be understood as the absolute number or the number ratio, etc. For example, the server may determine the number of changed nodes added or decreased in the second connected subgraph relative to the first connected subgraph, and then determine the number of changed nodes as the subgraph difference, or connect the number of changed nodes with the first connected subgraph The ratio of the number of subgraph nodes in the subgraph is determined as the subgraph difference. It can be understood that, since the wireless APs in the Wi-Fi network may be increased, decreased, changed names, and addresses, etc., the above-mentioned structural changes of the Wi-Fi network can be identified in time by the above method. In addition, as time increases, the network connection records about the Wi-Fi network acquired will gradually increase, which also makes the identification result of the network structure of the Wi-Fi network more accurate.
另外,通过上述方式识别出的Wi-Fi网络和无线AP,可以用于用户关系分析、终端定位、风控反作弊等诸多业务场景中,具体过程不再赘述。In addition, the Wi-Fi network and wireless AP identified in the above manner can be used in many business scenarios such as user relationship analysis, terminal positioning, risk control and anti-cheating, and the specific process will not be repeated.
通过上述实施例,首先获取终端与Wi-Fi网络实现无线连接产生的网络连接记录,然后从其中确定终端在不同无线AP之间实现网络漫游所产生的漫游连接记录,并根据漫游连接记录生成对应于Wi-Fi网络的至少一个连通子图,最后分别使用连通子图所对应漫游网络连接记录的SSID和BSSID分别标记Wi-Fi网络和及其无线AP。因为生成的连通子图能够表征Wi-Fi网络中包含的无线AP以及各个无线AP之间的连接关系,所以该连通子图能够体现Wi-Fi网络的内部结构,从而实现对Wi-Fi网络结构的有效识别,进而保证无线AP标识的准确度。该方式无需终端的定位数据,从根本上避免了用户隐私方面可能存在的安全隐患;而且需要使用的信息为终端产生的包含会话标识、BSSID和SSID的网络连接记录,不需要依赖定位数据,因而能够适用于通过Wi-Fi网络实现联网的多种应用场景。Through the above embodiment, first obtain the network connection record generated by the terminal and the Wi-Fi network implementing wireless connection, then determine the roaming connection record generated by the terminal implementing network roaming between different wireless APs, and generate the corresponding roaming connection record according to the roaming connection record. In at least one connected subgraph of the Wi-Fi network, the Wi-Fi network and its wireless APs are respectively marked with the SSID and BSSID of the roaming network connection record corresponding to the connected subgraph respectively. Because the generated connectivity subgraph can represent the wireless APs included in the Wi-Fi network and the connection relationship between each wireless AP, the connectivity subgraph can reflect the internal structure of the Wi-Fi network, so as to realize the structure of the Wi-Fi network. It can effectively identify the wireless AP and ensure the accuracy of the wireless AP identification. This method does not require the positioning data of the terminal, which fundamentally avoids potential security risks in terms of user privacy; and the information to be used is the network connection record generated by the terminal including the session ID, BSSID and SSID, and does not need to rely on the positioning data. It can be applied to a variety of application scenarios for networking through Wi-Fi networks.
下面结合图3-图5对本说明书方法的具体实现过程进行详细说明。图3是根据本公开的实施例示出的另一种Wi-Fi网络的识别方法流程图,图3所示的Wi-Fi网络的识别方法可由任意具有Wi-Fi网络识别功能的电子设备执行。电子设备可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。如图3所示,该方法应用于服务器,可以包括下述步骤302-316。The specific implementation process of the method in this specification will be described in detail below with reference to FIGS. 3-5 . FIG. 3 is a flowchart of another method for identifying a Wi-Fi network according to an embodiment of the present disclosure. The method for identifying a Wi-Fi network shown in FIG. 3 can be performed by any electronic device having a Wi-Fi network identification function. Electronic devices may be mobile phones, computers, digital broadcast terminals, messaging devices, game consoles, tablet devices, medical devices, fitness devices, personal digital assistants, and the like. As shown in FIG. 3 , the method is applied to a server and may include the following steps 302-316.
步骤302,服务器获取终端产生的原始网络连接记录。 Step 302, the server obtains the original network connection record generated by the terminal.
在一实施例中,连接至任一无线AP的终端中运行有联网应用程序,该应用程序中可以具有用于上报网络连接记录的功能。例如,用于上报网络连接记录的程序也可以预先独立部署在终端中,或者运行在HTML5页面等在线客户端中。终端通过无线AP服务器实现通信,例如传输数据、会话消息等。本公开实施例所述的会话消息,并不局限于即时通讯会话等过程中产生的通讯消息,也可以为多媒体资源传输过程中产生的数据传输消息,如资源请求消息、数据传输消息、数据校验消息等,不再赘述。In one embodiment, a terminal connected to any wireless AP runs a networking application, and the application may have a function for reporting network connection records. For example, the program for reporting the network connection record can also be independently deployed in the terminal in advance, or run in an online client such as an HTML5 page. The terminal implements communication through the wireless AP server, such as transmitting data, session messages, and the like. The session messages described in the embodiments of the present disclosure are not limited to communication messages generated during instant messaging sessions and other processes, and may also be data transmission messages generated during multimedia resource transmission, such as resource request messages, data transmission messages, and data calibration messages. The verification news, etc., will not be repeated here.
在终端与无线AP连接后,上述应用程序可以在终端参与会话的过程中向服务器上报原始网络连接记录,该原始网络连接记录中可以包括终端当前参与会话的会话标识、该无线AP对应的BSSID和SSID。其中,上述会话标识可以包含在会话对应的SESSION中,该SESSION中还可以包括终端的联网时刻;当然,上述会话标识和联网时刻也可以不包含在SESSION中而直接包含在上述原始网络连接记录中。After the terminal is connected to the wireless AP, the above-mentioned application may report the original network connection record to the server during the process of the terminal participating in the session, and the original network connection record may include the session identifier of the current session the terminal is participating in, the BSSID and the corresponding BSSID of the wireless AP. SSID. Wherein, the above-mentioned session identifier can be included in the session corresponding to the session, and the SESSION can also include the networking moment of the terminal; of course, the above-mentioned session identifier and networking moment can also be directly included in the above-mentioned original network connection record instead of being included in the SESSION .
在一实施例中,终端可以通过多种方式向服务器上报原始网络连接记录。例如,终端可以在联网状态下周期性上报原始网络连接记录;或者,也可以以实时监控方式或中断方式监测自身的联网状态,并在终端所连接的无线AP发生变更的情况下,上报变更 后的无线AP对应的原始网络连接记录,从而有效减少上报次数,避免网络拥堵。当然,服务器也可以主动向终端请求获取原始网络连接记录,从而终端可以在接收到服务器的请求后向其返回相应的网络连接记录,如当前时刻实时获取的原始网络连接记录或当前时刻之前预设时间段内产生的原始网络连接记录等。In one embodiment, the terminal can report the original network connection record to the server in various ways. For example, the terminal can periodically report the original network connection record in the online state; alternatively, it can also monitor its own networking status in real-time monitoring or interrupt mode, and when the wireless AP connected to the terminal changes, report the change after the change. The original network connection record corresponding to the wireless AP, thereby effectively reducing the number of reports and avoiding network congestion. Of course, the server can also actively request the terminal to obtain the original network connection record, so that the terminal can return the corresponding network connection record to it after receiving the request from the server, such as the original network connection record obtained in real time at the current moment or preset before the current moment. Raw network connection records generated during the time period, etc.
步骤304,服务器筛选原始网络连接记录得到对应于唯一无线AP的网络连接记录。 Step 304, the server filters the original network connection record to obtain the network connection record corresponding to the unique wireless AP.
由于无线AP可能连接有非法或恶意终端等(如非法终端盗用合法终端的终端标识)等,所以可能存在同一终端标识对应的多个终端在同一时刻分别连接至多个无线AP的异常情况,因此为保证任一时刻原始网络连接记录与终端的唯一对应关系,可以对终端上报的原始网络连接记录进行筛选。例如,服务器可以获取终端的至少一条原始网络连接记录,该原始网络连接记录中可以记录终端的终端标识、终端通过Wi-Fi网络连接的无线AP所归属基本服务集的基本服务集标识BSSID、以及终端连接至无线AP的连接时刻,在第一原始网络连接记录与第二原始网络连接记录包括的终端标识相同、连接时刻相同且BSSID不同的情况下,则可以从第一原始网络连接记录与第二原始网络连接记录中选取一条原始网络连接记录作为该终端标识所表征终端的网络连接记录,其中,第一原始网络连接记录为上述至少一条原始网络连接记录中的任一条连接记录,第二原始网络连接记录为上述至少一条原始网络连接记录中除第一原始网络连接记录之外的连接记录。在选取时,可以随机选取一条原始网络连接记录作为该终端的网络连接记录,或者将联网时刻距离当前时刻最近的一条作为该终端的网络连接记录,以保证任一时刻的网络连接记录与终端的唯一对应。实际上,从上述终端标识、连接时刻均相同且BSSID不同的多条原始网络连接记录中选取的一条,无论对应的真实终端是否合法,而只需保证任一终端标识的在任一时刻仅对应一条网络连接记录即可。Since the wireless AP may be connected to illegal or malicious terminals (such as illegal terminals stealing the terminal identifiers of legitimate terminals), etc., there may be an abnormal situation in which multiple terminals corresponding to the same terminal identifier are connected to multiple wireless APs at the same time. To ensure the unique correspondence between the original network connection record and the terminal at any time, the original network connection record reported by the terminal can be screened. For example, the server may acquire at least one original network connection record of the terminal, and the original network connection record may record the terminal identifier of the terminal, the basic service set identifier BSSID of the basic service set to which the wireless AP connected by the terminal through the Wi-Fi network belongs, and When the terminal is connected to the wireless AP, if the first original network connection record and the second original network connection record include the same terminal identifier, the same connection time, and different BSSIDs, the first original network connection record and the second original network connection record can be obtained from the first original network connection record. One original network connection record is selected from the two original network connection records as the network connection record of the terminal represented by the terminal identifier, wherein the first original network connection record is any one of the above at least one original network connection record, and the second original network connection record is any one of the above at least one original network connection record. The network connection record is a connection record other than the first original network connection record in the at least one original network connection record. When selecting, an original network connection record can be randomly selected as the terminal's network connection record, or the one closest to the current moment when the networking time is connected can be used as the terminal's network connection record, so as to ensure that the network connection record at any time is consistent with the terminal's network connection record. unique correspondence. In fact, one selected from the above-mentioned multiple original network connection records with the same terminal identification and connection time and different BSSIDs, regardless of whether the corresponding real terminal is legal or not, only needs to ensure that any terminal identification corresponds to only one at any time. Record the network connection.
通过该方式能够从服务器接收到的多条原始网络连接记录中,确定出同一终端在同一时刻连接至不同无线AP的多条原始网络连接记录,并将这部分记录中的其中一条记录作为网络连接记录,用于后续处理过程。在实际场景中,表明同一终端在同一时刻连接至不同无线AP的多条原始网络连接记录往往由黑产、盗号等非法手段产生,所以该方式能够有效避免上述非法终端的网络连接记录参与后续的识别处理,以提升Wi-Fi网络的识别准确度。In this way, from the multiple original network connection records received by the server, it is possible to determine multiple original network connection records that the same terminal is connected to different wireless APs at the same time, and use one of these records as the network connection. record for subsequent processing. In actual scenarios, multiple original network connection records indicating that the same terminal is connected to different wireless APs at the same time are often generated by illegal means such as hacking and number theft, so this method can effectively prevent the network connection records of the above illegal terminals from participating in subsequent Identification processing to improve the identification accuracy of Wi-Fi networks.
另外,还可以根据风控规则、反作弊规则等业务安全规则预先制定录筛选规则,并按照该规则对原始网络连接记录进行筛选,以在保证筛选后任一网络连接记录对应于唯一的无线AP的同时,尽量保证网络连接记录的安全性及网络识别的准确性。In addition, recording screening rules can also be pre-established according to business security rules such as risk control rules and anti-cheating rules, and the original network connection records can be screened according to the rules, so as to ensure that any network connection record corresponds to the unique wireless AP after screening. At the same time, try to ensure the security of network connection records and the accuracy of network identification.
对于经过筛选的任一网络连接记录,其所包含的BSSID对应于唯一的无线AP,其所包含的SSID用于标识该无线AP构建的Wi-Fi网络。其中,上述BSSID可以为该无线AP的MAC地址或预设的全网唯一编号;该SSID可以为该Wi-Fi网络的网络名称,如设备厂商预置的默认网络名称或用户自定义设置的网络名称等。For any filtered network connection record, the included BSSID corresponds to a unique wireless AP, and the included SSID is used to identify the Wi-Fi network constructed by the wireless AP. Wherein, the above-mentioned BSSID can be the MAC address of the wireless AP or the preset unique number of the whole network; the SSID can be the network name of the Wi-Fi network, such as the default network name preset by the device manufacturer or the network set by the user. name etc.
在一实施例中,服务器获取到的上述网络连接记录可以来自某一终端,也可以来自某一型号或某一区域的多个终端,还可以来自不同型号或不同区域的多个终端等。但可 以理解的一般性规律是,上述网络连接记录对应的终端所在区域面积越大,识别出的Wi-Fi网络就越全面;上述网络连接记录对应同一区域的终端或网络连接记录数量越多,识别出的Wi-Fi网络的网络结构准确度越高。因此,可以根据实际业务需求确定上述区域面积及网络连接记录的数量,以便更加全面、准确的识别出Wi-Fi网络及其所包含的无线AP。In an embodiment, the above-mentioned network connection record acquired by the server may come from a certain terminal, multiple terminals of a certain model or a certain area, or multiple terminals of different models or different areas. However, an understandable general rule is that the larger the area of the terminal corresponding to the above network connection record, the more comprehensive the identified Wi-Fi network; the more the number of terminals or network connection records corresponding to the above network connection record in the same area, The higher the accuracy of the network structure of the identified Wi-Fi network. Therefore, the above area area and the number of network connection records can be determined according to actual business requirements, so as to more comprehensively and accurately identify the Wi-Fi network and the wireless APs it contains.
步骤306,服务器按照时间顺序对网络连接记录进行排序。 Step 306, the server sorts the network connection records in chronological order.
在一实施例中,上述网络连接记录中还可以包含该网络连接记录的生成时刻或终端连接无线AP的时刻(通常,上述两时刻为同一时刻,下文统称为联网时刻),因而服务器可按照联网时刻对各个网络连接记录进行排序。In one embodiment, the above-mentioned network connection record may also include the generation time of the network connection record or the time when the terminal connects to the wireless AP (usually, the above-mentioned two times are the same time, hereinafter collectively referred to as the networking time), so the server can follow the network connection. All network connection records are sorted at all times.
如图4中的(a)所示,按照联网时刻的先后顺序依次对9个网络连接记录进行排序,从下到上,联网时刻越来越接近当前时刻,即网络连接记录1的联网时刻最早,网络连接记录9的联网时刻最晚。其中,网络连接记录1包含的会话标识为“H1”,SSID为“A”,BSSID为“A1”,下文中将该记录对应的无线AP记为“节点A1”,其他网络连接记录与此类似,不再一一赘述。由(a)可见,网络连接记录1-3归属于同一会话(即会话标识为H1的会话),且对应于同一ESS(即SSID为A的ESS);网络连接记录4-5以及网络连接记录6-7与此类似,不再赘述。网络连接记录8-9归属于同一会话(即会话标识为H4的会话),但二者分别归属于不同的ESS(即SSID分别为B和C的ESS)。As shown in (a) of Figure 4, the 9 network connection records are sorted in order of the time of connection. From bottom to top, the time of connection is getting closer and closer to the current time, that is, the connection time of connection record 1 is the earliest. , the network connection time of the network connection record 9 is the latest. Among them, the session identifier included in the network connection record 1 is "H1", the SSID is "A", and the BSSID is "A1", and the wireless AP corresponding to this record is hereinafter recorded as "node A1", and other network connection records are similar to this. , and will not repeat them one by one. It can be seen from (a) that the network connection records 1-3 belong to the same session (that is, the session whose session ID is H1), and correspond to the same ESS (that is, the ESS whose SSID is A); the network connection records 4-5 and the network connection records 6-7 are similar to this and will not be repeated here. The network connection records 8-9 belong to the same session (that is, the session whose session ID is H4), but they belong to different ESSs (that is, the ESSs whose SSIDs are B and C, respectively).
如图4中(a)所示,节点A1-A3均归属于会话标识H1对应的会话,表明终端在参与该会话的过程中生成了3条网络连接记录,且这3条网络连接记录分别对应于终端连接至无线AP A1、A2和A3的时刻,因此可以判定在参与该会话的过程中,终端依次在无线AP A1、A2和A3的BSA之间进行移动(即发生网络漫游行为)。类似的,终端在参与会话标识为H2的会话的过程中,依次在无线AP B1和B2的BSA之间进行移动;终端在参与会话标识为H3的会话的过程中,依次在无线AP A4和A2的BSA之间进行移动。而终端在参与会话标识为H4的会话的过程中,依次在无线AP B2和无线AP C1的BSA之间进行移动。无线AP B2和无线AP C1分别属于SSID为B和C的ESS,因此可以判定终端在无线AP B2和C1之间进行移动的过程中,实际上是在不同的Wi-Fi网络之间进行的移动。As shown in (a) in Figure 4, nodes A1-A3 all belong to the session corresponding to the session identifier H1, indicating that the terminal generates 3 network connection records during the process of participating in the session, and these 3 network connection records correspond to At the moment when the terminal is connected to the wireless APs A1, A2 and A3, it can be determined that during the process of participating in the session, the terminal moves between the BSAs of the wireless APs A1, A2 and A3 in turn (that is, network roaming behavior occurs). Similarly, during the process of participating in the session with the session identifier H2, the terminal moves between the BSAs of the wireless APs B1 and B2 in turn; during the process of participating in the session with the session identifier H3, the terminal moves between the wireless APs A4 and A2 in turn. move between BSAs. In the process of participating in the session with the session identifier H4, the terminal moves between the BSAs of the wireless AP B2 and the wireless AP C1 in turn. Wireless AP B2 and wireless AP C1 belong to ESSs with SSIDs B and C, respectively, so it can be determined that the terminal is actually moving between different Wi-Fi networks during the process of moving between wireless APs B2 and C1. .
在上述排序完成后,还可以根据排序后的网络连接记录进一步确定漫游连接记录。例如,可以将排序后相邻且包含相同的会话标识、不同的BSSID的多条网络连接记录确定为漫游连接记录。如图4中的(a)所示,可以确定出4组漫游连接记录:网络连接记录1、2和3为第一组、网络连接记录4和5为第二组、网络连接记录6和7为第三组、网络连接记录8和9为第四组。任意一组漫游连接记录的具体含义可以参见前述实施例的描述,此处不再赘述。After the above sorting is completed, the roaming connection record may be further determined according to the sorted network connection record. For example, multiple network connection records that are adjacent after sorting and contain the same session ID and different BSSIDs may be determined as roaming connection records. As shown in (a) of Figure 4, 4 groups of roaming connection records can be determined: network connection records 1, 2 and 3 are the first group, network connection records 4 and 5 are the second group, network connection records 6 and 7 For the third group, network connection records 8 and 9 are for the fourth group. For the specific meaning of any group of roaming connection records, reference may be made to the description of the foregoing embodiments, and details are not repeated here.
需要说明的是,同一会话仅可能由同一终端完成,因此上述同一会话对应的多条网络连接记录来自同一终端,而不同会话对应的多条网络连接记录可以来自同一终端也可以来自不同终端。It should be noted that the same session can only be completed by the same terminal, so the multiple network connection records corresponding to the same session are from the same terminal, and the multiple network connection records corresponding to different sessions can be from the same terminal or from different terminals.
步骤308,服务器根据排序后的网络连接记录生成节点序列。 Step 308, the server generates a node sequence according to the sorted network connection records.
基于上述移动过程可以生成各个会话标识分别对应的节点序列。如图4中(b)所示,可以生成节点序列A1-A2-A3、B1-B2、A4-A2和B2-C1。其中,节点序列中的各个节点即表征网络连接记录包含的BSSID对应的各个无线AP,节点序列中的各条连线即表征前述实施例中的漫游连接记录。Node sequences corresponding to each session identifier can be generated based on the above moving process. As shown in (b) of FIG. 4, the node sequences A1-A2-A3, B1-B2, A4-A2, and B2-C1 can be generated. Wherein, each node in the node sequence represents each wireless AP corresponding to the BSSID included in the network connection record, and each connection line in the node sequence represents the roaming connection record in the foregoing embodiment.
实际上,也可以直接根据上述漫游连接记录生成节点序列,如可以将一组漫游连接记录中包括的多个网络连接记录分别作为节点,将排序后相邻的两条网络连接记录之间的对应关系(即相邻关系)作为节点之间的连线(即根据该对应关系将相邻节点进行连接)。In fact, the node sequence can also be generated directly according to the above-mentioned roaming connection records. For example, multiple network connection records included in a group of roaming connection records can be used as nodes respectively, and the correspondence between the two adjacent network connection records after sorting can be The relationship (that is, the adjacent relationship) is used as the connection between the nodes (that is, the adjacent nodes are connected according to the corresponding relationship).
步骤310,服务器根据节点序列生成第一连通子图。 Step 310, the server generates a first connected subgraph according to the node sequence.
在本公开的实施例中,可以将图4中(b)所示生成的各个节点序列中的节点作为子图节点、并将各个节点序列中的连线作为子图边生成第一连通子图。其中,通过上述子图节点和子图边生成第一连通子图的具体过程可以采用相关技术中的紧密中心度算法(Closeness Centrality)、PySONA算法等连通子图生成方法进行计算,此处不再赘述。可以理解的是,为保证Wi-Fi网络结构识别的完整性,上述算法计算出的连通子图应当为最大连通子图。In the embodiment of the present disclosure, the nodes in each node sequence generated as shown in FIG. 4(b) may be used as subgraph nodes, and the connecting lines in each node sequence may be used as subgraph edges to generate the first connected subgraph . Wherein, the specific process of generating the first connected subgraph through the above subgraph nodes and subgraph edges can be calculated by using the closeness centrality algorithm (Closeness Centrality), PySONA algorithm and other connected subgraph generation methods in the related art, which will not be repeated here. . It can be understood that, in order to ensure the integrity of the identification of the Wi-Fi network structure, the connected subgraph calculated by the above algorithm should be the maximum connected subgraph.
实际上,步骤308中生成的任一节点序列包括节点和节点连线,其中的节点可以作为第一连通子图的子图节点、节点连线可以作为第一连通子图的子图边。进一步的,对于任意两条节点连线,在第一条节点连线连接的任一节点与另一条节点连线连接的另一节点为同一节点的情况下,则可以将该节点作为这两条节点连线的公共节点,从而将这两条节点连线连接起来(即该公共节点作为两条节点连线的交点)。其他的节点连线可以按照上述方式添加并连接至已有的子图节点和子图边中,最终得到完整的第一连通子图。In fact, any node sequence generated in step 308 includes nodes and node connections, wherein the nodes can be used as subgraph nodes of the first connected subgraph, and the node connections can be used as subgraph edges of the first connected subgraph. Further, for any two node lines, if any node connected by the first node line and another node connected by another node line are the same node, the node can be used as the two nodes. The common node of the node connection line, so as to connect the two node lines (that is, the common node serves as the intersection of the two node lines). Other node connections can be added and connected to existing subgraph nodes and subgraph edges in the above manner, and finally a complete first connected subgraph is obtained.
如图4中(c)所示,最终生成的连通子图包括A1、A2、A3和A4构成的连通子图、B1和B2构成的连通子图和C1构成的连通子图。需要说明的是,因为网络连接记录8和网络连接记录9所包含的SSID不同(即节点B2和C1分别属于不同的ESS),所以即便B2和C1构成节点序列,二者也无法生成同一连通子图。As shown in Fig. 4(c), the finally generated connected subgraph includes a connected subgraph composed of A1, A2, A3, and A4, a connected subgraph composed of B1 and B2, and a connected subgraph composed of C1. It should be noted that, because the SSIDs contained in the network connection record 8 and the network connection record 9 are different (that is, the nodes B2 and C1 belong to different ESSs respectively), so even if B2 and C1 constitute a node sequence, they cannot generate the same connected element. picture.
由上述连通子图的计算结果可知,A1、A2、A3和A4构成的连通子图对应的Wi-Fi网络包括A1、A2、A3和A4共四个无线AP,其中,无线AP A1、A3和A4均连接至无线AP A2(此时,无线AP A2可能为该Wi-Fi网络中的主无线AP,承担网络负载均衡或无线AP协调等工作)。B1和B2构成的连通子图对应的Wi-Fi网络包括B1和B2两个无线AP;而无线AP C1构成一个独立Wi-Fi网络。It can be seen from the calculation results of the above connected subgraphs that the Wi-Fi network corresponding to the connected subgraph formed by A1, A2, A3 and A4 includes four wireless APs, A1, A2, A3 and A4. A4 is connected to wireless AP A2 (at this time, wireless AP A2 may be the main wireless AP in the Wi-Fi network, responsible for network load balancing or wireless AP coordination). The Wi-Fi network corresponding to the connectivity subgraph formed by B1 and B2 includes two wireless APs B1 and B2; and wireless AP C1 constitutes an independent Wi-Fi network.
对应于上述连通子图的计算结果,相应的Wi-Fi网络的识别结果可参见图5。如图5(a)所示,无线AP A1-A4构成Wi-Fi网络A,无线AP B1-B2构成Wi-Fi网络B,无线AP C1构成Wi-Fi网络C。相应的,参与会话标识为H1会话的终端的移动轨迹为A1→A2→A3,参与会话标识为H2会话的终端移动轨迹为A4→A2,上述移动过程均未 超出Wi-Fi网络A的BSA。参与会话标识为H3会话的终端的移动轨迹为B1→B2,该移动过程未超出Wi-Fi网络B的BSA。参与会话标识为H4会话的终端的移动轨迹为B2→C1,该移动过程依次穿过Wi-Fi网络B和Wi-Fi网络C的BSA。上述移动过程对应的移动轨迹如图5中带箭头虚线所示。至此,完成对Wi-Fi网络的网络结构的识别过程。Corresponding to the calculation result of the above connected subgraph, the corresponding identification result of the Wi-Fi network can be seen in FIG. 5 . As shown in Figure 5(a), wireless APs A1-A4 constitute Wi-Fi network A, wireless APs B1-B2 constitute Wi-Fi network B, and wireless AP C1 constitutes Wi-Fi network C. Correspondingly, the movement trajectory of the terminal participating in the session identified as H1 session is A1→A2→A3, and the movement trajectory of the terminal participating in the session identified as H2 session is A4→A2. The above movement process does not exceed the BSA of Wi-Fi network A. The movement trajectory of the terminal participating in the session identified as the H3 session is B1→B2, and the movement process does not exceed the BSA of the Wi-Fi network B. The movement trajectory of the terminal participating in the session identified as the H4 session is B2→C1, and the movement process passes through the BSAs of the Wi-Fi network B and the Wi-Fi network C in sequence. The movement trajectory corresponding to the above-mentioned movement process is shown as a dotted line with an arrow in FIG. 5 . So far, the identification process of the network structure of the Wi-Fi network is completed.
在上述识别完成后,可以建立标识关系表,以使用SSID标记Wi-Fi网络、使用BSSID标记无线AP。例如,该标识关系表的任一表项可以包括SSID和BSSID,任意多条SSID相同的表项用于表征该SSID对应的Wi-Fi网络。对应于图4所示的实施例,相应的标识关系表可参见下述表1。或者,任一表项的一级字段可以包括SSID,二级字段可以包括两个BSSID,这两个BSSID分别用于表征该Wi-Fi网络中相邻的两个无线AP。After the above identification is completed, an identification relationship table can be established to mark the Wi-Fi network with the SSID and the wireless AP with the BSSID. For example, any entry in the identification relationship table may include an SSID and a BSSID, and any number of entries with the same SSID are used to represent the Wi-Fi network corresponding to the SSID. Corresponding to the embodiment shown in FIG. 4 , the corresponding identification relationship table may refer to Table 1 below. Alternatively, the first-level field of any entry may include an SSID, and the second-level field may include two BSSIDs, which are respectively used to represent two adjacent wireless APs in the Wi-Fi network.
表1Table 1
序号serial number SSIDSSID BSSIDBSSID
11 AA A1A1
22 AA A2A2
33 AA A3A3
44 AA A4A4
55 BB B1B1
66 BB B2B2
77 CC C1C1
表1中,表项1-4均对应于SSID为A的Wi-Fi网络A,并分别用于表征构成Wi-Fi网络A的4个无线AP;类似的,表项5-6均对应于SSID为B的Wi-Fi网络B,并分别用于表征构成Wi-Fi网络B的2个无线AP;表项7对应于SSID为C的Wi-Fi网络C,用于表征构成Wi-Fi网络C的1个无线AP。In Table 1, entries 1-4 all correspond to Wi-Fi network A with SSID A, and are used to characterize the four wireless APs that constitute Wi-Fi network A; similarly, entries 5-6 correspond to Wi-Fi network B with SSID B is used to characterize the two wireless APs that constitute Wi-Fi network B; entry 7 corresponds to Wi-Fi network C with SSID C, which is used to characterize the Wi-Fi network. 1 wireless AP of C.
步骤312,服务器根据更新后的网络连接记录生成第二连通子图。 Step 312, the server generates a second connected subgraph according to the updated network connection record.
步骤314,服务器判断子图差异是否大于预设的差异阈值。 Step 314, the server determines whether the difference between the sub-images is greater than a preset difference threshold.
在Wi-Fi网络的工作过程中,Wi-Fi网络内部的无线AP可能发生增加、减少、更改名称、更换地址等变化;或者,在网络连接记录较少的情况下,可能难以有效识别出Wi-Fi网络的完整结构。在一些实施例中,可以周期性获取新的网络连接记录,如以天、星期、月为周期获取更新后的网络连接记录,并使用更新后的网络连接记录再次计算新的连通子图,即第二连通子图。During the working process of the Wi-Fi network, the wireless APs inside the Wi-Fi network may increase, decrease, change the name, change the address, etc.; or, when there are few network connection records, it may be difficult to effectively identify the Wi-Fi network. - Complete structure of Fi network. In some embodiments, new network connection records may be acquired periodically, for example, updated network connection records may be acquired in cycles of days, weeks, and months, and a new connected subgraph may be calculated again using the updated network connection records, that is, The second connected subgraph.
可见,步骤312实际上是获取新的网络连接记录并重复进行上述步骤302-310的过程,上述第二连通子图可视为第一连通子图的更新版本。例如,在上述间隔时长为1星期的情况下,根据前一星期内的网络连接记录确定的上述第一连通子图用于反映前一星期的网络结构,根据后一星期的网络连接记录确定的上述第二连通子图用于反映后一星期的网络结构,因此通过第二连通子图与第一连通子图计算得到的子图差异能够反映 Wi-Fi网络在一周时间内的网络结构变化。It can be seen that step 312 is actually a process of acquiring a new network connection record and repeating the above steps 302-310, and the above-mentioned second connected subgraph can be regarded as an updated version of the first connected subgraph. For example, when the above-mentioned interval is one week, the above-mentioned first connected subgraph determined according to the network connection records in the previous week is used to reflect the network structure of the previous week, and the first connected subgraph determined according to the network connection records of the next week is used to reflect the network structure of the previous week. The above-mentioned second connected subgraph is used to reflect the network structure of the next week, so the difference between the subgraphs calculated by the second connected subgraph and the first connected subgraph can reflect the network structure change of the Wi-Fi network within a week.
在一实施例中,上述子图差异可以采用多种方式进行计算,例如可以将第二连通子图中(相对于第一连通子图)新增或减少的变更节点个数作为上述子图差异,其中,该节点个数可以理解为绝对个数或者个数比例等。例如,服务器可以确定第二连通子图相对于第一连通子图新增或减少的变更节点个数,然后将该变更节点个数确定为子图差异、或者将变更节点个数与第一连通子图中的子图节点个数的比值确定为子图差异。在计算得到上述子图差异后,将其与预设的差异阈值进行比较:在子图差异大于差异阈值的情况下,转入步骤316;否则,在子图差异小于差异阈值的情况下,转入步骤302重新开始计算下一周期的第一连通子图。或者,在子图差异小于差异阈值的情况下,也可以直接跳出该流程图的执行过程,终止对Wi-Fi网络的识别过程,此时,第二连通子图对应的Wi-Fi网络可视为与第一连通子图对应的Wi-Fi网络结构相同,因此第二连通子图对应的Wi-Fi网络可以继承第一连通子图对应的Wi-Fi网络的SSID。In one embodiment, the above-mentioned subgraph difference can be calculated in a variety of ways, for example, the number of changed nodes added or decreased in the second connected subgraph (relative to the first connected subgraph) can be used as the above-mentioned subgraph difference. , where the number of nodes can be understood as the absolute number or the number ratio, etc. For example, the server may determine the number of changed nodes added or decreased in the second connected subgraph relative to the first connected subgraph, and then determine the number of changed nodes as the subgraph difference, or connect the number of changed nodes with the first connected subgraph The ratio of the number of subgraph nodes in the subgraph is determined as the subgraph difference. After the above-mentioned sub-image difference is calculated, compare it with the preset difference threshold: if the sub-image difference is greater than the difference threshold, go to step 316; otherwise, if the sub-image difference is smaller than the difference threshold, go to step 316 Go to step 302 to restart the calculation of the first connected subgraph of the next cycle. Alternatively, when the difference between the subgraphs is less than the difference threshold, the execution process of the flowchart can also be directly jumped out, and the identification process of the Wi-Fi network can be terminated. At this time, the Wi-Fi network corresponding to the second connected subgraph can be viewed. In order to have the same structure as the Wi-Fi network corresponding to the first connected subgraph, the Wi-Fi network corresponding to the second connected subgraph may inherit the SSID of the Wi-Fi network corresponding to the first connected subgraph.
其中,上述差异阈值可以为预设的固定值,如可以为10%、15%、5%等;或者也可以根据终端类型分布、终端注册地址的区域分布、生成第一连通子图和第二连通子图的时间间隔等至少一种因素进行确定。例如,获取到的网络连接记录对应的终端注册地址的区域分布越集中,上述差异阈值可以越小;反之终端注册地址的区域分布越分散,上述差异阈值可以越大,从而在保证高密度Wi-Fi网络的标识准确度的同时,降低对于低密度Wi-Fi网络的标识工作量,同时提高识别准确度和识别识别效率。又或者,上述差异阈值也可以与生成第一连通子图和第二连通子图的时间间隔成正相关,即两次识别之间的时间间隔越长,上述差异阈值越大;反之,两次识别之间的时间间隔越短,上述差异阈值越小,从而以保证识别结果尽可能接近Wi-Fi网络的真实结构变化。The above difference threshold may be a preset fixed value, such as 10%, 15%, 5%, etc.; or the first connected subgraph and the second connected subgraph may be generated according to the distribution of terminal types and the regional distribution of registered addresses of terminals. At least one factor such as the time interval of the connected subgraph is determined. For example, the more concentrated the regional distribution of the terminal registration addresses corresponding to the acquired network connection records, the smaller the above-mentioned difference threshold; While improving the identification accuracy of the Fi network, the identification workload for low-density Wi-Fi networks is reduced, and the identification accuracy and identification efficiency are improved at the same time. Alternatively, the above-mentioned difference threshold may also be positively correlated with the time interval for generating the first connected subgraph and the second connected subgraph, that is, the longer the time interval between two identifications, the greater the above-mentioned difference threshold; The shorter the time interval, the smaller the above difference threshold, so as to ensure that the recognition result is as close to the real structural change of the Wi-Fi network as possible.
步骤316,服务器为第二连通子图分配新的网络标识。 Step 316, the server assigns a new network identifier to the second connected subgraph.
在子图差异大于差异阈值的情况下,表明当前识别出的Wi-Fi网络(如一周后的第二连通子图)与在先识别出的Wi-Fi网络(如一周前的第一连通子图)之间存在较大的结构差异,因此可以为第二连通子图对应的Wi-Fi网络分配区别于已有SSID的网络标识,从而将当前识别出的Wi-Fi网络作为新的Wi-Fi网络。实际上,之所以存在这种情况,可能是因为原有Wi-Fi网络的网络结构确实发生了较大变化(如增加无线AP、减少无线AP、更改无线AP的名称、更换无线AP的地址等),也有可能是因为在先识别Wi-Fi网络时使用的网络连接记录较少,从而导致识别不准确。通过该方式,能够及时发现Wi-Fi网络的结构变化,并逐渐提高Wi-Fi网络结构识别的准确性,进而识别出更为完整准确的Wi-Fi网络。When the difference between the subgraphs is greater than the difference threshold, it indicates that the currently identified Wi-Fi network (such as the second connected subgraph one week later) is different from the previously identified Wi-Fi network (such as the first connected subgraph one week ago). There is a large structural difference between the two connected subgraphs), so the Wi-Fi network corresponding to the second connected subgraph can be assigned a network identifier different from the existing SSID, so that the currently identified Wi-Fi network can be used as a new Wi-Fi network. Fi network. In fact, the reason why this situation exists may be because the network structure of the original Wi-Fi network has indeed undergone major changes (such as adding wireless APs, reducing wireless APs, changing the name of wireless APs, changing the address of wireless APs, etc. ), it is also possible that the identification is inaccurate because fewer network connection records were used when the Wi-Fi network was identified first. In this way, structural changes of the Wi-Fi network can be discovered in time, and the accuracy of the identification of the structure of the Wi-Fi network can be gradually improved, thereby identifying a more complete and accurate Wi-Fi network.
通过上述方式生成的连通子图能够表征Wi-Fi网络中包含的无线AP以及各个无线AP之间的连接关系,所以该连通子图能够体现Wi-Fi网络的内部结构,从而实现对Wi-Fi网络结构的有效识别,进而保证无线AP标识的准确度。因为生成的连通子图能够表征Wi-Fi网络中包含的无线AP以及各个无线AP之间的连接关系,所以该连通子图能够体现Wi-Fi网络的内部结构,从而实现对Wi-Fi网络结构的有效识别,进而保证无线AP 标识的准确度。该方式无需终端的定位数据,从根本上避免了用户隐私方面可能存在的安全隐患;而且需要使用的信息为终端产生的包含会话标识、BSSID和SSID的网络连接记录,不需要依赖定位数据,因而能够适用于通过Wi-Fi网络实现联网的多种应用场景。而且,通过生成连通子图识别Wi-Fi网络结构,能够保证相连Wi-Fi网络之间尽量少的发生无线AP重合的情况,一定程度上避免了Wi-Fi网络聚合不充分的事实(例如标识出的任一无线AP不会同时属于两个Wi-Fi网络),从而能够完整地识别一个Wi-Fi网络;并且整个过程自动化、流程化,无需人工参与和维护。Wi-Fi网络识别和聚合的结果可以保证高准确性,从而便于更好地洞悉用户关系,提升风控、反作弊等多种业务场景的目标。The connectivity subgraph generated by the above method can represent the wireless APs included in the Wi-Fi network and the connection relationship between the wireless APs, so the connectivity subgraph can reflect the internal structure of the Wi-Fi network, so as to realize the connection between the Wi-Fi network and the Wi-Fi network. Effective identification of the network structure, thereby ensuring the accuracy of the wireless AP identification. Because the generated connectivity subgraph can represent the wireless APs included in the Wi-Fi network and the connection relationship between each wireless AP, the connectivity subgraph can reflect the internal structure of the Wi-Fi network, so as to realize the structure of the Wi-Fi network. It can effectively identify the wireless AP and ensure the accuracy of wireless AP identification. This method does not require the positioning data of the terminal, which fundamentally avoids potential security risks in terms of user privacy; and the information to be used is the network connection record generated by the terminal including the session ID, BSSID and SSID, and does not need to rely on the positioning data. It can be applied to a variety of application scenarios for networking through Wi-Fi networks. Moreover, by generating a connected subgraph to identify the Wi-Fi network structure, it can ensure that as few wireless APs overlap as possible between connected Wi-Fi networks, and to a certain extent avoid the fact that Wi-Fi network aggregation is insufficient (such as identifying Any outgoing wireless AP will not belong to two Wi-Fi networks at the same time), so that a Wi-Fi network can be completely identified; and the whole process is automated and streamlined, without manual participation and maintenance. The results of Wi-Fi network identification and aggregation can ensure high accuracy, which facilitates better insight into user relationships and improves the goals of various business scenarios such as risk control and anti-fraud.
与前述Wi-Fi网络的识别方法的实施例相对应地,本公开还提出了Wi-Fi网络的识别装置的实施例。Corresponding to the foregoing embodiments of the Wi-Fi network identification method, the present disclosure also proposes an embodiment of a Wi-Fi network identification device.
图6是根据本公开的实施例示出的一种Wi-Fi网络的识别装置的示意框图。本公开的实施例所示的Wi-Fi网络的识别装置可以适用于服务器。FIG. 6 is a schematic block diagram of an apparatus for identifying a Wi-Fi network according to an embodiment of the present disclosure. The Wi-Fi network identification device shown in the embodiments of the present disclosure can be applied to a server.
如图6所示,所述Wi-Fi网络的识别装置可以包括:As shown in FIG. 6 , the device for identifying the Wi-Fi network may include:
获取单元601,被配置为获取终端的网络连接记录,所述终端通过Wi-Fi网络连接至无线接入点无线AP,所述网络连接记录中包含所述无线AP所参与会话的会话标识、所述无线AP所归属基本服务集的基本服务集标识BSSID以及所述无线AP所归属扩展服务集的服务集标识SSID;The acquiring unit 601 is configured to acquire a network connection record of a terminal, the terminal is connected to a wireless AP of a wireless access point through a Wi-Fi network, and the network connection record includes a session identifier of a session in which the wireless AP participates, all The basic service set identifier BSSID of the basic service set to which the wireless AP belongs and the service set identifier SSID of the extended service set to which the wireless AP belongs;
确定单元602,被配置为确定所述网络连接记录中的漫游连接记录,任意多组所述漫游连接记录包含的会话标识相同、BSSID不同;The determining unit 602 is configured to determine the roaming connection records in the network connection records, and any multiple groups of the roaming connection records contain the same session identifier and different BSSIDs;
生成单元603,被配置为根据所述漫游连接记录生成至少一个第一连通子图,其中,用于生成第一连通子图的漫游连接记录包含的SSID相同,不同第一连通子图用于表征不同的Wi-Fi网络;The generating unit 603 is configured to generate at least one first connected subgraph according to the roaming connection record, wherein the SSIDs included in the roaming connection record used to generate the first connected subgraph are the same, and different first connected subgraphs are used to represent different Wi-Fi networks;
标识单元604,被配置为使用生成第一连通子图的漫游连接记录包含的SSID标记所述第一连通子图所表征的第一Wi-Fi网络,并使用生成所述第一连通子图的漫游连接记录包含的BSSID标记所述第一Wi-Fi网络的无线AP。The identification unit 604 is configured to use the SSID included in the roaming connection record for generating the first connected subgraph to mark the first Wi-Fi network represented by the first connected subgraph, and to use the SSID for generating the first connected subgraph. The BSSID included in the roaming connection record marks the wireless AP of the first Wi-Fi network.
在一些实施例中,所述获取单元601还被配置为:In some embodiments, the obtaining unit 601 is further configured to:
获取终端的至少一条原始网络连接记录,所述原始网络连接记录包括所述终端的终端标识、所述终端通过Wi-Fi网络连接的无线AP所归属基本服务集的基本服务集标识BSSID,以及所述终端连接至无线AP的连接时刻;Acquire at least one original network connection record of the terminal, where the original network connection record includes the terminal identifier of the terminal, the basic service set identifier BSSID of the basic service set to which the wireless AP connected by the terminal through the Wi-Fi network belongs, and all the connection time when the terminal is connected to the wireless AP;
在第一原始网络连接记录与第二原始网络连接记录包括的终端标识相同、连接时刻相同且BSSID不同的情况下,则从所述第一原始网络连接记录与第二原始网络连接记录中选取一条原始网络连接记录作为所述终端标识所表征终端的网络连接记录,所述第一原始网络连接记录为所述至少一条原始网络连接记录中的任一条连接记录,所述第二原始网络连接记录为所述至少一条原始网络连接记录中除所述第一原始网络连接记录之外的连接记录。In the case that the first original network connection record and the second original network connection record include the same terminal identifier, the same connection time, and different BSSIDs, select one from the first original network connection record and the second original network connection record The original network connection record is used as the network connection record of the terminal represented by the terminal identifier, the first original network connection record is any one of the at least one original network connection record, and the second original network connection record is Connection records other than the first original network connection record in the at least one original network connection record.
在一些实施例中,所述确定单元602还被配置为:In some embodiments, the determining unit 602 is further configured to:
从各个所述网络连接记录中提取所述终端连接至无线AP的连接时刻,并按照所述连接时刻对各个所述网络连接记录进行排序;Extract the connection time when the terminal is connected to the wireless AP from each of the network connection records, and sort each of the network connection records according to the connection time;
在排序后的所述网络连接记录中,在相邻的多条网络连接记录包含的会话标识相同、BSSID不同的情况下,则确定所述多条网络连接记录为漫游连接记录。In the sorted network connection records, if the session identifiers contained in the adjacent multiple network connection records are the same but the BSSIDs are different, the multiple network connection records are determined as roaming connection records.
在一些实施例中,所述漫游连接记录包含第一BSSID和第二BSSID,所述第一BSSID用于表征第一无线AP,所述第二BSSID表征第二无线AP,所述漫游连接记录用于表征所述终端从所述第一无线AP漫游至所述第二无线AP,所述生成单元603还被配置为:In some embodiments, the roaming connection record includes a first BSSID and a second BSSID, the first BSSID is used to represent the first wireless AP, the second BSSID is used to represent the second wireless AP, and the roaming connection record is used for In order to characterize that the terminal roams from the first wireless AP to the second wireless AP, the generating unit 603 is further configured to:
将所述漫游连接记录中的BSSID表征的各个无线AP作为子图节点;Each wireless AP represented by the BSSID in the roaming connection record is used as a subgraph node;
连接所述各个无线AP中的相邻无线AP,所述相邻无线AP之间的连接线作为子图边,所述相邻无线AP为所述漫游连接记录中相邻的网络连接记录的BSSID表征的无线AP;Connect the adjacent wireless APs in each wireless AP, the connection lines between the adjacent wireless APs are used as subgraph edges, and the adjacent wireless APs are the BSSIDs of the adjacent network connection records in the roaming connection record. Characterized wireless AP;
对于任意两组漫游连接记录,在前一组漫游连接记录中任一BSSID与后一组漫游连接记录中的任一BSSID表征同一无线AP的情况下,则将该无线AP作为所述两组漫游连接记录分别对应的子图边的公共子图节点。For any two groups of roaming connection records, if any BSSID in the former group of roaming connection records and any BSSID in the latter group of roaming connection records represent the same wireless AP, the wireless AP is regarded as the two groups of roaming connections. Connect the common subgraph nodes that record the corresponding subgraph edges respectively.
在一些实施例中,还包括:In some embodiments, it also includes:
子图更新单元605,被配置为按照预设的间隔时长,获取更新后的网络连接记录并生成用于表征第二Wi-Fi网络的第二连通子图;The subgraph updating unit 605 is configured to obtain the updated network connection record according to the preset interval duration and generate a second connected subgraph for characterizing the second Wi-Fi network;
标识更新单元606,被配置为在所述第二连通子图与所述第一连通子图之间的子图差异大于预设的差异阈值的情况下,则使用区别于已有SSID的网络标识标记所述第二连通子图表征的所述第二Wi-Fi网络,所述已有SSID被用于标记已识别出的所述第一Wi-Fi网络。The identification updating unit 606 is configured to use a network identification different from the existing SSID when the subgraph difference between the second connected subgraph and the first connected subgraph is greater than a preset difference threshold The second Wi-Fi network represented by the second connected subgraph is marked, and the existing SSID is used to mark the identified first Wi-Fi network.
在一些实施例中,所述标识更新单元606还被配置为:In some embodiments, the identity update unit 606 is further configured to:
确定所述第二连通子图相对于所述第一连通子图新增或减少的变更节点个数;Determining the number of new or decreased changed nodes in the second connected subgraph relative to the first connected subgraph;
将所述变更节点个数确定为所述子图差异、或者将所述变更节点个数与所述第一连通子图中的子图节点个数的比值确定为所述子图差异。The number of changed nodes is determined as the subgraph difference, or the ratio of the number of changed nodes to the number of subgraph nodes in the first connected subgraph is determined as the subgraph difference.
本公开的实施例还提出一种电子设备,包括:Embodiments of the present disclosure also provide an electronic device, including:
处理器;processor;
用于存储所述处理器可执行指令的存储器;a memory for storing the processor-executable instructions;
其中,所述处理器被配置为执行所述指令,以实现如上述任一实施例所述的Wi-Fi网络的识别方法。Wherein, the processor is configured to execute the instructions to implement the method for identifying a Wi-Fi network according to any of the foregoing embodiments.
本公开的实施例还提出一种存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行上述任一实施例所述的Wi-Fi网络的识别方法。The embodiments of the present disclosure further provide a storage medium, when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the Wi-Fi network identification method described in any of the foregoing embodiments.
本公开的实施例还提出一种计算机程序产品,所述计算机程序产品被配置为执行上述任一实施例所述的Wi-Fi网络的识别方法。Embodiments of the present disclosure further provide a computer program product, the computer program product being configured to execute the method for identifying a Wi-Fi network described in any of the foregoing embodiments.
图7是根据本公开的实施例示出的一种电子设备的示意框图。例如,电子设备700可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。FIG. 7 is a schematic block diagram of an electronic device according to an embodiment of the present disclosure. For example, electronic device 700 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, and the like.
参照图7,电子设备700可以包括以下一个或多个组件:处理组件702,存储器704,电源组件706,多媒体组件708,音频组件710,输入/输出(I/O)的接口712,传感器组件714,以及通信组件718。7, an electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714 , and the communication component 718 .
处理组件702通常控制电子设备700的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件702可以包括一个或多个处理器720来执行指令,以完成上述Wi-Fi网络的识别方法的全部或部分步骤。此外,处理组件702可以包括一个或多个模块,便于处理组件702和其他组件之间的交互。例如,处理组件702可以包括多媒体模块,以方便多媒体组件708和处理组件702之间的交互。The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute the instructions to complete all or part of the steps of the Wi-Fi network identification method described above. Additionally, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.
存储器704被配置为存储各种类型的数据以支持在电子设备700的操作。这些数据的示例包括用于在电子设备700上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器704可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。 Memory 704 is configured to store various types of data to support operation at electronic device 700 . Examples of such data include instructions for any application or method operating on electronic device 700, contact data, phonebook data, messages, pictures, videos, and the like. Memory 704 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电源组件706为电子设备700的各种组件提供电力。电源组件706可以包括电源管理系统,一个或多个电源,及其他与为电子设备700生成、管理和分配电力相关联的组件。 Power supply component 706 provides power to various components of electronic device 700 . Power supply components 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 700 .
多媒体组件708包括在电子设备700和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。在屏幕包括触摸面板的情况下,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件708包括一个前置摄像头和/或后置摄像头。在电子设备700处于操作模式,如拍摄模式或视频模式的情况下,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。 Multimedia component 708 includes a screen that provides an output interface between electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). In the case where the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action. In some embodiments, multimedia component 708 includes a front-facing camera and/or a rear-facing camera. When the electronic device 700 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件710被配置为输出和/或输入音频信号。例如,音频组件710包括一个麦克风(MIC),在电子设备700处于操作模式,如呼叫模式、记录模式和语音识别模式的情况下,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器704或经由通信组件718发送。在一些实施例中,音频组件710还包括一个扬声器,用于输出音频信号。 Audio component 710 is configured to output and/or input audio signals. For example, audio component 710 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 700 is in operating modes, such as calling mode, recording mode, and voice recognition mode. The received audio signal may be further stored in memory 704 or transmitted via communication component 718 . In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
I/O接口712为处理组件702和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按 钮和锁定按钮。The I/O interface 712 provides an interface between the processing component 702 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.
传感器组件714包括一个或多个传感器,用于为电子设备700提供各个方面的状态评估。例如,传感器组件714可以检测到电子设备700的打开/关闭状态,组件的相对定位,例如所述组件为电子设备700的显示器和小键盘,传感器组件714还可以检测电子设备700或电子设备700一个组件的位置改变,用户与电子设备700接触的存在或不存在,电子设备700方位或加速/减速和电子设备700的温度变化。传感器组件714可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件714还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件714还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。 Sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of electronic device 700 . For example, the sensor assembly 714 can detect the open/closed state of the electronic device 700, the relative positioning of the components, such as the display and keypad of the electronic device 700, the sensor assembly 714 can also detect the electronic device 700 or one of the electronic devices 700 Changes in the position of components, presence or absence of user contact with the electronic device 700 , orientation or acceleration/deceleration of the electronic device 700 and changes in the temperature of the electronic device 700 . Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
图像采集组件716可以用于采集被摄对象的图像数据,以形成关于被摄对象的图像,并可以对该图像进行必要的处理。该图像采集组件716可以包括相机模组,相机模组中的图像传感器(Sensor)通过镜头感应来自被摄对象的光线,将得到的感光数据提供给图像信号处理器(ISP,Image Signal Processing),由后者根据感光数据生成对应于被摄对象的图像。其中,上述图像传感器可以为CMOS传感器或CCD传感器,当然,也可以为红外传感器、深度传感器等;相机模组可以内置在电子设备700中,也可以为电子设备700的外接模组;上述ISP可以内置在相机模组中,也可以外挂在上述电子设备中(不在相机模组内)。The image acquisition component 716 can be used to acquire image data of the subject to form an image about the subject, and can perform necessary processing on the image. The image acquisition component 716 may include a camera module, and an image sensor (Sensor) in the camera module senses light from a subject through a lens, and provides the obtained photosensitive data to an image signal processor (ISP, Image Signal Processing), The latter generates an image corresponding to the subject based on the photosensitive data. Wherein, the above-mentioned image sensor can be a CMOS sensor or a CCD sensor, of course, can also be an infrared sensor, a depth sensor, etc.; the camera module can be built in the electronic device 700, or can be an external module of the electronic device 700; the above-mentioned ISP can be It is built into the camera module, and can also be externally attached to the above electronic equipment (not in the camera module).
通信组件718被配置为便于电子设备700和其他设备之间有线或无线方式的通信。电子设备700可以接入基于通信标准的无线网络,如Wi-Fi,运营商网络(如2G、3G、4G或5G),或它们的组合。在一个示例性实施例中,通信组件718经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件718还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。 Communication component 718 is configured to facilitate wired or wireless communication between electronic device 700 and other devices. Electronic device 700 may access wireless networks based on communication standards, such as Wi-Fi, carrier networks (eg, 2G, 3G, 4G, or 5G), or a combination thereof. In one exemplary embodiment, the communication component 718 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 718 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
在本公开一实施例中,电子设备700可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述任一实施例所述的Wi-Fi网络的识别方法。In an embodiment of the present disclosure, the electronic device 700 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field A programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components are implemented to implement the method for identifying a Wi-Fi network described in any of the foregoing embodiments.
在本公开一实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器704,上述指令可由电子设备700的处理器720执行以完成上述任一实施例所述的Wi-Fi网络的识别方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an embodiment of the present disclosure, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by the processor 720 of the electronic device 700 to complete any of the foregoing embodiments. The method for identifying the Wi-Fi network. For example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
在示例性实施例中,还提供一种计算机程序产品,包括计算机程序和/或指令,所述计算机程序和/或指令被处理器执行时实现上述任一实施例所述的Wi-Fi网络的识别方法。In an exemplary embodiment, a computer program product is also provided, including a computer program and/or instructions, and when the computer program and/or instructions are executed by a processor, implement the Wi-Fi network described in any of the foregoing embodiments. recognition methods.
本公开所有实施例均可以单独被执行,也可以与其他实施例相结合被执行,均视为本公开要求的保护范围。All the embodiments of the present disclosure can be implemented independently or in combination with other embodiments, which are all regarded as the protection scope required by the present disclosure.

Claims (15)

  1. 一种无线保真Wi-Fi网络的识别方法,包括:A wireless fidelity Wi-Fi network identification method, comprising:
    获取终端的网络连接记录,所述终端通过Wi-Fi网络连接至无线接入点AP,所述网络连接记录包含所述无线AP所参与会话的会话标识、所述无线AP所归属基本服务集的基本服务集标识BSSID以及所述无线AP所归属扩展服务集的服务集标识SSID;Obtain the network connection record of the terminal, the terminal is connected to the wireless access point AP through the Wi-Fi network, and the network connection record includes the session identifier of the session in which the wireless AP participates, and the information of the basic service set to which the wireless AP belongs. The basic service set identifier BSSID and the service set identifier SSID of the extended service set to which the wireless AP belongs;
    确定所述网络连接记录中的漫游连接记录,任意多组所述漫游连接记录包含的会话标识相同、BSSID不同;Determine the roaming connection records in the network connection records, and any multiple groups of the roaming connection records contain the same session identifier and different BSSIDs;
    根据所述漫游连接记录生成至少一个第一连通子图,其中,用于生成第一连通子图的漫游连接记录包含的SSID相同,不同第一连通子图用于表征不同的Wi-Fi网络;Generate at least one first connected subgraph according to the roaming connection record, wherein the roaming connection record used to generate the first connected subgraph contains the same SSID, and different first connected subgraphs are used to represent different Wi-Fi networks;
    使用生成第一连通子图的漫游连接记录包含的SSID标记所述第一连通子图所表征的第一Wi-Fi网络,并使用生成所述第一连通子图的漫游连接记录包含的BSSID标记所述第一Wi-Fi网络的无线AP。Mark the first Wi-Fi network represented by the first connected subgraph using the SSID included in the roaming connection record that generates the first connected subgraph, and use the BSSID included in the roaming connection record that generates the first connected subgraph to mark The wireless AP of the first Wi-Fi network.
  2. 根据权利要求1所述的方法,其中,所述获取终端的网络连接记录,包括:The method according to claim 1, wherein the acquiring the network connection record of the terminal comprises:
    获取终端的至少一条原始网络连接记录,所述原始网络连接记录包括所述终端的终端标识、所述终端通过Wi-Fi网络连接的无线AP所归属基本服务集的基本服务集标识BSSID,以及所述终端连接至无线AP的连接时刻;Acquire at least one original network connection record of the terminal, where the original network connection record includes the terminal identifier of the terminal, the basic service set identifier BSSID of the basic service set to which the wireless AP connected by the terminal through the Wi-Fi network belongs, and all the connection time when the terminal is connected to the wireless AP;
    在第一原始网络连接记录与第二原始网络连接记录包括的终端标识相同、连接时刻相同且BSSID不同的情况下,则从所述第一原始网络连接记录与第二原始网络连接记录中选取一条原始网络连接记录作为所述终端标识所表征终端的网络连接记录,所述第一原始网络连接记录为所述至少一条原始网络连接记录中的任一条连接记录,所述第二原始网络连接记录为所述至少一条原始网络连接记录中除所述第一原始网络连接记录之外的连接记录。In the case that the first original network connection record and the second original network connection record include the same terminal identifier, the same connection time, and different BSSIDs, select one from the first original network connection record and the second original network connection record The original network connection record is used as the network connection record of the terminal represented by the terminal identifier, the first original network connection record is any one of the at least one original network connection record, and the second original network connection record is Connection records other than the first original network connection record in the at least one original network connection record.
  3. 根据权利要求1所述的方法,其中,所述确定所述网络连接记录中的漫游连接记录,包括:The method according to claim 1, wherein the determining the roaming connection record in the network connection record comprises:
    从各个所述网络连接记录中提取所述终端连接至无线AP的连接时刻,并按照所述连接时刻对各个所述网络连接记录进行排序;Extract the connection time when the terminal is connected to the wireless AP from each of the network connection records, and sort each of the network connection records according to the connection time;
    在排序后的所述网络连接记录中,在相邻的多条网络连接记录包含的会话标识相同、BSSID不同的情况下,则确定所述多条网络连接记录为漫游连接记录。In the sorted network connection records, if the session identifiers contained in the adjacent multiple network connection records are the same but the BSSIDs are different, the multiple network connection records are determined as roaming connection records.
  4. 根据权利要求3所述的方法,其中,所述漫游连接记录包含的第一BSSID和第二BSSID,所述第一BSSID用于表征第一无线AP,所述第二BSSID表征第二无线AP,所述漫游连接记录用于表征所述终端从所述第一无线AP漫游至所述第二无线AP,所述根据所述漫游连接记录生成至少一个第一连通子图,包括:The method according to claim 3, wherein the roaming connection record includes a first BSSID and a second BSSID, the first BSSID is used to represent the first wireless AP, and the second BSSID is used to represent the second wireless AP, The roaming connection record is used to represent that the terminal roams from the first wireless AP to the second wireless AP, and generating at least one first connectivity subgraph according to the roaming connection record includes:
    将所述漫游连接记录中的BSSID表征的各个无线AP作为子图节点;Each wireless AP represented by the BSSID in the roaming connection record is used as a subgraph node;
    连接所述各个无线AP中的相邻无线AP,所述相邻无线AP之间的连接线作为子图边,所述相邻无线AP为所述漫游连接记录中相邻的网络连接记录的BSSID表征的无线AP;Connect the adjacent wireless APs in each wireless AP, the connection lines between the adjacent wireless APs are used as subgraph edges, and the adjacent wireless APs are the BSSIDs of the adjacent network connection records in the roaming connection record. Characterized wireless AP;
    对于任意两组漫游连接记录,在前一组漫游连接记录中任一BSSID与后一组漫游连接记录中的任一BSSID表征同一无线AP的情况下,则将该无线AP作为所述两组漫游连接记录分别对应的子图边的公共子图节点。For any two groups of roaming connection records, if any BSSID in the former group of roaming connection records and any BSSID in the latter group of roaming connection records represent the same wireless AP, the wireless AP is regarded as the two groups of roaming connections. Connect the common subgraph nodes that record the corresponding subgraph edges respectively.
  5. 根据权利要求1所述的方法,还包括:The method of claim 1, further comprising:
    按照预设的间隔时长,获取更新后的网络连接记录并生成用于表征第二Wi-Fi网络的第二连通子图;According to the preset interval duration, obtain the updated network connection record and generate a second connected subgraph for characterizing the second Wi-Fi network;
    在所述第二连通子图与所述第一连通子图之间的子图差异大于预设的差异阈值的情况下,则使用区别于已有SSID的网络标识标记所述第二连通子图表征的所述第二Wi-Fi网络,所述已有SSID被用于标记已识别出的所述第一Wi-Fi网络。When the subgraph difference between the second connected subgraph and the first connected subgraph is greater than a preset difference threshold, the second connected subgraph is marked with a network identifier different from the existing SSID The characterized second Wi-Fi network, the existing SSID is used to tag the identified first Wi-Fi network.
  6. 根据权利要求5所述的方法,其中,通过下述方式确定所述子图差异:The method of claim 5, wherein the subgraph differences are determined by:
    确定所述第二连通子图相对于所述第一连通子图新增或减少的变更节点个数;Determining the number of new or decreased changed nodes in the second connected subgraph relative to the first connected subgraph;
    将所述变更节点个数确定为所述子图差异、或者将所述变更节点个数与所述第一连通子图中的子图节点个数的比值确定为所述子图差异。The number of changed nodes is determined as the subgraph difference, or the ratio of the number of changed nodes to the number of subgraph nodes in the first connected subgraph is determined as the subgraph difference.
  7. 一种无线保真Wi-Fi网络的识别装置,包括:A wireless fidelity Wi-Fi network identification device, comprising:
    获取单元,被配置为获取终端的网络连接记录,所述终端通过Wi-Fi网络连接至无线接入点无线AP,所述网络连接记录包含所述无线AP所参与会话的会话标识、所述无线AP所归属基本服务集的基本服务集标识BSSID以及所述无线AP所归属扩展服务集的服务集标识SSID;an acquiring unit, configured to acquire a network connection record of a terminal, the terminal is connected to a wireless access point wireless AP through a Wi-Fi network, the network connection record includes a session identifier of a session in which the wireless AP participates, the wireless AP The basic service set identifier BSSID of the basic service set to which the AP belongs and the service set identifier SSID of the extended service set to which the wireless AP belongs;
    确定单元,被配置为确定所述网络连接记录中的漫游连接记录,任意多组所述漫游连接记录包含的会话标识相同、BSSID不同;a determining unit, configured to determine a roaming connection record in the network connection record, and any multiple groups of the roaming connection record contain the same session identifier and different BSSIDs;
    生成单元,被配置为根据所述漫游连接记录生成至少一个第一连通子图,其中,用于生成第一连通子图的漫游连接记录包含的SSID相同,不同第一连通子图用于表征不同的Wi-Fi网络;The generating unit is configured to generate at least one first connected subgraph according to the roaming connection record, wherein the SSID included in the roaming connection record used to generate the first connected subgraph is the same, and different first connected subgraphs are used to represent different Wi-Fi network;
    标识单元,被配置为使用生成第一连通子图的漫游连接记录包含的SSID标记所述第一连通子图所表征的第一Wi-Fi网络,并使用生成所述第一连通子图的漫游连接记录包含的BSSID标记所述第一Wi-Fi网络的无线AP。The identification unit is configured to use the SSID included in the roaming connection record that generates the first connected subgraph to mark the first Wi-Fi network represented by the first connected subgraph, and use the roaming to generate the first connected subgraph. The BSSID contained in the connection record marks the wireless AP of the first Wi-Fi network.
  8. 根据权利要求7所述的装置,其中,所述获取单元还被配置为:The apparatus according to claim 7, wherein the obtaining unit is further configured to:
    获取终端的至少一条原始网络连接记录,所述原始网络连接记录包括所述终端的终端标识、所述终端通过Wi-Fi网络连接的无线AP所归属基本服务集的基本服务集标识BSSID,以及所述终端连接至无线AP的连接时刻;Acquire at least one original network connection record of the terminal, where the original network connection record includes the terminal identifier of the terminal, the basic service set identifier BSSID of the basic service set to which the wireless AP connected by the terminal through the Wi-Fi network belongs, and all the connection time when the terminal is connected to the wireless AP;
    在第一原始网络连接记录与第二原始网络连接记录包括的终端标识相同、连接时刻相同且BSSID不同的情况下,则从所述第一原始网络连接记录与第二原始网络连接记录中选取一条原始网络连接记录作为所述终端标识所表征终端的网络连接记录,所述第一原始网络连接记录为所述至少一条原始网络连接记录中的任一条连接记录,所述第二原始网络连接记录为所述至少一条原始网络连接记录中除所述第一原始网络连接记录之外的连接记录。In the case where the first original network connection record and the second original network connection record include the same terminal identifier, the same connection time, and different BSSIDs, select one from the first original network connection record and the second original network connection record The original network connection record is used as the network connection record of the terminal represented by the terminal identifier, the first original network connection record is any one of the at least one original network connection record, and the second original network connection record is Connection records other than the first original network connection record in the at least one original network connection record.
  9. 根据权利要求7所述的装置,其中,所述确定单元还被配置为:The apparatus of claim 7, wherein the determining unit is further configured to:
    从各个所述网络连接记录中提取所述终端连接至无线AP的连接时刻,并按照所述连接时刻对各个所述网络连接记录进行排序;Extract the connection time when the terminal is connected to the wireless AP from each of the network connection records, and sort each of the network connection records according to the connection time;
    在排序后的所述网络连接记录中,在相邻的多条网络连接记录包含的会话标识相同、BSSID不同的情况下,则确定所述多条网络连接记录为漫游连接记录。In the sorted network connection records, if the session identifiers contained in the adjacent multiple network connection records are the same but the BSSIDs are different, the multiple network connection records are determined as roaming connection records.
  10. 根据权利要求9所述的装置,其中,所述漫游连接记录包含第一BSSID和第二BSSID,所述第一BSSID用于表征第一无线AP,所述第二BSSID表征第二无线AP,所述漫游连接记录用于表征所述终端从所述第一无线AP漫游至所述第二无线AP,所述生成单元还被配置为:The apparatus of claim 9, wherein the roaming connection record includes a first BSSID and a second BSSID, the first BSSID is used to represent the first wireless AP, the second BSSID is used to represent the second wireless AP, and the The roaming connection record is used to represent that the terminal roams from the first wireless AP to the second wireless AP, and the generating unit is further configured to:
    将所述漫游连接记录中的BSSID表征的各个无线AP作为子图节点;Each wireless AP represented by the BSSID in the roaming connection record is used as a subgraph node;
    连接所述各个无线AP中的相邻无线AP,所述相邻无线AP之间的连接线作为子图边,所述相邻无线AP为所述漫游连接记录中相邻的网络连接记录的BSSID表征的无线AP;Connect the adjacent wireless APs in each wireless AP, the connection lines between the adjacent wireless APs are used as subgraph edges, and the adjacent wireless APs are the BSSIDs of the adjacent network connection records in the roaming connection record. Characterized wireless AP;
    对于任意两组漫游连接记录,在前一组漫游连接记录中任一BSSID与后一组漫游连接记录中的任一BSSID表征同一无线AP的情况下,则将该无线AP作为所述两组漫游连接记录分别对应的子图边的公共子图节点。For any two groups of roaming connection records, if any BSSID in the former group of roaming connection records and any BSSID in the latter group of roaming connection records represent the same wireless AP, the wireless AP is regarded as the two groups of roaming connections. Connect the common subgraph nodes that record the corresponding subgraph edges respectively.
  11. 根据权利要求7所述的装置,其中,还包括:The apparatus of claim 7, further comprising:
    子图更新单元,被配置为按照预设的间隔时长,获取更新后的网络连接记录并生成用于表征第二Wi-Fi网络的第二连通子图;a subgraph updating unit, configured to obtain the updated network connection record according to a preset interval duration and generate a second connected subgraph for characterizing the second Wi-Fi network;
    标识更新单元,被配置为在所述第二连通子图与所述第一连通子图之间的子图差异大于预设的差异阈值的情况下,则使用区别于已有SSID的网络标识标记所述第二连通子图表征的所述第二Wi-Fi网络,所述已有SSID被用于标记已识别出的所述第一Wi-Fi网络。An identification update unit, configured to use a network identification mark different from the existing SSID when the subgraph difference between the second connected subgraph and the first connected subgraph is greater than a preset difference threshold For the second Wi-Fi network represented by the second connectivity subgraph, the existing SSID is used to mark the identified first Wi-Fi network.
  12. 根据权利要求11所述的装置,其中,所述标识更新单元还被配置为:The apparatus of claim 11, wherein the identity update unit is further configured to:
    确定所述第二连通子图相对于所述第一连通子图新增或减少的变更节点个数;Determining the number of new or decreased changed nodes in the second connected subgraph relative to the first connected subgraph;
    将所述变更节点个数确定为所述子图差异、或者将所述变更节点个数与所述第一连通子图中的子图节点个数的比值确定为所述子图差异。The number of changed nodes is determined as the subgraph difference, or the ratio of the number of changed nodes to the number of subgraph nodes in the first connected subgraph is determined as the subgraph difference.
  13. 一种电子设备,包括:An electronic device comprising:
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;a memory for storing the processor-executable instructions;
    其中,所述处理器被配置为执行所述指令,以实现以下步骤:wherein the processor is configured to execute the instructions to implement the following steps:
    获取终端的网络连接记录,所述终端通过Wi-Fi网络连接至无线接入点AP,所述网络连接记录中包含所述无线AP所参与会话的会话标识、所述无线AP所归属基本服务集的基本服务集标识BSSID以及所述无线AP所归属扩展服务集的服务集标识SSID;Obtain the network connection record of the terminal, the terminal is connected to the wireless access point AP through the Wi-Fi network, and the network connection record includes the session identifier of the session in which the wireless AP participates, and the basic service set to which the wireless AP belongs. The basic service set identifier BSSID of the wireless AP and the service set identifier SSID of the extended service set to which the wireless AP belongs;
    确定所述网络连接记录中的漫游连接记录,任意多组所述漫游连接记录包含的会话标识相同、BSSID不同;Determine the roaming connection records in the network connection records, and any multiple groups of the roaming connection records contain the same session identifier and different BSSIDs;
    根据所述漫游连接记录生成至少一个第一连通子图,其中,用于生成第一连通子图的漫游连接记录包含的SSID相同,不同第一连通子图用于表征不同的Wi-Fi网络;Generate at least one first connected subgraph according to the roaming connection record, wherein the roaming connection record used to generate the first connected subgraph contains the same SSID, and different first connected subgraphs are used to represent different Wi-Fi networks;
    使用生成第一连通子图的漫游连接记录包含的SSID标记所述第一连通子图所表征的第一Wi-Fi网络,并使用生成所述第一连通子图的漫游连接记录包含的BSSID标记所述第一Wi-Fi网络的无线AP。Mark the first Wi-Fi network represented by the first connected subgraph using the SSID included in the roaming connection record that generates the first connected subgraph, and use the BSSID included in the roaming connection record that generates the first connected subgraph to mark The wireless AP of the first Wi-Fi network.
  14. 一种计算机可读存储介质,其中,当所述存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行以下步骤:A computer-readable storage medium, wherein when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the following steps:
    获取终端的网络连接记录,所述终端通过Wi-Fi网络连接至无线接入点AP,所述网络连接记录中包含所述无线AP所参与会话的会话标识、所述无线AP所归属基本服务集的基本服务集标识BSSID以及所述无线AP所归属扩展服务集的服务集标识SSID;Obtain the network connection record of the terminal, the terminal is connected to the wireless access point AP through the Wi-Fi network, and the network connection record includes the session identifier of the session in which the wireless AP participates, and the basic service set to which the wireless AP belongs. The basic service set identifier BSSID of the wireless AP and the service set identifier SSID of the extended service set to which the wireless AP belongs;
    确定所述网络连接记录中的漫游连接记录,任意多组所述漫游连接记录包含的会话标识相同、BSSID不同;Determine the roaming connection records in the network connection records, and any multiple groups of the roaming connection records contain the same session identifier and different BSSIDs;
    根据所述漫游连接记录生成至少一个第一连通子图,其中,用于生成第一连通子图的漫游连接记录包含的SSID相同,不同第一连通子图用于表征不同的Wi-Fi网络;Generate at least one first connected subgraph according to the roaming connection record, wherein the roaming connection record used to generate the first connected subgraph contains the same SSID, and different first connected subgraphs are used to represent different Wi-Fi networks;
    使用生成第一连通子图的漫游连接记录包含的SSID标记所述第一连通子图所表征的第一Wi-Fi网络,并使用生成所述第一连通子图的漫游连接记录包含的BSSID标记所述第一Wi-Fi网络的无线AP。Mark the first Wi-Fi network represented by the first connected subgraph using the SSID included in the roaming connection record that generates the first connected subgraph, and use the BSSID included in the roaming connection record that generates the first connected subgraph to mark The wireless AP of the first Wi-Fi network.
  15. 一种计算机程序产品,包括计算机程序/指令,其中,所述计算机程序/指令被处理器执行时实现以下步骤:A computer program product, comprising a computer program/instruction, wherein the computer program/instruction, when executed by a processor, implements the following steps:
    获取终端的网络连接记录,所述终端通过Wi-Fi网络连接至无线接入点AP,所述网络连接记录中包含所述无线AP所参与会话的会话标识、所述无线AP所归属基本服务集的基本服务集标识BSSID以及所述无线AP所归属扩展服务集的服务集标识SSID;Obtain the network connection record of the terminal, the terminal is connected to the wireless access point AP through the Wi-Fi network, and the network connection record includes the session identifier of the session in which the wireless AP participates, and the basic service set to which the wireless AP belongs. The basic service set identifier BSSID of the wireless AP and the service set identifier SSID of the extended service set to which the wireless AP belongs;
    确定所述网络连接记录中的漫游连接记录,任意多组所述漫游连接记录包含的会话标识相同、BSSID不同;Determine the roaming connection records in the network connection records, and any multiple groups of the roaming connection records contain the same session identifier and different BSSIDs;
    根据所述漫游连接记录生成至少一个第一连通子图,其中,用于生成第一连通子图的漫游连接记录包含的SSID相同,不同第一连通子图用于表征不同的Wi-Fi网络;Generate at least one first connected subgraph according to the roaming connection record, wherein the roaming connection record used to generate the first connected subgraph contains the same SSID, and different first connected subgraphs are used to represent different Wi-Fi networks;
    使用生成第一连通子图的漫游连接记录包含的SSID标记所述第一连通子图所表征的第一Wi-Fi网络,并使用生成所述第一连通子图的漫游连接记录包含的BSSID标记所述第一Wi-Fi网络的无线AP。Mark the first Wi-Fi network represented by the first connected subgraph using the SSID included in the roaming connection record that generates the first connected subgraph, and use the BSSID included in the roaming connection record that generates the first connected subgraph to mark The wireless AP of the first Wi-Fi network.
PCT/CN2021/113087 2021-01-29 2021-08-17 Wi-fi network recognition method and wi-fi network recognition apparatus WO2022160670A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110130166.5A CN112954774B (en) 2021-01-29 2021-01-29 Wi-Fi network identification method and device, electronic equipment and storage medium
CN202110130166.5 2021-01-29

Publications (1)

Publication Number Publication Date
WO2022160670A1 true WO2022160670A1 (en) 2022-08-04

Family

ID=76240191

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/113087 WO2022160670A1 (en) 2021-01-29 2021-08-17 Wi-fi network recognition method and wi-fi network recognition apparatus

Country Status (2)

Country Link
CN (1) CN112954774B (en)
WO (1) WO2022160670A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112954774B (en) * 2021-01-29 2022-11-18 北京达佳互联信息技术有限公司 Wi-Fi network identification method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104115525A (en) * 2012-02-17 2014-10-22 苹果公司 Detecting neighboring access points in a network
CN107995682A (en) * 2017-11-06 2018-05-04 北京三快在线科技有限公司 Wireless access independent positioning method, device, electronic equipment and storage medium
US20190261221A1 (en) * 2018-02-22 2019-08-22 Cisco Technology, Inc. Flash crowd detection and responsive network management
CN112954774A (en) * 2021-01-29 2021-06-11 北京达佳互联信息技术有限公司 Wi-Fi network identification method and device, electronic equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007045147A1 (en) * 2005-10-21 2007-04-26 Huawei Technologies Co., Ltd. An accessing network method, system and terminal of the wireless local area network terminal
KR101364475B1 (en) * 2009-06-30 2014-02-19 알까뗄 루슨트 Roaming method for mobile terminal in wireless local area network, related access controller and access point device
US9026099B2 (en) * 2011-12-08 2015-05-05 Apple Inc. Mechanisms to improve mobile device roaming in wireless networks
US20170353905A1 (en) * 2016-06-03 2017-12-07 Qualcomm Incorporated Access point roaming
CN108738098B (en) * 2018-08-14 2020-11-24 重庆邮电大学 Method for seamless switching among multiple access points of WLAN (Wireless local area network)
CN109640375A (en) * 2019-01-23 2019-04-16 欧普照明股份有限公司 A kind of smart machine distribution method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104115525A (en) * 2012-02-17 2014-10-22 苹果公司 Detecting neighboring access points in a network
CN107995682A (en) * 2017-11-06 2018-05-04 北京三快在线科技有限公司 Wireless access independent positioning method, device, electronic equipment and storage medium
US20190261221A1 (en) * 2018-02-22 2019-08-22 Cisco Technology, Inc. Flash crowd detection and responsive network management
CN112954774A (en) * 2021-01-29 2021-06-11 北京达佳互联信息技术有限公司 Wi-Fi network identification method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112954774B (en) 2022-11-18
CN112954774A (en) 2021-06-11

Similar Documents

Publication Publication Date Title
US20220400421A1 (en) Cell reselection method and apparatus, and communication device
CN106358189B (en) Method and device for accessing wireless local area network
CN112438056B (en) Device-based access point association and physical address tracking
US20240007248A1 (en) Method for information transmission and method for parameter determination, communication device, and non-transitory computer-readable storage medium
US20230413150A1 (en) Method and apparatus for determining target cell of ue, communication device, and storage medium
CN110521236B (en) Information processing method, device and computer storage medium
WO2022120751A1 (en) Communication method and apparatus, access device, terminal, and storage medium
US11889568B2 (en) Systems and methods for paging over WiFi for mobile terminating calls
US20210250889A1 (en) Network registration of terminal, and methods and apparatuses for transmission of network selection parameter
WO2019119421A1 (en) Cell access method and device, and storage medium
WO2022160670A1 (en) Wi-fi network recognition method and wi-fi network recognition apparatus
WO2023065255A1 (en) Cell reselection method and apparatus, communication device, and storage medium
WO2020258263A1 (en) Cell reselection method and device, and storage medium
CN113395745B (en) Method, device, terminal and storage medium for accessing Mesh network
CN109195203A (en) Method for parameter configuration, device, terminal and the storage medium of WLAN
CN115244962A (en) Measurement interval configuration method and device, communication equipment and storage medium
US20230199896A1 (en) Method and apparatus for transferring service, communication device and storage medium
US20230292365A1 (en) Method for random access communication device, and storage medium
US20220248322A1 (en) Cell selection method and apparatus, communication device, and storage medium
WO2023108428A1 (en) Method and apparatus for receiving/transmitting configuration information of ncd-ssb, communication device, and storage medium
WO2024088197A1 (en) Sensing processing method, information transmission method, core network device and terminal
WO2023155111A1 (en) Information processing method and apparatus, and communication device and storage medium
US20230422069A1 (en) Measurement data processing method and apparatus, communication device, and storage medium
WO2023130442A1 (en) Measurement method and apparatus, communication device and storage medium
WO2023108431A1 (en) Method and apparatus for executing predetermined operation, communication device, and storage medium

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: 21922265

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 19/09/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21922265

Country of ref document: EP

Kind code of ref document: A1