Movatterモバイル変換


[0]ホーム

URL:


CN111970750A - Multi-frequency WiFi identification method and device - Google Patents

Multi-frequency WiFi identification method and device
Download PDF

Info

Publication number
CN111970750A
CN111970750ACN202010833413.3ACN202010833413ACN111970750ACN 111970750 ACN111970750 ACN 111970750ACN 202010833413 ACN202010833413 ACN 202010833413ACN 111970750 ACN111970750 ACN 111970750A
Authority
CN
China
Prior art keywords
wifi
frequency
public network
network
historical connection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010833413.3A
Other languages
Chinese (zh)
Other versions
CN111970750B (en
Inventor
徐贤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co LtdfiledCriticalVivo Mobile Communication Co Ltd
Priority to CN202010833413.3ApriorityCriticalpatent/CN111970750B/en
Publication of CN111970750ApublicationCriticalpatent/CN111970750A/en
Application grantedgrantedCritical
Publication of CN111970750BpublicationCriticalpatent/CN111970750B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本申请公开了一种多频WiFi识别方法及装置,属于移动通信技术领域。所述方法包括:扫描电子设备所处环境中的待连接WiFi;在所述待连接WiFi包括第一WiFi和第二WiFi,且所述第一WiFi和所述第二WiFi满足预设多频WiFi条件的情况下,识别所述待连接WiFi为多频WiFi;其中,所述预设多频WiFi条件包括:第一公网网际互连协议IP地址与第二公网IP地址相同;第一公网IP为所述电子设备接入所述第一WiFi时的公网IP,所述第二公网IP为所述电子设备接入所述第二WiFi时的公网IP。本申请实施例解决了现有技术中,电子设备难以识别多频WiFi设备的问题。

Figure 202010833413

The present application discloses a multi-frequency WiFi identification method and device, which belong to the technical field of mobile communication. The method includes: scanning the WiFi to be connected in the environment where the electronic device is located; the WiFi to be connected includes a first WiFi and a second WiFi, and the first WiFi and the second WiFi satisfy a preset multi-frequency WiFi In the case of conditions, identifying the WiFi to be connected as a multi-frequency WiFi; wherein, the preset multi-frequency WiFi conditions include: the first public Internet Internet Protocol IP address is the same as the second public network IP address; the first public network IP address is the same; The network IP is the public network IP when the electronic device accesses the first WiFi, and the second public network IP is the public network IP when the electronic device accesses the second WiFi. The embodiments of the present application solve the problem in the prior art that it is difficult for an electronic device to identify a multi-frequency WiFi device.

Figure 202010833413

Description

Translated fromChinese
多频WiFi识别方法及装置Multi-frequency WiFi identification method and device

技术领域technical field

本申请属于移动通信技术领域,具体涉及一种多频WiFi识别方法及装置。The present application belongs to the technical field of mobile communication, and in particular relates to a method and device for identifying a multi-frequency WiFi.

背景技术Background technique

随着移动通信技术的迅速发展,无线保真(Wireless Fidelity,WiFi或Wi-Fi)已经得到了广泛的使用,用户对WiFi的带宽需求也越来越大。为了满足日益增长的带宽需求,当前WiFi标准已经开始使用除2.4G频段之外的5G频段,以扩展总带宽;同时,支持两个频段的无线路由器或者无线接入点(Access Point,AP)设备被称之为多频WiFi设备。With the rapid development of mobile communication technology, Wireless Fidelity (Wireless Fidelity, WiFi or Wi-Fi) has been widely used, and users' demand for WiFi bandwidth is also increasing. In order to meet the growing demand for bandwidth, the current WiFi standard has begun to use 5G frequency bands in addition to the 2.4G frequency band to expand the total bandwidth; at the same time, wireless routers or wireless access point (AP) devices that support both frequency bands It is called a multi-band WiFi device.

多频WiFi(即多频WiFi设备)在工作状态下,通常会同时发射出两个或两个以上频段的无线信号,电子设备可按需接入到两个频段所覆盖的网络中,以此来达到分摊带宽的目的。而在5G频段的带宽会大很多的情况下,接入5G频段会获得更快的网速。但由于5G频段的频率更高,所以传播损耗更大,穿透能力更弱,导致其覆盖范围相对2.4G频段要小一些。因此,为了获得更好的网络性能,就电子设备在使用多频WiFi作为接入点的过程中,需要主动切换频段,而识别多频WiFi则是终端主动切换频段的前提。Multi-frequency WiFi (that is, multi-frequency WiFi equipment) usually transmits wireless signals of two or more frequency bands at the same time, and electronic devices can access the networks covered by the two frequency bands as needed. To achieve the purpose of allocating bandwidth. In the case that the bandwidth of the 5G frequency band will be much larger, accessing the 5G frequency band will obtain a faster network speed. However, due to the higher frequency of the 5G band, the propagation loss is greater and the penetration capability is weaker, resulting in a smaller coverage than the 2.4G band. Therefore, in order to obtain better network performance, electronic devices need to actively switch frequency bands in the process of using multi-frequency WiFi as an access point, and identifying multi-frequency WiFi is a prerequisite for terminals to actively switch frequency bands.

目前,为了实现一个设备对两个频段的支持,通常会在一个设备上集成两套射频芯片,就当前网络分层协议的角度来看,两套射频芯片就是数据链路层的两个设备,而电子设备难以区分两个数据链路层的设备是两个独立的设备还是集成在一个设备实体中的两套射频芯片;因此,电子设备难以识别多频WiFi;若无法准确识别多频WiFi设备,则电子设备无法主动进行频段切换。At present, in order to realize the support of two frequency bands by one device, two sets of radio frequency chips are usually integrated on one device. From the perspective of the current network layering protocol, the two sets of radio frequency chips are two devices at the data link layer. It is difficult for electronic devices to distinguish whether the devices of the two data link layers are two independent devices or two sets of radio frequency chips integrated in one device entity; therefore, it is difficult for electronic devices to identify multi-band WiFi; if it cannot accurately identify multi-band WiFi devices , the electronic device cannot actively switch the frequency band.

发明内容SUMMARY OF THE INVENTION

本申请实施例的目的是提供一种多频WiFi识别方法及装置,能够解决电子设备难以识别多频WiFi设备的问题。The purpose of the embodiments of the present application is to provide a multi-frequency WiFi identification method and apparatus, which can solve the problem that it is difficult for electronic equipment to identify a multi-frequency WiFi device.

为了解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:

第一方面,本申请实施例提供了一种多频WiFi识别方法,所述方法包括:In a first aspect, an embodiment of the present application provides a multi-frequency WiFi identification method, the method comprising:

扫描电子设备所处环境中的待连接WiFi;Scan the WiFi to be connected in the environment where the electronic device is located;

在所述待连接WiFi包括第一WiFi和第二WiFi,且所述第一WiFi和所述第二WiFi满足预设多频WiFi条件的情况下,识别所述待连接WiFi为多频WiFi;In the case that the WiFi to be connected includes a first WiFi and a second WiFi, and the first WiFi and the second WiFi meet preset multi-frequency WiFi conditions, identifying the WiFi to be connected as a multi-frequency WiFi;

其中,所述预设多频WiFi条件包括:第一公网网际互连协议IP地址与第二公网IP地址相同;第一公网IP为所述电子设备接入所述第一WiFi时的公网IP,所述第二公网IP为所述电子设备接入所述第二WiFi时的公网IP。The preset multi-frequency WiFi conditions include: the IP address of the first public network Internet Protocol is the same as the second public network IP address; the first public network IP is the first public network IP when the electronic device accesses the first WiFi Public network IP, the second public network IP is the public network IP when the electronic device accesses the second WiFi.

可选地,所述预设多频WiFi条件还包括:所述第一WiFi的第一服务集标识SSID与所述第二WiFi的第二SSID满足预设相似度要求。Optionally, the preset multi-frequency WiFi condition further includes: the first service set identifier SSID of the first WiFi and the second SSID of the second WiFi meet a preset similarity requirement.

可选地,所述在所述待连接WiFi包括第一WiFi和第二WiFi,且所述第一WiFi和所述第二WiFi满足预设多频WiFi条件的情况下,识别所述待连接WiFi为多频WiFi,包括:Optionally, identifying the WiFi to be connected when the WiFi to be connected includes a first WiFi and a second WiFi, and the first WiFi and the second WiFi satisfy a preset multi-frequency WiFi condition For multi-band WiFi, including:

获取所述电子设备的历史连接列表;所述历史连接列表中包括所述电子设备的历史连接WiFi以及所述历史连接WiFi的网络访问参数;Obtain the historical connection list of the electronic device; the historical connection list includes the historical connection WiFi of the electronic device and the network access parameters of the historical connection WiFi;

从所述待连接WiFi中获取第一WiFi,以及从所述历史连接列表中,获取第二WiFi;所述第一WiFi的SSID和所述第二WiFi的SSID满足预设相似度要求;Obtain the first WiFi from the WiFi to be connected, and obtain the second WiFi from the historical connection list; the SSID of the first WiFi and the SSID of the second WiFi meet the preset similarity requirement;

根据所述第二WiFi的网络访问参数,接入所述第一WiFi并访问公网,获取所述电子设备的第一公网IP地址;According to the network access parameters of the second WiFi, access the first WiFi and access the public network, and obtain the first public network IP address of the electronic device;

若所述第一公网IP地址与所述第二WiFi的第二公网IP地址相同,则识别所述待连接WiFi为多频WiFi。If the first public network IP address is the same as the second public network IP address of the second WiFi, it is identified that the WiFi to be connected is a multi-frequency WiFi.

可选地,所述从所述待连接WiFi中获取第一WiFi,以及从所述历史连接列表中,获取第二WiFi;所述第一WiFi的SSID和所述第二WiFi的SSID满足预设相似度要求,包括:Optionally, obtaining the first WiFi from the WiFi to be connected, and obtaining the second WiFi from the historical connection list; the SSID of the first WiFi and the SSID of the second WiFi satisfy a preset Similarity requirements, including:

查询所述历史连接列表中,与所述待连接WiFi的SSID满足所述预设相似度要求的历史连接WiFi;所述待连接WiFi为所述第一WiFi,所述历史连接WiFi为所述第二WiFi。Querying the historical connection list, the historical connection WiFi that meets the preset similarity requirement with the SSID of the to-be-connected WiFi; the to-be-connected WiFi is the first WiFi, and the historically connected WiFi is thefirst WiFi 2. WiFi.

可选地,所述从所述待连接WiFi中获取第一WiFi,以及从所述历史连接列表中,获取第二WiFi;所述第一WiFi的SSID和所述第二WiFi的SSID满足预设相似度要求,包括:Optionally, obtaining the first WiFi from the WiFi to be connected, and obtaining the second WiFi from the historical connection list; the SSID of the first WiFi and the SSID of the second WiFi satisfy a preset Similarity requirements, including:

将所述待连接WiFi中,存在于所述历史连接列表中的第一待连接WiFi划分至第一WiFi集合,未存在于所述历史连接列表中的第二待连接WiFi划分至第二WiFi集合;In the to-be-connected WiFi, the first to-be-connected WiFi that exists in the historical connection list is divided into a first WiFi set, and the second to-be-connected WiFi that does not exist in the historical connection list is divided into a second WiFi set. ;

从所述第一WiFi集合中,筛选SSID满足预设相似度要求的第一WiFi和第二WiFi;From the first WiFi set, filter the first WiFi and the second WiFi whose SSID meets the preset similarity requirement;

或,or,

对于每个所述第一待连接WiFi,遍历所述第一WiFi集合,筛选与所述第一待连接WiFi满足预设多频WiFi条件的第二待连接WiFi,则所述第一待连接WiFi为所述第一WiFi,所述第二待连接WiFi为所述第二WiFi。For each of the first WiFi to be connected, the first WiFi set is traversed, and the second WiFi to be connected that meets the preset multi-frequency WiFi conditions with the first WiFi to be connected is screened, then the first WiFi to be connected is filtered. is the first WiFi, and the second WiFi to be connected is the second WiFi.

可选地,所述识别所述待连接WiFi为多频WiFi之后,所述方法还包括:Optionally, after identifying that the WiFi to be connected is a multi-frequency WiFi, the method further includes:

获取所述多频WiFi的网络状态参数;其中,所述网络状态参数包括信号强度、所述第一WiFi以及所述第二WiFi对应的接入点设备与所述电子设备之间的距离以及上下行速率中的至少一种;Obtain network status parameters of the multi-frequency WiFi; wherein, the network status parameters include signal strength, the distance between the access point device corresponding to the first WiFi and the second WiFi and the electronic device, and the upper and lower at least one of the line rates;

根据所述网络状态参数,在所述多频WiFi之间进行网络切换。According to the network state parameter, network switching is performed between the multi-frequency WiFi.

第二方面,本申请实施例还提供了一种多频WiFi识别装置,所述多频WiFi识别装置包括:In a second aspect, the embodiment of the present application further provides a multi-frequency WiFi identification device, and the multi-frequency WiFi identification device includes:

扫描模块,用于扫描电子设备所处环境中的待连接WiFi;The scanning module is used to scan the WiFi to be connected in the environment where the electronic device is located;

识别模块,用于在所述待连接WiFi包括第一WiFi和第二WiFi,且所述第一WiFi和所述第二WiFi满足预设多频WiFi条件的情况下,识别所述待连接WiFi为多频WiFi;An identification module, configured to identify the WiFi to be connected as a WiFi to be connected when the WiFi to be connected includes a first WiFi and a second WiFi, and the first WiFi and the second WiFi meet preset multi-frequency WiFi conditions Multi-band WiFi;

其中,所述预设多频WiFi条件包括:第一公网网际互连协议IP地址与第二公网IP地址相同;第一公网IP为所述电子设备接入所述第一WiFi时的公网IP,所述第二公网IP为所述电子设备接入所述第二WiFi时的公网IP。The preset multi-frequency WiFi conditions include: the IP address of the first public network Internet Protocol is the same as the second public network IP address; the first public network IP is the first public network IP when the electronic device accesses the first WiFi Public network IP, the second public network IP is the public network IP when the electronic device accesses the second WiFi.

可选地,所述预设多频WiFi条件还包括:所述第一WiFi的第一服务集标识SSID与所述第二WiFi的第二SSID满足预设相似度要求。Optionally, the preset multi-frequency WiFi condition further includes: the first service set identifier SSID of the first WiFi and the second SSID of the second WiFi meet a preset similarity requirement.

可选地,所述识别模块包括:Optionally, the identification module includes:

列表获取子模块,用于获取所述电子设备的历史连接列表;所述历史连接列表中包括所述电子设备的历史连接WiFi以及所述历史连接WiFi的网络访问参数;a list acquisition sub-module, used to acquire the historical connection list of the electronic device; the historical connection list includes the historical connection WiFi of the electronic device and the network access parameters of the historical connection WiFi;

筛选子模块,用于从所述待连接WiFi中获取第一WiFi,以及从所述历史连接列表中,获取第二WiFi;所述第一WiFi的SSID和所述第二WiFi的SSID满足预设相似度要求;A screening sub-module, configured to obtain the first WiFi from the WiFi to be connected, and obtain the second WiFi from the historical connection list; the SSID of the first WiFi and the SSID of the second WiFi meet the preset requirements similarity requirements;

接入子模块,用于根据所述第二WiFi的网络访问参数,接入所述第一WiFi并访问公网,获取所述电子设备的第一公网IP地址;an access submodule, configured to access the first WiFi and access the public network according to the network access parameters of the second WiFi, and obtain the first public IP address of the electronic device;

识别子模块,用于若所述第一公网IP地址与所述第二WiFi的第二公网IP地址相同,则识别所述待连接WiFi为多频WiFi。The identification submodule is configured to identify the WiFi to be connected as a multi-frequency WiFi if the first public network IP address is the same as the second public network IP address of the second WiFi.

可选地,所述筛选子模块包括:Optionally, the screening submodule includes:

查询单元,用于查询所述历史连接列表中,与所述待连接WiFi的SSID与满足所述预设相似度要求的历史连接WiFi;所述待连接WiFi为所述第一WiFi,所述历史连接WiFi为所述第二WiFi。A query unit, configured to query the historical connection list, the SSID of the WiFi to be connected and the historically connected WiFi that meets the preset similarity requirement; the WiFi to be connected is the first WiFi, the historical WiFi The connected WiFi is the second WiFi.

可选地,所述筛选子模块包括:Optionally, the screening submodule includes:

划分单元,用于将所述待连接WiFi中,存在于所述历史连接列表中的第一待连接WiFi划分至第一WiFi集合,未存在于所述历史连接列表中的第二待连接WiFi划分至第二WiFi集合;A dividing unit, configured to divide the first WiFi to be connected that exists in the historical connection list into the first WiFi set, and the second WiFi to be connected that does not exist in the historical connection list is divided into the WiFi to be connected to the second WiFi set;

第一筛选单元,用于从所述第一WiFi集合中,筛选SSID满足预设相似度要求的第一WiFi和第二WiFi;a first screening unit, configured to screen the first WiFi and the second WiFi whose SSID meets the preset similarity requirement from the first WiFi set;

或,or,

第二筛选单元,用于对于每个所述第一待连接WiFi,遍历所述第一WiFi集合,筛选与所述第一待连接WiFi满足预设多频WiFi条件的第二待连接WiFi,则所述第一待连接WiFi为所述第一WiFi,所述第二待连接WiFi为所述第二WiFi。The second screening unit is configured to traverse the first WiFi set for each of the first WiFi to be connected, and filter the second WiFi to be connected that satisfies the preset multi-frequency WiFi condition with the first WiFi to be connected, then The first WiFi to be connected is the first WiFi, and the second WiFi to be connected is the second WiFi.

可选地,所述装置还包括:Optionally, the device further includes:

参数获取模块,用于获取所述多频WiFi的网络状态参数;其中,所述网络状态参数包括信号强度、所述第一WiFi以及所述第二WiFi对应的接入点设备与所述电子设备之间的距离以及上下行速率中的至少一种;A parameter acquisition module, configured to acquire network state parameters of the multi-frequency WiFi; wherein, the network state parameters include signal strength, access point devices corresponding to the first WiFi and the second WiFi, and the electronic device At least one of the distance between and the uplink and downlink rates;

切换模块,用于根据所述网络状态参数,在所述多频WiFi之间进行网络切换。A switching module, configured to perform network switching between the multi-frequency WiFi according to the network state parameter.

第三方面,本申请实施例还提供了一种电子设备,该电子设备包括存储器、处理器及存储在存储器上并可在处理器上运行的程序或指令,所述处理器执行所述程序或指令时实现如上所述的多频WiFi识别方法中的步骤。In a third aspect, an embodiment of the present application further provides an electronic device, the electronic device includes a memory, a processor, and a program or instruction stored in the memory and executable on the processor, where the processor executes the program or The steps in the above-mentioned multi-frequency WiFi identification method are implemented when instructed.

第四方面,本申请实施例还提供了一种可读存储介质,该可读存储介质上存储有程序或指令,所述程序或指令被处理器执行时实现如上所述的多频WiFi识别方法中的步骤。In a fourth aspect, an embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the above-mentioned multi-frequency WiFi identification method is implemented steps in .

第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.

在本申请实施例中,扫描电子设备所处环境中的待连接WiFi;在所述待连接WiFi包括第一WiFi和第二WiFi,且所述第一WiFi和所述第二WiFi满足预设多频WiFi条件的情况下,识别所述待连接WiFi为多频WiFi;预设多频WiFi条件包括:第一公网IP地址与第二公网IP地址相同,若第一公网IP地址与第二公网IP地址相同,识别二者为多频WiFi的不同频段,后续可根据网络质量情况在二者之间切换,使电子设备连接网络质量较强的网络,以提升电子设备的上下行速率,提升网络资源的利用率。In this embodiment of the present application, the WiFi to be connected in the environment where the electronic device is located is scanned; the WiFi to be connected includes a first WiFi and a second WiFi, and the first WiFi and the second WiFi satisfy a preset number of WiFi In the case of frequency WiFi conditions, identify the WiFi to be connected as multi-frequency WiFi; the preset multi-frequency WiFi conditions include: the first public network IP address is the same as the second public network IP address, if the first public network IP address is the same as the second public network IP address The IP addresses of the two public networks are the same, and the two are identified as different frequency bands of multi-band WiFi. Later, you can switch between the two according to the network quality, so that the electronic device can be connected to the network with stronger network quality, so as to improve the uplink and downlink rates of the electronic device. to improve the utilization of network resources.

附图说明Description of drawings

为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application. , for those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative labor.

图1表示本申请实施例提供的多频WiFi识别方法的流程图之一;FIG. 1 shows one of the flowcharts of the multi-frequency WiFi identification method provided by the embodiment of the present application;

图2表示本申请实施例的第一示例的示意图;FIG. 2 shows a schematic diagram of a first example of an embodiment of the present application;

图3表示本申请实施例提供的多频WiFi识别方法的流程图之二;FIG. 3 shows the second flowchart of the multi-frequency WiFi identification method provided by the embodiment of the present application;

图4表示本申请实施例的第二示例的流程图;Fig. 4 shows the flow chart of the second example of the embodiment of the present application;

图5表示本申请实施例的第三示例的流程图;FIG. 5 shows a flowchart of a third example of the embodiment of the present application;

图6表示本申请的实施例提供的多频WiFi识别装置的框图;6 shows a block diagram of a multi-frequency WiFi identification device provided by an embodiment of the present application;

图7表示本申请的实施例提供的电子设备的框图之一;FIG. 7 shows one of the block diagrams of the electronic device provided by the embodiment of the present application;

图8表示本申请的实施例提供的电子设备的框图之二。FIG. 8 shows the second block diagram of the electronic device provided by the embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。在本申请的各种实施例中,应理解,下述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It is to be understood that reference throughout the specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic associated with the embodiment is included in at least one embodiment of the present application. Thus, appearances of "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments. In various embodiments of the present application, it should be understood that the size of the sequence numbers of the following processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be implemented in the present application. The implementation of the examples constitutes no limitation.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that embodiments of the application can be practiced in sequences other than those illustrated or described herein. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.

下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的多频WiFi识别方法进行详细地说明。The multi-frequency WiFi identification method provided by the embodiment of the present application will be described in detail below through specific embodiments and application scenarios with reference to the accompanying drawings.

参见图1,本申请一实施例提供了一种多频WiFi识别方法,可选地,所述方法可应用于电子设备,所述电子设备包括各种手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其它处理设备,以及各种形式的移动台(Mobile Station,MS),终端设备(Terminal Device)等等。Referring to FIG. 1, an embodiment of the present application provides a multi-frequency WiFi identification method. Optionally, the method can be applied to electronic devices, and the electronic devices include various handheld devices, vehicle-mounted devices, wearable devices, computing equipment or other processing equipment connected to a wireless modem, as well as various forms of Mobile Station (Mobile Station, MS), Terminal Device (Terminal Device), and so on.

所述方法包括:The method includes:

步骤101,扫描电子设备所处环境中的待连接WiFi。Step 101 , scan the WiFi to be connected in the environment where the electronic device is located.

其中,电子设备扫描其所处环境中的待连接WiFi,待连接WiFi可以是电子设备接入过的WiFi,也可以是未接入过的WiFi;为方便描述,后文中电子设备接入过的WiFi称为历史连接WiFi,而未接入过的WiFi称为新WiFi。通常情况下,电子设备会记录其所接入过的WiFi的相关访问参数,例如密码等,以便下次连接该WiFi。Among them, the electronic device scans the WiFi to be connected in the environment where it is located, and the WiFi to be connected may be the WiFi that the electronic device has accessed, or the WiFi that has not been connected; WiFi is called historical connection WiFi, and WiFi that has not been connected is called new WiFi. Usually, the electronic device records relevant access parameters of the WiFi that it has accessed, such as passwords, so as to connect to the WiFi next time.

作为第一示例,参见图2,图2所示为电子设备扫描待连接WiFi的界面示意图,其中,S1所示框线内为待连接WiFi列表。其中,具有S2标识的条目为新WiFi。As a first example, referring to FIG. 2 , FIG. 2 shows a schematic diagram of an interface of an electronic device scanning WiFi to be connected, wherein the frame line shown in S1 is a list of WiFi to be connected. Among them, the entry with the S2 identifier is the new WiFi.

步骤102,在所述待连接WiFi包括第一WiFi和第二WiFi,且所述第一WiFi和所述第二WiFi满足预设多频WiFi条件的情况下,识别所述待连接WiFi为多频WiFi;Step 102: In the case that the WiFi to be connected includes a first WiFi and a second WiFi, and the first WiFi and the second WiFi meet preset multi-frequency WiFi conditions, identify that the WiFi to be connected is a multi-frequency WiFi;

第一WiFi和第二WiFi为待连接WiFi中的WiFi,在电子设备所能扫描到的待连接WiFi中,筛选满足预设多频WiFi条件第一WiFi和第二WiFi。The first WiFi and the second WiFi are WiFi in the WiFi to be connected. From the WiFi to be connected that can be scanned by the electronic device, the first WiFi and the second WiFi that meet the preset multi-frequency WiFi conditions are screened.

所述预设多频WiFi条件包括:第一公网网际互连协议IP地址与第二公网IP地址相同;第一公网IP为所述电子设备接入所述第一WiFi时的公网IP,所述第二公网IP为所述电子设备接入所述第二WiFi时的公网IP。The preset multi-frequency WiFi conditions include: the first public network Internet Protocol IP address is the same as the second public network IP address; the first public network IP is the public network when the electronic device accesses the first WiFi IP, the second public network IP is the public network IP when the electronic device accesses the second WiFi.

多频WiFi(即多频WiFi设备)在工作状态下,通常会同时发射出两个或两个以上频段的无线信号,电子设备可按需接入到两个频段所覆盖的网络中,以此来达到分摊带宽的目的。当多频WiFi同时发射出两个频段的无线信号时,多频WiFi亦可称为双频WiFi,也即本申请实施例中的多频WiFi设备包括双频WiFi设备。Multi-frequency WiFi (that is, multi-frequency WiFi equipment) usually transmits wireless signals of two or more frequency bands at the same time, and electronic devices can access the networks covered by the two frequency bands as needed. To achieve the purpose of allocating bandwidth. When the multi-frequency WiFi simultaneously transmits wireless signals of two frequency bands, the multi-frequency WiFi may also be called dual-frequency WiFi, that is, the multi-frequency WiFi device in the embodiment of the present application includes a dual-band WiFi device.

第一公网网际互连协议(Internet Protocol,IP)为所述电子设备接入所述第一WiFi时的公网IP,所述第二公网IP为所述电子设备接入所述第二WiFi时的公网IP;公网IP即广域网IP,广域网、局域网是两种Internet的接入方式,局域网基于网络地址转换(Network Address Translation,NAT)将地址转换公网地址,进而访问外部网络。对于多频WiFi设备,当电子设备通过该多频WiFi设备的两个WiFi网络访问外部网络时,其公网IP相同;因此,当两个WiFi网络的占用同一个公网IP时,二者为同一个WiFi设备的的不同WiFi频段。这样,在识别多频WiFi之后,所述电子设备可根据网络情况进行网络切换。The first public network Internet Protocol (Internet Protocol, IP) is the public network IP when the electronic device accesses the first WiFi, and the second public network IP is when the electronic device accesses the second WiFi. The public network IP in WiFi; the public network IP is the WAN IP. The WAN and the local area network are two ways of accessing the Internet. The local area network converts the address to the public network address based on Network Address Translation (NAT), and then accesses the external network. For a multi-band WiFi device, when the electronic device accesses the external network through the two WiFi networks of the multi-band WiFi device, its public IP is the same; therefore, when the two WiFi networks occupy the same public IP, the two are Different WiFi frequency bands of the same WiFi device. In this way, after identifying the multi-frequency WiFi, the electronic device can perform network switching according to network conditions.

可以理解的是,同时满足预设多频WiFi条件的WiFi可以有两个或两个以上;为方便描述,本申请实施例中,以同时满预设多频WiFi条件的WiFi有两个进行说明,除此之外,满足预设多频WiFi条件的WiFi还可以有第三WiFi、第四WiFi,……,第N WiFi等,其中N为大于或等于2的正整数。下面以满足预设多频WiFi条件的WiFi包括第三WiFi举例说明,若在所述待连接WiFi包括第一WiFi、第二WiFi和第三WiFi,且所述第一WiFi、第二WiFi和第三WiFi满足预设多频WiFi条件的情况下,识别所述待连接WiFi为多频WiFi,电子设备可根据网络情况在第一WiFi、第二WiFi和第三WiFi之间进行网络切换。It can be understood that there may be two or more WiFis that satisfy the preset multi-frequency WiFi conditions at the same time; for the convenience of description, in the embodiment of the present application, there are two WiFis that satisfy the preset multi-frequency WiFi conditions at the same time for description. , in addition, the WiFi that satisfies the preset multi-frequency WiFi conditions may also include a third WiFi, a fourth WiFi, ..., an Nth WiFi, etc., where N is a positive integer greater than or equal to 2. The following example illustrates that the WiFi that satisfies the preset multi-frequency WiFi conditions includes the third WiFi. If the WiFi to be connected includes the first WiFi, the second WiFi and the third WiFi, and the first WiFi, the second WiFi and thethird WiFi 3. When the WiFi meets the preset multi-frequency WiFi conditions, it is recognized that the WiFi to be connected is a multi-frequency WiFi, and the electronic device can perform network switching among the first WiFi, the second WiFi and the third WiFi according to the network conditions.

本申请实施例中,扫描电子设备所处环境中的待连接WiFi;在所述待连接WiFi包括第一WiFi和第二WiFi,且所述第一WiFi和所述第二WiFi满足预设多频WiFi条件的情况下,识别所述待连接WiFi为多频WiFi;预设多频WiFi条件包括:第一公网IP地址与第二公网IP地址相同,若第一公网IP地址与第二公网IP地址相同,识别二者为多频WiFi的不同频段,后续可根据网络质量情况在二者之间切换,使电子设备连接网络质量较强的网络,以提升电子设备的上下行速率,提升网络资源的利用率。本申请实施例解决了现有技术中,电子设备难以识别多频WiFi设备的问题。In the embodiment of the present application, the WiFi to be connected in the environment where the electronic device is located is scanned; the WiFi to be connected includes a first WiFi and a second WiFi, and the first WiFi and the second WiFi satisfy the preset multi-frequency In the case of WiFi conditions, identify the WiFi to be connected as a multi-frequency WiFi; the preset multi-frequency WiFi conditions include: the first public network IP address is the same as the second public network IP address, if the first public network IP address is the same as the second public network IP address The public network IP address is the same, and the two are identified as different frequency bands of multi-band WiFi. Later, you can switch between the two according to the network quality, so that the electronic device can connect to the network with stronger network quality, so as to improve the uplink and downlink rates of the electronic device. Improve the utilization of network resources. The embodiments of the present application solve the problem in the prior art that it is difficult for an electronic device to identify a multi-frequency WiFi device.

在一个可选实施例中,所述识别所述待连接WiFi为多频WiFi之后,所述方法还包括:In an optional embodiment, after the identifying that the WiFi to be connected is a multi-frequency WiFi, the method further includes:

获取所述多频WiFi的网络状态参数;其中,所述网络状态参数包括信号强度、所述第一WiFi以及所述第二WiFi对应的接入点设备与所述电子设备之间的距离以及上下行速率中的至少一种;Obtain network status parameters of the multi-frequency WiFi; wherein, the network status parameters include signal strength, the distance between the access point device corresponding to the first WiFi and the second WiFi and the electronic device, and the upper and lower at least one of the line rates;

根据所述网络状态参数,在所述多频WiFi之间进行网络切换。According to the network state parameter, network switching is performed between the multi-frequency WiFi.

其中,识别第一WiFi以及第二WiFi为多频WiFi之后,且电子设备与其中的一个网络连接;在连接的状态下,可检测两个WiFi的网络状态参数,以根据网络质量参数进行切换。具体地,所述网络状态参数包括信号强度、所述第一WiFi以及所述第二WiFi对应的接入点设备与所述电子设备之间的距离以及上下行速率中的至少一种。Wherein, after identifying the first WiFi and the second WiFi as multi-frequency WiFi, and the electronic device is connected to one of the networks; in the connected state, the network state parameters of the two WiFis can be detected to switch according to the network quality parameters. Specifically, the network state parameter includes at least one of signal strength, a distance between the access point device corresponding to the first WiFi and the second WiFi and the electronic device, and an uplink and downlink rate.

若网络状态参数仅包括上述三个参数中的一个,比如包括信号强度或上下行速率时,可切换至信号较强的网络,或上下行速率较高的网络中;若包括所述第一WiFi以及所述第二WiFi对应的接入点设备与所述电子设备之间的距离,则可根据距离选择网络,比如,5G频段网络的覆盖范围相对2.4G频段要小一些,若所述距离大于或等于预设的距离阈值,则将网络切换至2.4G频段的网络,反之则切换至5G频段网络。If the network status parameter includes only one of the above three parameters, such as signal strength or uplink and downlink rate, it can be switched to a network with a stronger signal, or a network with a higher uplink and downlink rate; if it includes the first WiFi and the distance between the access point device corresponding to the second WiFi and the electronic device, the network can be selected according to the distance. For example, the coverage of the 5G frequency band network is smaller than that of the 2.4G frequency band. If it is equal to the preset distance threshold, the network will be switched to the network in the 2.4G band, otherwise, it will be switched to the network in the 5G band.

若网络状态参数仅包括上述三个参数中的至少两个,则可采用加权求和的方式对网络状态评估,选择匹配的WiFi网络,使电子设备连接网络质量较强的网络,以提升电子设备的上下行速率,提升网络资源的利用率。If the network state parameters only include at least two of the above three parameters, the weighted summation method can be used to evaluate the network state, select a matching WiFi network, and connect the electronic device to a network with stronger network quality, so as to improve the quality of the electronic device. The uplink and downlink rates increase the utilization of network resources.

在一个可选实施例中,所述预设多频WiFi条件还包括:所述第一WiFi的第一服务集标识SSID与所述第二WiFi的第二SSID满足预设相似度要求。In an optional embodiment, the preset multi-frequency WiFi condition further includes: the first service set identifier SSID of the first WiFi and the second SSID of the second WiFi meet a preset similarity requirement.

服务集标识(Service Set Identifier,SSID)通常为WiFi的名称,用于唯一标识一个WiFi网路,如图2中WiFi-1、WiFi-2……所示;同一生产商推出的同一款无线路由器或AP等WiFi设备通常会使用相同的SSID,因此多频WiFi设备的两个WiFi网络通常会采用相似或近似的SSID,比如,多频WiFi设备的两个频段的WiFi网络的SSID通常为“A-588DE8”和“A-588DE85G”;其中,“A-588DE8”为该设备的2.4G频段网络,“A-588DE8 5G”为该设备的5G频段网络,可见,两个频段的网络的SSID仅相差“5G”。Service Set Identifier (SSID) is usually the name of WiFi, which is used to uniquely identify a WiFi network, as shown in WiFi-1, WiFi-2... in Figure 2; the same wireless router launched by the same manufacturer WiFi devices such as WiFi devices or APs usually use the same SSID, so the two WiFi networks of multi-band WiFi devices usually use similar or similar SSIDs. -588DE8" and "A-588DE85G"; among them, "A-588DE8" is the 2.4G frequency band network of the device, and "A-588DE8 5G" is the 5G frequency band network of the device. It can be seen that the SSID of the network in the two frequency bands is only The difference is "5G".

预设相似度要求为第一SSID与第二SSID的相似度大于或等于预设阈值;若两个WiFi网络的SSID相似度大于或等于预设阈值,且二者的公网IP相同,则确定二者为相同的WiFi设备的不同频段的网络。The preset similarity requirement is that the similarity between the first SSID and the second SSID is greater than or equal to the preset threshold; if the SSID similarity of the two WiFi networks is greater than or equal to the preset threshold, and the public IPs of the two are the same, then determine The two are networks of different frequency bands of the same WiFi device.

可以理解的是,SSID还可以用户自命名的名称;比如,用户在设置无线路由器或AP时可能会为每个WiFi设定不同的名称,如图2中WiFi-1、WiFi-2也可以是用户自命名的名称。It is understandable that the SSID can also be a user-named name; for example, a user may set a different name for each WiFi when setting up a wireless router or AP, as shown in Figure 2, WiFi-1 and WiFi-2 can also be User self-named name.

参见图3,本申请一实施例还提供了一种多频WiFi识别方法,可选地,所述方法可应用于电子设备,所述方法包括:Referring to FIG. 3 , an embodiment of the present application further provides a multi-frequency WiFi identification method. Optionally, the method can be applied to an electronic device, and the method includes:

步骤301,扫描电子设备所处环境中的待连接WiFi。Step 301: Scan the WiFi to be connected in the environment where the electronic device is located.

其中,电子设备扫描其所处环境中的待连接WiFi,待连接WiFi可以是电子设备接入过的WiFi,也可以是未接入过的WiFi;为方便描述,后文中电子设备接入过的WiFi称为历史连接WiFi,而未接入过的WiFi称为新WiFi。新通常情况下,电子设备会记录其所接入过的WiFi的相关访问参数,例如密码等,以便下次连接该WiFi。Among them, the electronic device scans the WiFi to be connected in the environment where it is located, and the WiFi to be connected may be the WiFi that the electronic device has accessed, or the WiFi that has not been connected; WiFi is called historical connection WiFi, and WiFi that has not been connected is called new WiFi. New Under normal circumstances, the electronic device will record the relevant access parameters of the WiFi that it has accessed, such as passwords, so as to connect to the WiFi next time.

步骤302,获取所述电子设备的历史连接列表;所述历史连接列表中包括所述电子设备的历史连接WiFi以及所述历史连接WiFi的网络访问参数。Step 302: Obtain a historical connection list of the electronic device; the historical connection list includes the historical connection WiFi of the electronic device and the network access parameters of the historical connection WiFi.

其中,网络访问参数用于访问历史连接网络,包括密匙(密匙即密码)或者网络访问证书,通常情况下,电子设备在连接过WiFi后,会自动记录或由用户手动选择记录该WiFi的网络访问参数。Among them, the network access parameters are used to access the historical connection network, including the key (the key is the password) or the network access certificate. Usually, after the electronic device is connected to the WiFi, it will be automatically recorded or manually selected by the user to record the WiFi. Network access parameters.

步骤303,从所述待连接WiFi中获取第一WiFi,以及从所述历史连接列表中,获取第二WiFi;所述第一WiFi的SSID和所述第二WiFi的SSID满足预设相似度要求。Step 303: Obtain the first WiFi from the WiFi to be connected, and obtain the second WiFi from the historical connection list; the SSID of the first WiFi and the SSID of the second WiFi meet the preset similarity requirement .

其中,所述第二WiFi为所述历史连接WiFi;从待连接WiFi以及所述历史连接列表中,首先筛选SSID满足预设相似度要求的第一WiFi和第二WiFi;第二WiFi为所述历史连接WiFi,第二WiFi的网络访问参数已经记载在所述电子设备中。Wherein, the second WiFi is the historical connection WiFi; from the to-be-connected WiFi and the historical connection list, first filter the first WiFi and the second WiFi whose SSID meets the preset similarity requirement; the second WiFi is the WiFi is connected in history, and the network access parameters of the second WiFi have been recorded in the electronic device.

可以理解的是,第一WiFi可以是历史连接WiFi,也可以不是历史连接WiFi;也就是说,第一WiFi可以是当前可扫描到的历史连接WiFi。It can be understood that the first WiFi may be a historically connected WiFi, or may not be a historically connected WiFi; that is, the first WiFi may be a currently scannable historically connected WiFi.

步骤304,根据所述第二WiFi的网络访问参数,接入所述第一WiFi并访问公网,获取所述电子设备的第一公网IP地址。Step 304, according to the network access parameters of the second WiFi, access the first WiFi and access the public network, and obtain the first public network IP address of the electronic device.

在得到SSID满足预设相似度要求的第一WiFi和第二WiFi后,电子设备根据第二WiFi的网络访问参数,尝试接入第一WiFi并访问公网;若接入成功,获取第一公网IP地址。After obtaining the first WiFi and the second WiFi whose SSIDs meet the preset similarity requirements, the electronic device attempts to access the first WiFi and access the public network according to the network access parameters of the second WiFi; if the access is successful, obtain the first WiFi network IP address.

其中,对于多频WiFi的每个不同频段,一方面占用同一个公网IP地址,另一方面也采用同一个网络访问参数接入网络。Among them, for each different frequency band of the multi-band WiFi, on the one hand, it occupies the same public network IP address, and on the other hand, it also uses the same network access parameter to access the network.

步骤305,若所述第一公网IP地址与所述第二WiFi的第二公网IP地址相同,则识别所述待连接WiFi为多频WiFi。Step 305 , if the first public network IP address is the same as the second public network IP address of the second WiFi, identify the WiFi to be connected as a multi-frequency WiFi.

对于多频WiFi设备,当电子设备通过该多频WiFi设备的两个WiFi网络访问外部网络时,其公网IP相同;因此,当两个WiFi网络的占用同一个公网IP时,二者为同一个WiFi设备的不同WiFi频段。这样,在识别多频WiFi之后,所述电子设备可根据网络情况进行网络切换。For a multi-band WiFi device, when the electronic device accesses the external network through the two WiFi networks of the multi-band WiFi device, its public IP is the same; therefore, when the two WiFi networks occupy the same public IP, the two are Different WiFi bands for the same WiFi device. In this way, after identifying the multi-frequency WiFi, the electronic device can perform network switching according to network conditions.

在一个可选实施例中,步骤303包括:In an optional embodiment,step 303 includes:

查询所述历史连接列表中,与所述待连接WiFi的SSID与满足所述预设相似度要求的历史连接WiFi;所述待连接WiFi为所述第一WiFi,所述历史连接WiFi为所述第二WiFi。Querying the historical connection list, the SSID with the WiFi to be connected and the historically connected WiFi that meets the preset similarity requirement; the WiFi to be connected is the first WiFi, and the WiFi of the historical connection is the WiFi Second WiFi.

针对每个待连接WiFi,在所述历史连接列表中匹配待连接WiFi的SSID与满足所述预设相似度要求的历史连接WiFi,若匹配成功,则该两个WiFi分别为第一WiFi和第二WiFi。For each to-be-connected WiFi, match the SSID of the to-be-connected WiFi with the historically connected WiFi that meets the preset similarity requirement in the historical connection list. If the matching is successful, the two WiFis are the first WiFi and the third WiFi respectively. 2. WiFi.

作为第二示例,参见图4,图4示出了一具体应用过程,主要包括以下步骤:As a second example, refer to FIG. 4, which shows a specific application process, which mainly includes the following steps:

步骤401,扫描电子设备所处环境中的待连接WiFi。Step 401 , scan the WiFi to be connected in the environment where the electronic device is located.

步骤402,筛选配对网络;Step 402, screening the pairing network;

优先扫描电子设备的历史连接列表中的历史连接WiFi。在历史连接列表中筛选SSID满足预设相似度要求的两个网络,将二者组成一个候选对并加入候选列表。Priority is given to scanning the historical connection WiFi in the historical connection list of the electronic device. Two networks whose SSIDs meet the preset similarity requirements are screened in the historical connection list, and the two networks are formed into a candidate pair and added to the candidate list.

再扫描当前环境的待连接WiFi,若待连接WiFi与历史连接WiFi的SSID满足预设相似度要求,将二者组成一个候选对并加入候选列表。Then scan the WiFi to be connected in the current environment. If the SSIDs of the WiFi to be connected and the WiFi of the historical connection meet the preset similarity requirement, the two are formed into a candidate pair and added to the candidate list.

步骤403,尝试接入网络。Step 403, try to access the network.

对候选列表里面的候选对依次尝试接入网络,对于未接入过的网络使用候选对中另一网络的密匙或者证书接入。For the candidate pairs in the candidate list, try to access the network in turn, and use the key or certificate of the other network in the candidate pair to access the network that has not been accessed before.

步骤404,若接入成功,获取公网IP。Step 404, if the access is successful, obtain the public network IP.

接入网络后判断是否能访问公网,如果能访问公网就查询自身在公网中的IP,并记录IP。After accessing the network, determine whether it can access the public network. If it can access the public network, query its own IP in the public network and record the IP.

步骤405,若候选对的公网IP相同,则二者为一个多频WiFi的不同频段。Step 405, if the public network IPs of the candidate pair are the same, the two are different frequency bands of a multi-frequency WiFi.

在一个可选实施例中,步骤303包括:In an optional embodiment,step 303 includes:

第一步,将所述待连接WiFi中,存在于所述历史连接列表中的第一待连接WiFi划分至第一WiFi集合,未存在于所述历史连接列表中的第二待连接WiFi划分至第二WiFi集合;Step 1: In the WiFi to be connected, the first WiFi to be connected that exists in the historical connection list is divided into the first WiFi set, and the second WiFi to be connected that does not exist in the historical connection list is divided into The second WiFi set;

第二步,从所述第一WiFi集合中,筛选SSID满足预设相似度要求的第一WiFi和第二WiFi;In the second step, from the first WiFi set, filter the first WiFi and the second WiFi whose SSID meets the preset similarity requirement;

或,or,

第三步,对于每个所述第一待连接WiFi,遍历所述第一WiFi集合,筛选与所述第一待连接WiFi满足预设多频WiFi条件的第二待连接WiFi,则所述第一待连接WiFi为所述第一WiFi,所述第二待连接WiFi为所述第二WiFi。Step 3: For each of the first WiFi to be connected, traverse the first WiFi set, and filter the second WiFi to be connected that satisfies the preset multi-frequency WiFi conditions with the first WiFi to be connected, then the first WiFi to be connected is filtered. The first WiFi to be connected is the first WiFi, and the second WiFi to be connected is the second WiFi.

第一步中,首先将扫描到的可连接WiFi是否存在于历史连接列表中,分为第一WiFi集合与第二WiFi集合;在第二步中,从第一WiFi集合筛选预设相似度要求的第一WiFi和第二WiFi;在第三步中,针对第二WiFi集合中每个待连接WiFi,遍历第一WiFi集合,筛选与其满足预设多频WiFi条件的第二待连接WiFi;若筛选成功,则所述第一待连接WiFi为所述第一WiFi,所述第二待连接WiFi为所述第二WiFi,即所述第二待连接WiFi为历史连接WiFi。In the first step, whether the scanned connectable WiFi exists in the historical connection list is divided into the first WiFi set and the second WiFi set; in the second step, the preset similarity requirements are filtered from the first WiFi set the first WiFi and the second WiFi; in the third step, for each WiFi to be connected in the second WiFi set, traverse the first WiFi set, and filter the second WiFi to be connected that satisfies the preset multi-frequency WiFi conditions; if If the screening is successful, the first WiFi to be connected is the first WiFi, and the second WiFi to be connected is the second WiFi, that is, the second WiFi to be connected is the historically connected WiFi.

作为第三示例,参见图5,图5示出了一具体应用过程,主要包括以下步骤:As a third example, refer to FIG. 5, which shows a specific application process, which mainly includes the following steps:

步骤501,扫描当前WiFi。Step 501, scan the current WiFi.

具体地,电子设备扫描当前WiFi;将当前扫描到的WiFi集合称之为A,其中包含两个子集,第一WiFi集合A1为电子设备曾经接入过的集合,第二WiFi集合A2为终端未接入过的集合。Specifically, the electronic device scans the current WiFi; the currently scanned WiFi set is called A, which includes two subsets, the first WiFi set A1 is the set that the electronic device has accessed before, and the second WiFi set A2 is the terminal that has not been accessed yet. Accessed collection.

步骤502,在集合A1中筛选出候选对。Step 502, filter out candidate pairs from the set A1.

具体地,在已经接入过的WiFi集合A1中筛选出候选对C1至Ck。Specifically, the candidate pairs C1 to Ck are screened out from the WiFi set A1 that has been accessed.

步骤503,在集合A2中筛选出与A1中匹配的候选对。Instep 503, candidate pairs matching those in A1 are screened out from the set A2.

具体地,遍历集合A2,将集合A2中的每一个WiFi与A1中的每一个WiFi匹配,如果SSID满足预设相似度要求则加入候选对。Specifically, the set A2 is traversed, each WiFi in the set A2 is matched with each WiFi in A1, and a candidate pair is added if the SSID meets the preset similarity requirement.

其中A1中的WiFi为Ci1,A2中的WiFi为Ci2,k<i≤n。The WiFi in A1 is Ci1, the WiFi in A2 is Ci2, and k<i≤n.

步骤504,遍历每个候选对,尝试根据候选对中其中一个WiFi的密码接入另一WiFi。Step 504 , traverse each candidate pair, and try to access the other WiFi according to the password of one WiFi in the candidate pair.

具体地,遍历候选对列表C1至Cn。Specifically, the candidate pair lists C1 to Cn are traversed.

比如,对于Ck至Cn,尝试接入候选对Ci中的Ci1,使用历史曾接入过的密码或者证书,成功查询Ci1所在的公网IP,即第一公网IP;然后根据Ci1的网络访问参数尝试接入Ci2,成功查询Ci2所在的公网IP,即第二公网IP。For example, for Ck to Cn, try to access Ci1 in the candidate pair Ci, and use the password or certificate that has been accessed in the past to successfully query the public network IP where Ci1 is located, that is, the first public network IP; then access the network according to Ci1. The parameter attempts to access Ci2, and successfully queries the public network IP where Ci2 is located, that is, the second public network IP.

步骤505,若接入成功,且判断第一公网IP与第二公网IP相同,则二者为二者为一个多频WiFi的不同频段。Step 505 , if the access is successful, and it is determined that the IP of the first public network is the same as the IP of the second public network, the two are different frequency bands of a multi-band WiFi.

本申请实施例中,扫描电子设备所处环境中的待连接WiFi;在所述待连接WiFi包括第一WiFi和第二WiFi,且所述第一WiFi和所述第二WiFi满足预设多频WiFi条件的情况下,识别所述待连接WiFi为多频WiFi;预设多频WiFi条件包括:第一公网IP地址与第二公网IP地址相同,若第一公网IP地址与第二公网IP地址相同,识别二者为多频WiFi的不同频段,后续可根据网络质量情况在二者之间切换,使电子设备连接网络质量较强的网络,以提升电子设备的上下行速率,提升网络资源的利用率。In the embodiment of the present application, the WiFi to be connected in the environment where the electronic device is located is scanned; the WiFi to be connected includes a first WiFi and a second WiFi, and the first WiFi and the second WiFi satisfy the preset multi-frequency In the case of WiFi conditions, identify the WiFi to be connected as a multi-frequency WiFi; the preset multi-frequency WiFi conditions include: the first public network IP address is the same as the second public network IP address, if the first public network IP address is the same as the second public network IP address The public network IP address is the same, and the two are identified as different frequency bands of multi-band WiFi. Later, you can switch between the two according to the network quality, so that the electronic device can connect to the network with stronger network quality, so as to improve the uplink and downlink rates of the electronic device. Improve the utilization of network resources.

以上介绍了本申请实施例提供的多频WiFi识别方法,下面将结合附图介绍本申请实施例提供的多频WiFi识别装置。The multi-frequency WiFi identification method provided by the embodiments of the present application has been described above, and the multi-frequency WiFi identification device provided by the embodiments of the present application will be described below with reference to the accompanying drawings.

需要说明的是,本申请实施例提供的多频WiFi识别方法,执行主体可以为多频WiFi识别装置,或者该多频WiFi识别装置中的用于执行多频WiFi识别方法的控制模块。本申请实施例中以多频WiFi识别装置执行多频WiFi识别方法为例,说明本申请实施例提供的多频WiFi识别方法。It should be noted that, for the multi-frequency WiFi identification method provided by the embodiments of the present application, the execution subject may be a multi-frequency WiFi identification device, or a control module in the multi-frequency WiFi identification device for executing the multi-frequency WiFi identification method. In the embodiment of the present application, the multi-frequency WiFi identification method provided by the embodiment of the present application is described by taking the multi-frequency WiFi identification method performed by the multi-frequency WiFi identification device as an example.

参见图6,本申请实施例还提供了一种多频WiFi识别装置600,包括:Referring to FIG. 6, an embodiment of the present application further provides a multi-frequencyWiFi identification device 600, including:

扫描模块601,用于扫描电子设备所处环境中的待连接WiFi。Thescanning module 601 is configured to scan the WiFi to be connected in the environment where the electronic device is located.

其中,电子设备扫描其所处环境中的待连接WiFi,待连接WiFi可以是电子设备接入过的WiFi,也可以是未接入过的WiFi;为方便描述,后文中电子设备接入过的WiFi称为历史连接WiFi,而未接入过的WiFi称为新WiFi。新通常情况下,电子设备会记录其所接入过的WiFi的相关访问参数,例如密码等,以便下次连接该WiFi。Among them, the electronic device scans the WiFi to be connected in the environment where it is located, and the WiFi to be connected may be the WiFi that the electronic device has accessed, or the WiFi that has not been connected; WiFi is called historical connection WiFi, and WiFi that has not been connected is called new WiFi. New Under normal circumstances, the electronic device will record the relevant access parameters of the WiFi that it has accessed, such as passwords, so as to connect to the WiFi next time.

识别模块602,用于在所述待连接WiFi包括第一WiFi和第二WiFi,且所述第一WiFi和所述第二WiFi满足预设多频WiFi条件的情况下,识别所述待连接WiFi为多频WiFi;Anidentification module 602, configured to identify the WiFi to be connected when the WiFi to be connected includes a first WiFi and a second WiFi, and the first WiFi and the second WiFi meet preset multi-frequency WiFi conditions for multi-band WiFi;

第一WiFi和第二WiFi为待连接WiFi中的WiFi,在电子设备所能扫描到的待连接WiFi中,筛选满足预设多频WiFi条件第一WiFi和第二WiFi。所述预设多频WiFi条件包括:第一公网网际互连协议IP地址与第二公网IP地址相同;第一公网IP为所述电子设备接入所述第一WiFi时的公网IP,所述第二公网IP为所述电子设备接入所述第二WiFi时的公网IP。The first WiFi and the second WiFi are WiFi in the WiFi to be connected. From the WiFi to be connected that can be scanned by the electronic device, the first WiFi and the second WiFi that meet the preset multi-frequency WiFi conditions are screened. The preset multi-frequency WiFi conditions include: the first public network Internet Protocol IP address is the same as the second public network IP address; the first public network IP is the public network when the electronic device accesses the first WiFi IP, the second public network IP is the public network IP when the electronic device accesses the second WiFi.

多频WiFi(即多频WiFi设备)在工作状态下,通常会同时发射出两个或两个以上频段的无线信号,电子设备可按需接入到两个频段所覆盖的网络中,以此来达到分摊带宽的目的。当多频WiFi同时发射出两个频段的无线信号时,多频WiFi亦可称为双频WiFi,也即本申请实施例中的多频WiFi设备包括双频WiFi设备。Multi-frequency WiFi (that is, multi-frequency WiFi equipment) usually transmits wireless signals of two or more frequency bands at the same time, and electronic devices can access the networks covered by the two frequency bands as needed. To achieve the purpose of allocating bandwidth. When the multi-frequency WiFi simultaneously transmits wireless signals of two frequency bands, the multi-frequency WiFi may also be called dual-frequency WiFi, that is, the multi-frequency WiFi device in the embodiment of the present application includes a dual-band WiFi device.

第一IP为所述电子设备接入所述第一WiFi时的公网IP,所述第二公网IP为所述电子设备接入所述第二WiFi时的公网IP;公网IP即广域网IP,广域网、局域网是两种Internet的接入方式,局域网基于网络地址转换(Network Address Translation,NAT)将地址转换公网地址,进而访问外部网络。对于多频WiFi设备,当电子设备通过该多频WiFi设备的两个WiFi网络访问外部网络时,其公网IP相同;因此,当两个WiFi网络的占用同一个公网IP时,二者为同一个WiFi设备的的不同WiFi频段。这样,在识别多频WiFi之后,所述电子设备可根据网络情况进行网络切换。The first IP is the public IP when the electronic device accesses the first WiFi, and the second public IP is the public IP when the electronic device accesses the second WiFi; the public IP is Wide area network IP, wide area network and local area network are two ways of accessing the Internet. The local area network converts the address to the public network address based on network address translation (NAT), and then accesses the external network. For a multi-band WiFi device, when the electronic device accesses the external network through the two WiFi networks of the multi-band WiFi device, its public IP is the same; therefore, when the two WiFi networks occupy the same public IP, the two are Different WiFi frequency bands of the same WiFi device. In this way, after identifying the multi-frequency WiFi, the electronic device can perform network switching according to network conditions.

可以理解的是,同时满足预设多频WiFi条件的WiFi可以有两个或两个以上;为方便描述,本申请实施例中,以同时满预设多频WiFi条件的WiFi有两个进行说明,除此之外,满足预设多频WiFi条件的WiFi还可以有第三WiFi、第四WiFi,……,第NWiFi。下面以满足预设多频WiFi条件的WiFi包括第三WiFi举例说明,若在所述待连接WiFi包括第一WiFi、第二WiFi和第三WiFi,且所述第一WiFi、第二WiFi和第三WiFi满足预设多频WiFi条件的情况下,识别所述待连接WiFi为多频WiFi,电子设备可根据网络情况在第一WiFi、第二WiFi和第三WiFi之间进行网络切换。It can be understood that there may be two or more WiFis that satisfy the preset multi-frequency WiFi conditions at the same time; for the convenience of description, in the embodiment of the present application, there are two WiFis that satisfy the preset multi-frequency WiFi conditions at the same time for description. , in addition, the WiFi meeting the preset multi-frequency WiFi conditions may also include a third WiFi, a fourth WiFi, ..., an Nth WiFi. The following example illustrates that the WiFi that satisfies the preset multi-frequency WiFi conditions includes the third WiFi. If the WiFi to be connected includes the first WiFi, the second WiFi and the third WiFi, and the first WiFi, the second WiFi and thethird WiFi 3. When the WiFi meets the preset multi-frequency WiFi conditions, it is recognized that the WiFi to be connected is a multi-frequency WiFi, and the electronic device can perform network switching among the first WiFi, the second WiFi and the third WiFi according to the network conditions.

可选地,本申请实施例中,所述预设多频WiFi条件还包括:所述第一WiFi的第一服务集标识SSID与所述第二WiFi的第二SSID满足预设相似度要求。Optionally, in the embodiment of the present application, the preset multi-frequency WiFi conditions further include: the first service set identifier SSID of the first WiFi and the second SSID of the second WiFi meet a preset similarity requirement.

可选地,本申请实施例中,所述识别模块602包括:Optionally, in this embodiment of the present application, theidentification module 602 includes:

列表获取子模块,用于获取所述电子设备的历史连接列表;所述历史连接列表中包括所述电子设备的历史连接WiFi以及所述历史连接WiFi的网络访问参数;a list acquisition sub-module, used to acquire the historical connection list of the electronic device; the historical connection list includes the historical connection WiFi of the electronic device and the network access parameters of the historical connection WiFi;

筛选子模块,用于从所述待连接WiFi中获取第一WiFi,以及从所述历史连接列表中,获取第二WiFi;所述第一WiFi的SSID和所述第二WiFi的SSID满足预设相似度要求;其中,所述第二WiFi为所述历史连接WiFi;A screening sub-module, configured to obtain the first WiFi from the WiFi to be connected, and obtain the second WiFi from the historical connection list; the SSID of the first WiFi and the SSID of the second WiFi meet the preset requirements Similarity requirement; wherein, the second WiFi is the historical connection WiFi;

接入子模块,用于根据所述第二WiFi的网络访问参数,接入所述第一WiFi并访问公网,获取所述电子设备的第一公网IP地址;an access submodule, configured to access the first WiFi and access the public network according to the network access parameters of the second WiFi, and obtain the first public IP address of the electronic device;

识别子模块,用于若所述第一公网IP地址与所述第二WiFi的第二公网IP地址相同,则识别所述待连接WiFi为多频WiFi。The identification submodule is configured to identify the WiFi to be connected as a multi-frequency WiFi if the first public network IP address is the same as the second public network IP address of the second WiFi.

可选地,本申请实施例中,所述筛选子模块包括:Optionally, in the embodiment of the present application, the screening sub-module includes:

查询单元,用于查询所述历史连接列表中,与所述待连接WiFi的SSID与满足所述预设相似度要求的历史连接WiFi;所述待连接WiFi为所述第一WiFi,所述历史连接WiFi为所述第二WiFi。A query unit, configured to query the historical connection list, the SSID of the WiFi to be connected and the historically connected WiFi that meets the preset similarity requirement; the WiFi to be connected is the first WiFi, the historical WiFi The connected WiFi is the second WiFi.

可选地,本申请实施例中,所述筛选子模块包括:Optionally, in the embodiment of the present application, the screening sub-module includes:

划分单元,用于将所述待连接WiFi中,存在于所述历史连接列表中的第一待连接WiFi划分至第一WiFi集合,未存在于所述历史连接列表中的第二待连接WiFi划分至第二WiFi集合;A dividing unit, configured to divide the first WiFi to be connected that exists in the historical connection list into the first WiFi set, and the second WiFi to be connected that does not exist in the historical connection list is divided into the WiFi to be connected to the second WiFi set;

第一筛选单元,用于从所述第一WiFi集合中,筛选SSID满足预设相似度要求的第一WiFi和第二WiFi;a first screening unit, configured to screen the first WiFi and the second WiFi whose SSID meets the preset similarity requirement from the first WiFi set;

或,or,

第二筛选单元,用于对于每个所述第一待连接WiFi,遍历所述第一WiFi集合,筛选与所述第一待连接WiFi满足预设多频WiFi条件的第二待连接WiFi,则所述第一待连接WiFi为所述第一WiFi,所述第二待连接WiFi为所述第二WiFi。The second screening unit is configured to traverse the first WiFi set for each of the first WiFi to be connected, and filter the second WiFi to be connected that satisfies the preset multi-frequency WiFi condition with the first WiFi to be connected, then The first WiFi to be connected is the first WiFi, and the second WiFi to be connected is the second WiFi.

可选地,本申请实施例中,所述装置还包括:Optionally, in this embodiment of the present application, the device further includes:

参数获取模块,用于获取所述多频WiFi的网络状态参数;其中,所述网络状态参数包括信号强度、所述第一WiFi以及所述第二WiFi对应的接入点设备与所述电子设备之间的距离以及上下行速率中的至少一种;A parameter acquisition module, configured to acquire network state parameters of the multi-frequency WiFi; wherein, the network state parameters include signal strength, access point devices corresponding to the first WiFi and the second WiFi, and the electronic device At least one of the distance between and the uplink and downlink rates;

切换模块,用于根据所述网络状态参数,在所述多频WiFi之间进行网络切换。A switching module, configured to perform network switching between the multi-frequency WiFi according to the network state parameter.

本申请的实施例中,扫描模块601扫描电子设备所处环境中的待连接WiFi;在所述待连接WiFi中的第一WiFi和第二WiFi满足预设多频WiFi条件的情况下,识别模块602识别所述待连接WiFi为多频WiFi;预设多频WiFi条件包括:第一公网IP地址与第二公网IP地址相同,若第一公网IP地址与第二公网IP地址相同,识别二者为多频WiFi的不同频段,后续可根据网络质量情况在二者之间切换,使电子设备连接网络质量较强的网络,以提升电子设备的上下行速率,提升网络资源的利用率。In the embodiment of the present application, thescanning module 601 scans the WiFi to be connected in the environment where the electronic device is located; when the first WiFi and the second WiFi in the WiFi to be connected meet the preset multi-frequency WiFi conditions, theidentification module 602 Identify that the WiFi to be connected is a multi-frequency WiFi; the preset multi-frequency WiFi conditions include: the first public network IP address is the same as the second public network IP address, if the first public network IP address is the same as the second public network IP address , identify the two as different frequency bands of multi-band WiFi, and then switch between the two according to the network quality, so that the electronic device is connected to the network with stronger network quality, so as to improve the uplink and downlink rate of the electronic device and improve the utilization of network resources. Rate.

本申请实施例中的多频WiFi识别装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(Ultra-Mobile Personal Computer,UMPC)、上网本或者个人数字助理(Personal Digital Assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(Personal Computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The multi-frequency WiFi identification device in this embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The apparatus may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle electronic device, a wearable device, an Ultra-Mobile Personal Computer (UMPC), a netbook, or a Personal Digital Assistant (Personal Digital Assistant). Assistant, PDA), etc., non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (Personal Computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.

本申请实施例中的多频WiFi识别装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The multi-frequency WiFi identification device in the embodiment of the present application may be a device with an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.

本申请实施例提供的多频WiFi识别装置能够实现图1至图5的方法实施例中多频WiFi识别装置实现的各个过程,为避免重复,这里不再赘述。The multi-frequency WiFi identification device provided in the embodiments of the present application can implement each process implemented by the multi-frequency WiFi identification device in the method embodiments of FIG. 1 to FIG. 5 . To avoid repetition, details are not repeated here.

可选的,如图7所示,本申请实施例还提供一种电子设备700,包括处理器701,存储器702,存储在存储器702上并可在所述处理器701上运行的程序或指令,该程序或指令被处理器701执行时实现上述多频WiFi识别方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 7 , an embodiment of the present application further provides anelectronic device 700, including aprocessor 701, amemory 702, a program or instruction stored in thememory 702 and executable on theprocessor 701, When the program or instruction is executed by theprocessor 701, each process of the above-mentioned embodiment of the multi-frequency WiFi identification method can be realized, and the same technical effect can be achieved. In order to avoid repetition, details are not repeated here.

需要注意的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.

图8为实现本申请各个实施例的一种电子设备800的硬件结构示意图;FIG. 8 is a schematic diagram of a hardware structure of anelectronic device 800 implementing various embodiments of the present application;

该电子设备800包括但不限于:射频单元801、网络模块802、音频输出单元803、输入单元804、传感器805、显示单元806、用户输入单元807、接口单元808、存储器809、处理器810、以及电源811等部件。本领域技术人员可以理解,电子设备800还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器810逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图8中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Theelectronic device 800 includes but is not limited to: aradio frequency unit 801, anetwork module 802, anaudio output unit 803, aninput unit 804, asensor 805, adisplay unit 806, auser input unit 807, aninterface unit 808, amemory 809, aprocessor 810, andPower 811 and other components. Those skilled in the art can understand that theelectronic device 800 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to theprocessor 810 through a power management system, so as to manage charging, discharging, and power management through the power management system. consumption management and other functions. The structure of the electronic device shown in FIG. 8 does not constitute a limitation on the electronic device. The electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .

其中,网络模块802,用于扫描电子设备所处环境中的待连接WiFi;Wherein, thenetwork module 802 is used to scan the WiFi to be connected in the environment where the electronic device is located;

处理器810,用于在所述待连接WiFi包括第一WiFi和第二WiFi,且所述第一WiFi和所述第二WiFi满足预设多频WiFi条件的情况下,识别所述待连接WiFi为多频WiFi;Theprocessor 810 is configured to identify the WiFi to be connected when the WiFi to be connected includes a first WiFi and a second WiFi, and the first WiFi and the second WiFi meet preset multi-frequency WiFi conditions for multi-band WiFi;

其中,所述预设多频WiFi条件包括:第一公网网际互连协议IP地址与第二公网IP地址相同;第一公网IP为所述电子设备接入所述第一WiFi时的公网IP,所述第二公网IP为所述电子设备接入所述第二WiFi时的公网IP。The preset multi-frequency WiFi conditions include: the IP address of the first public network Internet Protocol is the same as the second public network IP address; the first public network IP is the first public network IP when the electronic device accesses the first WiFi Public network IP, the second public network IP is the public network IP when the electronic device accesses the second WiFi.

可选的,所述预设多频WiFi条件还包括:所述第一WiFi的第一服务集标识SSID与所述第二WiFi的第二SSID满足预设相似度要求。Optionally, the preset multi-frequency WiFi condition further includes: the first service set identifier SSID of the first WiFi and the second SSID of the second WiFi meet a preset similarity requirement.

可选的,处理器810,用于获取所述电子设备的历史连接列表;所述历史连接列表中包括所述电子设备的历史连接WiFi以及所述历史连接WiFi的网络访问参数;Optionally, theprocessor 810 is configured to obtain a historical connection list of the electronic device; the historical connection list includes the historical connection WiFi of the electronic device and the network access parameters of the historical connection WiFi;

从所述待连接WiFi中获取第一WiFi,以及从所述历史连接列表中,获取第二WiFi;所述第一WiFi的SSID和所述第二WiFi的SSID满足预设相似度要求;Obtain the first WiFi from the WiFi to be connected, and obtain the second WiFi from the historical connection list; the SSID of the first WiFi and the SSID of the second WiFi meet the preset similarity requirement;

根据所述第二WiFi的网络访问参数,接入所述第一WiFi并访问公网,获取所述电子设备的第一公网IP地址;According to the network access parameters of the second WiFi, access the first WiFi and access the public network, and obtain the first public network IP address of the electronic device;

若所述第一公网IP地址与所述第二WiFi的第二公网IP地址相同,则识别所述待连接WiFi为多频WiFi。If the first public network IP address is the same as the second public network IP address of the second WiFi, it is identified that the WiFi to be connected is a multi-frequency WiFi.

可选的,处理器810,用于查询所述历史连接列表中,与所述待连接WiFi的SSID与满足所述预设相似度要求的历史连接WiFi;所述待连接WiFi为所述第一WiFi,所述历史连接WiFi为所述第二WiFi。Optionally, theprocessor 810 is configured to query the historical connection list, the SSID of the WiFi to be connected and the historically connected WiFi that meets the preset similarity requirement; the WiFi to be connected is the first WiFi to be connected. WiFi, the historical connection WiFi is the second WiFi.

可选的,处理器810,用于将所述待连接WiFi中,存在于所述历史连接列表中的第一待连接WiFi划分至第一WiFi集合,未存在于所述历史连接列表中的第二待连接WiFi划分至第二WiFi集合;Optionally, theprocessor 810 is configured to divide, among the WiFi to be connected, the first WiFi to be connected that exists in the historical connection list into a first WiFi set, and the first WiFi that does not exist in the historical connection list. 2. The WiFi to be connected is divided into a second WiFi set;

从所述第一WiFi集合中,筛选SSID满足预设相似度要求的第一WiFi和第二WiFi;From the first WiFi set, filter the first WiFi and the second WiFi whose SSID meets the preset similarity requirement;

或,or,

对于每个所述第一待连接WiFi,遍历所述第一WiFi集合,筛选与所述第一待连接WiFi满足预设多频WiFi条件的第二待连接WiFi,则所述第一待连接WiFi为所述第一WiFi,所述第二待连接WiFi为所述第二WiFi。For each of the first WiFi to be connected, the first WiFi set is traversed, and the second WiFi to be connected that meets the preset multi-frequency WiFi conditions with the first WiFi to be connected is screened, then the first WiFi to be connected is filtered. is the first WiFi, and the second WiFi to be connected is the second WiFi.

可选的,处理器810,用于获取所述多频WiFi的网络状态参数;其中,所述网络状态参数包括信号强度、所述第一WiFi以及所述第二WiFi对应的接入点设备与所述电子设备之间的距离以及上下行速率中的至少一种;Optionally, theprocessor 810 is configured to acquire network state parameters of the multi-frequency WiFi; wherein, the network state parameters include signal strength, access point devices corresponding to the first WiFi and the second WiFi, and at least one of the distance between the electronic devices and the uplink and downlink rates;

根据所述网络状态参数,在所述多频WiFi之间进行网络切换。According to the network state parameter, network switching is performed between the multi-frequency WiFi.

本申请的实施例中,网络模块802扫描电子设备所处环境中的待连接WiFi;在所述待连接WiFi中的第一WiFi和第二WiFi满足预设多频WiFi条件的情况下,处理器810识别所述待连接WiFi为多频WiFi;预设多频WiFi条件包括:第一公网IP地址与第二公网IP地址相同,若第一公网IP地址与第二公网IP地址相同,识别二者为多频WiFi的不同频段,后续可根据网络质量情况在二者之间切换,使电子设备连接网络质量较强的网络,以提升电子设备的上下行速率,提升网络资源的利用率。In the embodiment of the present application, thenetwork module 802 scans the WiFi to be connected in the environment where the electronic device is located; when the first WiFi and the second WiFi in the WiFi to be connected meet the preset multi-frequency WiFi conditions, theprocessor 810 Identify that the WiFi to be connected is a multi-frequency WiFi; the preset multi-frequency WiFi conditions include: the first public network IP address is the same as the second public network IP address, if the first public network IP address is the same as the second public network IP address , identify the two as different frequency bands of multi-band WiFi, and then switch between the two according to the network quality, so that the electronic device is connected to the network with stronger network quality, so as to improve the uplink and downlink rate of the electronic device and improve the utilization of network resources. Rate.

本申请实施例还提供一种可读存储介质,可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述多频WiFi识别方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, each process of the above-mentioned embodiment of the multi-frequency WiFi identification method can be realized, and the same can be achieved. In order to avoid repetition, the technical effect will not be repeated here.

其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the foregoing embodiments. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.

本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述多频WiFi识别方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or an instruction to implement the above-mentioned multi-frequency WiFi identification method In order to avoid repetition, the details are not repeated here.

应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course hardware can also be used, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (10)

CN202010833413.3A2020-08-182020-08-18Multi-frequency WiFi identification method and deviceActiveCN111970750B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202010833413.3ACN111970750B (en)2020-08-182020-08-18Multi-frequency WiFi identification method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202010833413.3ACN111970750B (en)2020-08-182020-08-18Multi-frequency WiFi identification method and device

Publications (2)

Publication NumberPublication Date
CN111970750Atrue CN111970750A (en)2020-11-20
CN111970750B CN111970750B (en)2024-07-09

Family

ID=73388781

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202010833413.3AActiveCN111970750B (en)2020-08-182020-08-18Multi-frequency WiFi identification method and device

Country Status (1)

CountryLink
CN (1)CN111970750B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2022141000A1 (en)*2020-12-282022-07-07华为技术有限公司Network switching method, terminal device and access point device
CN115243339A (en)*2022-07-082022-10-25深圳绿米联创科技有限公司 Network access method, device, electronic device and smart home system of target device
CN116437410A (en)*2023-05-062023-07-14深圳市迈岭信息技术有限公司 Frequency band switching method, device and computer-readable storage medium
CN118695334A (en)*2024-08-132024-09-24安普德(天津)科技股份有限公司 An Internet of Things system based on dual-band Wi-Fi Mesh technology
CN116671182B (en)*2020-12-282025-10-14华为技术有限公司 Network switching method, terminal device and access point device

Citations (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101753434A (en)*2009-07-292010-06-23中国科学院自动化研究所Radio frequency identification router and radio frequency identification network system
CN102217243A (en)*2008-11-172011-10-12高通股份有限公司Remote access to local networks
US8989101B1 (en)*2013-06-272015-03-24Google Inc.Systems, methods, and computer-readable media for identifying virtual access points of wireless networks
CN105323244A (en)*2015-09-222016-02-10小米科技有限责任公司Method and device for network identification
US20160087826A1 (en)*2014-09-192016-03-24Po-Kai HuangSYSTEMS, METHODS, AND DEVICES FOR IDENTIFYING Wi-Fi SIGNALS FOR SPATIAL REUSE
WO2017206067A1 (en)*2016-05-312017-12-07华为技术有限公司Access point switching method and terminal device
CN107612716A (en)*2017-08-282018-01-19上海斐讯数据通信技术有限公司A kind of distribution method and system of intelligent electronic device
CN107920354A (en)*2017-11-212018-04-17珠海奔图电子有限公司The connection method of multiband equipment and system
WO2018130080A1 (en)*2017-01-102018-07-19青岛海信移动通信技术股份有限公司Wifi data transmission method, device and terminal device
US20180359219A1 (en)*2017-06-092018-12-13Microsoft Technology Licensing, LlcAutomatic network identification for enhanced communications administration
CN110602707A (en)*2019-09-052019-12-20青岛海信移动通信技术股份有限公司Method and terminal for connecting wireless network
US20200137671A1 (en)*2017-05-172020-04-30Espressif Systems (Shanghai) Co., Ltd.Wifi Network, and Networking Method Therefor and Data Transmission Method Therein
CN111356209A (en)*2020-02-172020-06-30Oppo广东移动通信有限公司Multi-frequency WiFi hotspot opening method and device, storage medium and electronic equipment

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102217243A (en)*2008-11-172011-10-12高通股份有限公司Remote access to local networks
CN101753434A (en)*2009-07-292010-06-23中国科学院自动化研究所Radio frequency identification router and radio frequency identification network system
US8989101B1 (en)*2013-06-272015-03-24Google Inc.Systems, methods, and computer-readable media for identifying virtual access points of wireless networks
US20160087826A1 (en)*2014-09-192016-03-24Po-Kai HuangSYSTEMS, METHODS, AND DEVICES FOR IDENTIFYING Wi-Fi SIGNALS FOR SPATIAL REUSE
CN105323244A (en)*2015-09-222016-02-10小米科技有限责任公司Method and device for network identification
WO2017206067A1 (en)*2016-05-312017-12-07华为技术有限公司Access point switching method and terminal device
WO2018130080A1 (en)*2017-01-102018-07-19青岛海信移动通信技术股份有限公司Wifi data transmission method, device and terminal device
US20200137671A1 (en)*2017-05-172020-04-30Espressif Systems (Shanghai) Co., Ltd.Wifi Network, and Networking Method Therefor and Data Transmission Method Therein
US20180359219A1 (en)*2017-06-092018-12-13Microsoft Technology Licensing, LlcAutomatic network identification for enhanced communications administration
CN107612716A (en)*2017-08-282018-01-19上海斐讯数据通信技术有限公司A kind of distribution method and system of intelligent electronic device
CN107920354A (en)*2017-11-212018-04-17珠海奔图电子有限公司The connection method of multiband equipment and system
CN110602707A (en)*2019-09-052019-12-20青岛海信移动通信技术股份有限公司Method and terminal for connecting wireless network
CN111356209A (en)*2020-02-172020-06-30Oppo广东移动通信有限公司Multi-frequency WiFi hotspot opening method and device, storage medium and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
沈丹萍;: "校园无线局域网的优化", 中国科技信息, no. 10, 15 May 2010 (2010-05-15)*

Cited By (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2022141000A1 (en)*2020-12-282022-07-07华为技术有限公司Network switching method, terminal device and access point device
CN116671182A (en)*2020-12-282023-08-29华为技术有限公司Network switching method, terminal equipment and access point equipment
CN116671182B (en)*2020-12-282025-10-14华为技术有限公司 Network switching method, terminal device and access point device
CN115243339A (en)*2022-07-082022-10-25深圳绿米联创科技有限公司 Network access method, device, electronic device and smart home system of target device
CN115243339B (en)*2022-07-082024-11-01深圳绿米联创科技有限公司Network access method and device of target equipment, electronic equipment and intelligent home system
CN116437410A (en)*2023-05-062023-07-14深圳市迈岭信息技术有限公司 Frequency band switching method, device and computer-readable storage medium
CN116437410B (en)*2023-05-062025-07-29深圳市迈岭信息技术有限公司Frequency band switching method, device and computer readable storage medium
CN118695334A (en)*2024-08-132024-09-24安普德(天津)科技股份有限公司 An Internet of Things system based on dual-band Wi-Fi Mesh technology

Also Published As

Publication numberPublication date
CN111970750B (en)2024-07-09

Similar Documents

PublicationPublication DateTitle
CN111970750A (en)Multi-frequency WiFi identification method and device
US12010576B2 (en)Communication method, apparatus, and system
CN113498121B (en) A communication method and device
CN109756951B (en) Method and user device for network selection
CN107318113A (en)Network sliced sheet processing method and device
CN110312259B (en)Pseudo base station identification method, pseudo base station identification device, terminal and storage medium
US20230048066A1 (en)Slice authentication method and apparatus
CN111432456A (en)Terminal residing method, mobile management entity, base station, system and storage medium
CN107124744B (en)Network switching method and wireless access point
CN110461023B (en)Cell residence method and device for voice service, storage medium and main base station
WO2020216222A1 (en)Information acquisition
CN101729993B (en)Access method, device and system
EP4050937A1 (en)Access control method and communication apparatus
WO2020151622A1 (en)Assessment method and apparatus for position recommendation
WO2020215272A1 (en)Communication method, communication apparatus, and communication system
WO2022083438A1 (en)Network registration method
WO2022007928A1 (en)Auxiliary information processing method, auxiliary information sending method, and related device
US20250287291A1 (en)Host network device identification method, apparatus and storage medium
CN110418325A (en)Cell registration method, device, storage medium and electronic equipment
CN111601346B (en)Method and equipment for determining access cell and configuring information
CN114885321B (en) Method, device, equipment and readable storage medium supporting network selection
CN109618394B (en)Wireless network access method, device, terminal equipment and storage medium
CN113573370B (en)Information processing method, network equipment, terminal and storage medium
WO2025087450A1 (en)Cell reselection method and apparatus, terminal and network side device
US11356891B2 (en)Control method for data transmission and terminal

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp