Connection method and electronic device
By automatically identifying and saving information about different access points of the same AP device, and using the same key to automatically switch to the optimal frequency band, the problem of users having difficulty manually switching frequency bands is solved, thus improving the internet experience for non-professional users.
Patent Information
- Application Number
- PCT/CN2024/142419
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-07
- Filing Date
- 2024-12-25
- Publication Date
- 2025-12-11
AI Technical Summary
Some routers offer different service set identifiers for access points on different frequency bands, which prevents users from enjoying the better internet experience brought by multi-band capabilities when manually connecting to the network. In particular, non-professional users find it difficult to automatically switch to the optimal frequency band.
Electronic devices can automatically identify different access points provided by the same AP device, save access point information, and automatically connect to the second access point using the same key, thereby automatically switching to the optimal frequency band and reducing the difficulty of user operation.
Even non-professional users can enjoy the complementary advantages of multi-band routers, improve their internet experience, simplify user operation processes, and increase the automation and efficiency of network switching.
Smart Images

Figure CN2024142419_11122025_PF_FP_ABST
Abstract
Description
Connection method and electronic device
[0001] The present application claims priority to the Chinese patent application No. 202410744477.4, filed on June 7, 2024, and entitled "Connection method and electronic device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the technical field of terminals, and in particular to a connection method and an electronic device. BACKGROUND
[0003] With the development of communication technology, a router can provide signals of multiple frequency bands for an electronic device to access, thereby improving communication efficiency and signal stability. For example, a dual-frequency router can provide signals of two frequency bands of 2.4G and 5G, wherein the 2.4G frequency band signal has a large coverage range but a small bandwidth and is prone to interference; the 5G frequency band signal has a small coverage range but a high bandwidth and a high transmission rate. After the electronic device accesses the access points of the two frequency bands provided by the router, the electronic device can adaptively switch to different frequency bands for communication according to needs.
[0004] However, the service set identifiers (SSIDs) of the access points of different frequency bands provided by some routers are not the same. When a user manually accesses a network, the user may not know that the electronic device needs to be manually accessed to the access points of different SSIDs, resulting in that the user cannot enjoy a better online experience brought by the multi-frequency band capability of the router. SUMMARY
[0005] To solve the above technical problems, the present application provides a connection method and an electronic device. The technical scheme provided by the present application can automatically identify different access points provided by the same AP device and save access point information, thereby reducing the operation difficulty of users and enabling non-professional users to easily use the multi-frequency band capability of the AP device.
[0006] To achieve the above technical purposes, the present application provides the following technical scheme:
[0007] In a first aspect, a connection method is provided, applied to an electronic device. The method comprises: establishing a first connection between the electronic device and a first access point, the frequency band of the first access point being a first frequency band; saving second information of a second access point according to first information of the first access point, the frequency band of the second access point being a second frequency band, and the first information comprising a first secret key of the first access point. The first access point and the second access point are access points provided by the same access point (AP) device, the service set identifier (SSID) of the first access point is different from the SSID of the second access point, but the secret keys are the same.
[0008] Thus, the electronic device acquires the second access point belonging to the same AP device as the first access point based on the first access point having established a connection, and saves information of the second access point. In this way, a non-professional user can also experience the complementary advantages brought by the AP device supporting multiple access points, and improve the online experience.
[0009] According to the first aspect, the saving of the second information of the second access point based on the first information of the first access point comprises: establishing a second connection with the second access point based on the first information of the first access point. The second information of the second access point is saved.
[0010] Generally, the keys of the access points provided by the same AP device are the same. Thus, the electronic device can acquire the second access point belonging to the same AP device by verifying the access point through the key of the first access point that has been accessed.
[0011] Thus, the electronic device can determine the access point that can be successfully accessed by the key indicated by the first information as the second access point to be searched for.
[0012] According to the first aspect, or any one of the implementation manners of the first aspect, the saving of the second information of the second access point comprises: saving the second information of the second access point when the second access point is available.
[0013] Alternatively, in some scenarios, the access point is in an unavailable state, such as being unable to provide online services for the electronic device. Thus, even if the electronic device saves the information of the access point in the unavailable state, the electronic device cannot provide online services for the user after accessing the access point subsequently.
[0014] Thus, the electronic device saves the second information when it is determined that the second access point is available, thereby ensuring that the electronic device can provide online services through the second access point after accessing the second access point based on the second information subsequently.
[0015] According to the first aspect, or any one of the implementation manners of the first aspect, the saving of the second information of the second access point comprises: automatically saving the second information of the second access point.
[0016] Thus, the second access point acquisition process does not require the participation of the user, thereby avoiding affecting the user.
[0017] According to the first aspect, or any one of the implementation manners of the first aspect, the saving of the second information of the second access point comprises: displaying prompt information, the prompt information being used to prompt the saving of the second information of the second access point.
[0018] For example, the user is a professional user, and it is more likely that the user wants to determine whether the electronic device accesses the second access point by himself / herself, rather than by the electronic device itself.
[0019] In this way, the electronic device selects whether to save the second information of the second access point according to the user's intention, increases the flexibility of the user's use, and improves the user's use experience.
[0020] According to the first aspect, or any one of the implementations of the first aspect, the method further includes: establishing a third connection with the second access point automatically according to the second information.
[0021] In this way, after saving the second information of the second access point, the electronic device can automatically access the second access point according to the network condition, so that the user can enjoy better online experience brought by the multi-band capability of the AP device.
[0022] According to the first aspect, or any one of the implementations of the first aspect, the first information further includes one or more of the following: a basic service set identifier (BSSID), an SSID, an encryption mode, a received signal strength indicator (RSSI), a virtual access point (VAP) state, a number of recognitions, and a throughput.
[0023] In some examples, the electronic device can determine whether the current network condition is suitable for obtaining the second access point through the first information, thereby reducing the impact on the user.
[0024] According to the first aspect, or any one of the implementations of the first aspect, saving the second information of the second access point according to the first information of the first access point includes: obtaining at least one first to-be-verified access point of the second frequency band according to the first information. Obtaining a second to-be-verified access point from the first to-be-verified access point, the second to-be-verified access point being an access point accessible through the first key, and the second access point being an available access point in the second to-be-verified access point.
[0025] In this way, the electronic device can screen the first to-be-verified access point through the first information, and in the case of obtaining a large number of access points nearby, the number of access points to be further verified later can be reduced through pre-screening, thereby reducing the verification difficulty later. Optionally, the process of screening the first to-be-verified access point can be a silent process, and the electronic device does not have to actively scan the access points nearby, thereby avoiding affecting the user's current use experience.
[0026] According to the first aspect, or any one of the implementations of the first aspect, obtaining at least one first to-be-verified access point of the second frequency band according to the first information includes: obtaining an access point of the second frequency band. Determining whether the obtained access point of the second frequency band meets a preset condition. Determining the access point meeting the preset condition as the first to-be-verified access point.
[0027] According to a first aspect, or any of the implementations of the first aspect, the preset condition comprises one or more of the following: the BSSID similarity exceeds a first threshold, the SSID similarity exceeds a second threshold, the corresponding profile is not saved, the RSSI is greater than a third threshold, and the encryption mode is a preset encryption mode.
[0028] The electronic device can obtain the signal sent by the other device in the vicinity through passive scanning, and the signal carries the information of the access point. In this way, the electronic device can obtain the information required for determining whether the access point meets the preset condition.
[0029] In this way, the electronic device can filter out the first to-be-verified access point that needs to be further verified through the preset condition. The filtered first to-be-verified access point is more likely to be the required second access point.
[0030] According to the first aspect, or any of the implementations of the first aspect, obtaining the second to-be-verified access point from the first to-be-verified access point comprises: scanning the access points in the second frequency band in the vicinity to obtain a third to-be-verified access point scanned from the first to-be-verified access point; and accessing the third to-be-verified access point through the secret key to obtain the second to-be-verified access point successfully accessed from the third to-be-verified access point.
[0031] In this way, the electronic device determines whether the to-be-verified access point exists in the real network environment through active scanning after determining the to-be-verified access point through passive scanning. Thus, the scanning efficiency is improved, and the impact of the communication quality of the electronic device based on the first access point is reduced.
[0032] According to the first aspect, or any of the implementations of the first aspect, obtaining the second to-be-verified access point indicated by the first information through the secret key comprises: accessing the first to-be-verified access point through the secret key to obtain the second to-be-verified access point successfully accessed from the first to-be-verified access point.
[0033] Generally, the secret keys of the access points provided by the same AP device are the same. Thus, the electronic device can obtain the second access point belonging to the same AP device by verifying the access point through the secret key of the first access point that has been accessed.
[0034] In this way, the electronic device can not need to actively scan, but directly obtain the second access point that can be accessed through the secret key, further reducing the impact of the communication quality of the electronic device based on the first access point.
[0035] According to the first aspect, or any one of the implementations of the first aspect, the saving the second information of the second access point according to the first information of the first access point comprises: scanning for an access point in the vicinity. The scanned access point is accessed according to the key indicated by the first information. The second information of the successfully accessed and available second access point is saved.
[0036] In this way, the electronic device can directly request access to the access point in the vicinity according to the key of the first access point, and directly determine the access point that can be accessed as the second access point, thereby reducing the determination process of the access point to be verified.
[0037] According to the first aspect, or any one of the implementations of the first aspect, before the saving the second information of the second access point according to the first information of the first access point, the method further comprises: determining that the current satisfies a judgment condition, the judgment condition comprising one or more of: not a line version, a wireless local area network (WLAN) switch is turned on, an access point automatic identification connection switch is turned on, a product of China region, not in a music playing state, not in a voice call state, having accessed the first access point and the first access point being available, an encryption mode of the first access point being a preset encryption mode, an identification number of the first access point being less than a preset identification number threshold, being in a screen-off state for a time period longer than a preset screen-off time threshold, being in a charging state, a virtual access point (VAP) being in a preset VAP state, a received signal strength indication (RSSI) being greater than a preset signal receiving strength threshold, and a throughput being less than a preset throughput threshold.
[0038] In this way, the electronic device determines whether the current is suitable for triggering the subsequent active scanning process or the process of requesting access to the access point to be verified according to the judgment condition, and triggers the subsequent active scanning process or the process of requesting access to the access point to be verified only when the current is suitable for triggering the subsequent active scanning process or the process of requesting access to the access point to be verified, thereby reducing the impact on the user.
[0039] According to the first aspect, or any one of the implementations of the first aspect, the method further comprises: detecting a user instruction to delete the second access point, and closing the automatic identification connection function.
[0040] In some scenarios, the user can choose to delete the saved second access point. Then, the electronic device can no longer trigger the automatic identification connection of the second access point in response to the user operation, such as closing the access point automatic identification connection function. For example, the user is a professional user, who can prefer to determine whether the electronic device accesses the second access point by himself / herself rather than by the electronic device, thereby meeting the flexible use demand of the user.
[0041] According to the first aspect, or any one of the implementations of the first aspect, the electronic device is a single-WiFi device, and the method comprises: disconnecting the first connection; sending a first connection establishment request to the first to-be-verified access point, the first connection establishment request carrying the secret key; receiving a first connection establishment response sent by the second to-be-verified access point; and establishing a second connection with the second to-be-verified access point.
[0042] In this way, when the electronic device is a single-WiFi device, the electronic device can only establish one WiFi connection. Then, the electronic device can establish a WiFi connection with the to-be-verified access point by first disconnecting the first connection, so as to facilitate determining whether the to-be-verified access point is the second access point.
[0043] Optionally, after the verification process ends, the electronic device and the first access point reestablish the first connection.
[0044] According to the first aspect, or any one of the implementations of the first aspect, the electronic device is a dual-WiFi device, and the method comprises: in the process of maintaining the first connection, sending a second connection establishment request to the first to-be-verified access point, the second connection establishment request carrying the secret key; receiving a second connection establishment response sent by the second to-be-verified access point; and establishing a third connection with the second to-be-verified access point.
[0045] In this way, when the electronic device is a dual-WiFi device, the electronic device can establish two WiFi connections. Then, the electronic device can establish a WiFi connection with the to-be-verified access point in the process of maintaining the first connection, so as to facilitate determining whether the to-be-verified access point is the second access point.
[0046] Optionally, after the verification process ends, the electronic device disconnects the WiFi connection established with the to-be-verified access point.
[0047] Optionally, the electronic device can also choose to first disconnect the first connection and then establish a WiFi connection with the to-be-verified access point.
[0048] In a second aspect, an electronic device is provided. The electronic device includes a processor and a memory coupled to the processor, the memory configured to store computer program code comprising computer instructions that, when read by the processor from the memory, cause the electronic device to perform: establishing, by the electronic device, a first connection with a first access point, the first access point being of a first frequency band; and saving, according to first information of the first access point, second information of a second access point, the second access point being of a second frequency band, the first information comprising a first key of the first access point, wherein the first access point and the second access point are access points provided by a same access point, AP, device, a service set identifier, SSID, of the first access point is different from an SSID of the second access point, but the keys are the same.
[0049] According to the second aspect, the saving, according to the first information of the first access point, the second information of the second access point comprises: establishing, according to the first information of the first access point, a second connection with the second access point; and saving the second information of the second access point.
[0050] According to the second aspect, or any one of the implementations of the second aspect, the saving the second information of the second access point comprises: saving the second information of the second access point when the second access point is available.
[0051] According to the second aspect, or any one of the implementations of the second aspect, the saving the second information of the second access point comprises: automatically saving the second information of the second access point.
[0052] According to the second aspect, or any one of the implementations of the second aspect, the saving the second information of the second access point comprises: displaying prompt information, the prompt information being used to prompt saving the second information of the second access point.
[0053] According to the second aspect, or any one of the implementations of the second aspect, when the processor reads the computer instructions from the memory, the electronic device is further caused to perform: automatically establishing, according to the second information, a third connection with the second access point.
[0054] According to the second aspect, or any one of the implementations of the second aspect, the first information further comprises one or more of: a basic service set identifier, BSSID, an SSID, an encryption mode, a received signal strength indication, RSSI, a virtual access point, VAP, state, a number of identifications, a throughput.
[0055] According to a second aspect, or any possible implementation mode of the second aspect, the saving the second information of the second access point according to the first information of the first access point comprises: acquiring at least one first to-be-verified access point of the second frequency band according to the first information. The second to-be-verified access point is acquired from the first to-be-verified access point, and the second to-be-verified access point is an access point accessible by the first key, and the second access point is an available access point in the second to-be-verified access point.
[0056] According to the second aspect, or any possible implementation mode of the second aspect, the acquiring at least one first to-be-verified access point of the second frequency band according to the first information comprises: acquiring an access point of the second frequency band. It is determined whether the acquired access point of the second frequency band meets a preset condition. The access point meeting the preset condition is determined as the first to-be-verified access point.
[0057] According to the second aspect, or any possible implementation mode of the second aspect, the preset condition comprises one or more of the following: the BSSID similarity exceeds a first threshold value, the SSID similarity exceeds a second threshold value, the corresponding configuration file is not saved, the RSSI is greater than a third threshold value, and the encryption mode is a preset encryption mode.
[0058] According to the second aspect, or any possible implementation mode of the second aspect, the acquiring the second to-be-verified access point from the first to-be-verified access point comprises: scanning an access point of the second frequency band nearby, acquiring a third to-be-verified access point scanned in the first to-be-verified access point. The third to-be-verified access point is accessed by the key, and the second to-be-verified access point successfully accessed in the third to-be-verified access point is acquired.
[0059] According to the second aspect, or any possible implementation mode of the second aspect, the acquiring the second to-be-verified access point accessible by the key indicated by the first information from the first to-be-verified access point comprises: accessing the first to-be-verified access point by the key, and acquiring the second to-be-verified access point successfully accessed in the first to-be-verified access point.
[0060] According to the second aspect, or any possible implementation mode of the second aspect, the saving the second information of the second access point according to the first information of the first access point comprises: scanning an access point nearby. The scanned access point is accessed by the key indicated by the first information. The second information of the second access point successfully accessed and available is saved.
[0061] According to a second aspect, or any possible implementation mode of the second aspect, when the processor reads the computer instructions from the memory, the electronic device further performs: determining that the current satisfies a judgment condition, the judgment condition including one or more of the following: not a production line version, a wireless local area network (WLAN) switch being turned on, an access point automatic identification connection switch being turned on, being a China region product, not being in a music playing state, not being in a voice call state, having accessed the first access point and the first access point being available, an encryption mode of the first access point being a preset encryption mode, an identification number of the first access point being less than a preset identification number threshold, a length of time in a screen-off state exceeding a preset screen-off time threshold, being in a charging state, a virtual access point (VAP) being in a preset VAP state, a received signal strength indication (RSSI) being greater than a preset signal receiving strength threshold, and a throughput being less than a preset throughput threshold.
[0062] According to the second aspect, or any possible implementation mode of the second aspect, when the processor reads the computer instructions from the memory, the electronic device further performs: detecting an operation of the user indicating to delete the second access point, and turning off the automatic identification connection function.
[0063] According to the second aspect, or any possible implementation mode of the second aspect, when the processor reads the computer instructions from the memory, the electronic device further performs: detecting an operation of the user indicating to delete the second access point, and turning off the automatic identification connection function.
[0064] According to the second aspect, or any possible implementation mode of the second aspect, when the processor reads the computer instructions from the memory, the electronic device further performs: detecting an operation of the user indicating to delete the second access point, and turning off the automatic identification connection function.
[0065] According to the second aspect, or any possible implementation mode of the second aspect, when the processor reads the computer instructions from the memory, the electronic device further performs: detecting an operation of the user indicating to delete the second access point, and turning off the automatic identification connection function.
[0066] In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (which can also be referred to as instructions or code) that, when executed by an electronic device, causes the electronic device to perform the method of the first aspect or any of the implementations of the first aspect.
[0067] In a fifth aspect, a computer program product is provided. The computer program product, when running on an electronic device, causes the electronic device to perform the method of the first aspect or any of the implementations of the first aspect.
[0068] In a sixth aspect, a circuitry is provided. The circuitry includes a processing circuitry configured to perform the method of the first aspect or any of the implementations of the first aspect.
[0069] In a seventh aspect, a chip system is provided. The chip system includes at least one processor and at least one interface circuitry. The at least one interface circuitry is configured to perform a transceiving function and send instructions to the at least one processor. When the at least one processor executes the instructions, the at least one processor performs the method of the first aspect or any of the implementations of the first aspect.
[0070] The technical effects of the foregoing aspects can be referred to each other, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0071] FIG. 1 is a schematic diagram of a communication system to which a connection method provided by embodiments of the present application is applied;
[0072] FIG. 2 is a schematic diagram of a frequency band switching scenario provided by embodiments of the present application;
[0073] FIG. 3 is a schematic diagram of an interface provided by embodiments of the present application;
[0074] FIG. 4A is a schematic diagram of a hardware structure of an electronic device provided by embodiments of the present application;
[0075] FIG. 4B is a schematic diagram of a hardware structure of an AP device provided by embodiments of the present application;
[0076] FIG. 5 is a schematic diagram of a connection method flow provided by embodiments of the present application;
[0077] FIG. 6 is a schematic diagram of a connection method flow provided by embodiments of the present application;
[0078] FIG. 7 is a schematic diagram of a connection method flow provided by embodiments of the present application;
[0079] FIG. 8 is a schematic diagram of a connection method flow provided by embodiments of the present application;
[0080] FIG. 9A is a schematic diagram of a connection method flow provided by embodiments of the present application;
[0081] FIG. 9B is a flowchart of a connection method according to an embodiment of the present application;
[0082] FIG. 10 is a flowchart of a connection method according to an embodiment of the present application;
[0083] FIG. 11 is a flowchart of a connection method according to an embodiment of the present application;
[0084] FIG. 12 is a flowchart of a connection method according to an embodiment of the present application;
[0085] FIG. 13A is a flowchart of a connection method according to an embodiment of the present application;
[0086] FIG. 13B is a schematic diagram of an interface according to an embodiment of the present application;
[0087] FIG. 14 is a flowchart of a connection method according to an embodiment of the present application;
[0088] FIG. 15 is a flowchart of a connection method according to an embodiment of the present application;
[0089] FIG. 16 is a schematic diagram of an interface according to an embodiment of the present application;
[0090] FIG. 17 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0091] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing the specific embodiments of the present application, and are not intended to be limiting on the present application. As used in the specification and the appended claims of the present application, the singular forms "a," "an," and "the" are intended to include the plural forms, such as "at least one," unless the context clearly indicates otherwise. It should also be understood that "at least one" and "one or more" refer to one or two or more (including two) in the following embodiments of the present application.
[0092] Reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" or "in a various embodiment" or "in some embodiment" or "in other embodiments" in various places throughout this specification are not necessarily all referring to the same embodiment, but can refer to different embodiments. The terms "including," "comprising," "having" and variations thereof are meant to encompass the item listed thereafter and any additional items. The terms "connected," "coupled," and variations thereof are meant to encompass the items connected, coupled, or linked to each other, whether directly or indirectly. The terms "first," "second," and variations thereof merely mean different instances and do not imply a relative importance or a number of the indicated technical features.
[0093] In the present application, the word "exemplary" or "for example" is used to mean serving as an example, instance, or illustration. Any implementation described as "exemplary" or "for example" in the present application is not necessarily to be construed as preferred or advantageous over other implementations. The described
[0094] FIG. 1 is a schematic diagram of a communication system to which a connection method according to an embodiment of the present application is applied. As shown in FIG. 1, the communication system includes an electronic device 100 and a wireless access point (AP) device 200.
[0095] Optionally, the electronic device 100 can be, for example, a mobile phone, a personal computer (PC), a tablet computer (Pad), a notebook computer, a desktop computer, a notebook computer, a computer with a transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a wearable device, a vehicle-mounted device, an artificial intelligence (AI) device, or the like. The embodiments of the present application do not have special restrictions on the specific form of the electronic device 100.
[0096] Optionally, the AP device 200 can be, for example, a wireless router for providing a wireless fidelity (Wi-Fi) network. In some embodiments, the electronic device 100 can access the Wi-Fi network provided by the AP device 200 as a station (STA) device. The AP device 200 can be a dual-band router, such as supporting 2.4G and 5G frequency bands. The AP device 200 can also be a tri-band router, such as supporting 2.4G, 5G low frequency and 5G high frequency. Optionally, the AP device 200 can also support more frequency bands, and the embodiments of the present application do not have special restrictions on this.
[0097] In some embodiments, the electronic device 100 and the AP device 200 establish an 802.11 session based on the institute of electrical and electronics engineers (IEEE) 802.11 standard, the electronic device 100 accesses the Wi-Fi network provided by the AP device 200, and realizes the function of surfing the Internet.
[0098] For example, the electronic device 100 needs to determine the service set identifier (SSID) of the Wi-Fi network to be accessed and the authentication mode first. The authentication mode has been preconfigured in the AP device 200, and the electronic device 100 can complete the authentication process by interacting with the AP device 200 in the authentication process. The electronic device 100 can obtain the SSID in the scanning process, which includes passive scanning and active scanning. For example, in the passive scanning process, the electronic device 100 obtains the SSID carried in the beacon frame sent by the AP device 200 in the vicinity of the electronic device 100 at a preset period. For another example, the electronic device 100 sends a probe request management frame to the AP device 200, and then obtains the SSID after receiving the probe response management frame sent by the AP device 200. Subsequently, the authentication process and the association process are completed based on the SSID. In the authentication process, the electronic device 100 receives the secret key input by the user, and completes the authentication by interacting with the AP device 200 to access the Wi-Fi network of the corresponding frequency band. In the association process, the media access control (MAC) address of the electronic device 100 is associated with the port of the AP device 200, so that the AP device 200 and the electronic device 100 can correctly transmit signals.
[0099] The SSID is the identity document (ID) of the AP device 200, which is used to distinguish different networks. The AP device 200 provides different SSIDs to distinguish different networks (such as 2.4 GHz network, 5 GHz network, employee access network, visitor access network, etc.), and the electronic device 100 can access the corresponding network by obtaining the SSID. In some examples, an AP device 200 connected to a wired network and at least one device connected to the AP device 200 through a wireless network form a group, which is called a basic service set (BSS). The devices in the same BSS set a corresponding identity document, which is called a BSSID. For example, the electronic device 100 can distinguish different frequency band Wi-Fi networks provided by the AP device 200 according to different SSIDs of the AP device 200. The electronic device 100 can also determine whether the Wi-Fi networks of different frequency bands belong to the same AP device 200 according to whether the BSSIDs are similar to each other.
[0100] In some embodiments, the electronic device 100 has a frequency band switching capability, and is capable of switching to another frequency band of the AP device 200 to communicate when the signal quality of a certain frequency band of the AP device 200 does not meet the communication requirement.
[0101] Exemplarily, as shown in FIG. 2, it is assumed that the AP device 200 is a dual-frequency router, and is capable of providing signals of two frequency bands of 2.4G and 5G, wherein the 2.4G frequency band signal has a large coverage range but a small bandwidth, and the 5G frequency band signal has a small coverage range but a high bandwidth. For example, the signal coverage range of the 5G frequency band of the provided Wi-Fi network is the range of the area 201, and the signal coverage range of the 2.4G frequency band is the range of the area 202. The electronic device 100 is capable of acquiring the access points of the 2.4G frequency band and the 5G frequency band provided by the AP device 200, and is capable of connecting to the access points according to the user operation to acquire the Wi-Fi network of the corresponding frequency band. It should be understood that the access points of different frequency bands provided by the AP device can also be described as the hotspots of different frequency bands provided by the AP device, and the embodiments of the present application do not limit this.
[0102] For example, the electronic device 100 is located at a location A, which is within the signal coverage of the 5G frequency band and the 2.4G frequency band of the AP device 200. Then, the electronic device 100 can acquire the Wi-Fi network provided by the AP device 200. As shown in FIG. 3, the electronic device 100 can display the searched connectable WLAN, such as the first access point 31 of the 2.4G frequency band and the second access point 32 of the 5G frequency band. For a non-professional user, the currently displayed network names are different, and it is considered that the Wi-Fi networks are provided by different AP devices, and it is considered that the multi-frequency band capability provided by the current dual-frequency AP device can be enjoyed by connecting to any Wi-Fi network. For example, the user instructs the electronic device 100 to connect to the first access point 31 of the 2.4G frequency band. In response to the user operation, the electronic device 100 displays a password input interface. In response to the password input by the user in the password input interface, the network authentication process is completed to connect to the first access point 31 of the 2.4G frequency band. Then, in the association process, the electronic device 100 can provide the user with the 2.4G frequency band Wi-Fi network. However, since the user does not instruct to connect to the second access point 32 of the 5G frequency band, the electronic device 100 cannot provide the user with the experience of automatically switching to the 5G frequency band Wi-Fi network. For example, the user moves between the location A and the location B. The 2.4G frequency band Wi-Fi network at the location B can provide a better online experience for the user, but at the location A, the actual 5G frequency band Wi-Fi network can provide a better online experience for the user. However, since the electronic device 100 does not connect to the 5G frequency band Wi-Fi network, the automatic switching to the 5G frequency band Wi-Fi network cannot be realized, and the user cannot experience the online experience of the 5G frequency band Wi-Fi network.
[0103] That is, since the SSIDs of the access points of different frequency bands are different, the user needs to manually operate the electronic device 100 to connect to the access points of different frequency bands, and the user operation is tedious. Moreover, if the user has little knowledge about the multi-frequency AP device and does not know that the access points of multiple frequency bands need to be manually connected, the user cannot enjoy the better online experience brought by the multi-frequency band capability of the router.
[0104] Therefore, the application provides a connection method, which automatically identifies different access points provided by the same AP device and automatically connects to the same AP device, so as to reduce the operation difficulty of the user and make the non-professional user easily use the multi-frequency band capability of the AP device.
[0105] For example, FIG. 4A shows a structural schematic diagram of the electronic device 100.
[0106] The electronic device 100 can 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, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, and the like.
[0107] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than illustrated, or combine certain components, or split certain components, or different arrangement of components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0108] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), and the like. Among them, different processing units can be independent devices, or can be integrated in one or more processors.
[0109] The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching instructions and executing instructions.
[0110] The memory in the processor 110 can also be provided for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. Avoiding repeated access, reducing the waiting time of the processor 110, thus improving the efficiency of the system.
[0111] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can 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.
[0112] The USB interface 130 is an interface conforming to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect earphones to play audio through the earphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0113] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection methods or a combination of multiple interface connection methods in the above embodiments.
[0114] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input through the wireless charging coil of the electronic device 100. The charging management module 140 can charge the battery 142 while also providing power to the electronic device through the power management module 141.
[0115] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 can also be configured to monitor parameters such as the battery capacity, the number of battery cycles, the battery health status (leakage, impedance), and the like. In some embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can be disposed in the same device.
[0116] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, and the like.
[0117] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.
[0118] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G and the like applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and perform filtering, amplification, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify signals modulated by the modem processor, and convert the amplified signals into electromagnetic waves to be radiated through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be disposed in the same device.
[0119] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and radiate it as an electromagnetic wave via the antenna 2.
[0120] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).
[0121] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs, which execute program instructions to generate or change display information.
[0122] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be manufactured by using a liquid crystal display (LCD), for example, an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Mini-led, a Micro-led, a Micro-oled, a quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device 100 can include 1 or N display screens 194, where N is a positive integer greater than 1.
[0123] The camera 193 is used to capture still images or videos. An object generates an optical image through a lens and projects the optical image to a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to an ISP to convert into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into an image signal in a standard format, such as RGB, YUV, etc. In some embodiments, the electronic device 100 can include 1 or N cameras 193, where N is a positive integer greater than 1.
[0124] 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 electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement data storage functions. For example, music, video, etc. files are saved in the external memory card.
[0125] The internal memory 121 can be used to store computer executable program codes including instructions. The internal memory 121 can include a program area and a data area. The internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), or the like. The processor 110 performs various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and / or instructions stored in a memory disposed in the processor.
[0126] The audio module 170 is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or part of the functions of the audio module 170 can be disposed in the processor 110. The electronic device 100 can play music, record sound, and the like through the audio module 170. The audio module 170 can include a speaker, a receiver, a microphone, a headphone interface, and an application processor, and the like to implement audio functions.
[0127] The sensor module 180 can include a pressure sensor, a gyro sensor, a barometric sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like. The electronic device 100 can detect a touch operation applied to or near the display screen 194 through the touch sensor.
[0128] The key 190 includes a power key, a volume key, and the like. The key 190 can be a mechanical key. It can also be a touch key. The electronic device 100 can receive a key input, and generate a key signal input related to user settings and function control of the electronic device 100.
[0129] The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
[0130] The indicator 192 can be an indicator light, and can be used to indicate a charging state, a power change, and can also be used to indicate a message, a missed call, a notification, and the like.
[0131] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, N being a positive integer greater than 1.
[0132] Optionally, the AP device 200 in the embodiments of the present application can be implemented by different devices. For example, the AP device 200 in the embodiments of the present application can be implemented by a communication device in FIG. 4B. FIG. 4B shows a hardware structure schematic diagram of the AP device 200 provided by the embodiments of the present application. The AP device 200 comprises at least one processor 401, a communication line 402, a memory 403 and at least one communication interface 404. The memory 403 can also be included in the processor 401.
[0133] The processor 401 can be a general central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs of the solutions of the present application.
[0134] The communication line 402 can comprise a path for transmitting information between the above-mentioned components.
[0135] The communication interface 404 is configured to communicate with other devices. In the embodiments of the present application, the communication interface can be a module, a circuit, a bus, an interface, a transceiver or other devices capable of realizing the communication function, and is configured to communicate with other devices. Optionally, when the communication interface is a transceiver, the transceiver can be a separately arranged transmitter, which can be configured to send information to other devices. The transceiver can also be a separately arranged receiver, which can be configured to receive information from other devices. The transceiver can also be a component integrating the functions of sending and receiving information. The embodiments of the present application do not limit the specific implementation of the transceiver.
[0136] The memory 403 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but the present application is not limited thereto. The memory can exist independently, and be connected to the processor via the communication line 402. The memory can also be integrated with the processor.
[0137] The memory 403 is configured to store computer-executable instructions for implementing the solutions of the present application, and the processor 401 is configured to execute the computer-executable instructions stored in the memory 403.
[0138] Optionally, the computer-executable instructions in the embodiments of the present application can also be referred to as application program codes, instructions, computer programs, or other names, and the embodiments of the present application do not make specific limitations thereto.
[0139] In a specific implementation, as an embodiment, the processor 401 can include one or more CPUs, such as the CPU0 and the CPU1 in FIG. 4B.
[0140] In a specific implementation, as an embodiment, the AP device 200 can include multiple processors, such as the processor 401 and the processor 407 in FIG. 4B. Each of the processors can be a single-CPU processor or a multi-CPU processor. The processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (for example, computer program instructions).
[0141] The AP device 200 described above can be a general-purpose device or a special-purpose device, and the embodiments of the present application do not limit the type of the AP device 200. The AP device 200 can be a device having a structure similar to that in FIG. 4B.
[0142] The following takes the AP device 200 as a dual-frequency router supporting 2.4G and 5G frequency bands as an example to introduce the connection method provided in the embodiments of the present application in detail. It can be understood that the connection method of an AP device 200 supporting more frequency bands can refer to the connection method provided in the embodiments of the present application, and details are not described herein.
[0143] FIG. 5 is a flow diagram of a connection method provided in the embodiments of the present application. It should be noted that the method is not limited to the specific order of FIG. 5 and the following description, and it should be understood that in other embodiments, the order of some steps of the method can be exchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0144] S501, the electronic device 100 and the first access point establish a first connection, and the frequency band of the first connection is a first frequency band.
[0145] The AP device 200 is a dual-frequency router, and the access points of the Wi-Fi network provided by the AP device 200 include a first access point of a first frequency band and a second access point of a second frequency band. Optionally, the first frequency band is, for example, a 2.4G frequency band.
[0146] In some embodiments, the electronic device 100 is located in the signal coverage range of the Wi-Fi network provided by the AP device 200, and the accessible WLANs obtained include the Wi-Fi network access points of multiple frequency bands provided by the AP device 200. The electronic device 100 displays the obtained accessible WLANs, and in response to the operation of the user indicating to access the first access point, the electronic device 100 receives the secret key input by the user and sends the secret key to the AP device 200. After the secret key is verified, the electronic device 100 accesses the first access point and performs communication in the first frequency band.
[0147] Optionally, the first information of the first access point includes one or more of, for example, a secret key, an SSID, a BSSID, a received signal strength indicator (RSSI), a virtual access point (VAP) state, an encryption method, an identification number, a throughput, and the like.
[0148] The SSIDs of different access points provided by the AP device 200 are different, but the secret keys for accessing the access points are the same. For example, the SSID of the first access point is different from the SSID of the second access point, but the electronic device 100 can access the first access point and the second access point provided by the AP device 200 through the same secret key.
[0149] The BSSID corresponding to the first access point is used to distinguish whether different access points belong to the same AP device 200. For example, when the similarity of the BSSIDs corresponding to different access points exceeds a preset threshold, it can be determined that the different access points belong to the same AP device 200, that is, the different access points are all provided by the same AP device 200.
[0150] The RSSI, throughput, and identification times of the first access point are used to measure the communication quality and other communication states of the electronic device 100 after accessing the first access point.
[0151] The encryption mode of the first access point is used to protect the communication security of the Wi-Fi network. Optionally, the encryption mode includes, for example, Wi-Fi protected access (WPA) 1 standard, WPA 2 standard, and WPA 3 standard.
[0152] In S502, the electronic device 100 saves the second information of the second access point according to the first information of the first access point, where the frequency band of the second access point is a second frequency band.
[0153] In some embodiments, the first access point and the second access point are access points provided by the same AP device, the SSID of the first access point is different from the SSID of the second access point, but the secret key is the same.
[0154] In some embodiments, after the electronic device 100 accesses the first access point for communication, it can trigger the acquisition of whether there is a second access point that can be automatically accessed. In this way, the electronic device 100 automatically triggers the acquisition of an access point with a different SSID but the same secret key from the currently accessed access point. Subsequently, the electronic device 100 can automatically switch to access different access points according to the network status, realize automatic multi-frequency band switching, and avoid being limited to manual access, so that non-professional users can enjoy better online experience brought by the multi-frequency band capability of the AP device 200.
[0155] In some embodiments, after the electronic device 100 establishes a first connection with the first access point, it can trigger the saving of the second information of the second access point according to the first information of the first access point in the process of maintaining the first connection. Alternatively, the electronic device 100 establishes a first connection with the first access point and saves the first information of the first access point, and then disconnects the first connection. Subsequently, the electronic device 100 saves the second information of the second access point according to the first information of the first access point. That is, as long as the electronic device 100 establishes a first connection with the first access point and saves the first information, it can save the second information of the second access point.
[0156] In some embodiments, the electronic device 100 can obtain the Beacon frame sent by the AP device 200 in a preset period through passive scanning, and obtain the SSID, BSSID and other information carried in the Beacon frame. Then, the electronic device 100 can determine whether there is a second access point belonging to the same AP device 200 as the first access point currently accessed according to the information carried in the Beacon frame. Then, the electronic device 100 actively scans the access points existing nearby to determine whether the second access point determined by the electronic device 100 through passive scanning actually exists. In the case of existence, the electronic device 100 can obtain the key in the first information, which is the key used when the electronic device 100 accesses the first access point. Then, the electronic device 100 can verify the obtained access point through the key, and if the key can be used to access the obtained access point, it can be determined that the access point that can be accessed is the second access point to be searched. That is, the electronic device 100 can access the second access point through the same key, thereby realizing the multi-band capability provided by the AP device 200. The specific implementation of the process is described below with reference to the steps shown in FIG. 6, and will not be described here.
[0157] The above process does not require user participation, and the electronic device 100 can automatically access the access points of different frequency bands provided by the same AP device 200, thereby effectively simplifying user operation. Moreover, based on the passive scanning silent mode to determine the possible second access point, and then through the active scanning verification mode to determine the second access point, the power consumption generated in the process of determining the second access point can be effectively reduced, and the influence on the communication quality of the electronic device 100 is reduced, thereby reducing the influence on the user.
[0158] Optionally, the above active scanning process is an optional process. For example, after the electronic device 100 determines at least one access point through passive scanning, it can also directly request to access the at least one access point through the key corresponding to the first access point. Then, the electronic device 100 determines the access point successfully accessed as the second access point to be searched.
[0159] In other embodiments, the electronic device 100 can also directly actively scan the access points existing nearby, and try to access the scanned access points through the key in the first information. In the case of successful access, the electronic device 100 can determine that the access point successfully accessed is the second access point.
[0160] Optionally, in the case of directly actively scanning the access points existing nearby, the electronic device 100 can also select a preset number of access points with a signal strength in the front in the scanned access points. Then, the electronic device 100 can verify the preset number of access points through the key in the first information, thereby improving the determination efficiency of the second access point.
[0161] In some embodiments, after obtaining the second access point, the electronic device 100 can obtain second information of the second access point, such as information including SSID, secret key, BSSID, and the like of the second access point. Then, the electronic device 100 saves the second information of the second access point.
[0162] In this way, the electronic device 100 automatically obtains the second access point belonging to the same AP device 200 as the first access point based on the first access point with which the connection has been established. Subsequently, the automatic access to the second access point can be implemented without the involvement of the user. In this way, non-professional users can also experience the complementary advantages brought by the dual-band router and improve the online experience.
[0163] The above describes the overall process of the connection method provided by the embodiments of the present application. The specific determination process of the second access point is described in detail below.
[0164] FIG. 6 is a flow diagram of another connection method provided by the embodiments of the present application. The electronic device 100 can obtain the second access point through the steps shown in FIG. 6. Optionally, the above step S502 includes the following steps S601-S603.
[0165] S601, the electronic device 100 obtains at least one first to-be-verified access point of the second frequency band according to the first information.
[0166] In some embodiments, after establishing the first connection with the first access point, the electronic device 100 can trigger the process of obtaining the second access point belonging to the same AP device 200 as the first access point. In the obtaining process, the electronic device 100 can obtain a plurality of access points, and the electronic device 100 further needs to verify these access points to determine the second access point included therein. Optionally, the access points that need to be further verified are determined as to-be-verified access points.
[0167] FIG. 7 is a flow diagram of another connection method provided by the embodiments of the present application. The electronic device 100 can obtain the to-be-verified access point through the steps shown in FIG. 7. Optionally, the above step S601 includes the following steps S6011-S6013.
[0168] S6011, the electronic device 100 obtains the access point of the second frequency band.
[0169] In some embodiments, the AP device 200 sends a Beacon frame to the electronic device 100 at a preset period. The Beacon frame carries information of the AP device 200, such as BSSID, SSID, etc. The electronic device 100 can receive the information in a passive scanning manner without active scanning.
[0170] For example, the electronic device 100 can obtain one or more 5G band APs in the vicinity. The one or more 5G band APs include the 5G band AP provided by the AP device 200.
[0171] S6012, the electronic device 100 determines whether the obtained second band AP meets a preset condition.
[0172] The preset condition includes one or more of the following: the BSSID similarity exceeds a threshold 1, the SSID similarity exceeds a threshold 2, the corresponding profile is not saved, the RSSI is greater than a threshold 3, and the encryption mode is a preset encryption mode.
[0173] In some embodiments, the AP device 200 provides multiple band APs for other electronic devices to access, and the SSIDs of the multiple bands are different but the keys are the same. In this case, if the electronic device 100 has established a first connection with a first AP, the electronic device 100 needs to determine a second AP belonging to the same AP device as the first AP, so that the electronic device 100 can access the second AP based on the same key. Based on this, the electronic device 100 can filter out first to-be-verified APs that are likely to belong to the same AP device as the currently accessed first AP from the obtained APs based on the preset condition, so as to subsequently verify the first to-be-verified APs.
[0174] It should be understood that the preset condition for filtering the first to-be-verified APs includes not only the above-mentioned several conditions, but also other conditions.
[0175] As shown in FIG. 8, step S6012 can include steps S6012a-S6012d. The electronic device 100 filters the first to-be-verified APs that meet the preset condition through steps S6012a-S6012d. It should be understood that the present application does not limit the execution steps of steps S6012a-S6012d, and some of steps S6012a-S6012d are optional steps. That is, the electronic device 100 can select some or all of the preset conditions to filter the to-be-verified APs.
[0176] S6012a, the electronic device 100 determines whether the similarity of the basic service set identifier and the basic service set identifier indicated by the first information exceeds a threshold value 1.
[0177] In some embodiments, the access points provided by the same AP device belong to the same BSS, and the basic service set identifiers (BSSIDs) of these access points have a certain degree of similarity. Therefore, the electronic device 100 can determine, according to the BSSID, whether the access point currently being screened belongs to the same AP device as the first access point that has been accessed.
[0178] In some embodiments, in the first to-be-verified access point screening process, the electronic device 100 can obtain the BSSID of the first access point from the obtained first information of the first access point.
[0179] In some embodiments, after obtaining the BSSID of the first access point, the electronic device 100 can compare the BSSID of the to-be-screened access point with the BSSID of the first access point, and determine whether the similarity of the two exceeds a threshold value 1. In the case where the similarity exceeds the threshold value 1, the electronic device 100 can determine that the currently screened access point is likely to belong to the same AP device as the first access point that has been accessed.
[0180] For example, the BSSID is generally composed of 6 bytes, and the middle 4 bytes of the BSSID of the access points belonging to the same AP device are generally the same. Therefore, the electronic device 100 can determine whether the middle 4 bytes of the BSSID of the currently screened access point are the same as the middle 4 bytes of the BSSID of the first access point that has been accessed. In the case of being the same, the electronic device 100 can determine that the similarity of the BSSID of the currently screened access point and the BSSID of the first access point that has been accessed exceeds the threshold value 1. In the case of being different, the electronic device 100 can determine that the similarity of the BSSID of the currently screened access point and the BSSID of the first access point that has been accessed is less than the threshold value 1.
[0181] In this way, the electronic device 100 can screen the first to-be-verified access point through the BSSID, and in the case where a large number of access points are obtained nearby, the number of access points to be further verified in the subsequent process is reduced through pre-screening, thereby reducing the difficulty of subsequent verification. Moreover, the process of screening the first to-be-verified access point based on the BSSID is a silent process, and the electronic device 100 does not need to actively scan the access points nearby, thereby avoiding affecting the current use experience of the user.
[0182] S6012b, the electronic device 100 determines whether the similarity of the service set identifier and the service set identifier indicated by the first information exceeds a threshold value 2.
[0183] In some embodiments, the service set identifiers (SSIDs) of the access points of different frequency bands provided by the same AP device are different, but similar. For example, as shown in the interface of FIG. 3, for a dual-band router providing a 2.4G frequency band and a 5G frequency band, the SSID of the first access point of the 2.4G frequency band and the SSID of the second access point of the 5G frequency band are different only in that the SSID of the second access point has the identifier “-5G” added to the SSID of the first access point, so as to facilitate the user to distinguish. Therefore, the electronic device 100 can determine, according to the SSIDs, whether the access point currently being screened belongs to the same AP device as the first access point that has been accessed.
[0184] In some embodiments, in the first to-be-verified access point screening process, the electronic device 100 can obtain the SSID of the first access point from the obtained first information of the first access point.
[0185] In some embodiments, after obtaining the SSID of the first access point, the electronic device 100 can compare the SSID of the to-be-screened access point with the SSID of the first access point, and determine whether the similarity of the two exceeds a threshold 2. In the case where the similarity exceeds the threshold 2, the electronic device 100 can determine that the currently screened access point is likely to belong to the same AP device as the first access point that has been accessed.
[0186] For example, the electronic device 100 first obtains the SSID of the first access point, and then can determine whether the SSID of the currently screened access point has the identifier “-5G” added to the BSSID of the first access point. In the case of yes, the electronic device 100 can determine that the similarity of the SSID of the currently screened access point and the SSID of the first access point that has been accessed exceeds the threshold 2. In the case of no, the electronic device 100 can determine that the similarity of the SSID of the currently screened access point and the SSID of the first access point that has been accessed is less than the threshold 2.
[0187] In this way, the electronic device 100 can screen the first to-be-verified access point through the SSID, and in the case where a large number of access points in the vicinity are obtained, the number of the first to-be-verified access points to be further verified in the subsequent process is reduced through the pre-screening, thereby reducing the difficulty of the subsequent verification. Moreover, the current screening process based on the SSID is a silent process, and the electronic device 100 does not need to actively scan the access points in the vicinity, thereby avoiding affecting the current use experience of the user.
[0188] S6012c, the electronic device 100 determines whether the corresponding configuration file is not saved.
[0189] In some embodiments, the electronic device 100 can save the configuration file corresponding to the access point if the electronic device 100 has accessed the access point and determines that the access point can normally communicate. For example, the electronic device 100 accesses a first access point provided by the AP device 200 and communicates. Then, the electronic device 100 saves the configuration file of the first access point. Optionally, the configuration file of the first access point includes the first information of the first access point.
[0190] The current first to-be-verified access point screening process is used to screen the second access point which has not been accessed by the electronic device 100, so as to facilitate the subsequent triggering of the automatic access process of the second access point. Therefore, the electronic device 100 should not have saved the configuration file of the second access point. Then, in the process of screening the first to-be-verified access point through the preset condition, the electronic device 100 can determine whether the configuration file of the currently screened access point is saved. If yes, the electronic device 100 can determine that the currently screened access point is not the first to-be-verified access point. If no, the electronic device 100 can determine that the currently screened access point can be the first to-be-verified access point.
[0191] In this way, the electronic device 100 can screen the first to-be-verified access point through whether the corresponding configuration file is saved. In the case of obtaining more access points nearby, the number of access points to be further verified in the subsequent process can be reduced through the pre-screening, thereby reducing the verification difficulty in the subsequent process. Moreover, the current screening process based on whether the corresponding configuration file is saved is a silent process, and the electronic device 100 does not need to actively scan the access points nearby, thereby avoiding affecting the current use experience of the user.
[0192] S6012d, the electronic device 100 determines whether the signal strength is greater than a threshold 3 and whether the encryption mode is a preset encryption mode.
[0193] In some embodiments, the electronic device 100 has accessed the first access point provided by the AP device 200, and currently expects to acquire the second access point provided by the AP device 200. Since the AP device 200 provides better communication with a higher RSSI for the electronic device 100 when it is located nearby, the AP device 200 providing the first access point is also located nearby the electronic device 100. Therefore, the electronic device 100 needs to acquire an access point with a higher RSSI to possibly provide the second access point provided by the AP device 200 located nearby. Then, the electronic device 100 determines whether the currently screened access point is the access point provided by the AP device 200 located nearby by determining whether the RSSI of the currently screened access point is greater than the threshold 3. For example, when the RSSI of the currently screened access point is greater than the threshold 3, the electronic device 100 can determine that the currently screened access point is the first to-be-verified access point. When the RSSI of the currently screened access point is less than or equal to the threshold 3, the electronic device 100 can determine that the currently screened access point is not the first to-be-verified access point.
[0194] In some embodiments, the AP device 200 encrypts the access points provided by the AP device 200 in a certain encryption manner to ensure the security of the communication with the electronic device 100. The electronic device 100 can acquire the encryption manner of the first access point of the AP device 200 in the process of requesting to access the first access point. Alternatively, the electronic device 100 has accessed the first access point provided by the AP device 200, and can also acquire the encryption manner of the first access point of the AP device 200, for example, the encryption manner is a preset encryption manner. Alternatively, the preset encryption manner is an encryption manner that can ensure the security of the communication. Alternatively, the electronic device 100 can acquire the encryption manners of the access points in the nearby second frequency band in the process of passively scanning the access points in the second frequency band. Then, in the process of screening the second access point, the electronic device 100 can determine the access point with the preset encryption manner as the to-be-verified access point.
[0195] Alternatively, the preset encryption manner is, for example, WPA1, WPA2, or WPA3. For example, when the electronic device 100 determines that the encryption manner of the scanned access point in the second frequency band is any one of WPA1, WPA2, or WPA3, the electronic device 100 can determine that the access point is the to-be-verified access point. Alternatively, the encryption manner of the first access point and the encryption manner of the to-be-verified access point are the same or different.
[0196] In this way, the electronic device 100 can screen the first to-be-verified access point according to whether the signal strength is greater than the threshold 3 and whether the encryption mode is the preset encryption mode. In the case that a large number of access points are obtained nearby, the number of access points to be further verified in the subsequent step is reduced through the pre-screening, so as to reduce the difficulty of subsequent verification. Moreover, the screening process of the first to-be-verified access point based on whether the signal strength is greater than the threshold 3 and whether the encryption mode is the preset encryption mode is a silent process, and the electronic device 100 does not need to actively scan the access points nearby, thereby avoiding affecting the current use experience of the user.
[0197] In some embodiments, in the case that the results of the determination steps S6012a-S6012d are all yes, the electronic device 100 can perform the following step S6013, that is, the electronic device 100 determines that the currently screened access point is the first to-be-verified access point. In the case that any one of the results of the determination steps S6012a-S6012d is no, the electronic device 100 returns to continue screening the next access point, that is, the electronic device 100 determines that the currently screened access point is not the first to-be-verified access point.
[0198] S6013, the electronic device 100 determines the access point satisfying the preset condition as the first to-be-verified access point.
[0199] In some embodiments, the electronic device 100 screens the obtained access points through the at least one preset condition, and determines the access point satisfying the preset condition as the first to-be-verified access point, so as to further verify the first to-be-verified access point through the subsequent steps and obtain the final required second access point. Optionally, the frequency band of the first to-be-verified access point screened through the preset condition is the second frequency band, and the number is at least one.
[0200] In some embodiments, in the case that the AP device 200 is a dual-frequency router, if the electronic device 100 has accessed the first access point provided by the AP device 200, the number of the second access point that can be automatically accessed is one. Therefore, the number of the first to-be-verified access point screened by the electronic device 100 through the preset condition is one. Then, in the case that the number of the first to-be-verified access point screened by the electronic device 100 through the preset condition is multiple, the electronic device 100 can determine the final one first to-be-verified access point through the RSSI. For example, the electronic device 100 determines the access point with the highest RSSI in the multiple first to-be-verified access points as the final first to-be-verified access point.
[0201] Optionally, the electronic device 100 can determine the number of access points supported by the AP device 200 according to the obtained Beacon frame (or other information), and determine the number of first to-be-verified access points to be screened based on the number of access points.
[0202] The above describes the determination process of the first to-be-verified access point, and the following describes the verification process of the first to-be-verified access point.
[0203] In some embodiments, the electronic device 100 acquires the second access point so as to subsequently automatically access the second access point. Then, after acquiring the first to-be-verified access point, the electronic device 100 can establish a connection according to the secret key indicated by the first information and the first to-be-verified access point, and the second to-be-verified access point in which the connection establishment is successful can be the second access point to be acquired.
[0204] S602, the electronic device 100 acquires, in the first to-be-verified access point, a second to-be-verified access point that can be accessed through the secret key indicated by the first information.
[0205] In some embodiments, the electronic device 100 accesses the first to-be-verified access point through the secret key indicated by the first information of the first access point, and acquires a second to-be-verified access point that is successfully accessed in the first to-be-verified access point.
[0206] In another embodiment, the electronic device 100 first actively scans the access points nearby to determine whether the first to-be-verified access point is actually present in the access points nearby. Then, the electronic device 100 further verifies a third to-be-verified access point that is actually present in the first to-be-verified access point. For example, the electronic device 100 accesses the third to-be-verified access point through the secret key indicated by the first information of the first access point, and acquires a second to-be-verified access point that is successfully accessed in the third to-be-verified access point.
[0207] In this way, the electronic device 100 determines the second to-be-verified access point that can be automatically accessed through the secret key corresponding to the first access point.
[0208] The following describes the manner of determining the second to-be-verified access point through active scanning by steps S6021-S6022 shown in FIG. 9A. For example, step S602 can include steps S6021-S6022.
[0209] S6021, the electronic device 100 scans the access points nearby to acquire a third to-be-verified access point scanned in the first to-be-verified access point.
[0210] In some embodiments, after acquiring the first to-be-verified access point, the electronic device 100 can trigger active scanning to determine whether the first to-be-verified access points are actually present nearby. In the case that the access points are actually present nearby, only the access points that are actually present can be the connectable access points, such as the access points in the connectable state.
[0211] S6022. The electronic device 100 requests to access the third to-be-verified access point by the key indicated by the first information, and obtains a second to-be-verified access point successfully accessed in the third to-be-verified access point.
[0212] In some embodiments, the keys of the access points of different frequency bands provided by the AP device 200 are the same. After the electronic device 100 accesses the first access point provided by the AP device 200, the electronic device 100 can save the key of the first access point. For example, the first information saved by the electronic device 100 includes the key of the first access point. Then, after the electronic device 100 completes scanning of the third to-be-verified access point, the electronic device 100 can attempt to access the third to-be-verified access point scanned by using the key indicated by the first information.
[0213] If the third to-be-verified access point can be accessed by using the key, the electronic device 100 can determine that the third to-be-verified access point is an access point belonging to the same AP device as the currently accessed first access point. Then, the electronic device 100 can perform the following step S603 to trigger a usable probe of the third to-be-verified access point.
[0214] If the third to-be-verified access point cannot be accessed by using the key, the electronic device 100 can determine that the third to-be-verified access point is not an access point belonging to the same AP device as the currently accessed first access point. If all the third to-be-verified access points cannot be accessed by using the key, the electronic device 100 can return to perform the above step S601 to re-determine the first to-be-verified access point.
[0215] In some embodiments, the AP device 200 can modify the keys of the provided access points according to user operations. Then, there are some scenarios in which the key of the first access point provided by the AP device is different from the key of the second access point. Then, if the electronic device 100 requests to access the first to-be-verified access point (or the third to-be-verified access point) based on the key of the first access point, the electronic device 100 can fail to access. Alternatively, during the process in which the electronic device 100 requests to access the first to-be-verified access point (or the third to-be-verified access point) by using the key of the first access point, the electronic device 100 determines that all the first to-be-verified access points (or the third to-be-verified access points) cannot be accessed. Then, the electronic device 100 displays prompt information to prompt the user to confirm whether to access the second access point and to input the key of the second access point. After that, the electronic device 100 can attempt to access the first to-be-verified access point (or the third to-be-verified access point) by using the received key, and determine the access point successfully accessed as the second to-be-verified access point.
[0216] In this way, the problem that the electronic device 100 cannot automatically access the access points of other frequency bands of the same AP device due to different keys of different access points of the AP device is avoided, and the realizability of the scheme is ensured.
[0217] In some embodiments, the electronic device 100 can directly display a prompt information to prompt the user to confirm whether to access the third to-be-verified access point and input the secret key after scanning the third to-be-verified access point. Then, the electronic device 100 can attempt to access the third to-be-verified access point by using the received secret key, and determine the successfully accessed third to-be-verified access point as the second to-be-verified access point. In this way, the process of attempting to access the third to-be-verified access point by using the secret key of the first access point is saved.
[0218] As shown in FIG. 9B, step S6021 includes steps S60211-S60215.
[0219] S60211, the electronic device 100 triggers to scan the access points in the vicinity and starts a timer 1.
[0220] In some embodiments, after determining the first to-be-verified access point, the electronic device 100 can trigger to actively scan the access points in the vicinity to determine that the first to-be-verified access point is a truly existing access point.
[0221] S60212, the electronic device 100 determines whether the timer 1 is expired. If not, the electronic device 100 performs step S60213; if yes, the electronic device 100 performs step S60215.
[0222] S60213, the electronic device 100 determines whether a third to-be-verified access point is scanned. If yes, the electronic device 100 performs step S60214; if not, the electronic device 100 performs step S60215.
[0223] In some embodiments, after triggering the active scanning process, the electronic device 100 starts the timer 1 to record the scanning time. If the electronic device 100 does not scan the third to-be-verified access point within a preset time, the electronic device 100 can return to step S601 to reacquire the first to-be-verified access point. That is, step S6025 is performed. If the electronic device 100 scans the third to-be-verified access point within the preset time, the electronic device 100 can trigger the connection available probe of the scanned third to-be-verified access point. That is, step S603 is performed.
[0224] It should be understood that the execution sequence between step S60212 and step S60213 is not limited in the embodiments of the present application. That is, the electronic device 100 starts the timer 1 when starting to scan the third to-be-verified access point. The timer 1 is continuously running during the scanning process of the third to-be-verified access point, and stops running when scanning the third to-be-verified access point. Alternatively, the scanning of the third to-be-verified access point and the running of the timer 1 are stopped when the timer 1 is expired (e.g., the preset time is exceeded).
[0225] In some embodiments, in the active scanning process, the electronic device 100 sends a probe request management frame to the AP device 200 according to a preset period, to determine whether the third to-be-verified access point exists according to the probe response management frame sent by the AP device 200.
[0226] S60214, the electronic device 100 triggers the connection available probe.
[0227] In some embodiments, after determining that the third to-be-verified access point is scanned, the electronic device 100 can verify the third to-be-verified access point. Wherein, the key of the first access point and the access point of the second frequency provided by the AP device 200 is the same. Then, the electronic device 100 can verify whether it can access the third to-be-verified access point through the key indicated by the first information of the first access point. Alternatively, if it can access, the electronic device 100 can also verify whether the communication connection of the electronic device 100 accessing the to-be-verified access point can normally communicate. That is, the connection available probe includes probing whether the scanned access point can be accessed and whether the scanned access point can normally communicate.
[0228] Wherein, the specific implementation of the connection available probe can refer to step S603.
[0229] S60215, the electronic device 100 returns to obtain the first to-be-verified access point of at least one second frequency.
[0230] In some embodiments, after determining that the first to-be-verified access point does not exist, the electronic device 100 can return to the above step S601 to reacquire the first to-be-verified access point. That is, the electronic device 100 determines that the first to-be-verified access point determined by the passive scanning method does not exist in the vicinity, and needs to be reconfirmed.
[0231] In this way, after the electronic device determines the to-be-verified access point by the passive scanning method, it determines whether the to-be-verified access point exists in the real network environment by the active scanning method. Thus, the scanning efficiency is improved, and the influence on the communication quality of the electronic device 100 based on the first access point is reduced.
[0232] In some embodiments, since the active scanning process or the process of requesting access to the to-be-verified access point may have an impact on the current communication quality of the electronic device 100, the electronic device 100 can trigger the active scanning process or the process of requesting access to the to-be-verified access point again in the case that the current satisfies the determination condition, to reduce the impact on the user experience.
[0233] As shown in FIG. 10, before step S602, step S1001 can also be included.
[0234] S1001, the electronic device 100 determines that the current satisfies the discrimination condition.
[0235] The discrimination condition comprises one or more of the following, for example: not a production line version, a WLAN switch is turned on, an access point automatic identification connection switch is turned on, a product of China region, not in a music playing state, not in a voice call state, connected to a first access point and the first access point is available, an encryption mode of the first access point is a preset encryption mode, an identification number of the first access point is less than a preset identification number threshold, a time length in a screen-off state is greater than a preset screen-off time threshold, in a charging state, a VAP is in a preset VAP state, an RSSI is greater than a preset signal receiving strength threshold, and a throughput is less than a preset throughput threshold.
[0236] Optionally, the production line version refers to a function version set in the production process of the electronic device 100. In order to avoid affecting the production, the production line version does not trigger the automatic scanning and access of the access point. That is, the connection method provided in the embodiments of the present application is applied to the non-production line version, and takes effect in the ordinary user use scenario.
[0237] Optionally, when the WLAN is turned on, the electronic device 100 can scan and access the access point existing in the vicinity. Therefore, the electronic device 100 needs to determine that the WLAN switch is turned on, and in this case, the process of active scanning and access can be triggered.
[0238] Optionally, the access point automatic identification connection switch is used to turn on the access point automatic identification connection function. Optionally, when the access point automatic identification connection switch is turned on, the electronic device 100 can automatically identify and connect the second access point belonging to the same AP device as the first access point in response to the first access point having been connected.
[0239] Optionally, since the non-China region AP device may have problems not suitable for the current scheme, the judgment of whether it is a product of China region is added in the discrimination condition.
[0240] Optionally, to reduce the impact of the active scanning process (or the process of requesting access to the to-be-verified access point) on the user's use, in some use scenarios, the electronic device 100 cannot trigger the active scanning process; or in some scenarios, the electronic device 100 triggers the active scanning process. For example, when the electronic device 100 is in a music playing state (i.e., in a music playing scenario) or in a voice call state (i.e., in a voice call scenario), the electronic device 100 cannot trigger the active scanning process to avoid affecting the music playing or voice call, etc. For another example, when the electronic device 100 is in a screen-off state, the user may not need to use the electronic device 100 temporarily. Then, in the case that the electronic device is in a screen-off state, performing active scanning will not affect the user's use. Optionally, in the case that the duration of the screen-off state exceeds a preset screen-off time threshold, the user is less likely to use the electronic device 100, so after the screen-off time of the electronic device 100 exceeds the preset screen-off time threshold, the active scanning process is triggered again, which can further reduce the possibility of affecting the user's use. Optionally, the preset screen-off time threshold is, for example, 120 seconds, 180 seconds, 240 seconds, etc. For another example, the active scanning process will consume power. Therefore, the electronic device 100 can trigger the active scanning process when it is determined that the electronic device 100 is in a charging state. Optionally, the electronic device 100 can determine whether the electronic device 100 is in a music playing state, a voice call state, a screen-off state, a charging state, etc. by acquiring a system report event.
[0241] Optionally, the electronic device 100 can trigger the active scanning process when it is determined that the electronic device 100 has accessed the available first access point and the encryption mode of the first access point is a preset encryption mode. For example, the preset encryption mode is WPA1, WPA2, or WPA3.
[0242] Optionally, the preset VAP state includes one or more of the following: a non-point to point (P2P) connection state, a non-HarmonyOS markup language (HML) state, a non-soft-AP state, and a non-multilink state. Optionally, in the case that the WiFi connection is occupied in a scenario that is not the preset VAP state, the automatic scanning and access of the access point can affect the business that is currently running through the WiFi connection. Therefore, in the case that the electronic device 100 and the AP device 200 are in the preset VAP state, the scanning and access of the second access point are triggered again to avoid affecting the user's use.
[0243] Optionally, the electronic device 100 triggers the active scanning process (or the process of requesting to access the to-be-verified access point) in a case where it is determined that the communication quality of the current first access point is good, so as to reduce the impact on the user. For example, the electronic device 100 can determine that the communication quality of the current first access point is good in a case where the number of times of identification of the first access point is less than a preset number of times of identification threshold and the RSSI is greater than a preset signal receiving strength threshold. Then, the electronic device 100 can trigger the active scanning process. Optionally, the preset number of times of identification threshold is, for example, 3. The preset signal receiving strength threshold is, for example, -65 decibel-milliwatts (dbm).
[0244] Optionally, the electronic device 100 can determine that the current communication is not busy and trigger the active scanning process (or the process of requesting to access the to-be-verified access point) in a case where it is determined that the current communication throughput is less than a preset throughput threshold. Optionally, the preset throughput threshold is, for example, 1 megabits per second (Mbps).
[0245] In this way, the electronic device 100 triggers the subsequent active scanning process or the process of requesting to access the to-be-verified access point in a case where it is determined that the current active scanning process or the process of requesting to access the to-be-verified access point is suitable, so as to reduce the impact on the user.
[0246] In some embodiments, the electronic device 100 triggers the first determination process of the determination condition after determining that the duration of the screen-off state exceeds a preset screen-off time threshold. If all the determination conditions are met, the electronic device 100 can trigger the active scanning process or the process of requesting to access the to-be-verified access point. If all the determination conditions are not met, the electronic device 100 can periodically determine whether the determination conditions are met according to the period of the preset screen-off time threshold in a case where it is determined that the current first to-be-verified access point exists, so as to determine whether the active scanning process or the process of requesting to access the to-be-verified access point can be triggered in a timely manner.
[0247] It should be understood that the embodiments of the present application do not limit the execution order of step S601 and step S1001. For example, the electronic device 100 can trigger the determination of whether the determination conditions are met after obtaining the first to-be-verified access point of the at least one second frequency band, and trigger the active scanning of the first to-be-verified access point that can exist nearby in a case where the determination conditions are met. That is, the electronic device 100 executes step S601 first and then executes step S1001. For another example, the electronic device 100 triggers the obtaining of the first to-be-verified access point of the at least one second frequency band in a case where it is determined that the determination conditions are met. That is, the electronic device 100 executes step S1001 first and then executes step S601.
[0248] S603, the electronic device 100 saves the second information of the second access point available in the second to-be-verified access point.
[0249] In some embodiments, the electronic device 100 saves the second information of the second access point upon determining that the second access point is available. Then, the electronic device 100 needs to first verify whether the second to-be-verified access point is available, take the access point available therein as the second access point to be searched for, and save the second information of the second access point.
[0250] In some embodiments, after the electronic device 100 accesses the second to-be-verified access point provided by the AP device 200, the communication connection established thereby can also be in an unavailable state, such as being unable to provide the electronic device 100 with online services and the like. Therefore, after the electronic device 100 accesses the second to-be-verified access point by using the secret key indicated by the first information, the electronic device 100 also needs to verify the availability of the communication connection corresponding to the second to-be-verified access point. In a case where it is determined that the communication connection is available, the electronic device can determine that the second to-be-verified access point passes the verification and is the second access point to be searched for.
[0251] In this way, the electronic device 100 determines the final available second access point by using the connection availability detection. Subsequently, the electronic device 100 can automatically access the second access point based on the saved second access point when needed, and implement the communication service based on the second frequency band for the user.
[0252] In some embodiments, part of the electronic devices are devices supporting dual-WiFi, and part of the electronic devices are devices not supporting dual-WiFi. Among them, the devices supporting dual-WiFi can simultaneously establish WiFi connections with different access points provided by the same AP device. The devices not supporting dual-WiFi can only establish one WiFi connection with the AP device. If the electronic device 100 needs to switch to access different access points, the electronic device 100 needs to first disconnect the WiFi connection with the access point in the frequency band, and then reestablish the WiFi connection with the access point to be switched to.
[0253] The process of the electronic device 100 implementing the connection availability detection is introduced below by using the steps shown in FIG. 11 and FIG. 12, respectively, in a case where the electronic device 100 is a device not supporting dual-WiFi or a case where the electronic device 100 is a device supporting dual-WiFi.
[0254] Alternatively, as described above, in the process of requesting to access the to-be-verified access point by using the secret key indicated by the first information, the to-be-verified access point requested to be accessed can be the first to-be-verified access point, or a third to-be-verified access point among the first to-be-verified access points determined to exist by the electronic device 100 through active scanning. The process of the connection availability detection is introduced in detail below by taking the to-be-verified access point requested to be accessed by using the secret key indicated by the first information as the first to-be-verified access point. It should be understood that the process of the connection availability detection described below is also applicable to the third to-be-verified access point.
[0255] FIG. 11 is a flow diagram illustrating a process of implementing a connection availability detection procedure when the electronic device 100 does not support dual-WiFi connection according to an embodiment of the disclosure. As shown in FIG. 11, the process includes the following steps.
[0256] In step S1101, the electronic device 100 disconnects the first connection and sends a first connection establishment request to the first to-be-verified access point.
[0257] In some embodiments, the electronic device 100 obtains the key indicated by the first information and the first to-be-verified access point, and the electronic device 100 disconnects the first connection between the first WiFi and the AP device 200. Then, the electronic device 100 requests to establish a WiFi connection with the first to-be-verified access point by using the key indicated by the first information.
[0258] That is, since the electronic device 100 does not support dual-WiFi connection, the electronic device 100 needs to disconnect the established WiFi connection before establishing a new WiFi connection with the first to-be-verified access point in the process of verifying whether the first to-be-verified access point is accessible.
[0259] In step S1102, the electronic device 100 determines whether the WiFi connection with the first to-be-verified access point is successfully established. If yes, step S1103 is performed; if no, step S1105 is performed.
[0260] In some embodiments, after the electronic device 100 determines that the WiFi connection with the first to-be-verified access point is successfully established by using the key indicated by the first information, the electronic device 100 can perform step S1103 to verify the availability of the WiFi connection. Alternatively, after the electronic device 100 determines that the WiFi connection with the first to-be-verified access point fails to be established by using the key indicated by the first information, the electronic device 100 can perform step S1105 to determine that the first to-be-verified access point fails to pass the verification.
[0261] In some embodiments, the electronic device 100 triggers a timer to detect the duration of establishing the WiFi connection with the first to-be-verified access point. If the electronic device 100 fails to establish the WiFi connection with the first to-be-verified access point by using the key indicated by the first information within a preset WiFi connection establishment duration threshold, the electronic device 100 can determine that the WiFi connection establishment fails.
[0262] In step S1103, the electronic device 100 determines whether the successfully established WiFi connection is available. If yes, step S1104 is performed; if no, step S1105 is performed.
[0263] In some embodiments, after the electronic device 100 establishes the WiFi connection with the first to-be-verified access point, the electronic device 100 can send information to the AP device through the WiFi connection and receive the information fed back by the AP device. If the information is sent successfully, it can be determined that the successfully established WiFi connection is available, and the electronic device 100 can perform the following step S1104 to determine that the first to-be-verified access point passes the verification. If the information is not sent successfully, it can be determined that the successfully established WiFi connection is not available, and the electronic device 100 can perform the following step S1105 to determine that the first to-be-verified access point fails the verification.
[0264] S1104, the electronic device 100 acquires the second access point corresponding to the WiFi connection available.
[0265] In some embodiments, the electronic device 100 determines that the WiFi connection can be established between the electronic device 100 and the second access point in the first to-be-verified access point, and the established WiFi connection is available. Then, the electronic device 100 can determine that the second access point passes the verification and determine the second access point as the access point to be acquired.
[0266] S1105, the electronic device 100 deletes the first to-be-verified access point that cannot be connected or connected.
[0267] In some embodiments, the electronic device 100 determines that the WiFi connection cannot be established between the electronic device 100 and the first to-be-verified access point. Alternatively, the electronic device 100 determines that the established WiFi connection is not available after the WiFi connection is established between the electronic device 100 and the first to-be-verified access point. Then, the electronic device 100 can determine that the first to-be-verified access point fails the verification, and the electronic device 100 deletes the first to-be-verified access point that cannot be connected or connected.
[0268] S1106, the electronic device 100 disconnects the WiFi connection between the electronic device 100 and the second access point and re-establishes the first connection.
[0269] In some embodiments, after the electronic device 100 acquires the second access point, the electronic device 100 can save the second information of the second access point. And the electronic device 100 can re-establish the first connection with the first access point to ensure the continuous communication between the electronic device 100 and the first access point and meet the continuous use requirement of the user.
[0270] In some embodiments, after the electronic device 100 acquires the second access point, the electronic device 100 can disconnect the WiFi connection between the electronic device 100 and the second access point.
[0271] It should be understood that the step S1106 is an optional step, and after the electronic device 100 saves the second information of the second access point, the electronic device 100 can adaptively select to access the first access point or the second access point. If the electronic device 100 selects to access the second access point, the electronic device 100 does not have to re-establish the first connection.
[0272] In addition, in the case where the first to-be-verified access point is multiple, steps S1101-S1106 are loop steps until the connection available detection of all the first to-be-verified access points is completed. In the case where the first to-be-verified access point is one, if the first to-be-verified access point fails to pass the verification, the electronic device 100 can acquire the first to-be-verified access point again through the above-mentioned example embodiments.
[0273] In some embodiments, the electronic device 100 is configured with a self-healing function for automatically triggering the use of cellular data to implement network communication in the case where the WiFi connection of the electronic device 100 fails to communicate. In order to effectively perform the connection available detection of the to-be-verified access point and avoid the automatic switching to use cellular data from affecting the judgment of the connection availability of the first to-be-verified access point, the electronic device 100 can close the self-healing function before performing the connection available detection. For example, the electronic device 100 closes the self-healing function before step S1101. Moreover, the electronic device 100 opens the self-healing function after completing the connection available detection. For example, the electronic device 100 opens the self-healing function after step S1104 or step S1105.
[0274] FIG. 12 is a flow diagram of a process of implementing the connection available detection in the case where the electronic device 100 is a dual-WiFi device according to an embodiment of the present application. As shown in FIG. 12, the process includes the following steps.
[0275] S1201. The electronic device 100 sends a second connection establishment request to the first to-be-verified access point in the process of maintaining the first connection.
[0276] S1202. The electronic device 100 determines whether the WiFi connection with the first to-be-verified access point is successfully established. If yes, step S1203 is performed; if no, step S1205 is performed.
[0277] S1203. The electronic device 100 determines whether the successfully established WiFi connection is available. If yes, step S1204 is performed; if no, step S1205 is performed.
[0278] S1204. The electronic device 100 acquires the second access point corresponding to the available WiFi connection.
[0279] S1205. The electronic device 100 deletes the first to-be-verified access point that is not connectable or the connection of which is not available.
[0280] In some embodiments, the electronic device 100 accesses the first access point of the AP device 200 through a WiFi 1 connection (e.g., the first connection). Then, in a case where it is determined that the connection available detection for the first to-be-verified access point is needed, the key indicated by the first information is triggered to request to access the first to-be-verified access point. Since the electronic device 100 supports dual WiFi connection, the electronic device 100 can request to establish a WiFi connection with the first to-be-verified access point by re-establishing another WiFi connection (e.g., a WiFi 2 connection) while maintaining the first connection. If the electronic device 100 determines that the WiFi connection is successfully established and the successfully-established WiFi connection is available, the electronic device 100 can determine that the first to-be-verified access point is verified and determine the first to-be-verified access point as the second access point to be acquired. Otherwise, the electronic device 100 can determine that the first to-be-verified access point fails to pass the verification, and the electronic device 100 deletes the first to-be-verified access point which is not connectable or not available.
[0281] S1206, the electronic device 100 disconnects the WiFi connection between the electronic device 100 and the second access point.
[0282] In some embodiments, the electronic device 100 can delete the third connection after completing the connection available detection for the to-be-verified access point by establishing the WiFi connection. Subsequently, the electronic device 100 can trigger to establish the WiFi connection with the second access point when needed.
[0283] Optionally, other contents of steps S1201-S1206 can refer to the related contents of steps S1101-S1106 described above, and will not be described herein again.
[0284] It should be understood that step S1206 is an optional step. That is, the electronic device 100 can also not disconnect the WiFi connection which has been established with the second access point.
[0285] In addition, in a case where the electronic device 100 is a dual-WiFi-enabled device, the electronic device 100 can also be configured with a self-healing function. Then, in a case where the electronic device 100 is configured with the self-healing function, the electronic device 100 can turn off the self-healing function before triggering the connection available detection for the first to-be-verified access point, and turn on the self-healing function after completing the connection available detection for the first to-be-verified access point.
[0286] In some embodiments, in the case that the electronic device 100 is a dual-WiFi enabled device, the electronic device 100 can simultaneously establish WiFi connections with different access points provided by the same AP device. Scanning the second access point and establishing a communication connection with the second access point through the WiFi connection will not affect the communication of the first connection or affect it to a small extent. Then, in step S1001 described above, when determining whether to trigger the process of scanning the second access point according to the predetermined condition, the electronic device 100 can not include the condition that is set because the scanning, connection, and the like may affect the ongoing WiFi service, such as not being in a music playing state, not being in a voice call state, the VAP being in a preset VAP state, and the like.
[0287] For example, because the electronic device 100 is performing a music playing service through the first connection, triggering the scanning of the frequency band corresponding to the other WiFi connection will not affect the service performed through the first connection. Therefore, the condition can not include the condition of determining whether the electronic device 100 is currently in a music playing state.
[0288] In some scenarios, after obtaining the second access point, the electronic device 100 directly saves the second access point, that is, completes the addition of the second access point.
[0289] In some scenarios, after obtaining the second access point, the electronic device 100 notifies the user that the second access point is detected. Then, the electronic device 100 determines whether to save the second access point according to the user operation. For example, the user is a professional user, who may prefer to determine whether the electronic device 100 accesses the second access point by himself / herself rather than by the electronic device 100. In this way, the flexibility of adding the second access point is increased.
[0290] Optionally, FIG. 13A is another connection method flowchart provided by the embodiments of the present application. For example, step S502 can include the steps shown in FIG. 13A. As shown in FIG. 13A, the process includes the following steps.
[0291] S1301, the electronic device 100 obtains a second access point according to the first information of the first access point.
[0292] Optionally, the process of obtaining the second access point can refer to each of the embodiments of the above examples, which will not be described herein again.
[0293] S1302, the electronic device 100 displays prompt information, which is used to prompt the user whether to save the second access point.
[0294] In some embodiments, the electronic device 100 obtains the second access point through each of the embodiments of the above examples. Then, the electronic device 100 can prompt the user whether to add the second access point.
[0295] In some embodiments, the electronic device 100 can prompt the user whether to add the second access point by displaying prompt information. Optionally, the display manner of the prompt information includes one or more of a pop-up window display, a notification bar display, a card display, and the like.
[0296] In step S1303, the electronic device 100 determines whether a user instruction to save is detected. If yes, step S1304 is performed; if no, step S1305 is performed.
[0297] In step S1304, the electronic device 100 saves the second information of the second access point.
[0298] In step S1305, the electronic device 100 does not save the second information of the second access point.
[0299] In some embodiments, after determining that the user agrees to add the second access point, the electronic device 100 can determine to add the second access point and save the second information of the second access point.
[0300] For example, as shown in FIG. 13B, during the screen-off process, the electronic device 100 obtains the second access point according to the first information of the first access point that has been accessed. Then, the electronic device 100 can display prompt information 131 to prompt the user whether to save the searched WLAN (e.g., the second access point) under the same router. In response to the operation of the user on the save control 132, the electronic device 100 can save the second information of the obtained second access point.
[0301] Optionally, the electronic device 100 saves the second information for subsequent automatic access to the second access point based on the second information. Details of the automatic access process are described below in the related content of step S503, which are not repeated here.
[0302] Optionally, after completing the addition of the second access point, the electronic device 100 can continue to detect the access points to be verified and continue to prompt the user to add the detected access points according to the detection condition.
[0303] In some embodiments, after determining that the user does not agree to add the second access point, the electronic device 100 can determine not to add the second access point, e.g., not to save the second information of the second access point.
[0304] Optionally, after determining not to add the second access point, the electronic device 100 can no longer display the current prompt information.
[0305] Optionally, after determining not to add the second access point, the electronic device 100 can continue to detect the to-be-verified access point, and continue to prompt the user to add the detected access point according to the detection condition. Optionally, the electronic device 100 can prompt the user to detect the new access point after a preset time (for example, 24 hours) after the current user operation of not saving. Optionally, the electronic device 100 can stop detecting the to-be-verified access point (for example, turn off the function of automatically identifying and connecting the access point) after the user continuously performs a preset number of times (for example, 2 times) of the operation of not saving. In this way, the frequent prompts are avoided, and the use of the user is affected.
[0306] In some embodiments, the electronic device 100 does not receive the operation of saving or not saving within the preset time. Then, the electronic device 100 can stop displaying the prompt information. Optionally, the electronic device 100 can display the prompt information again after a preset time (for example, 24 hours). Optionally, the electronic device 100 displays the notification of adding the same second access point no more than a preset number of times (for example, 2 times) within a preset period (for example, 7 days).
[0307] In this way, the electronic device 100 selects whether to add the second access point according to the user's intention, increases the flexibility of the user's use, and improves the user's use experience.
[0308] In some scenarios, the user can select to delete the automatically saved second access point. Then, the electronic device 100 can no longer trigger the function of automatically identifying and connecting the second access point in response to the user operation (for example, turn off the function of automatically identifying and connecting the access point). For example, the user is a professional user, and it is more likely that the user wants to determine whether the electronic device 100 accesses the second access point by the user's operation, rather than by the electronic device 100 itself.
[0309] Optionally, as shown in FIG. 14, the implementation process of deleting the access point includes the following steps.
[0310] S1401, the electronic device 100 starts the WLAN function.
[0311] In some embodiments, the electronic device 100 supports establishing a WiFi connection in the case of starting the WLAN function. That is, the electronic device 100 has the basic condition of automatically accessing the second access point.
[0312] S1402, the electronic device 100 determines whether the function of automatically identifying and connecting the access point is started. If yes, step S1403 is performed; if no, step S1404 is performed.
[0313] S1403, the electronic device 100 starts the function of automatically identifying and connecting the access point.
[0314] S1404, the electronic device 100 does not start the access point automatic identification connection module.
[0315] In some embodiments, the electronic device 100 is configured with an access point automatic identification connection function. In a case where the access point automatic identification connection function is turned on, the electronic device 100 can start the access point automatic identification connection module to perform the automatic identification process of the second access point. In a case where the access point automatic identification connection function is not turned on, the electronic device 100 can not start the access point automatic identification connection module, i.e., does not perform the automatic identification process of the second access point.
[0316] Optionally, the automatic identification connection function is in a default on state.
[0317] Optionally, the automatic identification connection function can be controlled to be turned on or turned off through an automatic identification connection switch.
[0318] S1405, the electronic device 100 triggers the process of obtaining the second access point.
[0319] In some embodiments, the electronic device 100 triggers the process of obtaining the second access point through the automatic identification connection module. The process of obtaining the second access point can refer to the above-mentioned various related embodiments, which will not be described here.
[0320] S1406, the electronic device 100 detects a user operation of deleting a saved access point.
[0321] In some embodiments, the electronic device 100 can display one or more saved access points on a WLAN setting interface, and the user can select to delete the saved access point on the interface.
[0322] Optionally, the one or more saved access points displayed on the WLAN setting interface can include or can not include the access point of the second access point obtained by the automatic identification connection module.
[0323] S1407, the electronic device 100 determines whether the deleted access point is the second access point. If yes, step S1408 is performed; if no, step S1409 is performed.
[0324] S1408, the electronic device 100 stops the process of obtaining the second access point.
[0325] S1409, the electronic device 100 ignores the deletion event.
[0326] In some embodiments, in response to the user operation of deleting the saved access point, it can be determined whether the access point indicated by the user to be deleted is the second access point automatically identified by the electronic device 100.
[0327] If the access point indicated to be deleted by the user is the second access point automatically identified by the electronic device 100, the electronic device 100 can determine that the user does not need the electronic device 100 to automatically identify the connection to the second access point. Then, the electronic device 100 can delete the second access point indicated to be deleted by the user. Alternatively, after the deletion of the second access point, the electronic device 100 can stop the process of acquiring the second access point, for example, the electronic device turns off the automatic identification connection switch. Alternatively, after the automatic identification connection switch is turned off, the electronic device 100 ignores the events related to the automatic identification connection of the second access point. Alternatively, the electronic device 100 can automatically turn on the automatic identification connection switch after the factory settings are restored.
[0328] If the access point indicated to be deleted by the user is not the second access point automatically identified by the electronic device 100, for example, the access point manually accessed by the user. Then, the electronic device 100 can directly ignore the deletion event. That is, the electronic device 100 can continue to automatically identify the connection to the second access point. It should be understood that the electronic device 100 ignores the deletion event means that the current deletion event does not affect the automatic identification connection of the second access point, but the electronic device 100 will still delete the access point indicated to be deleted by the user in response to the user operation.
[0329] The process of the electronic device 100 automatically accessing the second access point based on the saved second information of the second access point is described below.
[0330] In some scenarios, after the electronic device 100 saves the second information of the second access point, the electronic device 100 can automatically access the second access point based on the second information. For example, as shown in FIG. 15, after step S502, step S503 can also be included.
[0331] S503, the electronic device 100 automatically establishes a fourth connection with the second access point according to the second information.
[0332] In some embodiments, the electronic device 100 can determine whether to perform access point switching according to the saved second information according to the change of the current communication state. For example, in the scenario shown in FIG. 2, when the electronic device 100 is at position B, the electronic device 100 accesses the first frequency band (such as 2.4G frequency band) provided by the AP device 200. Subsequently, as the electronic device 100 moves, the electronic device 100 moves to position A and is closer to the AP device 200. Then, the electronic device 100 can automatically select the second access point with better signal quality to establish a connection based on the second frequency band (such as 5G frequency band) according to the saved second information. Thus, based on the multi-frequency band capability, the electronic device 100 can adaptively provide the user with a better online experience.
[0333] Exemplarily, as shown in FIG. 3, the electronic device 100 searches for a first access point 31 of a 2.4G frequency band and a second access point 32 of a 5G frequency band. The first access point 31 and the second access point 32 are access points provided by the same AP device 200. Then, the electronic device 100 establishes a first connection with the first access point 31 according to a user operation. As shown in (a) of FIG. 16, the connected WLAN displayed by the electronic device 100 includes the first access point 31 of the 2.4G frequency band, and the available WLAN still includes the second access point 32 of the 5G frequency band. In response to the current scenario, the electronic device 100 can save the second information of the second access point 32 of the 5G frequency band according to the first information of the first access point 31 of the 2.4G frequency band by the method shown in the above various embodiments. For example, as shown in the interface of (b) of FIG. 16, the electronic device 100 has saved the second information of the second access point 32 of the 5G frequency band. Then, in response to a change in communication quality and the like, the electronic device 100 can automatically access the second access point 32 of the 5G frequency band according to the second information. For example, the electronic device 100 is a device supporting dual WiFi, and as shown in (c) of FIG. 16, the connected WLAN displayed by the electronic device 100 includes the first access point 31 of the 2.4G frequency band and the second access point 32 of the 5G frequency band.
[0334] Optionally, in the case where the electronic device 100 supports dual WiFi, the electronic device 100 and the first access point establish a first connection, the electronic device 100 and the second access point establish a fourth connection, and the electronic device 100 adaptively selects whether to communicate through the first connection or the fourth connection according to communication quality. The first connection and the fourth connection are both WiFi connections. Optionally, the electronic device 100 and the AP device 200 can also establish only one WiFi connection.
[0335] Optionally, in the case where the electronic device 100 does not support dual WiFi, the electronic device 100 and the first access point establish a first connection. When it is determined that switching to the second access point is needed, the electronic device 100 disconnects the first connection and establishes a fourth connection with the second access point by reestablishing a WiFi connection.
[0336] Optionally, the above takes the AP device 200 as a dual-band router, and the electronic device 100 automatically accesses a second access point (such as an access point of a 5G frequency band) provided by the AP device 200 based on a first access point (such as an access point of a 2.4G frequency band) already accessed by the AP device 200. It should be understood that the electronic device 100 can also automatically access a first access point (such as an access point of a 2.4G frequency band) provided by the AP device 200 based on a second access point (such as an access point of a 5G frequency band) already accessed by the AP device 200. Alternatively, in the case of an AP device 200 being a three-band router or a router supporting other frequency bands, the electronic device 100 can also automatically connect one or more access points belonging to the same AP device 200 based on a certain access point already accessed by the AP device 200 through the connection method provided in the embodiments of the present application, and the embodiments of the present application will not be described here.
[0337] In addition, the connection method provided in the embodiments of the present application can also be applied to scenarios of Bluetooth connection, zigbee, and other communication modes. For example, two Bluetooth gateways are configured near the electronic device 100, and the electronic device 100 has already accessed one Bluetooth gateway, which can trigger the process of automatically identifying and connecting another Bluetooth gateway.
[0338] The connection method provided in the embodiments of the present application is described in detail above in combination with FIGS. 5-16. The electronic device provided in the embodiments of the present application is described in detail below in combination with FIG. 17.
[0339] In a possible design, FIG. 17 is a structural schematic diagram of an electronic device provided in the embodiments of the present application. As shown in FIG. 17, the electronic device 1700 can include a transceiver unit 1701 and a processing unit 1702. The electronic device 1700 can be used to implement the functions of the electronic device involved in the above method embodiments.
[0340] Optionally, the transceiver unit 1701 is configured to support the electronic device 1700 to perform S501 in FIG. 5; and / or, is configured to support the electronic device 1700 to perform S602 in FIG. 6; and / or, is configured to support the electronic device 1700 to perform S6021 and S6022 in FIG. 9A; and / or, is configured to support the electronic device 1700 to perform S60211 and S60215 in FIG. 9B; and / or, is configured to support the electronic device 1700 to perform S1001 in FIG. 10; and / or, is configured to support the electronic device 1700 to perform S1101-S1106 in FIG. 11; and / or, is configured to support the electronic device 1700 to perform S1201-S1206 in FIG. 12; and / or, is configured to support the electronic device 1700 to perform S503 in FIG. 15.
[0341] Optionally, the processing unit 1702 is configured to support the electronic device 1700 to perform S502 in FIG. 5; and / or, is configured to support the electronic device 1700 to perform S601 and S603 in FIG. 6; and / or, is configured to support the electronic device 1700 to perform S6011-S6013 in FIG. 7; and / or, is configured to support the electronic device 1700 to perform S6012a-S6012d in FIG. 8; and / or, is configured to support the electronic device 1700 to perform S1301, S1303-S1305 in FIG. 13A; and / or, is configured to support the electronic device 1700 to perform S1401-S1409 in FIG. 14.
[0342] The transceiving unit can include a receiving unit and a sending unit, can be implemented by a transceiver or a transceiver related circuit component, and can be a transceiver or a transceiving module. The operations and / or functions of each unit in the electronic device 1700 are respectively used to implement the corresponding procedures of the connection method described in the above method embodiments. All related contents of each step described in the above method embodiments can be referred to the function description of the corresponding functional unit, and will not be repeated here for brevity.
[0343] Optionally, the electronic device 1700 further includes a display unit (not shown in FIG. 17), which is configured to support the electronic device 1700 to perform S1302 in FIG. 13A.
[0344] Optionally, the electronic device 1700 shown in FIG. 17 can further include a storage unit (not shown in FIG. 17), and the storage unit stores programs or instructions. When the transceiving unit 1701 and the processing unit 1702 execute the programs or instructions, the electronic device 1700 shown in FIG. 17 can perform the connection method described in the above method embodiments.
[0345] The technical effects of the electronic device 1700 shown in FIG. 17 can refer to the technical effects of the connection method described in the above method embodiments, which will not be repeated here.
[0346] In addition to the form of the electronic device 1700, the technical solutions provided in the present application can also be a functional unit or a chip in the electronic device, or a device matched with the electronic device.
[0347] The embodiments of the present application also provide a chip system, including: a processor, the processor is coupled with a memory, the memory is used for storing programs or instructions, when the programs or instructions are executed by the processor, the chip system realizes the method in any one of the above method embodiments.
[0348] Optionally, the processor in the chip system can be one or more. The processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which is implemented by reading software code stored in a memory.
[0349] Optionally, the memory in the chip system can also be one or more. The memory can be integrated with the processor or arranged separately from the processor, and the embodiments of the present application do not limit the arrangement. For example, the memory can be a non-transient processor, such as a read-only memory (ROM), which can be integrated on the same chip as the processor or arranged on different chips, and the embodiments of the present application do not limit the type of memory or the arrangement of the memory and the processor.
[0350] For example, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.
[0351] It should be understood that each step in the above method embodiments can be completed by the integrated logic circuit of hardware in the processor or the instructions in the form of software. The method steps disclosed in conjunction with the embodiments of the present application can be directly embodied as hardware processor execution or executed by a combination of hardware and software modules in the processor.
[0352] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. When the computer program is run on a computer, the computer is caused to execute the above related steps to implement the connection method in the above embodiments.
[0353] The embodiments of the present application also provide a computer program product, which, when run on a computer, causes the computer to execute the above related steps to implement the connection method in the above embodiments.
[0354] In addition, an apparatus is provided in the embodiments of the present application. The apparatus can be specifically a component or a module, and can include one or more processors and memories connected thereto. The memories are configured to store computer programs. When the computer programs are executed by the one or more processors, the apparatus performs the connection method in the above-mentioned method embodiments.
[0355] The apparatus, the computer readable storage medium, the computer program product or the chip provided in the embodiments of the present application are all used to execute the corresponding method provided above. Therefore, the beneficial effects achieved thereby can refer to the beneficial effects in the corresponding method provided above, which will not be described here again.
[0356] The steps of the methods or algorithms described in connection with the embodiments disclosed in the present application can be implemented in hardware, or be implemented by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in a random access memory (RAM), a flash memory, a read only memory (ROM), an erasable programmable ROM (EPROM), an electrically EPROM (EEPROM), a register, a hard disk, a mobile hard disk, a compact disk read only memory (CD-ROM) or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC).
[0357] From the above description of the embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example for illustration. In actual applications, the above functions can be completed by different functional modules according to needs; that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above. The specific working process of the above-mentioned system, apparatus and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here again.
[0358] In several embodiments provided in the present application, it should be understood that the disclosed method can be implemented in other ways. The above-described device embodiments are only illustrative. For example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner; for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, modules or units, which can be electrical, mechanical or other forms.
[0359] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0360] The computer readable storage medium includes, but is not limited to, any one of the following: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes.
[0361] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of connecting, characterized by, The method is applied to an electronic device, and the method comprises: The electronic device and a first access point establish a first connection, and the frequency band of the first access point is a first frequency band; According to first information of the first access point, second information of a second access point is saved, the frequency band of the second access point is a second frequency band, and the first information comprises a first secret key of the first access point; The first access point and the second access point are access points provided by the same access point AP device, the service set identifier SSID of the first access point is different from the SSID of the second access point, but the secret keys are the same.
2. The method of claim 1, wherein, The method further comprises: According to the first information of the first access point, a second connection is established with the second access point; The second information of the second access point is saved.
3. The method of claim 2, wherein, The method further comprises: When the second access point is available, the second information of the second access point is saved.
4. The method according to any one of claims 1-3, characterized in that, The method further comprises: The second information of the second access point is automatically saved.
5. The method according to any one of claims 1-3, characterized in that, The method further comprises: Prompt information is displayed, and the prompt information is used to prompt saving of the second information of the second access point.
6. The method according to any one of claims 1-5, characterized in that, The method further comprises: According to the second information, a third connection is automatically established with the second access point.
7. The method according to any one of claims 1 to 6, characterized in that, The first information further comprises one or more of the following: basic service set identifier BSSID, SSID, encryption mode, received signal strength indication RSSI, virtual access point VAP state, identification times, and throughput.
8. The method according to any one of claims 1-7, characterized in that, The method further comprises: According to the first information, a first to-be-verified access point of at least one second frequency band is acquired; A second to-be-verified access point is acquired from the first to-be-verified access point, the second to-be-verified access point is an access point that can be accessed through the first secret key, and the second access point is an available access point in the second to-be-verified access point.
9. The method of claim 8, wherein, The method further comprises: An access point of the second frequency band is acquired; It is determined whether the acquired access point of the second frequency band meets a preset condition; The access point that meets the preset condition is determined as the first to-be-verified access point.
10. The method of claim 9, wherein, The preset condition comprises one or more of the following: the BSSID similarity exceeds a first threshold value, the SSID similarity exceeds a second threshold value, a corresponding configuration file is not saved, the RSSI is greater than a third threshold value, and the encryption mode is a preset encryption mode.
11. The method according to any one of claims 8-10, characterized in that, The method further comprises: Access points of the second frequency band in the vicinity are scanned, and a third to-be-verified access point scanned in the first to-be-verified access point is acquired; The third to-be-verified access point is accessed through the secret key, and the second to-be-verified access point successfully accessed in the third to-be-verified access point is acquired.
12. The method according to any one of claims 8-10, characterized in that, The method further comprises: Access the first to-be-verified access point by the secret key, and obtain the second to-be-verified access point successfully accessed in the first to-be-verified access point.
13. The method of any one of claims 1-7, wherein, The method further comprises: Scanning nearby access points; Accessing the scanned access points by the secret key indicated by the first information; Saving the second information of the second access points successfully accessed and available.
14. The method according to any one of claims 1 to 13, characterized in that, Before the step of saving the second information of the second access points according to the first information of the first access point, the method further comprises: Determining that the current satisfies a judgment condition, the judgment condition comprising one or more of the following: not a production line version, a wireless local area network (WLAN) switch being turned on, an access point automatic identification connection switch being turned on, being a product of a China region, not being in a music playing state, not being in a voice call state, having accessed the first access point and the first access point being available, an encryption mode of the first access point being a preset encryption mode, an identification number of the first access point being less than a preset identification number threshold, a length of time in a screen-off state being greater than a preset screen-off time threshold, being in a charging state, a virtual access point (VAP) being in a preset VAP state, a received signal strength indication (RSSI) being greater than a preset signal receiving strength threshold, and a throughput being less than a preset throughput threshold.
15. The method according to any one of claims 1 to 14, characterized in that, The method further comprises: Detecting a user instruction to delete the second access points, and turning off the automatic identification connection function.
16. An electronic device, comprising: The method further comprises: A processor and a memory, the memory being coupled to the processor, the memory being configured to store computer program codes, the computer program codes comprising computer instructions, when the processor reads the computer instructions from the memory, the electronic device executes the method according to any one of claims 1-15.
17. A computer readable storage medium characterized by: The computer readable storage medium comprises a computer program, when the computer program runs on an electronic device, the electronic device executes the method according to any one of claims 1-15.
18. A computer program product, characterised in that, The computer program product, when running on a computer, makes the computer execute the method according to any one of claims 1-15.
Citation Information
Patent Citations
WiFi (Wireless Fidelity) hotspot connection and switching method and hotspot access equipment
CN107920353A
Wi-Fi connection authentication method, wireless terminal, access node and storage medium
CN115087073A
Network connection method and device, terminal equipment and storage medium
CN116801422A
Antenna configuration method and device
WO2023142782A1