CN117729651A - Network connection method, electronic device and computer readable storage medium - Google Patents
Network connection method, electronic device and computer readable storage medium Download PDFInfo
- Publication number
- CN117729651A CN117729651A CN202310912323.7A CN202310912323A CN117729651A CN 117729651 A CN117729651 A CN 117729651A CN 202310912323 A CN202310912323 A CN 202310912323A CN 117729651 A CN117729651 A CN 117729651A
- Authority
- CN
- China
- Prior art keywords
- local area
- area network
- electronic device
- wireless local
- operating system
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 87
- 238000011084 recovery Methods 0.000 claims abstract description 63
- 230000007246 mechanism Effects 0.000 claims abstract description 58
- 230000002159 abnormal effect Effects 0.000 claims description 11
- 230000004044 response Effects 0.000 claims description 11
- 238000004891 communication Methods 0.000 abstract description 14
- 238000010586 diagram Methods 0.000 description 26
- 230000008569 process Effects 0.000 description 17
- 230000006870 function Effects 0.000 description 14
- 238000007726 management method Methods 0.000 description 12
- 238000012545 processing Methods 0.000 description 8
- 238000012544 monitoring process Methods 0.000 description 7
- 230000005236 sound signal Effects 0.000 description 6
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 5
- 238000013461 design Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 238000012790 confirmation Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000001960 triggered effect Effects 0.000 description 4
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 3
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 3
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 3
- 230000001413 cellular effect Effects 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 238000013459 approach Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000001902 propagating effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000001356 surgical procedure Methods 0.000 description 1
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域Technical Field
本申请实施例涉及通信技术领域,尤其涉及一种网络连接方法、电子设备和计算机可读存储介质。The embodiments of the present application relate to the field of communication technology, and in particular, to a network connection method, an electronic device, and a computer-readable storage medium.
背景技术Background Art
电子设备处于联网状态时,若电子设备遇到Wi-Fi(Wireless Fidelity)驱动、无线接入点(Access Point,AP)或操作系统等异常造成连接的Wi-Fi异常断开的情况下,电子设备的操作系统会按照预设的Wi-Fi恢复机制,执行Wi-Fi恢复连接操作。即电子设备在断网的情况下,会重新扫描Wi-Fi,与Wi-Fi扫描结果中以往连接过的并设置了自动连接的Wi-Fi连接。When an electronic device is connected to a network, if the electronic device encounters an abnormal disconnection of the connected Wi-Fi due to an abnormality in the Wi-Fi (Wireless Fidelity) driver, wireless access point (AP) or operating system, the operating system of the electronic device will perform the Wi-Fi recovery connection operation according to the preset Wi-Fi recovery mechanism. That is, when the electronic device is disconnected from the network, it will rescan the Wi-Fi and connect to the Wi-Fi that has been connected in the past and set to automatically connect in the Wi-Fi scan results.
但是,若扫描到的Wi-Fi中不存在设置了自动连接的Wi-Fi,则电子设备无法重新连接到Wi-Fi,以及电子设备重新连接Wi-Fi失败的情况下,电子设备保持Wi-Fi断开,用户体验较差。However, if there is no Wi-Fi set for automatic connection among the scanned Wi-Fi, the electronic device cannot reconnect to the Wi-Fi. If the electronic device fails to reconnect to the Wi-Fi, the electronic device remains disconnected from the Wi-Fi, resulting in a poor user experience.
发明内容Summary of the invention
本申请提供一种网络连接方法、电子设备和计算机可读存储介质,可以在电子设备的操作系统按照预设的无线局域网恢复机制,恢复无线局域网连接失败的情况下,也能自动连接到无线局域网,提升了用户的上网体验。The present application provides a network connection method, an electronic device and a computer-readable storage medium, which can automatically connect to a wireless local area network even when the operating system of the electronic device fails to restore the wireless local area network connection according to a preset wireless local area network recovery mechanism, thereby improving the user's Internet experience.
为达到上述目的,本申请的实施例采用如下技术方案:To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
第一方面,提供了一种网络连接方法,该方法包括:若电子设备检测到断开无线局域网,电子设备的操作系统按照预设的自连恢复机制,控制电子设备连接无线局域网;若操作系统按照预设的自连恢复机制未成功连接到无线局域网,电子设备从扫描到的候选无线局域网中确定第一目标无线局域网;其中,候选无线局域网为电子设备已保存连接凭证的无线局域网;电子设备与第一目标无线局域网进行连接。In a first aspect, a network connection method is provided, the method comprising: if an electronic device detects that a wireless local area network is disconnected, the operating system of the electronic device controls the electronic device to connect to the wireless local area network according to a preset self-connection recovery mechanism; if the operating system fails to successfully connect to the wireless local area network according to the preset self-connection recovery mechanism, the electronic device determines a first target wireless local area network from the scanned candidate wireless local area networks; wherein the candidate wireless local area network is a wireless local area network for which the electronic device has saved connection credentials; and the electronic device is connected to the first target wireless local area network.
本申请实施例中,即使电子设备的操作系统按照预设的自连恢复机制,重新连接无线局域网失败,电子设备也可以从电子设备扫描到的已知无线局域网中选择目标无线局域网,控制电子设备与该目标无线局域网进行连接。这样,尽管电子设备的操作系统按照预设的自连恢复机制,恢复无线局域网连接失败的情况下,电子设备也能自动连接到无线局域网,提升了用户的上网体验。In the embodiment of the present application, even if the operating system of the electronic device fails to reconnect to the wireless LAN according to the preset self-connection recovery mechanism, the electronic device can select a target wireless LAN from the known wireless LANs scanned by the electronic device and control the electronic device to connect to the target wireless LAN. In this way, even if the operating system of the electronic device fails to restore the wireless LAN connection according to the preset self-connection recovery mechanism, the electronic device can automatically connect to the wireless LAN, thereby improving the user's Internet experience.
在第一方面的一种可能的实现方式中,若电子设备检测到断开无线局域网,电子设备的操作系统按照预设的自连恢复机制,控制电子设备连接无线局域网,包括:若电子设备检测到无线局域网异常断开,电子设备的操作系统按照预设的自连恢复机制,控制电子设备连接无线局域网;其中,无线局域网异常断开包括未检测到用户断开指令的情况下断开无线局域网。In a possible implementation of the first aspect, if the electronic device detects that the wireless local area network is disconnected, the operating system of the electronic device controls the electronic device to connect to the wireless local area network according to a preset self-connection recovery mechanism, including: if the electronic device detects that the wireless local area network is abnormally disconnected, the operating system of the electronic device controls the electronic device to connect to the wireless local area network according to a preset self-connection recovery mechanism; wherein the abnormal disconnection of the wireless local area network includes disconnecting the wireless local area network without detecting a user disconnection instruction.
在第一方面的一种可能的实现方式中,电子设备设置有第三方应用,若电子设备检测到断开无线局域网,包括:若操作系统检测到断开无线局域网,向第三方应用发送无线局域网断开信息;若操作系统按照预设的自连恢复机制未成功连接到无线局域网,电子设备从扫描到的候选无线局域网中确定第一目标无线局域网,包括:操作系统接收到第三方应用发送的无线局域网断开信息,若操作系统按照预设的自连恢复机制未成功连接到无线局域网,且电子设备扫描到候选无线局域网,则操作系统向第三方应用发送具有候选无线局域网的信息;第三方应用响应于接收到具有候选无线局域网的信息,从候选无线局域网中确定第一目标无线局域网;电子设备与第一目标无线局域网进行连接,包括:第三方应用控制电子设备与第一目标无线局域网进行连接。In a possible implementation of the first aspect, an electronic device is provided with a third-party application, and if the electronic device detects that a wireless local area network is disconnected, the method includes: if an operating system detects that the wireless local area network is disconnected, sending wireless local area network disconnection information to the third-party application; if the operating system fails to successfully connect to the wireless local area network according to a preset self-connection recovery mechanism, the electronic device determines a first target wireless local area network from scanned candidate wireless local area networks, including: the operating system receives the wireless local area network disconnection information sent by the third-party application, if the operating system fails to successfully connect to the wireless local area network according to the preset self-connection recovery mechanism, and the electronic device scans a candidate wireless local area network, the operating system sends information with candidate wireless local area networks to the third-party application; the third-party application determines the first target wireless local area network from the candidate wireless local area networks in response to receiving the information with candidate wireless local area networks; the electronic device connects to the first target wireless local area network, including: the third-party application controls the electronic device to connect to the first target wireless local area network.
可以理解,相关技术中,电子设备在断开网络的情况下,电子设备的操作系统便会按照预设的自连恢复机制,执行无线局域网恢复连接操作。第三方应用在接收到操作系统发送的具有候选无线局域网的信息的情况下,才执行第三方应用中的无线局域网恢复机制,执行无线局域网恢复连接操作,而不是在电子设备一开始无线局域网断开时就执行第三方应用中的自连恢复机制。这样,可以避免第三方应用中的自连恢复机制和操作系统中的自连恢复机制的冲突。It can be understood that in the related art, when an electronic device is disconnected from the network, the operating system of the electronic device will perform a wireless LAN recovery connection operation according to a preset self-connection recovery mechanism. When a third-party application receives information about a candidate wireless LAN sent by the operating system, it will execute the wireless LAN recovery mechanism in the third-party application and perform a wireless LAN recovery connection operation, rather than executing the self-connection recovery mechanism in the third-party application when the wireless LAN of the electronic device is disconnected at the beginning. In this way, the conflict between the self-connection recovery mechanism in the third-party application and the self-connection recovery mechanism in the operating system can be avoided.
在第一方面的一种可能的实现方式中,从扫描到的候选无线局域网中确定第一目标无线局域网,包括:基于第一方式,根据候选无线局域网中的无线局域网的网络参数,确定候选无线局域网中各无线局域网的无线局域网质量指标;其中,网络参数包括网络信号强度参数、网络信号质量参数、网络频段参数、网络协议参数、网络连接速率或网络协议安全参数中的任意组合;根据候选无线局域网中各无线局域网的无线局域网质量指标,确定第一目标无线局域网。In a possible implementation of the first aspect, determining a first target wireless local area network from scanned candidate wireless local area networks includes: based on the first method, determining wireless local area network quality indicators of each wireless local area network in the candidate wireless local area network according to network parameters of the wireless local area networks in the candidate wireless local area networks; wherein the network parameters include any combination of network signal strength parameters, network signal quality parameters, network frequency band parameters, network protocol parameters, network connection rate or network protocol security parameters; determining the first target wireless local area network according to the wireless local area network quality indicators of each wireless local area network in the candidate wireless local area networks.
在第一方面的一种可能的实现方式中,候选无线局域网为具有与广域网进行通信的能力的网络。In a possible implementation manner of the first aspect, the candidate wireless local area network is a network capable of communicating with a wide area network.
候选无线局域网为具有与广域网进行通信的能力的网络,这可以拓宽用户的上网范围,提升用户体验。The candidate wireless LAN is a network that has the ability to communicate with the wide area network, which can broaden the user's Internet access range and improve the user experience.
在第一方面的一种可能的实现方式中,电子设备的操作系统按照预设的自连恢复机制,控制电子设备连接无线局域网,包括:电子设备的操作系统控制电子设备扫描无线局域网,获取候选无线局域网;若候选无线局域网中包括设置为自动连接的无线局域网,则操作系统基于第二方式确定第二目标无线局域网,第二方式中的网络参数与第一方式中的网络参数不同网络信号强度参数;操作系统控制电子设备连接第二目标无线局域网。In a possible implementation of the first aspect, the operating system of the electronic device controls the electronic device to connect to the wireless local area network according to a preset self-connection recovery mechanism, including: the operating system of the electronic device controls the electronic device to scan the wireless local area network to obtain a candidate wireless local area network; if the candidate wireless local area network includes a wireless local area network set to automatically connect, the operating system determines a second target wireless local area network based on a second method, and the network parameters in the second method are different from the network parameters in the first method. The network signal strength parameter; the operating system controls the electronic device to connect to the second target wireless local area network.
在第一方面的一种可能的实现方式中,操作系统按照预设的自连恢复机制未成功连接到无线局域网,包括:候选无线局域网中未包括设置为自动连接的无线局域网;或者,电子设备与第二目标无线局域网连接失败。In a possible implementation of the first aspect, the operating system fails to successfully connect to the wireless local area network according to a preset self-connection recovery mechanism, including: the candidate wireless local area network does not include a wireless local area network set for automatic connection; or the electronic device fails to connect to the second target wireless local area network.
在第一方面的一种可能的实现方式中,控制电子设备连接第二目标无线局域网之后,方法还包括:在电子设备与第二目标无线局域网连接成功的情况下,若基于第一方式从候选无线局域网中确定一个第三目标无线局域网,且第三目标无线局域网和第三目标无线局域网不同,则控制电子设备连接第一目标无线局域网。In a possible implementation manner of the first aspect, after controlling the electronic device to connect to the second target wireless local area network, the method further includes: when the electronic device is successfully connected to the second target wireless local area network, if a third target wireless local area network is determined from the candidate wireless local area networks based on the first method, and the third target wireless local area network is different from the third target wireless local area network, then controlling the electronic device to connect to the first target wireless local area network.
在第一方面的一种可能的实现方式中,候选无线局域网为信号强度大于或等于预设信号强度阈值的无线局域网。In a possible implementation manner of the first aspect, the candidate wireless local area network is a wireless local area network whose signal strength is greater than or equal to a preset signal strength threshold.
在第一方面的一种可能的实现方式中,该方法还包括:In a possible implementation manner of the first aspect, the method further includes:
响应于检测到用户断开无线局域网的指令,电子设备保持断开无线局域网。In response to detecting the user's instruction to disconnect the wireless LAN, the electronic device remains disconnected from the wireless LAN.
第二方面,提供了一种电子设备,该电子设备包括处理器和存储器;存储器用于存储代码指令;处理器用于运行代码指令,以执行如第一方面中任一种可能的设计方式中的网络连接方法。In a second aspect, an electronic device is provided, which includes a processor and a memory; the memory is used to store code instructions; the processor is used to run the code instructions to execute a network connection method in any possible design manner as in the first aspect.
第三方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当指令在计算机上运行时,使得计算机执行如第一方面中任一种可能的设计方式中的网络连接方法。In a third aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes a network connection method in any possible design manner in the first aspect.
第四方面,提供了一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现第一方面中任一种可能的设计方式中的网络连接方法。In a fourth aspect, a computer program product is provided, comprising a computer program/instruction, which, when executed by a processor, implements the network connection method in any possible design manner in the first aspect.
其中,第二方面、第三方面和第四方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。Among them, the technical effects brought about by any design method in the second aspect, the third aspect and the fourth aspect can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1示出了一种笔记本电脑重新扫描Wi-Fi的场景示意图;FIG1 is a schematic diagram showing a scenario in which a laptop computer rescans Wi-Fi;
图2示出了一种扫描到的Wi-Fi的示例性表格示意图;FIG. 2 is a schematic diagram showing an exemplary table of scanned Wi-Fi networks;
图3示出了一种相关技术的Wi-Fi连接方法的流程示意图;FIG3 is a schematic diagram showing a flow chart of a Wi-Fi connection method in the related art;
图4基于图2中的内容,示出了一种从扫描到的Wi-Fi中选择一个目标Wi-Fi的示意图;FIG4 is a schematic diagram showing a method of selecting a target Wi-Fi network from scanned Wi-Fi networks based on the content in FIG2 ;
图5示出了本申请实施例提供的一种笔记本电脑的结构示意图;FIG5 shows a schematic structural diagram of a notebook computer provided in an embodiment of the present application;
图6示出了一种Wi-Fi连接方法的流程示意图;FIG6 shows a schematic flow chart of a Wi-Fi connection method;
图7示出了一种笔记本电脑100的操作系统的网络和互联网用户界面的示意图;FIG7 shows a schematic diagram of a network and Internet user interface of an operating system of a notebook computer 100;
图8示出了一种最优Wi-Fi确认的流程示意图;FIG8 shows a schematic diagram of a process of optimal Wi-Fi confirmation;
图9示出了一种Wi-Fi质量指标的示意图;FIG9 shows a schematic diagram of a Wi-Fi quality indicator;
图10示出了一种可自动连接Wi-Fi的Wi-Fi连接优先级的排名示意图;FIG10 is a schematic diagram showing a ranking of Wi-Fi connection priorities for automatically connecting to Wi-Fi;
图11示出了一种目标Wi-Fi确认的流程示意图;FIG11 shows a schematic diagram of a process of target Wi-Fi confirmation;
图12示出了一种已知Wi-Fi的Wi-Fi连接优先级的排名示意图;FIG12 is a schematic diagram showing a ranking of Wi-Fi connection priorities of a known Wi-Fi;
图13示出了一种可自动连接的Wi-Fi的Wi-Fi连接优先级的排名示意图。FIG. 13 shows a schematic diagram of ranking Wi-Fi connection priorities of a Wi-Fi that can be automatically connected.
具体实施方式DETAILED DESCRIPTION
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。以下术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”等的特征可以明示或者隐含地包括一个或者更多个该特征。The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The following terms "first", "second", etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features.
在本申请实施例中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。In the embodiments of the present application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
在本申请实施例中,“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。In the embodiments of the present application, "and/or" is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "/" in this article generally indicates that the associated objects before and after are in an "or" relationship.
在本申请的描述中,需要说明的是,除非另有明确的规定和限定,术语“设置”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "set", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
为了便于更好的说明本申请的技术方案,下面对本申请涉及到的术语做简要概述。In order to better illustrate the technical solution of the present application, the following is a brief overview of the terms involved in the present application.
(1)无线网络,无线网络是指无需布线就能实现各种通信设备互联的网络。常见的无线网络有Wi-Fi、蓝牙、ZigBee、热点等。(1) Wireless network: A wireless network is a network that can interconnect various communication devices without wiring. Common wireless networks include Wi-Fi, Bluetooth, ZigBee, hotspots, etc.
根据网络覆盖范围的不同,可以将无线网络划分为无线广域网(Wireless WideArea Network,WWAN)、无线局域网(Wireless Local Area Network,WLAN)和无线城域网(Wireless Metropolitan Area Network,WMAN)。According to the different network coverage, wireless networks can be divided into wireless wide area networks (WWAN), wireless local area networks (WLAN) and wireless metropolitan area networks (WMAN).
(2)局域网(Local Area Network,LAN),局域网覆盖范围一般是方圆几千米之内,其具备的安装便捷、成本节约、扩展方便等特点使其在各类办公室内运用广泛。局域网可以实现文件管理、应用软件共享、打印机共享等功能。(2) Local Area Network (LAN): LANs generally cover an area of several thousand meters. They are easy to install, cost-effective, and easy to expand, making them widely used in various offices. LANs can realize functions such as file management, application software sharing, and printer sharing.
(3)广域网(Wide Area Network,WAN),又称外网、公网。是连接不同地区局域网或城域网计算机通信的远程网。通常跨接很大的物理范围,所覆盖的范围从几十公里到几千公里,它能连接多个地区、城市和国家,或横跨几个洲并能提供远距离通信,形成国际性的远程网络。广域网并不等同于互联网,一般所指的互联网是属于一种公共型的广域网。(3) Wide Area Network (WAN), also known as extranet or public network, is a long-distance network that connects computers in local area networks or metropolitan area networks in different regions. It usually spans a large physical range, ranging from tens of kilometers to thousands of kilometers. It can connect multiple regions, cities and countries, or span several continents and provide long-distance communications, forming an international long-distance network. A WAN is not the same as the Internet. The Internet generally refers to a public WAN.
如前文背景技术所述,电子设备在断网的情况下,会重新扫描Wi-Fi,与Wi-Fi扫描结果中以往连接过的并设置了自动连接的Wi-Fi连接。但是,若扫描到的Wi-Fi中不存在设置了自动连接的Wi-Fi,则电子设备无法重新连接到Wi-Fi,电子设备重新连接Wi-Fi失败,电子设备仍会保持Wi-Fi断开状态,用户体验较差。As described in the background technology above, when the electronic device is disconnected from the Internet, it will rescan the Wi-Fi and connect to the Wi-Fi that was previously connected and set to automatically connect in the Wi-Fi scan results. However, if there is no Wi-Fi with automatic connection set in the scanned Wi-Fi, the electronic device cannot reconnect to the Wi-Fi, and the electronic device fails to reconnect to the Wi-Fi, and the electronic device will remain in the Wi-Fi disconnected state, resulting in a poor user experience.
例如,图1示出了一种笔记本电脑重新扫描Wi-Fi的场景示意图。如图1所示,笔记本电脑100的操作系统会执行Wi-Fi恢复连接操作,首先,笔记本电脑100会重新扫描Wi-Fi。For example, Fig. 1 shows a schematic diagram of a scenario in which a laptop computer rescans Wi-Fi. As shown in Fig. 1, the operating system of the laptop computer 100 will perform a Wi-Fi recovery connection operation. First, the laptop computer 100 will rescan Wi-Fi.
笔记本电脑100扫描到的Wi-Fi可以有多个。例如,图2示出了一种扫描到的Wi-Fi的示例性表格示意图。如图2所示,扫描到的Wi-Fi可以有Wi-Fi-A、Wi-Fi-B、Wi-Fi-C、Wi-Fi-D、Wi-Fi-E、Wi-Fi-F和Wi-Fi-G,其中,扫描到的以往连接过的Wi-Fi有Wi-Fi-A、Wi-Fi-B、Wi-Fi-C、Wi-Fi-E和Wi-Fi-F。可以理解的是,以往连接过的Wi-Fi可以简称为已知Wi-Fi。以往连接过的Wi-Fi可以为笔记本电脑100已保存连接凭证的Wi-Fi,连接凭证可以是网络连接密码、网络账户、网络连接数字凭证。笔记本电脑100可以通过网络连接密码、网络账户或网络连接数字凭证上网。There may be multiple Wi-Fis scanned by the laptop computer 100. For example, FIG2 shows an exemplary table diagram of scanned Wi-Fis. As shown in FIG2, the scanned Wi-Fis may include Wi-Fi-A, Wi-Fi-B, Wi-Fi-C, Wi-Fi-D, Wi-Fi-E, Wi-Fi-F, and Wi-Fi-G, wherein the previously connected Wi-Fis scanned include Wi-Fi-A, Wi-Fi-B, Wi-Fi-C, Wi-Fi-E, and Wi-Fi-F. It is understandable that the previously connected Wi-Fis may be referred to as known Wi-Fis. The previously connected Wi-Fis may be Wi-Fis for which the laptop computer 100 has saved connection credentials, and the connection credentials may be a network connection password, a network account, or a network connection digital certificate. The laptop computer 100 can access the Internet through a network connection password, a network account, or a network connection digital certificate.
可自动连接的Wi-Fi是笔记本电脑100响应于用户操作,将已知Wi-Fi设置为自动连接的Wi-Fi。如图1所示,用户操作可以是用户点击自动连接按钮的操作。如图2所示,扫描到的以往连接过的Wi-Fi-A、Wi-Fi-B、Wi-Fi-C、Wi-Fi-E和Wi-Fi-F均未设置为自动连接。即笔记本电脑100扫描到Wi-Fi中不存在设置了自动连接的Wi-Fi。The automatically connectable Wi-Fi is the Wi-Fi that the laptop 100 sets as the automatically connected Wi-Fi in response to the user operation. As shown in FIG1 , the user operation may be the operation of the user clicking the automatic connection button. As shown in FIG2 , the previously connected Wi-Fi-A, Wi-Fi-B, Wi-Fi-C, Wi-Fi-E, and Wi-Fi-F scanned are not set to automatically connect. That is, the laptop 100 scans that there is no Wi-Fi that is set to automatically connect.
下面介绍一种Wi-Fi的连接方法,图3示出了一种相关技术的Wi-Fi连接方法的流程示意图。如图3所示,该流程包括如下步骤:A Wi-Fi connection method is described below. FIG3 shows a schematic diagram of a Wi-Fi connection method of a related art. As shown in FIG3 , the process includes the following steps:
步骤301:笔记本电脑100的操作系统检测到断开Wi-Fi,控制笔记本电脑100扫描Wi-Fi,获取Wi-Fi扫描结果。Step 301: the operating system of the notebook computer 100 detects that the Wi-Fi is disconnected, controls the notebook computer 100 to scan the Wi-Fi, and obtains the Wi-Fi scanning result.
步骤302:笔记本电脑100的操作系统从Wi-Fi扫描结果中确定已知Wi-Fi以及可自动连接Wi-Fi。Step 302: The operating system of the notebook computer 100 determines a known Wi-Fi and a Wi-Fi that can be automatically connected from the Wi-Fi scanning results.
步骤303:笔记本电脑100的操作系统判断是否存在可自动连接Wi-Fi。Step 303: The operating system of the notebook computer 100 determines whether there is a Wi-Fi network that can be automatically connected.
笔记本电脑100的操作系统在判断出存在可自动连接Wi-Fi的情况下,笔记本电脑100的操作系统根据Wi-Fi参数确定可自动连接Wi-Fi的Wi-Fi质量指标,基于可自动连接Wi-Fi的Wi-Fi质量指标确定目标Wi-Fi,即执行步骤305。笔记本电脑100的操作系统在判断出不存在可自动连接Wi-Fi的情况下,笔记本电脑100的操作系统控制笔记本电脑100保持Wi-Fi断开状态。When the operating system of the laptop computer 100 determines that there is a Wi-Fi that can be automatically connected, the operating system of the laptop computer 100 determines a Wi-Fi quality indicator that can automatically connect to the Wi-Fi according to the Wi-Fi parameters, and determines a target Wi-Fi based on the Wi-Fi quality indicator that can automatically connect to the Wi-Fi, that is, executes step 305. When the operating system of the laptop computer 100 determines that there is no Wi-Fi that can be automatically connected, the operating system of the laptop computer 100 controls the laptop computer 100 to keep the Wi-Fi disconnected.
步骤304:笔记本电脑100的操作系统控制笔记本电脑100保持Wi-Fi断开状态。Step 304: The operating system of the notebook computer 100 controls the notebook computer 100 to maintain a Wi-Fi disconnected state.
笔记本电脑100的Wi-Fi处于断开状态,操作系统会高频率定期扫描网络,以便笔记本电脑100进入可自动连接网络范围时可以快速的自动连接到相应的可自动连接网络。而频繁扫描会增加笔记本电脑100中无线局域网适配器的功耗。When the Wi-Fi of the laptop 100 is disconnected, the operating system will scan the network at a high frequency and regularly, so that the laptop 100 can quickly and automatically connect to the corresponding automatically connectable network when it enters the automatically connectable network range. Frequent scanning will increase the power consumption of the wireless LAN adapter in the laptop 100.
步骤305:笔记本电脑100的操作系统根据Wi-Fi参数确定可自动连接Wi-Fi的Wi-Fi质量指标,基于可自动连接Wi-Fi的Wi-Fi质量指标确定目标Wi-Fi。Step 305: The operating system of the notebook computer 100 determines a Wi-Fi quality indicator for automatically connecting to the Wi-Fi according to the Wi-Fi parameters, and determines a target Wi-Fi based on the Wi-Fi quality indicator for automatically connecting to the Wi-Fi.
Wi-Fi参数包括网络信号强度参数。Wi-Fi parameters include network signal strength parameters.
步骤306:笔记本电脑100的操作系统控制笔记本电脑100连接目标Wi-Fi。Step 306: The operating system of the notebook computer 100 controls the notebook computer 100 to connect to the target Wi-Fi.
笔记本电脑100的操作系统会按照预设的Wi-Fi恢复机制,如前文步骤301至步骤306,执行Wi-Fi恢复连接操作。即连接扫描到的已知Wi-Fi中设置了自动连接的Wi-Fi。但是,扫描到的以往连接过的Wi-Fi-A、Wi-Fi-B、Wi-Fi-C、Wi-Fi-E和Wi-Fi-F均未设置为自动连接,笔记本电脑100扫描到的Wi-Fi中不存在设置了自动连接的Wi-Fi,笔记本电脑100无法重新连接到Wi-Fi,笔记本电脑100重新连接Wi-Fi失败,笔记本电脑100仍会保持Wi-Fi断开状态,用户体验较差。The operating system of the laptop computer 100 will perform the Wi-Fi recovery connection operation according to the preset Wi-Fi recovery mechanism, such as steps 301 to 306 above. That is, the Wi-Fi that is scanned and set to automatically connect is connected. However, the previously scanned Wi-Fi-A, Wi-Fi-B, Wi-Fi-C, Wi-Fi-E, and Wi-Fi-F are not set to automatically connect. There is no Wi-Fi that is set to automatically connect among the Wi-Fi scanned by the laptop computer 100. The laptop computer 100 cannot reconnect to the Wi-Fi. The laptop computer 100 fails to reconnect to the Wi-Fi. The laptop computer 100 will still remain in the Wi-Fi disconnected state, and the user experience is poor.
为了解决前述技术问题,本申请实施例提出一种网络连接方法,该方法包括:若电子设备检测到断开无线局域网,电子设备的操作系统按照预设的自连恢复机制,控制电子设备连接无线局域网;若操作系统按照预设的自连恢复机制未成功连接到无线局域网,电子设备从扫描到的候选无线局域网中确定第一目标无线局域网;其中,候选无线局域网为电子设备已保存连接凭证的无线局域网。然后,电子设备与第一目标无线局域网进行连接。In order to solve the aforementioned technical problems, an embodiment of the present application proposes a network connection method, which includes: if the electronic device detects that the wireless local area network is disconnected, the operating system of the electronic device controls the electronic device to connect to the wireless local area network according to a preset self-connection recovery mechanism; if the operating system fails to successfully connect to the wireless local area network according to the preset self-connection recovery mechanism, the electronic device determines a first target wireless local area network from the scanned candidate wireless local area networks; wherein the candidate wireless local area network is a wireless local area network for which the electronic device has saved connection credentials. Then, the electronic device is connected to the first target wireless local area network.
本申请实施例中,即使电子设备的操作系统按照预设的自连恢复机制,重新连接无线局域网失败,电子设备也可以从电子设备扫描到的已知无线局域网中选择目标无线局域网,控制电子设备与该目标无线局域网进行连接。这样,尽管电子设备的操作系统按照预设的自连恢复机制,恢复无线局域网连接失败的情况下,电子设备也能自动连接到无线局域网,提升了用户的上网体验。In the embodiment of the present application, even if the operating system of the electronic device fails to reconnect to the wireless LAN according to the preset self-connection recovery mechanism, the electronic device can select a target wireless LAN from the known wireless LANs scanned by the electronic device and control the electronic device to connect to the target wireless LAN. In this way, even if the operating system of the electronic device fails to restore the wireless LAN connection according to the preset self-connection recovery mechanism, the electronic device can automatically connect to the wireless LAN, thereby improving the user's Internet experience.
这里的无线局域网可以包括Wi-Fi,蓝牙、ZigBee、热点等各种无线网络。本申请中主要以无线局域网为Wi-Fi为例进行说明。The wireless local area network here may include various wireless networks such as Wi-Fi, Bluetooth, ZigBee, hotspots, etc. In this application, the wireless local area network is mainly described by taking Wi-Fi as an example.
在Wi-Fi为Wi-Fi的情况下,当电子设备在检测到Wi-Fi断开时,电子设备的操作系统按照预设的自连恢复机制,控制电子设备连接Wi-Fi;若操作系统按照预设的自连恢复机制未成功连接到Wi-Fi,电子设备从扫描到的候选Wi-Fi中确定第一目标Wi-Fi;其中,候选Wi-Fi为电子设备已保存连接凭证的Wi-Fi;电子设备与第一目标Wi-Fi进行连接。In the case where the Wi-Fi is Wi-Fi, when the electronic device detects that the Wi-Fi is disconnected, the operating system of the electronic device controls the electronic device to connect to the Wi-Fi according to a preset self-connection recovery mechanism; if the operating system fails to successfully connect to the Wi-Fi according to the preset self-connection recovery mechanism, the electronic device determines a first target Wi-Fi from the scanned candidate Wi-Fi; wherein the candidate Wi-Fi is a Wi-Fi for which the electronic device has saved connection credentials; and the electronic device connects to the first target Wi-Fi.
可以理解,预设的自连恢复机制也可以称为预设的Wi-Fi恢复机制。It can be understood that the preset self-connection recovery mechanism can also be called a preset Wi-Fi recovery mechanism.
例如,图4基于图2中的内容,示出了一种从扫描到的Wi-Fi中选择一个目标Wi-Fi的示意图。如图4所示,扫描到的Wi-Fi可以有Wi-Fi-A、Wi-Fi-B、Wi-Fi-C、Wi-Fi-D、Wi-Fi-E、Wi-Fi-F和Wi-Fi-G,其中,扫描到的已知Wi-Fi有Wi-Fi-A、Wi-Fi-B、Wi-Fi-C、Wi-Fi-E和Wi-Fi-F。若笔记本电脑100的操作系统按照预设的Wi-Fi恢复机制仍然未成功连接到Wi-Fi,则可以从Wi-Fi-A、Wi-Fi-B、Wi-Fi-C、Wi-Fi-E和Wi-Fi-F中确定一个目标Wi-Fi,例如,Wi-Fi-A,控制笔记本电脑100与该目标Wi-Fi进行连接。For example, FIG4 is based on the content in FIG2 and shows a schematic diagram of selecting a target Wi-Fi from the scanned Wi-Fi. As shown in FIG4, the scanned Wi-Fi may include Wi-Fi-A, Wi-Fi-B, Wi-Fi-C, Wi-Fi-D, Wi-Fi-E, Wi-Fi-F and Wi-Fi-G, wherein the scanned known Wi-Fi include Wi-Fi-A, Wi-Fi-B, Wi-Fi-C, Wi-Fi-E and Wi-Fi-F. If the operating system of the laptop 100 still fails to successfully connect to the Wi-Fi according to the preset Wi-Fi recovery mechanism, a target Wi-Fi, for example, Wi-Fi-A, can be determined from Wi-Fi-A, Wi-Fi-B, Wi-Fi-C, Wi-Fi-E and Wi-Fi-F, and the laptop 100 is controlled to connect to the target Wi-Fi.
本申请实施例提供的电子设备是具有连接无线局域网功能的各种设备。本申请实施例提供的电子设备可以是笔记本电脑、手机(mobile phone)、智能电视、可穿戴设备、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)电子设备、增强现实(augmented reality,AR)电子设备、工业控制(industrial control)中的无线终端、无人驾驶(self-driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等等。The electronic device provided in the embodiment of the present application is a variety of devices with the function of connecting to a wireless local area network. The electronic device provided in the embodiment of the present application can be a laptop, a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control (industrial control), a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid (smart grid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in a smart city (smart city), a wireless terminal in a smart home (smart home), etc.
下面以电子设备为笔记本电脑为例进一步详细介绍本申请的技术方案。The technical solution of the present application is further described in detail below by taking a laptop computer as an example of an electronic device.
请参考图5,其示出本申请实施例提供的一种笔记本电脑的结构示意图。如图5所示,该笔记本电脑可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,显示屏150,天线,无线通信模块160,音频模块170,扬声器(即喇叭)170A,麦克风170C,耳机接口170B,触控板180,键盘190,以及摄像头191等。Please refer to Figure 5, which shows a schematic diagram of the structure of a laptop provided by an embodiment of the present application. As shown in Figure 5, the laptop may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, a display screen 150, an antenna, a wireless communication module 160, an audio module 170, a speaker (i.e., a speaker) 170A, a microphone 170C, an earphone interface 170B, a touchpad 180, a keyboard 190, and a camera 191, etc.
其中,上述除显示屏150之外的其他器件(如处理器110,外部存储器接口120,内部存储器121,USB接口130,充电管理模块140,电源管理模块141,电池142,天线,无线通信模块160,音频模块170,触控板180,扬声器170A,麦克风170C,耳机接口170B,键盘190和摄像头191等均可以设置在笔记本电脑的底座。上述摄像头191可设置于笔记本电脑的底座或者显示屏150的边框上。Among them, the other components except the display screen 150 (such as the processor 110, the external memory interface 120, the internal memory 121, the USB interface 130, the charging management module 140, the power management module 141, the battery 142, the antenna, the wireless communication module 160, the audio module 170, the touchpad 180, the speaker 170A, the microphone 170C, the headphone interface 170B, the keyboard 190 and the camera 191, etc.) can be set on the base of the laptop computer. The above-mentioned camera 191 can be set on the base of the laptop computer or on the frame of the display screen 150.
可以理解的是,本实施例示意的结构并不构成对笔记本电脑的具体限定。在另一些实施例中,笔记本电脑可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the laptop computer. In other embodiments, the laptop computer may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。处理器110可以执行本申请实施例提供的网络连接方法。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. The processor 110 can execute the network connection method provided in the embodiment of the present application.
控制器可以是笔记本电脑的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can be the nerve center and command center of the laptop computer. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对笔记本电脑的结构限定。在另一些实施例中,笔记本电脑也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation on the notebook computer. In other embodiments, the notebook computer may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器(如无线充电器或有线充电器)接收充电输入,为电池142充电。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为笔记本电脑的各个器件供电。The charging management module 140 is used to receive charging input from a charger (such as a wireless charger or a wired charger) to charge the battery 142. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140 to power various components of the laptop computer.
笔记本电脑的无线通信功能可以通过天线和无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the notebook computer can be realized through the antenna and the wireless communication module 160, the modem processor and the baseband processor.
天线用于发射和接收电磁波信号。笔记本电脑中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。Antennas are used to transmit and receive electromagnetic wave signals. Each antenna in a laptop can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
在一些实施例中,笔记本电脑的天线和无线通信模块160耦合,使得笔记本电脑可以通过无线通信技术与无线局域网以及其他设备通信。无线通信模块160可以提供应用在笔记本电脑上的包括无线局域网(wireless local area networks,WLAN),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线局域网可以是Wi-Fi,基于蜂窝移动网络生成的热点,蓝牙(bluetooth,BT)。In some embodiments, the antenna of the laptop is coupled to the wireless communication module 160, so that the laptop can communicate with the wireless local area network and other devices through wireless communication technology. The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc. applied to the laptop. The wireless local area network can be Wi-Fi, a hotspot generated based on a cellular mobile network, or Bluetooth (BT).
笔记本电脑可以通过GPU,显示屏150,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏150和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。显示屏150用于显示图像,视频等。The laptop computer can realize the display function through a GPU, a display screen 150, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 150 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information. The display screen 150 is used to display images, videos, etc.
上述触控板180中集成有触摸传感器。笔记本电脑可以通过触控板180和键盘190接收用户对笔记本电脑的控制命令。A touch sensor is integrated in the touch panel 180. The notebook computer can receive control commands from the user to the notebook computer through the touch panel 180 and the keyboard 190.
笔记本电脑可以通过ISP,摄像头191,视频编解码器,GPU,显示屏150以及应用处理器等实现拍摄功能。ISP用于处理摄像头191反馈的数据。在一些实施例中,ISP可以设置在摄像头191中。摄像头191用于捕获静态图像或视频。在一些实施例中,笔记本电脑可以包括1个或N个摄像头191,N为大于1的正整数。The laptop computer can realize the shooting function through the ISP, the camera 191, the video codec, the GPU, the display screen 150 and the application processor. The ISP is used to process the data fed back by the camera 191. In some embodiments, the ISP can be set in the camera 191. The camera 191 is used to capture a static image or a video. In some embodiments, the laptop computer can include 1 or N cameras 191, where N is a positive integer greater than 1.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展笔记本电脑的存储能力。内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行笔记本电脑的各种功能应用以及数据处理。例如,在本申请实施例中,处理器110可以通过执行存储在内部存储器121中的指令,内部存储器121可以包括存储程序区和存储数据区。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the laptop computer. The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the laptop computer by running the instructions stored in the internal memory 121. For example, in an embodiment of the present application, the processor 110 can execute the instructions stored in the internal memory 121, and the internal memory 121 may include a program storage area and a data storage area.
笔记本电脑可以通过音频模块170,扬声器170A,麦克风170C,耳机接口170B,以及应用处理器等实现音频功能。例如音乐播放,录音等。The notebook computer can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the microphone 170C, the headphone jack 170B, and the application processor.
音频模块170用于将数字音频信号转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。耳机接口170B用于连接有线耳机。耳机接口170B可以是USB接口130,也可以是1.5mm的开放移动电子设备平台(open mobile terminalplatform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunicationsindustry association of the USA,CTIA)标准接口。The audio module 170 is used to convert digital audio signals into analog audio signals for output, and is also used to convert analog audio inputs into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110. The speaker 170A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The microphone 170C, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals. The headphone jack 170B is used to connect wired headphones. The headphone jack 170B can be a USB interface 130, or it can be a 1.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, the American Cellular Telecommunications Industry Association (cellular telecommunicationsindustry association of the USA, CTIA) standard interface.
本申请实施例应用于无线局域网,下面以无线局域网为Wi-Fi为例进行说明。The embodiments of the present application are applied to a wireless local area network, and the following description will be given taking the wireless local area network as Wi-Fi as an example.
为了解决前述技术问题,本申请实施例提出一种Wi-Fi连接方法,该方法包括:若笔记本电脑100的操作系统按照预设的Wi-Fi恢复机制仍然连接不到Wi-Fi,则笔记本电脑100会利用第三方应用中设置的Wi-Fi恢复机制继续进行Wi-Fi连接。具体的,若笔记本电脑100的操作系统按照预设的Wi-Fi恢复机制仍然连接不到Wi-Fi,操作系统可以向第三方应用发送扫描到的Wi-Fi中具有已知网络的信息,在笔记本电脑100断开Wi-Fi,且第三方应用接收到该扫描到的Wi-Fi中具有已知网络的信息的情况下,会从扫描到的已知Wi-Fi中确定目标Wi-Fi,控制笔记本电脑100与该目标Wi-Fi进行连接。预设的Wi-Fi恢复机制也可以称为预设的自连恢复机制。In order to solve the aforementioned technical problems, an embodiment of the present application proposes a Wi-Fi connection method, which includes: if the operating system of the laptop computer 100 still cannot connect to the Wi-Fi according to the preset Wi-Fi recovery mechanism, the laptop computer 100 will use the Wi-Fi recovery mechanism set in the third-party application to continue the Wi-Fi connection. Specifically, if the operating system of the laptop computer 100 still cannot connect to the Wi-Fi according to the preset Wi-Fi recovery mechanism, the operating system can send information about known networks in the scanned Wi-Fi to the third-party application. When the laptop computer 100 disconnects the Wi-Fi and the third-party application receives the information about known networks in the scanned Wi-Fi, it will determine the target Wi-Fi from the scanned known Wi-Fi and control the laptop computer 100 to connect to the target Wi-Fi. The preset Wi-Fi recovery mechanism can also be called a preset self-connection recovery mechanism.
本申请实施例中,即使笔记本电脑100的操作系统按照预设的Wi-Fi恢复机制,重新连接Wi-Fi失败,第三方应用也会从笔记本电脑100扫描到的已知Wi-Fi中选择目标Wi-Fi,控制笔记本电脑100与该目标Wi-Fi进行连接。这样,尽管笔记本电脑100的操作系统按照预设的Wi-Fi恢复机制,恢复Wi-Fi连接失败的情况下,也能自动连接到Wi-Fi,提升了用户的上网体验。In the embodiment of the present application, even if the operating system of the laptop computer 100 fails to reconnect to the Wi-Fi according to the preset Wi-Fi recovery mechanism, the third-party application will select a target Wi-Fi from the known Wi-Fi scanned by the laptop computer 100 and control the laptop computer 100 to connect to the target Wi-Fi. In this way, even if the operating system of the laptop computer 100 fails to restore the Wi-Fi connection according to the preset Wi-Fi recovery mechanism, it can still automatically connect to the Wi-Fi, thereby improving the user's Internet experience.
图6示出了一种Wi-Fi连接方法的流程示意图。如图6所示,该流程包括如下步骤:FIG6 shows a schematic diagram of a process of a Wi-Fi connection method. As shown in FIG6 , the process includes the following steps:
步骤601:笔记本电脑100的操作系统检测到断开Wi-Fi,向笔记本电脑100的第三方应用发送Wi-Fi断开信息。Step 601 : the operating system of the notebook computer 100 detects that the Wi-Fi is disconnected, and sends Wi-Fi disconnection information to a third-party application of the notebook computer 100 .
若笔记本电脑100检测到Wi-Fi异常断开,笔记本电脑100的操作系统可以按照预设的自连恢复机制,控制笔记本电脑100连接无线局域网;其中,Wi-Fi异常断开包括未检测到用户断开Wi-Fi指令的情况下断开Wi-Fi,即Wi-Fi异常断开为非用户断开Wi-Fi的操作的情况下触发的Wi-Fi断开。Wi-Fi正常断开包括检测到用户断开Wi-Fi指令的情况下断开Wi-Fi,即Wi-Fi正常断开为用户断开Wi-Fi的操作的情况下触发的Wi-Fi断开。If the laptop computer 100 detects an abnormal Wi-Fi disconnection, the operating system of the laptop computer 100 can control the laptop computer 100 to connect to the wireless LAN according to the preset self-recovery mechanism; wherein the abnormal Wi-Fi disconnection includes disconnecting the Wi-Fi when no instruction from the user to disconnect the Wi-Fi is detected, that is, the abnormal Wi-Fi disconnection is a Wi-Fi disconnection triggered by a non-user Wi-Fi disconnection operation. The normal Wi-Fi disconnection includes disconnecting the Wi-Fi when an instruction from the user to disconnect the Wi-Fi is detected, that is, the normal Wi-Fi disconnection is a Wi-Fi disconnection triggered by a user Wi-Fi disconnection operation.
可以理解的是,在一些实施例中,笔记本电脑100的第三方应用可以向操作系统申请注册事件监听回调,操作系统同意注册事件监听回调后,笔记本电脑100的操作系统便可以将监听到的Wi-Fi信息以及一些触发信息发送至第三方应用。It is understandable that in some embodiments, a third-party application of the laptop computer 100 can apply to the operating system to register an event monitoring callback. After the operating system agrees to register the event monitoring callback, the operating system of the laptop computer 100 can send the monitored Wi-Fi information and some trigger information to the third-party application.
例如,笔记本电脑100检测到Wi-Fi断开,会向第三方应用发送Wi-Fi断开消息和Wi-Fi断开原因,Wi-Fi断开消息包括wlan_notification_acm_disconnected事件,wlan_notification_acm_disconnected事件用于表示Wi-Fi连接断开。For example, when the laptop computer 100 detects that the Wi-Fi connection is disconnected, it will send a Wi-Fi disconnection message and a Wi-Fi disconnection reason to the third-party application. The Wi-Fi disconnection message includes a wlan_notification_acm_disconnected event. The wlan_notification_acm_disconnected event is used to indicate that the Wi-Fi connection is disconnected.
笔记本电脑100的第三方应用可以根据断开原因判断Wi-Fi断开是正常断开还是异常断开,正常断开是指笔记本电脑100响应于用户断开Wi-Fi的操作触发的Wi-Fi断开。Wi-Fi异常断开为非用户断开Wi-Fi的操作的情况下触发的Wi-Fi断开。异常断开原因可以是Wi-Fi驱动、无线接入点或操作系统等造成连接的Wi-Fi异常断开的原因,wlan_notification_acm_disconnected事件用于表示Wi-Fi连接断开。The third-party application of the laptop computer 100 can determine whether the Wi-Fi disconnection is a normal disconnection or an abnormal disconnection according to the disconnection reason. A normal disconnection refers to a Wi-Fi disconnection triggered by the laptop computer 100 in response to a user's operation of disconnecting the Wi-Fi. An abnormal Wi-Fi disconnection is a Wi-Fi disconnection triggered by an operation other than the user disconnecting the Wi-Fi. The abnormal disconnection reason can be a reason for the abnormal disconnection of the connected Wi-Fi caused by the Wi-Fi driver, wireless access point, or operating system. The wlan_notification_acm_disconnected event is used to indicate that the Wi-Fi connection is disconnected.
步骤602:笔记本电脑100的第三方应用接收到Wi-Fi断开消息。Step 602: The third-party application of the notebook computer 100 receives a Wi-Fi disconnection message.
步骤603:笔记本电脑100的操作系统控制笔记本电脑100扫描Wi-Fi,获取Wi-Fi扫描结果。Step 603: The operating system of the notebook computer 100 controls the notebook computer 100 to scan Wi-Fi and obtain the Wi-Fi scanning result.
笔记本电脑100的操作系统检测到断开Wi-Fi的情况下,可以启动重新连接Wi-Fi机制。首先,笔记本电脑100可以扫描Wi-Fi,尝试获取可以重新连接的Wi-Fi,获取Wi-Fi扫描结果。When the operating system of the notebook computer 100 detects that the Wi-Fi is disconnected, a mechanism for reconnecting to the Wi-Fi can be started. First, the notebook computer 100 can scan the Wi-Fi, try to obtain the Wi-Fi that can be reconnected, and obtain the Wi-Fi scanning result.
步骤604:笔记本电脑100的操作系统从Wi-Fi扫描结果中确定已知Wi-Fi以及可自动连接Wi-Fi。Step 604: The operating system of the notebook computer 100 determines known Wi-Fi and automatically connectable Wi-Fi from the Wi-Fi scanning results.
笔记本电脑100可以扫描到Wi-Fi,也可能扫描不到Wi-Fi。若笔记本电脑100扫描不到Wi-Fi,则Wi-Fi扫描结果中扫描到的Wi-Fi的数量为0;若笔记本电脑100扫描到Wi-Fi,则Wi-Fi扫描结果中扫描到的Wi-Fi的数量至少为1。在Wi-Fi扫描结果中扫描到的Wi-Fi的数量大于等于1的情况下,笔记本电脑100可以从Wi-Fi扫描结果中确定已知Wi-Fi以及可自动连接Wi-Fi。The laptop computer 100 may or may not scan Wi-Fi. If the laptop computer 100 cannot scan Wi-Fi, the number of Wi-Fi scanned in the Wi-Fi scan result is 0; if the laptop computer 100 scans Wi-Fi, the number of Wi-Fi scanned in the Wi-Fi scan result is at least 1. When the number of Wi-Fi scanned in the Wi-Fi scan result is greater than or equal to 1, the laptop computer 100 can determine known Wi-Fi and Wi-Fi that can be automatically connected from the Wi-Fi scan result.
可以理解的是,Wi-Fi扫描结果中的已知Wi-Fi的数量可能为0,也可能大于等于1,可自动连接Wi-Fi的数量可能为0,也可能大于等于1。It is understandable that the number of known Wi-Fi in the Wi-Fi scan result may be 0, or may be greater than or equal to 1, and the number of automatically connectable Wi-Fi may be 0, or may be greater than or equal to 1.
已知Wi-Fi也可以叫做候选无线局域网,供笔记本电脑100从中选择可以连接的网络。It is known that Wi-Fi can also be called a candidate wireless local area network, from which the notebook computer 100 can select a network to connect.
笔记本电脑100的操作系统中保存当前之前的一段时间内的已知Wi-Fi以及可自动连接Wi-Fi。这样,笔记本电脑100的操作系统便可以将Wi-Fi扫描结果中的Wi-Fi与笔记本电脑100的操作系统中保存的已知Wi-Fi以及可自动连接Wi-Fi相匹配,从Wi-Fi扫描结果中确定已知Wi-Fi以及可自动连接Wi-Fi。The operating system of the notebook computer 100 stores the known Wi-Fi and automatically connectable Wi-Fi in a period of time before the current time. In this way, the operating system of the notebook computer 100 can match the Wi-Fi in the Wi-Fi scan result with the known Wi-Fi and automatically connectable Wi-Fi stored in the operating system of the notebook computer 100, and determine the known Wi-Fi and automatically connectable Wi-Fi from the Wi-Fi scan result.
笔记本电脑100的操作系统中保存的当前之前的一段时间内的已知Wi-Fi可以显示在笔记本电脑100的显示屏上。The known Wi-Fi networks within a period of time before the current time stored in the operating system of the notebook computer 100 can be displayed on the display screen of the notebook computer 100 .
例如,图7示出了一种笔记本电脑100的操作系统的网络和互联网用户界面的示意图。如图7所示,笔记本电脑100的操作系统的网络和互联网用户界面显示管理已知网络条目。笔记本电脑100响应于用户利用光标打开管理已知网络条目的操作,可以显示当前之前的一段时间内的已知Wi-Fi。For example, FIG7 shows a schematic diagram of a network and Internet user interface of an operating system of a laptop computer 100. As shown in FIG7, the network and Internet user interface of the operating system of the laptop computer 100 displays a management known network entry. In response to the user opening the management known network entry with a cursor, the laptop computer 100 can display known Wi-Fis within a period of time before the current time.
Wi-Fi扫描结果可以显示在笔记本电脑100的显示屏上。笔记本电脑100的操作系统的网络和互联网用户界面显示可用网络条目。笔记本电脑100响应于用户利用光标打开显示可用网络条目的操作,可以显示Wi-Fi扫描结果。The Wi-Fi scan result can be displayed on the display screen of the laptop computer 100. The network and Internet user interface of the operating system of the laptop computer 100 displays available network entries. In response to the user's operation of opening the display available network entry with a cursor, the laptop computer 100 can display the Wi-Fi scan result.
步骤605:笔记本电脑100的操作系统判断是否存在可自动连接Wi-Fi。Step 605: The operating system of the notebook computer 100 determines whether there is a Wi-Fi network that can be automatically connected.
若自动连接Wi-Fi的数量为0,则笔记本电脑100判断不存在可自动连接Wi-Fi;若自动连接Wi-Fi的数量大于等于1,则笔记本电脑100判断存在可自动连接Wi-Fi。If the number of automatically connected Wi-Fi is 0, the notebook computer 100 determines that there is no automatically connected Wi-Fi; if the number of automatically connected Wi-Fi is greater than or equal to 1, the notebook computer 100 determines that there is an automatically connected Wi-Fi.
笔记本电脑100在判断出存在可自动连接Wi-Fi的情况下,笔记本电脑100的操作系统根据Wi-Fi参数确定可自动连接Wi-Fi的Wi-Fi质量指标,基于可自动连接Wi-Fi的Wi-Fi质量指标确定目标Wi-Fi,即执行步骤611。笔记本电脑100在判断出不存在可自动连接Wi-Fi的情况下,控制笔记本电脑100保持Wi-Fi断开状态,向第三方应用发送Wi-Fi扫描结果中具有已知Wi-Fi的信息,即执行步骤606。When the laptop computer 100 determines that there is a Wi-Fi that can be automatically connected, the operating system of the laptop computer 100 determines the Wi-Fi quality indicator of the Wi-Fi that can be automatically connected according to the Wi-Fi parameters, and determines the target Wi-Fi based on the Wi-Fi quality indicator of the Wi-Fi that can be automatically connected, that is, executing step 611. When the laptop computer 100 determines that there is no Wi-Fi that can be automatically connected, the laptop computer 100 controls the laptop computer 100 to keep the Wi-Fi disconnected, and sends the information of the known Wi-Fi in the Wi-Fi scan result to the third-party application, that is, executing step 606.
步骤606:笔记本电脑100的操作系统控制笔记本电脑100保持Wi-Fi断开状态,向第三方应用发送Wi-Fi扫描结果中具有已知Wi-Fi的信息。Step 606: The operating system of the notebook computer 100 controls the notebook computer 100 to keep the Wi-Fi disconnected state, and sends the information of the known Wi-Fi in the Wi-Fi scan result to the third-party application.
笔记本电脑100的操作系统可以向笔记本电脑100的第三方应用发送Wi-Fi扫描结果中具有已知Wi-Fi的信息。这样,第三方应用便可以接收操作系统发送的Wi-Fi扫描结果中具有已知Wi-Fi的信息,并在接收到操作系统发送的Wi-Fi扫描结果中具有已知Wi-Fi的信息的情况下,执行第三方应用中的Wi-Fi恢复机制,执行Wi-Fi恢复连接操作。The operating system of the notebook computer 100 can send the information about the known Wi-Fi in the Wi-Fi scan result to the third-party application of the notebook computer 100. In this way, the third-party application can receive the information about the known Wi-Fi in the Wi-Fi scan result sent by the operating system, and when receiving the information about the known Wi-Fi in the Wi-Fi scan result sent by the operating system, execute the Wi-Fi recovery mechanism in the third-party application and perform the Wi-Fi recovery connection operation.
可以理解,相关技术中,笔记本电脑100在断开网络的情况下,笔记本电脑100的操作系统便会按照预设的Wi-Fi恢复机制,执行Wi-Fi恢复连接操作。第三方应用在接收到操作系统发送的Wi-Fi扫描结果中具有已知Wi-Fi的信息的情况下,才执行第三方应用中的Wi-Fi恢复机制,执行Wi-Fi恢复连接操作,而不是在笔记本电脑100一开始Wi-Fi断开时就执行第三方应用中的Wi-Fi恢复机制。这样,可以避免第三方应用中的Wi-Fi恢复机制和操作系统中的Wi-Fi恢复机制的冲突。It can be understood that in the related art, when the laptop computer 100 is disconnected from the network, the operating system of the laptop computer 100 will perform the Wi-Fi recovery connection operation according to the preset Wi-Fi recovery mechanism. The third-party application will only execute the Wi-Fi recovery mechanism in the third-party application and perform the Wi-Fi recovery connection operation when it receives the Wi-Fi scan result sent by the operating system with the information of the known Wi-Fi, instead of executing the Wi-Fi recovery mechanism in the third-party application when the Wi-Fi is disconnected at the beginning of the laptop computer 100. In this way, the conflict between the Wi-Fi recovery mechanism in the third-party application and the Wi-Fi recovery mechanism in the operating system can be avoided.
当笔记本电脑100的Wi-Fi处于断开状态,操作系统中的无线服务确定存在已知Wi-Fi时,操作系统可以向第三方应用发送Wi-Fi扫描结果中具有已知Wi-Fi的信息,Wi-Fi扫描结果中具有已知Wi-Fi的信息包括wlan_notification_acm_network_available事件;其中,wlan_notification_acm_network_available事件用于表明Wi-Fi扫描结果中存在已知Wi-Fi。When the Wi-Fi of the laptop computer 100 is disconnected and the wireless service in the operating system determines that there is a known Wi-Fi, the operating system can send information about the known Wi-Fi in the Wi-Fi scan result to the third-party application, and the information about the known Wi-Fi in the Wi-Fi scan result includes a wlan_notification_acm_network_available event; wherein the wlan_notification_acm_network_available event is used to indicate that there is a known Wi-Fi in the Wi-Fi scan result.
可以理解的是,在一些实施例中,笔记本电脑100的第三方应用可以向操作系统申请注册事件监听回调,操作系统同意注册事件监听回调后,笔记本电脑100的操作系统便可以将监听到的Wi-Fi信息以及一些触发信息发送至第三方应用。It is understandable that in some embodiments, a third-party application of the laptop computer 100 can apply to the operating system to register an event monitoring callback. After the operating system agrees to register the event monitoring callback, the operating system of the laptop computer 100 can send the monitored Wi-Fi information and some trigger information to the third-party application.
例如,笔记本电脑100便可以在判断不存在可自动连接Wi-Fi的情况下,向第三方应用发送Wi-Fi扫描结果中具有已知Wi-Fi的信息,或者在目标Wi-Fi连接失败的情况下,向第三方应用发送Wi-Fi扫描结果中具有已知Wi-Fi的信息。For example, the laptop computer 100 can send information about known Wi-Fi in the Wi-Fi scan results to a third-party application if it determines that there is no Wi-Fi that can be automatically connected, or send information about known Wi-Fi in the Wi-Fi scan results to a third-party application if the target Wi-Fi connection fails.
可以理解,在一些实施例中,笔记本电脑100开机后,笔记本电脑100的第三方应用打开后,该软件一直在后台运行,该软件刚启动运行时给操作系统注册事件监听回调。It can be understood that in some embodiments, after the notebook computer 100 is turned on and the third-party application of the notebook computer 100 is opened, the software has been running in the background, and the software registers an event monitoring callback with the operating system when it is just started.
可以理解的是,在一些实施例中,笔记本电脑100的操作系统在已知Wi-Fi的数量大于0的情况下,向笔记本电脑100的第三方应用发送Wi-Fi扫描结果中具有已知Wi-Fi的信息。这样,第三方应用便可以接收到操作系统发送的Wi-Fi扫描结果中具有已知Wi-Fi的信息,并在接收到操作系统发送的Wi-Fi扫描结果中具有已知Wi-Fi的信息的情况下,执行第三方应用中的Wi-Fi恢复机制,执行Wi-Fi恢复连接操作。It is understandable that in some embodiments, when the number of known Wi-Fi networks is greater than 0, the operating system of the laptop computer 100 sends information about known Wi-Fi networks in the Wi-Fi scan result to the third-party application of the laptop computer 100. In this way, the third-party application can receive the information about known Wi-Fi networks in the Wi-Fi scan result sent by the operating system, and when receiving the information about known Wi-Fi networks in the Wi-Fi scan result sent by the operating system, the third-party application executes the Wi-Fi recovery mechanism in the third-party application and performs the Wi-Fi recovery connection operation.
若笔记本电脑100的操作系统在已知Wi-Fi的数量为0的情况下,仍向笔记本电脑100的第三方应用发送Wi-Fi扫描结果中具有已知Wi-Fi的信息。这样,第三方应用即使在接收到操作系统发送的Wi-Fi扫描结果中具有已知Wi-Fi的信息,并在接收到操作系统发送的Wi-Fi扫描结果中具有已知Wi-Fi的信息的情况下,执行第三方应用中的Wi-Fi恢复机制,也会因为已知Wi-Fi的数量为0导致重新连接Wi-Fi失败,并浪费笔记本电脑100的操作系统向笔记本电脑100的第三方应用发送Wi-Fi扫描结果中具有已知Wi-Fi的信息的功耗。因此,笔记本电脑100的操作系统在已知Wi-Fi的数量大于0的情况下,才向笔记本电脑100的第三方应用发送Wi-Fi扫描结果中具有已知Wi-Fi的信息。这样,可以降低笔记本电脑100不必要的Wi-Fi连接功耗。If the number of known Wi-Fis is 0, the operating system of the laptop computer 100 still sends the information of the known Wi-Fis in the Wi-Fi scan result to the third-party application of the laptop computer 100. In this way, even if the third-party application receives the information of the known Wi-Fis in the Wi-Fi scan result sent by the operating system, and executes the Wi-Fi recovery mechanism in the third-party application, the reconnection to Wi-Fi will fail because the number of known Wi-Fis is 0, and the power consumption of the operating system of the laptop computer 100 in sending the information of the known Wi-Fis in the Wi-Fi scan result to the third-party application of the laptop computer 100 will be wasted. Therefore, the operating system of the laptop computer 100 sends the information of the known Wi-Fis in the Wi-Fi scan result to the third-party application of the laptop computer 100 only when the number of known Wi-Fis is greater than 0. In this way, unnecessary Wi-Fi connection power consumption of the laptop computer 100 can be reduced.
步骤607:笔记本电脑100的第三方应用接收到操作系统发送的Wi-Fi扫描结果中具有已知Wi-Fi的信息。Step 607: The third-party application of the notebook computer 100 receives information about known Wi-Fi in the Wi-Fi scanning result sent by the operating system.
步骤608:笔记本电脑100的第三方应用从Wi-Fi扫描结果中确定已知Wi-Fi。Step 608: The third-party application of the notebook computer 100 determines a known Wi-Fi from the Wi-Fi scanning result.
笔记本电脑100的操作系统中保存当前之前的一段时间内的已知Wi-Fi。笔记本电脑100的第三方应用接收到操作系统发送的Wi-Fi扫描结果中具有已知Wi-Fi的信息的情况下,可以从笔记本电脑100的操作系统中获取笔记本电脑100的操作系统中保存的已知Wi-Fi。这样,笔记本电脑100的第三方应用便可以将Wi-Fi扫描结果中的Wi-Fi与从笔记本电脑100的操作系统中获取到的已知Wi-Fi相匹配,从Wi-Fi扫描结果中确定已知Wi-Fi。The operating system of the laptop computer 100 stores the known Wi-Fi in a period of time before the current time. When the third-party application of the laptop computer 100 receives the information of the known Wi-Fi in the Wi-Fi scanning result sent by the operating system, the known Wi-Fi stored in the operating system of the laptop computer 100 can be obtained from the operating system of the laptop computer 100. In this way, the third-party application of the laptop computer 100 can match the Wi-Fi in the Wi-Fi scanning result with the known Wi-Fi obtained from the operating system of the laptop computer 100, and determine the known Wi-Fi from the Wi-Fi scanning result.
步骤609:笔记本电脑100的第三方应用从已知Wi-Fi中确定最优Wi-Fi。Step 609 : The third-party application of the notebook computer 100 determines the best Wi-Fi from the known Wi-Fi.
可以理解,Wi-Fi的优劣在一定程度上取决于Wi-Fi的各种质量指标,Wi-Fi的各种质量指标可以是Wi-Fi参数的参数值。为了提升用户的使用体验,笔记本电脑100可以根据Wi-Fi参数选择出较优质的待连接Wi-Fi。具体的,在一些实施例中,笔记本电脑100可以根据Wi-Fi参数确定已知Wi-Fi的Wi-Fi质量指标,根据Wi-Fi质量指标对连接优先级进行排名,基于排名的连接优先级确定最优Wi-Fi。It can be understood that the quality of Wi-Fi depends to a certain extent on various quality indicators of Wi-Fi, and various quality indicators of Wi-Fi can be parameter values of Wi-Fi parameters. In order to improve the user experience, the laptop 100 can select a better quality Wi-Fi to be connected according to the Wi-Fi parameters. Specifically, in some embodiments, the laptop 100 can determine the Wi-Fi quality indicators of known Wi-Fi according to the Wi-Fi parameters, rank the connection priorities according to the Wi-Fi quality indicators, and determine the optimal Wi-Fi based on the ranked connection priorities.
具体的,图8示出了一种最优Wi-Fi确认的流程示意图。如图8所示,该流程包括如下步骤:Specifically, Figure 8 shows a schematic diagram of a process of optimal Wi-Fi confirmation. As shown in Figure 8, the process includes the following steps:
步骤801:笔记本电脑100的第三方应用根据已知Wi-Fi中的Wi-Fi的Wi-Fi参数,确定已知Wi-Fi中各Wi-Fi的Wi-Fi质量指标。Step 801: The third-party application of the notebook computer 100 determines the Wi-Fi quality indicator of each Wi-Fi among the known Wi-Fi according to the Wi-Fi parameters of the Wi-Fi among the known Wi-Fi.
Wi-Fi参数可以包括至少一种,Wi-Fi质量指标可以是至少一种Wi-Fi参数评分之和。Wi-Fi参数可以包括网络信号强度参数、网络信号质量参数、Wi-Fi频段、Wi-Fi协议、Wi-Fi连接速率、Wi-Fi协议安全等中的任意一种或多种组合。The Wi-Fi parameter may include at least one, and the Wi-Fi quality indicator may be the sum of at least one Wi-Fi parameter score. The Wi-Fi parameter may include any one or more combinations of a network signal strength parameter, a network signal quality parameter, a Wi-Fi frequency band, a Wi-Fi protocol, a Wi-Fi connection rate, and Wi-Fi protocol security.
下面以Wi-Fi参数包括网络信号质量参数、Wi-Fi频段、Wi-Fi协议、Wi-Fi连接速率和Wi-Fi协议安全为例,说明质量指标确定方案。The following uses Wi-Fi parameters including network signal quality parameters, Wi-Fi frequency band, Wi-Fi protocol, Wi-Fi connection rate, and Wi-Fi protocol security as an example to illustrate the quality indicator determination solution.
例如,图9示出了一种Wi-Fi质量指标的示意图。如图9所示,Wi-Fi参数可以包括Wi-Fi信号质量参数、Wi-Fi频段参数、Wi-Fi协议参数、Wi-Fi连接速率参数和Wi-Fi协议安全参数,Wi-Fi质量指标可以是Wi-Fi信号质量参数分数、Wi-Fi频段参数分数、Wi-Fi协议参数分数、Wi-Fi连接速率参数分数和Wi-Fi协议安全参数分数之和。For example, a schematic diagram of a Wi-Fi quality indicator is shown in Figure 9. As shown in Figure 9, the Wi-Fi parameters may include Wi-Fi signal quality parameters, Wi-Fi frequency band parameters, Wi-Fi protocol parameters, Wi-Fi connection rate parameters, and Wi-Fi protocol security parameters, and the Wi-Fi quality indicator may be the sum of the Wi-Fi signal quality parameter score, the Wi-Fi frequency band parameter score, the Wi-Fi protocol parameter score, the Wi-Fi connection rate parameter score, and the Wi-Fi protocol security parameter score.
下面示例性介绍一种Wi-Fi信号质量参数、Wi-Fi频段参数、Wi-Fi协议参数、Wi-Fi连接速率参数和Wi-Fi协议安全参数评分的标准。The following is an example of a scoring standard for Wi-Fi signal quality parameters, Wi-Fi frequency band parameters, Wi-Fi protocol parameters, Wi-Fi connection rate parameters, and Wi-Fi protocol security parameters.
表1示出了一种信号质量参数评分的示例性表格。Table 1 shows an exemplary table of signal quality parameter scores.
表1Table 1
如表1所示,若信号质量参数在大于0小于30的区间,则Wi-Fi信号质量参数分数为0;若信号质量参数在大于等于30小于50的区间,则Wi-Fi信号质量参数分数为20;若信号质量参数在大于等于50小于70的区间,则Wi-Fi信号质量参数分数为60;若信号质量参数在大于等于70小于等于100的区间,则Wi-Fi信号质量参数分数为80。As shown in Table 1, if the signal quality parameter is in the range of greater than 0 and less than 30, the Wi-Fi signal quality parameter score is 0; if the signal quality parameter is in the range of greater than or equal to 30 and less than 50, the Wi-Fi signal quality parameter score is 20; if the signal quality parameter is in the range of greater than or equal to 50 and less than 70, the Wi-Fi signal quality parameter score is 60; if the signal quality parameter is in the range of greater than or equal to 70 and less than or equal to 100, the Wi-Fi signal quality parameter score is 80.
表2示出了一种Wi-Fi频段评分的示例性表格。Table 2 shows an exemplary table of Wi-Fi frequency band scores.
表2Table 2
如表2所示,若Wi-F i频段参数在2.4GHz,则Wi-F i频段分数为20;若Wi-F i频段参数在5GHz,则Wi-F i频段分数为50。As shown in Table 2, if the Wi-Fi i frequency band parameter is 2.4 GHz, the Wi-Fi i frequency band score is 20; if the Wi-Fi i frequency band parameter is 5 GHz, the Wi-Fi i frequency band score is 50.
表3示出了一种Wi-F i协议类型参数评分的示例性表格。Table 3 shows an exemplary table of Wi-Fi protocol type parameter scores.
表3Table 3
如表3所示,若Wi-F i协议类型参数为b/a/g/n,则Wi-Fi协议类型参数分数为0;若Wi-Fi协议类型参数为ac,则Wi-Fi协议类型参数分数为5;若Wi-Fi协议类型参数为ax,则Wi-Fi协议类型参数分数为10;若Wi-Fi协议类型参数为be,则Wi-Fi协议类型分数为15。As shown in Table 3, if the Wi-Fi protocol type parameter is b/a/g/n, the Wi-Fi protocol type parameter score is 0; if the Wi-Fi protocol type parameter is ac, the Wi-Fi protocol type parameter score is 5; if the Wi-Fi protocol type parameter is ax, the Wi-Fi protocol type parameter score is 10; if the Wi-Fi protocol type parameter is be, the Wi-Fi protocol type score is 15.
表4示出了一种Wi-F i连接速率参数评分的示例性表格。Table 4 shows an exemplary table of Wi-Fi connection rate parameter scores.
表4Table 4
如表4所示,若Wi-Fi连接速率参数在大于等于0小于287的区间,则Wi-Fi连接速率参数分数为0;若Wi-Fi连接速率参数在大于等于287小于574的区间,则Wi-Fi连接速率参数分数为5;若Wi-Fi连接速率参数在大于等于574小于1201的区间,则Wi-Fi连接速率参数分数为10;若Wi-Fi连接速率参数大于等于1201,则Wi-Fi连接速率参数分数为15。As shown in Table 4, if the Wi-Fi connection rate parameter is in the range of greater than or equal to 0 and less than 287, the Wi-Fi connection rate parameter score is 0; if the Wi-Fi connection rate parameter is in the range of greater than or equal to 287 and less than 574, the Wi-Fi connection rate parameter score is 5; if the Wi-Fi connection rate parameter is in the range of greater than or equal to 574 and less than 1201, the Wi-Fi connection rate parameter score is 10; if the Wi-Fi connection rate parameter is greater than or equal to 1201, the Wi-Fi connection rate parameter score is 15.
表5示出了一种Wi-Fi协议安全评分的示例性表格。Table 5 shows an exemplary table of Wi-Fi protocol security scores.
表5Table 5
如表5所示,若Wi-Fi协议安全参数为安全,则Wi-Fi协议安全参数分数为40;若Wi-Fi协议安全参数为开放,则Wi-Fi协议安全参数分数为0。As shown in Table 5, if the Wi-Fi protocol security parameter is secure, the Wi-Fi protocol security parameter score is 40; if the Wi-Fi protocol security parameter is open, the Wi-Fi protocol security parameter score is 0.
在一些实施例中,已知Wi-F i可以为信号强度大于或等于预设信号强度阈值的Wi-F i。预设信号强度阈值可以为-75dbm。In some embodiments, the known Wi-Fi may be a Wi-Fi whose signal strength is greater than or equal to a preset signal strength threshold. The preset signal strength threshold may be -75dbm.
在一些实施例中,笔记本电脑100可以通过操作系统提供的一些公共接口能够获取连接Wi-Fi的Wi-Fi协议类型参数、Wi-Fi连接速率参数、Wi-Fi信号质量参数、Wi-Fi信号强度参数、Wi-Fi安全参数等Wi-Fi参数内容。In some embodiments, the laptop computer 100 can obtain Wi-Fi parameter contents such as Wi-Fi protocol type parameters, Wi-Fi connection rate parameters, Wi-Fi signal quality parameters, Wi-Fi signal strength parameters, and Wi-Fi security parameters for connecting to Wi-Fi through some public interfaces provided by the operating system.
1)通过操作系统公共接口:Wl anQueryI nterface函数,将参数OpCode设置为wlan_intf_opcode_current_connect ion,可用于获取当前连接Wi-Fi的Wi-Fi协议类型参数、Wi-Fi连接速率参数、Wi-Fi信号质量参数、Wi-Fi安全参数。1) Through the operating system public interface: WlanQueryInterface function, set the parameter OpCode to wlan_intf_opcode_current_connection, which can be used to obtain the Wi-Fi protocol type parameters, Wi-Fi connection rate parameters, Wi-Fi signal quality parameters, and Wi-Fi security parameters of the current Wi-Fi connection.
2)通过操作系统公共接口:Wl anQueryI nterface函数,将参数OpCode设置为wlan_intf_opcode_channe l_number,可用于获取当前连接Wi-FiWi-Fi的信道,根据信道可以映射到频段参数。2) Through the operating system public interface: WlanQueryInterface function, set the parameter OpCode to wlan_intf_opcode_channel_number, which can be used to obtain the channel of the current Wi-Fi connection, and the channel can be mapped to the frequency band parameters.
3)通过操作系统公共接口:Wl anQueryI nterface函数,将参数OpCode设置为wlan_intf_opcode_rss i,可用于获取当前连接Wi-Fi的Wi-Fi信号强度参数。3) Through the operating system public interface: WlanQueryInterface function, set the parameter OpCode to wlan_intf_opcode_rssi, which can be used to obtain the Wi-Fi signal strength parameters of the currently connected Wi-Fi.
步骤802:笔记本电脑100的第三方应用根据已知Wi-Fi中各Wi-Fi的Wi-Fi质量指标,对已知Wi-Fi中各Wi-Fi的连接优先级进行排名。Step 802: The third-party application of the notebook computer 100 ranks the connection priority of each Wi-Fi among the known Wi-Fi according to the Wi-Fi quality indicator of each Wi-Fi among the known Wi-Fi.
具体的,在一些实施例中,笔记本电脑100可以将已知Wi-Fi中各Wi-Fi的Wi-Fi质量指标按照从高到低的顺序进行排名,然后,笔记本电脑再按照Wi-Fi质量指标从高到低的排名,赋予Wi-Fi的连接优先级从高到低的排名。Specifically, in some embodiments, the laptop computer 100 may rank the Wi-Fi quality indicators of each Wi-Fi in the known Wi-Fi in order from high to low, and then the laptop computer assigns connection priorities to the Wi-Fi in order from high to low according to the ranking of the Wi-Fi quality indicators from high to low.
步骤803:笔记本电脑100的第三方应用基于已知Wi-Fi中各Wi-Fi的连接优先级的排名,确定最优Wi-Fi。Step 803: The third-party application of the notebook computer 100 determines the optimal Wi-Fi based on the ranking of the connection priority of each Wi-Fi among the known Wi-Fis.
笔记本电脑100可以将已知Wi-Fi中,各Wi-Fi的连接优先级排名第一的Wi-Fi确定最优Wi-Fi。The notebook computer 100 may determine the optimal Wi-Fi network from among the known Wi-Fi networks, the Wi-Fi network having the highest connection priority among the Wi-Fi networks.
例如,如图10所示,笔记本电脑100可以将Wi-Fi-F确定为最优Wi-Fi。For example, as shown in FIG. 10 , the notebook computer 100 may determine Wi-Fi-F as the optimal Wi-Fi.
网路可以按照网络覆盖范围的不同划分为广域网、局域网和城域网等。拓宽电子设备的上网范围,可以提高用户的上网体验。在其他一些实施例中,电子设备可以优先连接扫描到的Wi-Fi中具有与广域网进行通信的能力的网络,且连接优先级较靠前的Wi-Fi。连接优先级为根据前述方案确定的连接优先级。The network can be divided into wide area network, local area network and metropolitan area network according to the different network coverage. Broadening the Internet access range of electronic devices can improve the user's Internet experience. In some other embodiments, the electronic device can preferentially connect to the network with the ability to communicate with the wide area network among the scanned Wi-Fi, and the Wi-Fi with a higher connection priority. The connection priority is the connection priority determined according to the above scheme.
具体的,图11示出了一种最优Wi-Fi确认的流程示意图。如图11所示,该流程包括如下步骤:Specifically, Figure 11 shows a schematic diagram of a process of optimal Wi-Fi confirmation. As shown in Figure 11, the process includes the following steps:
步骤1101:笔记本电脑100的第三方应用判断已知Wi-Fi中是否包括具有与广域网进行通信的能力的Wi-Fi。Step 1101 : The third-party application of the notebook computer 100 determines whether the known Wi-Fi networks include a Wi-Fi network capable of communicating with a wide area network.
若已知Wi-Fi中包括至少一个具有与广域网进行通信的能力的Wi-Fi,则根据已知Wi-Fi中的具有与广域网进行通信的能力的Wi-Fi的Wi-Fi参数,确定已知Wi-Fi中具有与广域网进行通信的能力的Wi-Fi的Wi-Fi质量指标,即执行步骤1102;若已知Wi-Fi中不包括具有与广域网进行通信的能力的Wi-Fi,则根据已知Wi-Fi中的不具有与广域网进行通信的能力的Wi-Fi的Wi-Fi参数,确定已知Wi-Fi中不具有与广域网进行通信的能力的Wi-Fi的Wi-Fi质量指标,即执行步骤1105。If the known Wi-Fis include at least one Wi-Fi having the capability to communicate with a wide area network, a Wi-Fi quality indicator of the Wi-Fi having the capability to communicate with a wide area network among the known Wi-Fis is determined according to the Wi-Fi parameters of the Wi-Fi having the capability to communicate with a wide area network among the known Wi-Fis, that is, step 1102 is executed; if the known Wi-Fis do not include a Wi-Fi having the capability to communicate with a wide area network, a Wi-Fi quality indicator of the Wi-Fi having no capability to communicate with a wide area network among the known Wi-Fis is determined according to the Wi-Fi parameters of the Wi-Fi having no capability to communicate with a wide area network among the known Wi-Fis, that is, step 1105 is executed.
在一些实施例中,笔记本电脑100可以通过探测公共服务器等方式判断当前连接Wi-Fi是否为具有与广域网进行通信的能力的Wi-Fi。比如笔记本电脑100向搜索引擎域名系统服务器发送互联网控制消息协议(Internet Control Message Protocol,ICMP)请求,笔记本电脑100接收ICMP响应判断Wi-Fi是否为具有与广域网进行通信的能力的Wi-Fi;笔记本电脑100也可以通过给笔记本电脑100连接性检测云服务器发送HTTP请求,笔记本电脑100接收HTTP响应,根据HTTP响应码判断是否可上网,若可上网,则确定Wi-Fi为具有与广域网进行通信的能力的Wi-Fi。In some embodiments, the laptop computer 100 can determine whether the currently connected Wi-Fi is a Wi-Fi capable of communicating with a wide area network by detecting a public server or the like. For example, the laptop computer 100 sends an Internet Control Message Protocol (ICMP) request to a search engine domain name system server, and the laptop computer 100 receives an ICMP response to determine whether the Wi-Fi is a Wi-Fi capable of communicating with a wide area network; the laptop computer 100 can also send an HTTP request to a cloud server for detecting the connectivity of the laptop computer 100, and the laptop computer 100 receives an HTTP response, and determines whether the Internet is available based on the HTTP response code. If the Internet is available, it is determined that the Wi-Fi is a Wi-Fi capable of communicating with a wide area network.
在一些实施例中,已知Wi-Fi可以为信号强度大于或等于预设信号强度阈值的Wi-Fi。预设信号强度阈值可以为-75dbm。In some embodiments, the known Wi-Fi may be a Wi-Fi whose signal strength is greater than or equal to a preset signal strength threshold. The preset signal strength threshold may be -75dbm.
步骤1102:笔记本电脑100的第三方应用根据已知Wi-Fi中的具有与广域网进行通信的能力的Wi-Fi的Wi-Fi参数,确定已知Wi-Fi中具有与广域网进行通信的能力的Wi-Fi的Wi-Fi质量指标。Step 1102: The third-party application of the notebook computer 100 determines a Wi-Fi quality indicator of the known Wi-Fi capable of communicating with the wide area network according to the Wi-Fi parameters of the known Wi-Fi capable of communicating with the wide area network.
具有与广域网进行通信的能力的Wi-Fi的Wi-Fi质量指标与前述Wi-Fi质量指标的确定方案相同,在此不再赘述。The Wi-Fi quality indicator of the Wi-Fi capable of communicating with the wide area network is the same as the determination scheme of the aforementioned Wi-Fi quality indicator, which is not repeated here.
步骤1103:笔记本电脑100的第三方应用根据已知Wi-Fi中具有与广域网进行通信的能力的Wi-Fi的Wi-Fi质量指标,对已知Wi-Fi中具有与广域网进行通信的能力的Wi-Fi的连接优先级进行排名。Step 1103: The third-party application of the notebook computer 100 ranks the connection priorities of the known Wi-Fi networks capable of communicating with the wide area network according to the Wi-Fi quality indicators of the known Wi-Fi networks capable of communicating with the wide area network.
具有与广域网进行通信的能力的Wi-Fi的连接优先级排名与前述Wi-Fi连接优先级排名的连接优先级排名方案相同,在此不再赘述。The connection priority ranking of the Wi-Fi capable of communicating with the wide area network is the same as the connection priority ranking scheme of the aforementioned Wi-Fi connection priority ranking, and will not be repeated here.
步骤1104:笔记本电脑100的第三方应用基于已知Wi-Fi中的所有具有与广域网进行通信的能力的Wi-Fi的连接优先级的排名,确定最优Wi-Fi。Step 1104 : The third-party application of the notebook computer 100 determines the optimal Wi-Fi based on the ranking of the connection priorities of all Wi-Fis among the known Wi-Fis that have the ability to communicate with the wide area network.
具有与广域网进行通信的能力的Wi-Fi中最优Wi-Fi的确定与前述最优Wi-Fi的确定方案相同,在此不再赘述。The determination of the optimal Wi-Fi among the Wi-Fis capable of communicating with the wide area network is the same as the aforementioned determination scheme of the optimal Wi-Fi, which will not be described in detail here.
步骤1105:笔记本电脑100的第三方应用根据已知Wi-Fi中的不具有与广域网进行通信的能力的Wi-Fi的Wi-Fi参数,确定已知Wi-Fi中不具有与广域网进行通信的能力的Wi-Fi的Wi-Fi质量指标。Step 1105: The third-party application of the notebook computer 100 determines the Wi-Fi quality indicator of the known Wi-Fi network that does not have the ability to communicate with the wide area network according to the Wi-Fi parameters of the known Wi-Fi network that does not have the ability to communicate with the wide area network.
不具有与广域网进行通信的能力的Wi-Fi的Wi-Fi质量指标与前述Wi-Fi质量指标的确定方案相同,在此不再赘述。The Wi-Fi quality indicator of the Wi-Fi that does not have the ability to communicate with the wide area network is the same as the determination scheme of the aforementioned Wi-Fi quality indicator, which is not repeated here.
步骤1106:笔记本电脑100的第三方应用根据已知Wi-Fi中不具有与广域网进行通信的能力的Wi-Fi的Wi-Fi质量指标,对已知Wi-Fi中不具有与广域网进行通信的能力的Wi-Fi的连接优先级进行排名。Step 1106 : The third-party application of the notebook computer 100 ranks the connection priorities of the known Wi-Fi networks that do not have the ability to communicate with the wide area network according to the Wi-Fi quality indicators of the known Wi-Fi networks that do not have the ability to communicate with the wide area network.
不具有与广域网进行通信的能力的Wi-Fi的连接优先级排名与前述Wi-Fi连接优先级排名的连接优先级排名方案相同,在此不再赘述。The connection priority ranking of Wi-Fi that does not have the ability to communicate with a wide area network is the same as the connection priority ranking scheme of the aforementioned Wi-Fi connection priority ranking, and will not be repeated here.
步骤1107:笔记本电脑100的第三方应用基于已知Wi-Fi中的所有不具有与广域网进行通信的能力的Wi-Fi的连接优先级的排名确定最优Wi-Fi。Step 1107 : The third-party application of the notebook computer 100 determines the optimal Wi-Fi based on the ranking of the connection priorities of all Wi-Fis that do not have the ability to communicate with the wide area network among the known Wi-Fis.
不具有与广域网进行通信的能力的Wi-Fi的Wi-Fi质量指标与前述Wi-Fi质量指标的确定方案相同,在此不再赘述。The Wi-Fi quality indicator of the Wi-Fi that does not have the ability to communicate with the wide area network is the same as the determination scheme of the aforementioned Wi-Fi quality indicator, which is not repeated here.
可以理解的是,笔记本电脑100也可以根据Wi-Fi参数确定已知Wi-Fi的Wi-Fi质量指标,根据Wi-Fi质量指标对连接优先级进行排名,基于排名的连接优先级确定最优Wi-Fi。具体方案跟上述目标网路的判断标准相同,再次不再赘述。It is understandable that the laptop computer 100 can also determine the Wi-Fi quality index of the known Wi-Fi according to the Wi-Fi parameters, rank the connection priorities according to the Wi-Fi quality index, and determine the optimal Wi-Fi based on the ranked connection priorities. The specific solution is the same as the judgment criteria of the above-mentioned target network, and will not be repeated again.
本申请实施例中,最优Wi-Fi可以为连接优先级排名第一的Wi-Fi。In the embodiment of the present application, the optimal Wi-Fi may be the Wi-Fi with the highest connection priority.
本步骤中,笔记本电脑100的第三方应用从已知Wi-Fi中确定最优Wi-Fi的各种方案可以统称为第一方式。In this step, various solutions for the third-party application of the notebook computer 100 to determine the optimal Wi-Fi from known Wi-Fi can be collectively referred to as a first approach.
本申请实施例中,本步骤中,最优Wi-Fi为按照第一方式确定的连接优先级排名第一的Wi-Fi。最优Wi-Fi及其他目标无线局域网也可以称为第一目标局域网。In the embodiment of the present application, in this step, the optimal Wi-Fi is the Wi-Fi with the highest connection priority determined in the first manner. The optimal Wi-Fi and other target wireless local area networks may also be referred to as first target local area networks.
步骤610:笔记本电脑100的第三方应用控制笔记本电脑100与最优Wi-Fi进行连接。Step 610: The third-party application of the notebook computer 100 controls the notebook computer 100 to connect to the optimal Wi-Fi.
例如,图12示出了一种已知Wi-Fi的Wi-Fi连接优先级的排名示意图。如图12所示,已知Wi-Fi包括Wi-Fi-A、Wi-Fi-B、Wi-Fi-C、Wi-Fi-E和Wi-Fi-F。若Wi-Fi-A、Wi-Fi-B、Wi-Fi-C、Wi-Fi-E和Wi-Fi-F按照第三方应用中的质量指标确定方案得到的Wi-Fi质量指标分别为90、110、105、95、150,则Wi-Fi的连接优先级排名是:Wi-Fi-A的连接优先级排名为第五,Wi-Fi-B的连接优先级排名为第二,Wi-Fi-C的连接优先级排名为第三,Wi-Fi-E的连接优先级排名为第四,Wi-Fi-F的连接优先级排名为第一。Wi-Fi-F为已知Wi-Fi中的最优Wi-Fi。笔记本电脑100的第三方应用控制笔记本电脑100与Wi-Fi-F进行连接。For example, FIG12 shows a schematic diagram of the ranking of Wi-Fi connection priorities of a known Wi-Fi. As shown in FIG12, known Wi-Fi includes Wi-Fi-A, Wi-Fi-B, Wi-Fi-C, Wi-Fi-E, and Wi-Fi-F. If the Wi-Fi quality indicators obtained by Wi-Fi-A, Wi-Fi-B, Wi-Fi-C, Wi-Fi-E, and Wi-Fi-F according to the quality indicator determination scheme in the third-party application are 90, 110, 105, 95, and 150, respectively, then the connection priority ranking of Wi-Fi is: Wi-Fi-A is ranked fifth in connection priority, Wi-Fi-B is ranked second in connection priority, Wi-Fi-C is ranked third in connection priority, Wi-Fi-E is ranked fourth in connection priority, and Wi-Fi-F is ranked first in connection priority. Wi-Fi-F is the best Wi-Fi among the known Wi-Fi. The third-party application of the laptop computer 100 controls the laptop computer 100 to connect to Wi-Fi-F.
在一些实施例中,若笔记本电脑100与最优Wi-Fi连接失败的情况下,还可以与次优的Wi-Fi进行连接,例如,次优的Wi-Fi可以是连接优先级排名第二的Wi-Fi。In some embodiments, if the laptop computer 100 fails to connect to the optimal Wi-Fi, it may also connect to the suboptimal Wi-Fi. For example, the suboptimal Wi-Fi may be the Wi-Fi with the second highest connection priority.
步骤611:笔记本电脑100的操作系统根据Wi-Fi参数确定可自动连接Wi-Fi的Wi-Fi质量指标,基于可自动连接Wi-Fi的Wi-Fi质量指标确定目标Wi-Fi。Step 611: The operating system of the notebook computer 100 determines a Wi-Fi quality indicator for automatically connecting to the Wi-Fi according to the Wi-Fi parameters, and determines a target Wi-Fi based on the Wi-Fi quality indicator for automatically connecting to the Wi-Fi.
本步骤中,笔记本电脑100的操作系统根据Wi-Fi参数确定可自动连接Wi-Fi的Wi-Fi质量指标,基于可自动连接Wi-Fi的Wi-Fi质量指标确定目标Wi-Fi的方案可以统称为第二方式。第二方式中与第一方式中确定目标Wi-Fi的方案相同,但第二方式中的网络参数与第一方式中的网络参数不同,第一方式中的网络参数包括网络信号强度参数、网络信号质量参数、网络频段参数、网络协议参数、网络连接速率或网络协议安全参数中的任意组合;第二方式中的网络参数包括网络信号强度参数。In this step, the operating system of the laptop computer 100 determines the Wi-Fi quality indicator that can automatically connect to the Wi-Fi based on the Wi-Fi parameters, and the scheme for determining the target Wi-Fi based on the Wi-Fi quality indicator that can automatically connect to the Wi-Fi can be collectively referred to as the second method. The scheme for determining the target Wi-Fi in the second method is the same as that in the first method, but the network parameters in the second method are different from the network parameters in the first method. The network parameters in the first method include any combination of network signal strength parameters, network signal quality parameters, network frequency band parameters, network protocol parameters, network connection rate, or network protocol security parameters; the network parameters in the second method include network signal strength parameters.
本申请实施例中,本步骤中,目标Wi-Fi为按照第二方式确定的连接优先级排名第一的Wi-Fi。目标Wi-Fi及其他目标无线局域网也可以称为第二目标局域网。In the embodiment of the present application, in this step, the target Wi-Fi is the Wi-Fi with the first connection priority determined in the second manner. The target Wi-Fi and other target wireless local area networks may also be referred to as second target local area networks.
例如,图10示出了一种可自动连接Wi-Fi的Wi-Fi连接优先级的排名示意图。如图10所示,已知Wi-Fi包括Wi-Fi-A、Wi-Fi-B、Wi-Fi-C、Wi-Fi-E和Wi-Fi-F。可自动连接的Wi-Fi包括Wi-Fi-B、Wi-Fi-C和Wi-Fi-F。Wi-Fi-B、Wi-Fi-C和Wi-Fi-F按照第二种方式得到的Wi-Fi质量总分数分别为110、105、150。则Wi-Fi的连接优先级排名是:Wi-Fi-B的连接优先级排名为第二,Wi-Fi-C的连接优先级排名为第三,Wi-Fi-F的连接优先级排名为第一。For example, FIG10 shows a schematic diagram of the ranking of Wi-Fi connection priorities that can automatically connect to Wi-Fi. As shown in FIG10, known Wi-Fi includes Wi-Fi-A, Wi-Fi-B, Wi-Fi-C, Wi-Fi-E, and Wi-Fi-F. The Wi-Fi that can automatically connect includes Wi-Fi-B, Wi-Fi-C, and Wi-Fi-F. The total Wi-Fi quality scores obtained by Wi-Fi-B, Wi-Fi-C, and Wi-Fi-F in the second way are 110, 105, and 150, respectively. Then the connection priority ranking of Wi-Fi is: Wi-Fi-B is ranked second in connection priority, Wi-Fi-C is ranked third in connection priority, and Wi-Fi-F is ranked first in connection priority.
步骤612:笔记本电脑100的操作系统控制笔记本电脑100连接目标Wi-Fi。Step 612: The operating system of the notebook computer 100 controls the notebook computer 100 to connect to the target Wi-Fi.
例如,笔记本电脑100的操作系统控制笔记本电脑100连接Wi-Fi-F。For example, the operating system of the notebook computer 100 controls the notebook computer 100 to connect to Wi-Fi-F.
相关技术中,笔记本电脑100的操作系统保存有可自动连接Wi-Fi的已知Wi-Fi,如果这些可自动连接Wi-Fi的已知Wi-Fi未成功连接到,有其它可连接的已知Wi-Fi时,Wi-Fi连接处于断开状态,操作系统会高频率定期扫描,以便进入这些可自动连接Wi-Fi的已知Wi-Fi范围时可以快速的自动连接到,而频繁扫描会增加笔记本电脑100中无线Wi-Fi适配器的功耗。本申请实施中,笔记本电脑100可以连接上这些已知Wi-Fi,操作系统就不再触发这些扫描,降低了笔记本电脑100的功耗。In the related art, the operating system of the laptop computer 100 stores known Wi-Fis that can automatically connect to Wi-Fi. If these known Wi-Fis that can automatically connect to Wi-Fi are not successfully connected to, and there are other known Wi-Fis that can be connected, the Wi-Fi connection is in a disconnected state, and the operating system will scan regularly at a high frequency so that it can quickly and automatically connect to these known Wi-Fis that can automatically connect to Wi-Fis when entering the range of these known Wi-Fis that can automatically connect to Wi-Fis. Frequent scanning will increase the power consumption of the wireless Wi-Fi adapter in the laptop computer 100. In the implementation of this application, the laptop computer 100 can connect to these known Wi-Fis, and the operating system will no longer trigger these scans, thereby reducing the power consumption of the laptop computer 100.
步骤613:笔记本电脑100的操作系统判断目标Wi-Fi是否连接成功。Step 613: The operating system of the notebook computer 100 determines whether the target Wi-Fi connection is successful.
笔记本电脑100判断目标Wi-Fi是否连接成功,若目标Wi-Fi连接成功,为了提升用户使用体验,使用户用到质量较好的Wi-Fi,笔记本电脑100还可以判断目标Wi-Fi是否为已知Wi-Fi中的最优Wi-Fi,首先,笔记本电脑100的操作系统向第三方应用发送Wi-Fi连接成功的信息,以使第三方应用从已知Wi-Fi中确定最优Wi-Fi,即执行步骤614。若目标Wi-Fi连接失败,则控制笔记本电脑100保持Wi-Fi断开状态,向第三方应用发送Wi-Fi扫描结果中具有已知Wi-Fi的信息,即执行步骤606。The laptop computer 100 determines whether the target Wi-Fi is successfully connected. If the target Wi-Fi is successfully connected, in order to improve the user experience and allow the user to use Wi-Fi with better quality, the laptop computer 100 can also determine whether the target Wi-Fi is the best Wi-Fi among the known Wi-Fi. First, the operating system of the laptop computer 100 sends the information of successful Wi-Fi connection to the third-party application, so that the third-party application can determine the best Wi-Fi from the known Wi-Fi, that is, execute step 614. If the target Wi-Fi connection fails, the laptop computer 100 is controlled to keep the Wi-Fi disconnected state, and the information of the known Wi-Fi in the Wi-Fi scan result is sent to the third-party application, that is, execute step 606.
在一些实施例中,若笔记本电脑100与目标Wi-Fi连接失败的情况下,还可以与次优的Wi-Fi进行连接,例如,次优的Wi-Fi可以是连接优先级排名第二的Wi-Fi。在笔记本电脑100与次优的Wi-Fi连接失败的情况下,控制笔记本电脑100保持Wi-Fi断开状态,向第三方应用发送Wi-Fi扫描结果中具有已知Wi-Fi的信息;在笔记本电脑100与次优的Wi-Fi连接成功的情况下,笔记本电脑100的操作系统向第三方应用发送Wi-Fi连接成功的信息,以使第三方应用从已知Wi-Fi中确定最优Wi-Fi。In some embodiments, if the laptop computer 100 fails to connect to the target Wi-Fi, it can also connect to the suboptimal Wi-Fi, for example, the suboptimal Wi-Fi can be the Wi-Fi with the second highest connection priority. In the case that the laptop computer 100 fails to connect to the suboptimal Wi-Fi, the laptop computer 100 is controlled to keep the Wi-Fi disconnected, and the information of the known Wi-Fi in the Wi-Fi scan result is sent to the third-party application; in the case that the laptop computer 100 successfully connects to the suboptimal Wi-Fi, the operating system of the laptop computer 100 sends the information of the successful Wi-Fi connection to the third-party application, so that the third-party application can determine the optimal Wi-Fi from the known Wi-Fi.
步骤614:笔记本电脑100的操作系统向第三方应用发送Wi-Fi连接成功的信息。Step 614: The operating system of the notebook computer 100 sends a message indicating that the Wi-Fi connection is successful to the third-party application.
步骤615:笔记本电脑100的第三方应用接收到第三方应用发送的Wi-Fi连接成功的信息,笔记本电脑100的第三方应用从Wi-Fi扫描结果中确定已知Wi-Fi。Step 615: the third-party application of the notebook computer 100 receives the Wi-Fi connection success information sent by the third-party application, and the third-party application of the notebook computer 100 determines the known Wi-Fi from the Wi-Fi scanning result.
本步骤中,从Wi-Fi扫描结果中确定已知Wi-Fi的技术方案与步骤608中的技术方案相同,在此不再赘述。In this step, the technical solution for determining the known Wi-Fi from the Wi-Fi scanning result is the same as the technical solution in step 608, which will not be repeated here.
可以理解的是,在一些实施例中,笔记本电脑100的第三方应用可以向操作系统申请注册事件监听回调,操作系统同意注册事件监听回调后,笔记本电脑100的操作系统便可以将监听到的Wi-Fi信息以及一些触发信息发送至第三方应用。It is understandable that in some embodiments, a third-party application of the laptop computer 100 can apply to the operating system to register an event monitoring callback. After the operating system agrees to register the event monitoring callback, the operating system of the laptop computer 100 can send the monitored Wi-Fi information and some trigger information to the third-party application.
又如,笔记本电脑100检测到Wi-Fi连接成功,会向第三方应用发送Wi-Fi连接成功的信息,Wi-Fi连接成功的信息包括wlan_notification_acm_connection_complete事件,wlan_notification_acm_connection_complete事件用于表示Wi-Fi连接成功。For another example, when the laptop computer 100 detects that the Wi-Fi connection is successful, it will send information about the successful Wi-Fi connection to the third-party application. The information about the successful Wi-Fi connection includes a wlan_notification_acm_connection_complete event. The wlan_notification_acm_connection_complete event is used to indicate that the Wi-Fi connection is successful.
步骤616:笔记本电脑100的第三方应用从已知Wi-Fi中确定最优Wi-Fi。Step 616: The third-party application of the notebook computer 100 determines the best Wi-Fi from the known Wi-Fi.
本步骤的技术方案与步骤609中的技术方案相同,在此不再赘述。The technical solution of this step is the same as that in step 609 and will not be repeated here.
本步骤中,笔记本电脑100的第三方应用从已知Wi-Fi中确定最优Wi-Fi的各种方案可以统称为第一方式。In this step, various solutions for the third-party application of the notebook computer 100 to determine the optimal Wi-Fi from known Wi-Fi can be collectively referred to as a first approach.
本申请实施例中,本步骤中,最优Wi-Fi为按照第一方式确定的连接优先级排名第一的Wi-Fi。最优Wi-Fi及其他目标无线局域网也可以称为第三目标局域网。In the embodiment of the present application, in this step, the optimal Wi-Fi is the Wi-Fi with the highest connection priority determined in the first manner. The optimal Wi-Fi and other target wireless local area networks may also be referred to as third target local area networks.
步骤617:笔记本电脑100的第三方应用判断目标Wi-Fi是否为已知Wi-Fi中的最优Wi-Fi。Step 617: The third-party application of the notebook computer 100 determines whether the target Wi-Fi is the best Wi-Fi among the known Wi-Fi.
笔记本电脑100判断目标Wi-Fi是否为已知Wi-Fi中的最优Wi-Fi,若目标Wi-Fi为已知Wi-Fi中的最优Wi-Fi,则结束,若目标Wi-Fi不是已知Wi-Fi中的最优Wi-Fi,则进一步控制笔记本电脑100连接已知Wi-Fi中的最优Wi-Fi,即执行步骤618。The laptop computer 100 determines whether the target Wi-Fi is the best Wi-Fi among the known Wi-Fis. If the target Wi-Fi is the best Wi-Fi among the known Wi-Fis, the process ends. If the target Wi-Fi is not the best Wi-Fi among the known Wi-Fis, the laptop computer 100 is further controlled to connect to the best Wi-Fi among the known Wi-Fis, that is, step 618 is executed.
例如,图12示出了一种已知Wi-Fi的Wi-Fi连接优先级的排名示意图。如图12所示,已知Wi-Fi包括Wi-Fi-A、Wi-Fi-B、Wi-Fi-C、Wi-Fi-E和Wi-Fi-F。若Wi-Fi-A、Wi-Fi-B、Wi-Fi-C、Wi-Fi-E和Wi-Fi-F按照第三方应用中的质量指标确定方案得到的Wi-Fi质量指标分别为90、110、105、95、150,则Wi-Fi的连接优先级排名是:Wi-Fi-A的连接优先级排名为第五,Wi-Fi-B的连接优先级排名为第二,Wi-Fi-C的连接优先级排名为第三,Wi-Fi-E的连接优先级排名为第四,Wi-Fi-F的连接优先级排名为第一。Wi-Fi-F为已知Wi-Fi中的最优Wi-Fi。若笔记本电脑100判断Wi-Fi-F为已知Wi-Fi中的最优Wi-Fi:Wi-Fi-F,则结束。For example, FIG12 shows a schematic diagram of ranking Wi-Fi connection priorities of a known Wi-Fi. As shown in FIG12, known Wi-Fi includes Wi-Fi-A, Wi-Fi-B, Wi-Fi-C, Wi-Fi-E, and Wi-Fi-F. If the Wi-Fi quality indicators obtained by Wi-Fi-A, Wi-Fi-B, Wi-Fi-C, Wi-Fi-E, and Wi-Fi-F according to the quality indicator determination scheme in the third-party application are 90, 110, 105, 95, and 150, respectively, then the connection priority ranking of Wi-Fi is: Wi-Fi-A is ranked fifth in connection priority, Wi-Fi-B is ranked second in connection priority, Wi-Fi-C is ranked third in connection priority, Wi-Fi-E is ranked fourth in connection priority, and Wi-Fi-F is ranked first in connection priority. Wi-Fi-F is the best Wi-Fi among the known Wi-Fi. If the laptop computer 100 determines that Wi-Fi-F is the best Wi-Fi among the known Wi-Fi: Wi-Fi-F, then the connection priority ranking is ended.
又如,图13示出了一种可自动连接的Wi-Fi的Wi-Fi连接优先级的排名示意图。如图13所示,已知Wi-Fi包括Wi-Fi-A、Wi-Fi-B、Wi-Fi-C、Wi-Fi-E和Wi-Fi-F。可自动连接的Wi-Fi为Wi-Fi-B和Wi-Fi-C,Wi-Fi-B和Wi-Fi-C按照操作系统中的质量指标确定方案得到的Wi-Fi质量指标分别为110、105,则Wi-Fi的连接优先级排名是:Wi-Fi-B的连接优先级排名为第一,Wi-Fi-C的连接优先级排名为第二。Wi-Fi-B为目标Wi-Fi。As another example, FIG13 shows a schematic diagram of the ranking of Wi-Fi connection priorities of a Wi-Fi that can be automatically connected. As shown in FIG13 , it is known that Wi-Fi includes Wi-Fi-A, Wi-Fi-B, Wi-Fi-C, Wi-Fi-E, and Wi-Fi-F. The Wi-Fi that can be automatically connected are Wi-Fi-B and Wi-Fi-C. The Wi-Fi quality indicators obtained by Wi-Fi-B and Wi-Fi-C according to the quality indicator determination scheme in the operating system are 110 and 105 respectively. Then, the connection priority ranking of Wi-Fi is: Wi-Fi-B is ranked first in connection priority, and Wi-Fi-C is ranked second in connection priority. Wi-Fi-B is the target Wi-Fi.
笔记本电脑100判断Wi-Fi-B不是已知Wi-Fi中的最优Wi-Fi:Wi-Fi-F,则进一步控制笔记本电脑100连接已知Wi-Fi中的最优Wi-Fi:Wi-Fi-F,即执行步骤618。The laptop computer 100 determines that Wi-Fi-B is not the best Wi-Fi among the known Wi-Fis: Wi-Fi-F, and further controls the laptop computer 100 to connect to the best Wi-Fi among the known Wi-Fis: Wi-Fi-F, that is, executes step 618 .
在一些实施例中,若笔记本电脑100与最优Wi-Fi连接失败的情况下,还可以与次优的Wi-Fi进行连接,例如,次优的Wi-Fi可以是连接优先级排名第二的Wi-Fi。In some embodiments, if the laptop computer 100 fails to connect to the optimal Wi-Fi, it may also connect to the suboptimal Wi-Fi. For example, the suboptimal Wi-Fi may be the Wi-Fi with the second highest connection priority.
步骤618:笔记本电脑100的第三方应用控制笔记本电脑100与最优Wi-Fi进行连接。Step 618: The third-party application of the notebook computer 100 controls the notebook computer 100 to connect to the optimal Wi-Fi.
本申请实施例还提供一种计算机可读存储介质,该计算机存储介质包括计算机指令,当所述计算机指令在上述移动终端上运行时,使得该移动终端执行上述方法实施例中笔记本电脑100执行的各个功能或者步骤。The embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned mobile terminal, the mobile terminal executes each function or step executed by the laptop computer 100 in the above-mentioned method embodiment.
本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行上述方法实施例中笔记本电脑100执行的各个功能或者步骤。该计算机可以是上述移动终端(如笔记本电脑100)。The present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps executed by the laptop computer 100 in the above method embodiment. The computer may be the above mobile terminal (such as the laptop computer 100).
本申请公开的机制的各实施例可以被实现在硬件、软件、固件或这些实现方法的组合中。本申请的实施例可实现为在可编程系统上执行的计算机程序或程序代码,该可编程系统包括至少一个处理器、存储系统(包括易失性和非易失性存储器和/或存储元件)、至少一个输入设备以及至少一个输出设备。The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device and at least one output device.
可将程序代码应用于输入指令,以执行本申请描述的各功能并生成输出信息。可以按已知方式将输出信息应用于一个或多个输出设备。为了本申请的目的,处理系统包括具有诸如例如数字信号处理器(Digital Signal Processor,DSP)、微控制器、专用集成电路(Application Specific Integrated Circuit,ASIC)或微处理器之类的处理器的任何系统。Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
程序代码可以用高级程序化语言或面向对象的编程语言来实现,以便与处理系统通信。在需要时,也可用汇编语言或机器语言来实现程序代码。事实上,本申请中描述的机制不限于任何特定编程语言的范围。在任一情形下,该语言可以是编译语言或解释语言。Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
在一些情况下,所公开的实施例可以以硬件、固件、软件或其任何组合来实现。所公开的实施例还可以被实现为由一个或多个暂时或非暂时性机器可读(例如,计算机可读)存储介质承载或存储在其上的指令,其可以由一个或多个处理器读取和执行。例如,指令可以通过网络或通过其他计算机可读存储介质分发。因此,机器可读存储介质可以包括用于以机器(例如,计算机)可读的形式存储或传播信息的任何机制,包括但不限于,软盘、光盘、光碟、只读存储器(CD-ROMs)、磁光盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、可擦除可编程只读存储器(Erasable ProgrammableRead Only Memory,EPROM)、电可擦除可编程只读存储器(Electrically ErasableProgrammable Read-Only Memory,EEPROM)、磁卡或光卡、闪存、或用于基于因特网以电、光、声或其他形式的传播信号来传播信息(例如,载波、红外信号数字信号等)的有形的机器可读存储器。因此,机器可读存储介质包括适合于以机器(例如计算机)可读的形式存储或传播电子指令或信息的任何类型的机器可读存储介质。In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable storage media. Therefore, a machine-readable storage medium may include any mechanism for storing or disseminating information in a machine (e.g., computer) readable form, including but not limited to, a floppy disk, an optical disk, an optical disk, a read-only memory (CD-ROMs), a magneto-optical disk, a read-only memory (ROM), a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic card or an optical card, a flash memory, or a tangible machine-readable memory for disseminating information (e.g., a carrier wave, an infrared signal digital signal, etc.) based on the Internet in an electrical, optical, acoustic, or other form of propagation signal. Accordingly, machine-readable storage media include any type of machine-readable storage media suitable for storing or propagating electronic instructions or information in a form readable by a machine (eg, a computer).
在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。In the accompanying drawings, some structural or method features may be shown in a specific arrangement and/or order. However, it should be understood that such a specific arrangement and/or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and/or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存在其它的单元/模块。It should be noted that the units/modules mentioned in the various device embodiments of the present application are all logical units/modules. Physically, a logical unit/module can be a physical unit/module, or a part of a physical unit/module, or can be implemented as a combination of multiple physical units/modules. The physical implementation method of these logical units/modules themselves is not the most important. The combination of functions implemented by these logical units/modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units/modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units/modules in the above-mentioned device embodiments.
需要说明的是,在本专利的示例和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims (12)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310912323.7A CN117729651B (en) | 2023-07-21 | 2023-07-21 | A network connection method, electronic device and computer readable storage medium |
PCT/CN2024/083121 WO2025020556A1 (en) | 2023-07-21 | 2024-03-21 | Network connection method, electronic device and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310912323.7A CN117729651B (en) | 2023-07-21 | 2023-07-21 | A network connection method, electronic device and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117729651A true CN117729651A (en) | 2024-03-19 |
CN117729651B CN117729651B (en) | 2025-01-17 |
Family
ID=90200384
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310912323.7A Active CN117729651B (en) | 2023-07-21 | 2023-07-21 | A network connection method, electronic device and computer readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117729651B (en) |
WO (1) | WO2025020556A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2025020556A1 (en) * | 2023-07-21 | 2025-01-30 | 荣耀终端有限公司 | Network connection method, electronic device and computer-readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104105169A (en) * | 2014-07-25 | 2014-10-15 | 小米科技有限责任公司 | Method and device for automatically connecting with wireless local area network |
US20170013549A1 (en) * | 2014-06-30 | 2017-01-12 | Tencent Technology (Shenzhen) Company Limited | Method, system and apparatus for automatically connecting to WLAN |
CN107979863A (en) * | 2017-11-27 | 2018-05-01 | 广东欧珀移动通信有限公司 | A WiFi automatic connection method, system and terminal equipment |
CN107995645A (en) * | 2017-11-28 | 2018-05-04 | 广东欧珀移动通信有限公司 | Network connection method, mobile terminal and computer readable storage medium |
CN114765776A (en) * | 2021-01-14 | 2022-07-19 | 青岛海信宽带多媒体技术有限公司 | Method for automatically connecting set top box with WIFI, set top box and storage medium |
CN116456409A (en) * | 2023-03-30 | 2023-07-18 | 广东虹勤通讯技术有限公司 | Method and device for accessing computing equipment to wireless local area network |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012112607A1 (en) * | 2011-02-14 | 2012-08-23 | Devicescape Software, Inc. | Systems and methods for network curation |
US8590023B2 (en) * | 2011-06-30 | 2013-11-19 | Intel Corporation | Mobile device and method for automatic connectivity, data offloading and roaming between networks |
CN106714244B (en) * | 2015-07-20 | 2021-02-09 | 小米科技有限责任公司 | Wireless access method and device of terminal and terminal |
CN108770075A (en) * | 2018-05-29 | 2018-11-06 | 深圳市零度智控科技有限公司 | network connection control method, mobile terminal and computer readable storage medium |
CN112954823B (en) * | 2021-01-29 | 2023-06-27 | Oppo广东移动通信有限公司 | Method for reestablishing data connection, terminal equipment and storage medium |
CN114286454A (en) * | 2022-02-09 | 2022-04-05 | 北京小米移动软件有限公司 | Network connection method, device and storage medium |
CN116017632A (en) * | 2022-12-02 | 2023-04-25 | 深圳康佳电子科技有限公司 | Wi-Fi automatic reconnection method and device, intelligent terminal and storage medium |
CN117729651B (en) * | 2023-07-21 | 2025-01-17 | 荣耀终端有限公司 | A network connection method, electronic device and computer readable storage medium |
-
2023
- 2023-07-21 CN CN202310912323.7A patent/CN117729651B/en active Active
-
2024
- 2024-03-21 WO PCT/CN2024/083121 patent/WO2025020556A1/en unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170013549A1 (en) * | 2014-06-30 | 2017-01-12 | Tencent Technology (Shenzhen) Company Limited | Method, system and apparatus for automatically connecting to WLAN |
CN104105169A (en) * | 2014-07-25 | 2014-10-15 | 小米科技有限责任公司 | Method and device for automatically connecting with wireless local area network |
CN107979863A (en) * | 2017-11-27 | 2018-05-01 | 广东欧珀移动通信有限公司 | A WiFi automatic connection method, system and terminal equipment |
CN107995645A (en) * | 2017-11-28 | 2018-05-04 | 广东欧珀移动通信有限公司 | Network connection method, mobile terminal and computer readable storage medium |
CN114765776A (en) * | 2021-01-14 | 2022-07-19 | 青岛海信宽带多媒体技术有限公司 | Method for automatically connecting set top box with WIFI, set top box and storage medium |
CN116456409A (en) * | 2023-03-30 | 2023-07-18 | 广东虹勤通讯技术有限公司 | Method and device for accessing computing equipment to wireless local area network |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2025020556A1 (en) * | 2023-07-21 | 2025-01-30 | 荣耀终端有限公司 | Network connection method, electronic device and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2025020556A1 (en) | 2025-01-30 |
CN117729651B (en) | 2025-01-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11330650B2 (en) | Wireless connection method and device | |
US20210243831A1 (en) | Method for establishing classic bluetooth connection between dual-mode bluetooth devices, and dual-mode bluetooth device | |
EP3893109B1 (en) | Method and device for connecting bluetooth devices | |
US11129221B2 (en) | Bluetooth connection method, device and smart terminal | |
KR101742985B1 (en) | The method of determining group owner in peer to peer network and the device thereof | |
US9538445B2 (en) | Communication method and apparatus for electronic device in mobile communication system | |
WO2021037250A1 (en) | Network access method and apparatus for wireless local area network (wlan) | |
US10009838B2 (en) | Access point connection method and electronic device thereof | |
US10863559B2 (en) | Method and apparatus for communicating in a wireless communication network | |
CN106658573B (en) | A kind of the transmission power control method and mobile terminal of WLAN | |
US9258672B2 (en) | Short-range wireless communication device | |
CN113556715B (en) | Device connection method and apparatus, computer readable medium and electronic device | |
CN110870353B (en) | WiFi connection method and terminal | |
WO2023065931A1 (en) | Method for charging electronic device, and electronic device | |
WO2021238404A1 (en) | Data card switching method and apparatus, and terminal, and storage medium | |
CN105636041A (en) | Networking method and device for smart devices | |
CN108513715A (en) | Wirelessly communicate matching method, radio receiver and wireless transmitting device, system | |
JP7252259B2 (en) | Access control method, message broadcasting method and related device | |
WO2025020556A1 (en) | Network connection method, electronic device and computer-readable storage medium | |
US20230050458A1 (en) | Cell selection method, cell selection control method and reated device | |
CN116489818A (en) | Device connection method, device connection apparatus, device storage medium and chip | |
CN111371896B (en) | Network acceleration method, terminal and storage medium | |
CN111818642B (en) | Parameter processing method, device and computer readable storage medium | |
US11758594B2 (en) | Communication apparatus, method of controlling the same, and storage medium | |
US20130252555A1 (en) | Apparatus and method for link setup using electric field |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |