Connection method and electronic equipment
By automatically identifying and saving different access point information of AP devices through electronic devices, the problem of users being unable to manually switch frequency bands is solved, realizing automatic frequency band switching and improving the Internet experience.
Patent Information
- Application Number
- CN202410744477.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2025-12-09
AI Technical Summary
Some routers provide different Service Set Identifiers (SSIDs) for access points on different frequency bands, which prevents users from enjoying the better internet experience provided by the router's multi-band capabilities when manually connecting to the network.
Electronic devices automatically identify different access points provided by the same AP device, save the access point information, verify the access point's key and obtain information from other access points, and automatically switch to the optimal frequency band for communication.
This reduces the difficulty of operation for users, allowing even non-professional users to enjoy a better internet experience brought by the multi-band capabilities of AP devices.
Smart Images

Figure CN121099397A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a connection method and an electronic device. Background Technology
[0002] With the development of communication technology, routers can provide signals on multiple frequency bands for electronic devices to access, thereby improving communication efficiency and signal stability. For example, a dual-band router can provide signals on both the 2.4GHz and 5GHz bands. The 2.4GHz band has a large coverage area but a smaller bandwidth, making it susceptible to interference; the 5GHz band has a smaller coverage area but a higher bandwidth and transmission rate. After an electronic device connects to the access point provided by the router on these two frequency bands, it can adaptively switch to the different frequency bands for communication as needed.
[0003] However, some routers provide different service set identifiers (SSIDs) for access points on different frequency bands. When manually connecting to the network, users may not know that they need to manually connect their electronic devices to access points with different SSIDs, thus failing to enjoy the better internet experience provided by the router's multi-band capabilities. Summary of the Invention
[0004] To address the aforementioned technical problems, this application provides a connection method and an electronic device. The technical solution provided by this application can automatically identify different access points provided by the same AP device and save the access point information, reducing the difficulty of user operation and enabling even non-professional users to easily use the multi-band capabilities of AP devices.
[0005] To achieve the above-mentioned technical objectives, this application provides the following technical solution:
[0006] Firstly, a connection method is provided, applied to an electronic device. The method includes: establishing a first connection between the electronic device and a first access point, wherein the frequency band of the first access point is a first frequency band; storing second information of a second access point based on first information of the first access point, wherein the frequency band of the second access point is a second frequency band; and the first information includes a first key of the first access point. Wherein, the first access point and the second access point are access points provided by the same access point AP device, and the Service Set Identifier (SSID) of the first access point and the SSID of the second access point are different, but their keys are the same.
[0007] In this way, the electronic device, based on the already established first access point, obtains a second access point belonging to the same AP device as the first access point and saves the information of the second access point. This allows even non-professional users to experience the complementary advantages of AP devices supporting multiple access points, thus improving their internet browsing experience.
[0008] According to the first aspect, saving the second information of the second access point based on the first information of the first access point includes: establishing a second connection with the second access point based on the first information of the first access point; and saving the second information of the second access point.
[0009] Generally, access points provided by the same AP devices share the same access point key. Therefore, an electronic device can verify the access point using the key of the first access point it has already connected to, and thus obtain a second access point belonging to the same AP device.
[0010] In this way, the electronic device can use the key indicated by the first information to determine the access point that the key can successfully access as the second access point to be searched.
[0011] According to the first aspect, or any implementation of the first aspect above, the second information of the second access point is saved, including: saving the second information of the second access point when the second access point is available.
[0012] Optionally, in some scenarios, the access point may be unavailable, such as being unable to provide internet access to electronic devices. In this case, even if the electronic device stores information about an unavailable access point, it will still be unable to provide internet access to the user after subsequently connecting to that access point.
[0013] In this way, when an electronic device determines that the second access point is available, it saves the second information, thereby ensuring that subsequent electronic devices can access the second access point based on the second information and provide Internet access services through the second access point.
[0014] According to the first aspect, or any implementation of the first aspect above, the second information of the second access point is saved, including: automatically saving the second information of the second access point.
[0015] In this way, the process of acquiring a second access point without user intervention avoids impacting users.
[0016] According to the first aspect, or any implementation of the first aspect above, saving the second information of the second access point includes: displaying a prompt message, the prompt message being used to prompt the saving of the second information of the second access point.
[0017] For example, a professional user might prefer to decide whether an electronic device connects to a second access point themselves, rather than having the electronic device connect to the second access point automatically.
[0018] In this way, electronic devices can choose whether to save the second information of the second access point according to the user's wishes, increasing the flexibility of user use and improving the user experience.
[0019] According to the first aspect, or any implementation of the first aspect above, the method further includes: automatically establishing a third connection with the second access point based on the second information.
[0020] In this way, after saving the second information of the second access point, the electronic device can automatically connect to the second access point according to the network conditions, so that users can enjoy a better Internet experience brought by the multi-band capability provided by the AP device.
[0021] According to the first aspect, or any implementation of the first aspect above, the first information also includes one or more of the following: Basic Service Set Identifier (BSSID), SSID, encryption method, Received Signal Strength Indicator (RSSI), Virtual Access Point (VAP) status, number of identifications, and throughput.
[0022] In some examples, electronic devices can use this initial information to determine whether the current network conditions are suitable for obtaining a second access point, thereby reducing the impact on users.
[0023] According to the first aspect, or any implementation of the first aspect above, based on the first information of the first access point, the second information of the second access point is saved, including: based on the first information, obtaining at least one first access point to be verified in a second frequency band; obtaining a second access point to be verified from the first access points to be verified, wherein the second access point to be verified is an access point that can be accessed through the first key, and the second access point is an available access point among the second access points to be verified.
[0024] In this way, the electronic device can filter out the first access point to be verified based on the initial information. If a large number of nearby access points are obtained, pre-screening reduces the number of access points that need to be further verified, thereby reducing the difficulty of subsequent verifications. Optionally, the process of filtering the first access point to be verified can be a silent process, so that the electronic device does not need to actively scan for nearby access points, thus avoiding affecting the user's current experience.
[0025] According to the first aspect, or any implementation of the first aspect above, based on the first information, obtaining at least one first access point to be verified in a second frequency band includes: obtaining access points in the second frequency band; determining whether the obtained access points in the second frequency band meet preset conditions; and determining the access points that meet the preset conditions as the first access points to be verified.
[0026] According to the first aspect, or any implementation of the first aspect above, the preset conditions include one or more of the following: BSSID similarity exceeds the first threshold, SSID similarity exceeds the second threshold, the corresponding configuration file is not saved, RSSI is greater than the third threshold, and the encryption method is the preset encryption method.
[0027] In this system, electronic devices can passively scan for signals sent by other nearby devices, and these signals carry information about the access point. This allows the electronic devices to obtain the information needed to determine whether the access point meets preset conditions.
[0028] In this way, by using preset conditions, electronic devices can filter out the first access point that needs further verification. Among them, the first access point to be verified is more likely to be the required second access point.
[0029] According to the first aspect, or any implementation of the first aspect above, obtaining the second access point to be verified from the first access point to be verified includes: scanning access points in the nearby second frequency band to obtain the third access point to be verified scanned from the first access point to be verified; requesting access to the third access point to be verified through a key; and obtaining the second access point to be verified that was successfully accessed from the third access point to be verified.
[0030] In this way, after the electronic device identifies the access point to be verified through passive scanning, it then uses active scanning to determine whether the access point to be verified exists in the real network environment. This improves scanning efficiency and reduces the impact on the communication quality of the electronic device based on the first access point.
[0031] According to the first aspect, or any implementation of the first aspect above, obtaining a second access point that can be accessed through the key indicated by the first information from the first access point to be verified includes: requesting access to the first access point to be verified through the key, and obtaining the second access point to be verified that has been successfully accessed from the first access point to be verified.
[0032] Generally, access points provided by the same AP devices share the same access point key. Therefore, an electronic device can verify the access point using the key of the first access point it has already connected to, and thus obtain a second access point belonging to the same AP device.
[0033] In this way, electronic devices no longer need to actively scan, but can directly obtain the second access point that can be accessed through the key, further reducing the impact on the communication quality of electronic devices based on the first access point.
[0034] According to the first aspect, or any implementation of the first aspect above, based on the first information of the first access point, the second information of the second access point is saved, including: scanning nearby access points; accessing the scanned access point using the key indicated by the first information; and saving the second information of the successfully accessed and available second access point.
[0035] In this way, electronic devices can directly request access to nearby access points based on 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 process of determining the access point to be verified.
[0036] According to the first aspect, or any implementation of the first aspect above, before saving the second information of the second access point based on the first information of the first access point, the method further includes: determining that the current discrimination conditions are met, the discrimination conditions include one or more of the following: not a production line version, the wireless local area network (WLAN) switch is turned on, the access point automatic identification connection switch is turned on, it is a product from the Chinese region, it is not in music playback mode, it is not in voice call mode, it has been connected to the first access point and the first access point is available, the encryption method of the first access point is a preset encryption method, the number of identifications of the first access point is less than a preset identification number threshold, the duration of being in screen-off mode exceeds a preset screen-off time threshold, it is in charging mode, the virtual access point (VAP) is in a preset VAP state, the RSSI is greater than a preset signal reception strength threshold, and the throughput is less than a preset throughput threshold.
[0037] In this way, electronic devices can determine whether it is appropriate to initiate an active scanning process or request access to a verified access point by judging the conditions, and then trigger the subsequent active scanning process or request access to a verified access point, so as to reduce the impact on users.
[0038] According to the first aspect, or any implementation of the first aspect above, the method further includes: detecting a user instruction to delete the second access point and disabling the automatic connection identification function.
[0039] In some scenarios, users may choose to delete saved secondary access points. In this case, the electronic device, responding to the user's action, may no longer trigger automatic identification and connection to the secondary access point, such as disabling the automatic access point identification and connection function. For example, professional users may prefer to decide whether the electronic device connects to the secondary access point themselves, rather than having the electronic device automatically connect, thus meeting the user's flexible usage needs.
[0040] According to the first aspect, or any implementation thereof, the electronic device is a device that does not support dual WiFi. Obtaining a second access point accessible via a key indicated by the first information from the first access point to be verified includes: disconnecting the first connection; sending a first connection establishment request to the first access point to be verified, the first connection establishment request carrying a key; receiving a first connection establishment response from the second access point to be verified, and establishing a second connection with the second access point to be verified.
[0041] Therefore, when an electronic device does not support dual WiFi, it can only establish one WiFi connection. The electronic device can then establish a WiFi connection with the access point to be verified by first disconnecting the first connection, thus facilitating the determination of whether the access point to be verified is the second access point.
[0042] Optionally, after the verification process is completed, the electronic device and the first access point re-establish the first connection.
[0043] According to the first aspect, or any implementation thereof, the electronic device is a dual-WiFi device. Obtaining a second access point accessible via a key indicated by first information from a first access point to be verified includes: while maintaining a first connection, sending a second connection establishment request to the first access point to be verified, the second connection establishment request carrying a key; receiving a second connection establishment response from the second access point to be verified; and establishing a third connection with the second access point to be verified.
[0044] Thus, when an electronic device supports dual WiFi, it can establish two WiFi connections. The electronic device can then establish a WiFi connection with the access point to be verified while maintaining the first connection, making it easier to determine whether the access point to be verified is the second access point.
[0045] Optionally, after the verification process is completed, the electronic device disconnects the established WiFi connection with the access point to be verified.
[0046] Alternatively, electronic devices may choose to disconnect the first connection before establishing a WiFi connection with the access point to be verified.
[0047] Secondly, an electronic device is provided. The electronic device includes a processor and a memory, the memory being coupled to the processor. The memory stores computer program code, which includes computer instructions. When the processor reads the computer instructions from the memory, the electronic device executes the following: establishing a first connection between the electronic device and a first access point, the first access point being on a first frequency band. Based on first information from the first access point, storing second information from a second access point, the second access point being on a second frequency band. The first information includes a first key from the first access point. The first and second access points are access points provided by the same access point AP device. The Service Set Identifier (SSID) of the first access point and the SSID of the second access point are different, but their keys are the same.
[0048] According to the second aspect, based on the first information of the first access point, saving the second information of the second access point includes: establishing a second connection with the second access point based on the first information of the first access point; and saving the second information of the second access point.
[0049] According to the second aspect, or any implementation of the second aspect above, the second information of the second access point is saved, including: saving the second information of the second access point when the second access point is available.
[0050] According to the second aspect, or any implementation of the second aspect above, the second information of the second access point is saved, including: automatically saving the second information of the second access point.
[0051] According to the second aspect, or any implementation of the second aspect above, saving the second information of the second access point includes: displaying a prompt message, the prompt message being used to prompt the saving of the second information of the second access point.
[0052] According to the second aspect, or any implementation of the second aspect above, when the processor reads computer instructions from memory, it also causes the electronic device to perform: automatically establishing a third connection with the second access point based on the second information.
[0053] According to the second aspect, or any implementation of the second aspect above, the first information also includes one or more of the following: Basic Service Set Identifier (BSSID), SSID, encryption method, Signal Received Strength Indicator (RSSI), Virtual Access Point (VAP) status, number of identifications, and throughput.
[0054] According to the second aspect, or any implementation of the second aspect above, based on the first information of the first access point, the second information of the second access point is saved, including: based on the first information, obtaining at least one first access point to be verified in a second frequency band; obtaining a second access point to be verified from the first access points to be verified, wherein the second access point to be verified is an access point that can be accessed through the first key, and the second access point is an available access point among the second access points to be verified.
[0055] According to the second aspect, or any implementation of the second aspect above, based on the first information, obtaining at least one first access point to be verified in a second frequency band includes: obtaining access points in the second frequency band; determining whether the obtained access points in the second frequency band meet preset conditions; and determining the access points that meet the preset conditions as the first access points to be verified.
[0056] According to the second aspect, or any implementation of the second aspect above, the preset conditions include one or more of the following: BSSID similarity exceeds the first threshold, SSID similarity exceeds the second threshold, the corresponding configuration file is not saved, RSSI is greater than the third threshold, and the encryption method is the preset encryption method.
[0057] According to the second aspect, or any implementation of the second aspect above, obtaining the second access point to be verified from the first access point to be verified includes: scanning access points in the nearby second frequency band to obtain the third access point to be verified scanned from the first access point to be verified; requesting access to the third access point to be verified through a key; and obtaining the second access point to be verified that has been successfully accessed from the third access point to be verified.
[0058] According to the second aspect, or any implementation of the second aspect above, obtaining a second access point that can be accessed through the key indicated by the first information from the first access point to be verified includes: requesting access to the first access point to be verified through the key, and obtaining the second access point to be verified that has been successfully accessed from the first access point to be verified.
[0059] According to the second aspect, or any implementation of the second aspect above, based on the first information of the first access point, the second information of the second access point is saved, including: scanning nearby access points; accessing the scanned access point using the key indicated by the first information; and saving the second information of the successfully accessed and available second access point.
[0060] According to the second aspect, or any implementation of the second aspect above, when the processor reads computer instructions from memory, it also causes the electronic device to perform: determining that the current discrimination condition is met, the discrimination condition including one or more of the following: not a production line version, the wireless local area network (WLAN) switch is turned on, the access point automatic identification connection switch is turned on, it is a product from the Chinese region, it is not in music playback mode, it is not in voice call mode, it is connected to the first access point and the first access point is available, the encryption method of the first access point is a preset encryption method, the number of identifications of the first access point is less than a preset identification number threshold, the duration of being in screen-off mode exceeds a preset screen-off time threshold, it is in charging mode, the virtual access point (VAP) is in a preset VAP state, the RSSI is greater than a preset signal reception strength threshold, and the throughput is less than a preset throughput threshold.
[0061] According to the second aspect, or any implementation of the second aspect above, when the processor reads computer instructions from memory, it also causes the electronic device to perform: detecting a user instruction to delete the second access point and disabling the automatic identification connection function.
[0062] According to the second aspect, or any implementation thereof, if the electronic device is not a dual-WiFi device, obtaining a second access point accessible via a key indicated by the first information from the first access point to be verified includes: disconnecting the first connection; sending a first connection establishment request to the first access point to be verified, the first connection establishment request carrying a key; receiving a first connection establishment response from the second access point to be verified, and establishing a second connection with the second access point to be verified.
[0063] According to the second aspect, or any implementation thereof, the electronic device is a dual-WiFi device. Obtaining a second access point accessible via a key indicated by the first information from a first access point to be verified includes: while maintaining a first connection, sending a second connection establishment request to the first access point to be verified, the second connection establishment request carrying a key; receiving a second connection establishment response from the second access point to be verified; and establishing a third connection with the second access point to be verified.
[0064] Thirdly, an electronic device is provided that has the function of implementing the connection method as described in the first aspect and any of its possible implementations. This function can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the described function.
[0065] Fourthly, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (also 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 embodiment of the first aspect.
[0066] Fifthly, a computer program product is provided that, when run on an electronic device, causes the electronic device to perform the method of the first aspect or any one of the embodiments of the first aspect.
[0067] In a sixth aspect, a circuit system is provided, the circuit system including processing circuitry configured to perform the method of the first aspect or any embodiment of the first aspect.
[0068] In a seventh aspect, a chip system is provided, including at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor, and when the at least one processor executes the instructions, the at least one processor performs the method of the first aspect or any embodiment of the first aspect.
[0069] The technical effects of the aforementioned aspects can be referenced from each other, and will not be elaborated further here. Attached Figure Description
[0070] Figure 1 A schematic diagram of a communication system to which the connection method provided in the embodiments of this application is applied;
[0071] Figure 2 This is a schematic diagram of a frequency band switching scenario provided in an embodiment of this application;
[0072] Figure 3 Interface illustration provided for embodiments of this application Figure 1 ;
[0073] Figure 4A A schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application;
[0074] Figure 4B This is a schematic diagram of the hardware structure of the AP device provided in the embodiments of this application;
[0075] Figure 5 Flowchart of the connection method provided in the embodiments of this application Figure 1 ;
[0076] Figure 6 Flowchart of the connection method provided in the embodiments of this application Figure 2 ;
[0077] Figure 7 Flowchart of the connection method provided in the embodiments of this application Figure 3 ;
[0078] Figure 8 Schematic diagram four of the connection method provided in the embodiments of this application;
[0079] Figure 9A Flowchart of the connection method provided in the embodiments of this application Figure 5 ;
[0080] Figure 9B Flowchart of the connection method provided in the embodiments of this application Figure 6 ;
[0081] Figure 10 Flowchart of the connection method provided in the embodiments of this application Figure 7 ;
[0082] Figure 11 Flowchart of the connection method provided in the embodiments of this application Figure 8 ;
[0083] Figure 12 Schematic diagram nine of the connection method provided in the embodiments of this application;
[0084] Figure 13A Flowchart of the connection method provided in the embodiments of this application Figure 10 ;
[0085] Figure 13B Interface illustration provided for embodiments of this application Figure 2 ;
[0086] Figure 14 Flowchart of the connection method provided in the embodiments of this application Figure 10 ;
[0087] Figure 15 Flowchart of the connection method provided in the embodiments of this application Figure 10 one;
[0088] Figure 16 Interface illustration provided for embodiments of this application Figure 3 ;
[0089] Figure 17 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0090] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to be a limitation of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one or more (including two).
[0091] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.
[0092] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0093] Figure 1 This is a schematic diagram of a communication system in which a connection method provided in an embodiment of this application is applied. Figure 1As shown, the communication system includes an electronic device 100 and a wireless access point (AP) device 200.
[0094] Optionally, the electronic device 100 may be, for example, a mobile phone, a personal computer (PC), a tablet computer, a laptop computer, a desktop computer, a computer with transceiver capabilities, 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 care, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a wearable device, an in-vehicle device, an artificial intelligence (AI) device, and other terminal devices. This application does not impose any special limitations on the specific form of the electronic device 100.
[0095] Optionally, the AP device 200 may be, for example, a wireless router for providing a wireless fidelity (Wi-Fi) network. In some embodiments, the electronic device 100 acts as a station (STA) device and can access the Wi-Fi network provided by the AP device 200. The AP device 200 may be a dual-band router, such as supporting the 2.4 GHz band and the 5 GHz band. The AP device 200 may also be a tri-band router, such as supporting the 2.4 GHz band, 5 GHz low frequency, and 5 GHz high frequency. Optionally, the AP device 200 may also support more frequency bands, which is not specifically limited in this embodiment.
[0096] In some embodiments, electronic device 100 and AP device 200 establish an 802.11 session based on the Institute of Electrical and Electronics Engineers (IEEE) 802.11 standard, and electronic device 100 accesses the Wi-Fi network provided by AP device 200 to achieve Internet access.
[0097] For example, electronic device 100 first needs to determine the service set identifier (SSID) of the Wi-Fi network to be accessed and the authentication method. The authentication method is pre-configured in AP device 200. During the authentication process, electronic device 100 completes the authentication process by exchanging authentication frames with AP device 200. Electronic device 100 can obtain the SSID during the scanning process, which is divided into passive scanning and active scanning. For example, during passive scanning, electronic device 100 obtains beacon frames sent by AP device 200 near electronic device 100 at a preset period, and obtains the SSID carried in the beacon frames. Another example is that electronic device 100 sends a probe request management frame to AP device 200, and then obtains the SSID after receiving a probe response management frame from AP device 200. Subsequently, the authentication and association processes are completed based on the SSID. During the authentication process, electronic device 100 receives the key input by the user and completes authentication through key exchange with AP device 200 to access the Wi-Fi network of the corresponding frequency band. During the association process, the media access control (MAC) address of electronic device 100 is associated with the port of AP device 200 so that AP device 200 and electronic device 100 can correctly transmit signals.
[0098] The SSID is a unique identity document (ID) for the AP device 200, used to distinguish different networks. The AP device 200 can be configured with different SSIDs to differentiate between the different networks it provides (e.g., 2.4GHz network, 5GHz network, employee access network, visitor access network, etc.). 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 that AP device 200 via a wireless network form a group, called a basic service set (BSS). Devices within the same BSS are configured with corresponding identity documents, which are called BSSIDs. For example, the electronic device 100 can distinguish between different frequency band Wi-Fi networks provided by the AP device 200 based on the different SSIDs corresponding to the AP device 200. The electronic device 100 can also determine whether Wi-Fi networks of different frequency bands belong to the same AP device 200 based on whether the similarity of the BSSIDs exceeds a preset threshold.
[0099] In some embodiments, the electronic device 100 has a frequency band switching capability, which enables it to switch to other frequency bands of the AP device 200 for communication when the signal quality of a certain frequency band of the access AP device 200 does not meet the communication requirements.
[0100] For example, such as Figure 2 As shown, assuming the AP device 200 is a dual-band router, capable of providing signals on both the 2.4GHz and 5GHz bands, the 2.4GHz band has a wider coverage area but lower bandwidth, while the 5GHz band has a smaller coverage area but higher bandwidth. For example, the 5GHz band coverage area of the provided Wi-Fi network is the area of region 201, and the 2.4GHz band coverage area is the area of region 202. The electronic device 100 can obtain the 2.4GHz and 5GHz access points provided by the AP device 200 and, according to user operation, connect to the access points to obtain the Wi-Fi network of the corresponding band. It should be understood that the access points of different frequency bands provided by the AP device can also be described as hotspots of different frequency bands provided by the AP device, and this embodiment does not limit this.
[0101] For example, electronic device 100 is located at location A, which is within the signal coverage area of both the 5GHz band and the 2.4GHz band of access point (AP) device 200. Therefore, electronic device 100 can access the Wi-Fi network provided by AP device 200. Figure 3As shown, the electronic device 100 can display searchable connectable wireless local area networks (WLANs), such as a first access point 31 on the 2.4 GHz band and a second access point 32 on the 5 GHz band. For non-professional users, the different network names displayed might lead them to believe that these are Wi-Fi networks provided by different access points (APs), and they might assume that connecting to any of these Wi-Fi networks will allow them to enjoy the multi-band capabilities provided by the dual-band AP. For example, if a user instructs the electronic device 100 to connect to the first access point 31 on the 2.4 GHz band, the electronic device 100 will display a password input interface. Upon receiving the password entered by the user, the network authentication process will be completed, allowing access to the first access point 31 on the 2.4 GHz band. During the subsequent connection process, the electronic device 100 can provide the user with access to the 2.4 GHz band Wi-Fi network. However, since the user did not instruct them to connect to the second access point 32 on the 5 GHz band, the electronic device 100 cannot provide the user with the experience of automatically switching to the 5 GHz band Wi-Fi network. For example, when a user moves between location A and location B, the 2.4 GHz Wi-Fi network at location B provides a good internet experience, but at location A, the 5 GHz Wi-Fi network is actually the better option. However, since the electronic device 100 is not currently connected to the 5 GHz Wi-Fi network, it cannot automatically switch to the 5 GHz Wi-Fi network to allow the user to experience the 5 GHz Wi-Fi network.
[0102] In other words, because access points on different frequency bands have different SSIDs, users need to manually connect their electronic devices (100) to access points on different frequency bands, which is cumbersome. Furthermore, if users have limited knowledge of multi-band access points and are unaware that they need to manually connect to access points on multiple frequency bands, they will be unable to enjoy the better internet experience offered by the router's multi-band capabilities.
[0103] Based on this, this application provides a connection method that automatically identifies different access points provided by the same AP device and automatically connects to them, reducing the difficulty of user operation and enabling non-professional users to easily use the multi-band capabilities of AP devices.
[0104] For example, Figure 4A A schematic diagram of an electronic device 100 is shown.
[0105] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc.
[0106] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0107] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0108] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0109] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0110] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0111] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0112] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0113] The charging management module 140 receives 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 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0114] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0115] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0116] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, 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 conjunction with a tuning switch.
[0117] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0118] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0119] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may 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 technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0120] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0121] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be manufactured using a liquid crystal display (LCD), such as an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini-LED, a micro-LED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0122] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion 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 image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0123] The external storage 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 storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0124] Internal memory 121 can be used to store executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. Internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory disposed in the processor.
[0125] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110. The electronic device 100 can use the audio module 170 for functions such as music playback and recording. The audio module 170 may include a speaker, receiver, microphone, headphone jack, and application processor to implement audio functions.
[0126] The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc. For example, electronic device 100 uses a touch sensor to detect touch operations applied to or near display screen 194.
[0127] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0128] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.
[0129] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0130] 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, where N is a positive integer greater than 1.
[0131] Optionally, the AP device 200 in this embodiment can be implemented using different devices. For example, the AP device 200 in this embodiment can be implemented using... Figure 4B It is implemented using communication devices. Figure 4B The diagram shows the hardware structure of an AP device 200 provided in an embodiment of this application. The AP device 200 includes at least one processor 401, a communication line 402, a memory 403, and at least one communication interface 404. The memory 403 may also be included within the processor 401.
[0132] The processor 401 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present application.
[0133] Communication line 402 may include a path for transmitting information between the aforementioned components.
[0134] Communication interface 404 is used for communication with other devices. In this embodiment, the communication interface can be a module, circuit, bus, interface, transceiver, or other device capable of communication functions, used for communication with other devices. Optionally, when the communication interface is a transceiver, the transceiver can be a separately configured transmitter used to send information to other devices, or it can be a separately configured receiver used to receive information from other devices. The transceiver can also be a component that integrates sending and receiving information functions; this embodiment does not limit the specific implementation of the transceiver.
[0135] The memory 403 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processor via communication line 402. The memory may also be integrated with the processor.
[0136] The memory 403 stores computer execution instructions for implementing the scheme of this application, and the processor 401 controls the execution of these instructions. The processor 401 executes the computer execution instructions stored in the memory 403 to implement the frequency band switching method provided in the following embodiments of this application.
[0137] Optionally, the computer execution instructions in the embodiments of this application may also be referred to as application code, instructions, computer program or other names, and the embodiments of this application do not specifically limit them.
[0138] In a specific implementation, as one example, processor 401 may include one or more CPUs, for example... Figure 4B CPU0 and CPU1 in the CPU.
[0139] In a specific implementation, as one example, the AP device 200 may include multiple processors, for example... Figure 4B Processors 401 and 407 are described herein. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here may refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).
[0140] The aforementioned AP device 200 can be a general-purpose device or a dedicated device; the embodiments of this application do not limit the type of AP device 200. The AP device 200 can be a device with… Figure 4B Devices with similar structures.
[0141] The following describes the connection method provided in this application embodiment using AP device 200 as an example, which supports both 2.4GHz and 5GHz bands. It is understood that the connection method for AP device 200 supporting more frequency bands can refer to the connection method provided in this application embodiment, and will not be repeated here.
[0142] Figure 5 This is a flowchart illustrating a connection method provided in an embodiment of this application. It should be noted that this method does not rely on... Figure 5 The specific order described below is a limitation. It should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0143] S501, electronic device 100 and first access point establish a first connection, the frequency band of the first connection is the first frequency band.
[0144] The AP device 200 is a dual-band router, providing Wi-Fi network access points including a first access point for the first frequency band and a second access point for the second frequency band. Optionally, the first frequency band is, for example, the 2.4 GHz band.
[0145] In some embodiments, the electronic device 100 is located within the signal coverage area of the Wi-Fi network provided by the AP device 200, and the acquired accessible WLANs include Wi-Fi network access points of multiple frequency bands provided by the AP device 200. The electronic device 100 displays the acquired accessible WLANs. In response to a user's instruction to access the first access point, the electronic device 100 receives a key input by the user and sends the key to the AP device 200. After successful key verification, the electronic device 100 accesses the first access point and performs communication on the first frequency band.
[0146] Optionally, the first information of the first access point may include one or more of the following: key, SSID, BSSID, received signal strength indicator (RSSI), virtual access point (VAP) status, encryption method, number of identifications, throughput, etc.
[0147] In this configuration, the AP device 200 provides different SSIDs for different access points, but the access key is the same. For example, the SSID of the first access point is different from that of the second access point, but the electronic device 100 can access the first and second access points provided by the AP device 200 using the same key.
[0148] 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, if 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 access points provided by the same AP device 200.
[0149] The RSSI, throughput, and number of identifications of the first access point are used to measure the communication quality and other communication status of the electronic device 100 after it accesses the first access point.
[0150] The encryption method used at the first access point is to protect the communication security of the Wi-Fi network. Optionally, the encryption method may include, for example, the Wi-Fi Protected Access (WPA) 1 standard, the WPA 2 standard, or the WPA 3 standard.
[0151] S502, the electronic device 100 saves the second information of the second access point according to the first information of the first access point, and the frequency band of the second access point is the second frequency band.
[0152] 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 and the SSID of the second access point are different, but the secret key is the same.
[0153] In some embodiments, after communicating with the first access point, the electronic device 100 may trigger an inquiry to determine if a second access point exists that can be automatically accessed. In this way, the electronic device 100 automatically triggers an inquiry to find an access point with a different SSID but the same key as the currently accessed access point. Subsequently, the electronic device 100 can automatically switch to different access points according to network conditions, achieving automatic multi-band switching and avoiding the limitation of manual access, which prevents non-professional users from enjoying the better internet experience brought by the multi-band capabilities of the AP device 200.
[0154] In some embodiments, after establishing a first connection with a first access point, the electronic device 100 may, while maintaining the first connection, trigger the saving of second information of a second access point based on first information of the first access point. Alternatively, after establishing a first connection with the first access point and saving the first information of the first access point, the electronic device 100 may disconnect the first connection. Afterward, the electronic device 100 may save the second information of the second access point based on the first information of the first access point. In other words, as long as the electronic device 100 has established a first connection with the first access point and saved the first information, it can save the second information of the second access point.
[0155] In some embodiments, the electronic device 100 can passively scan to obtain Beacon frames sent by the AP device 200 at preset intervals, and obtain information such as SSID and BSSID carried in the Beacon frames. Then, the electronic device 100 can determine whether there is a second access point nearby that belongs to the same AP device 200 as the currently accessed first access point, based on the information carried in the Beacon frames. Afterwards, the electronic device 100 actively scans for nearby access points to determine whether the second access point identified by the electronic device 100 through passive scanning truly exists. If it does, the electronic device 100 can obtain the key from the first information; this key is the key used by the electronic device 100 to access the first access point. The electronic device 100 can then verify the obtained access point using this key. If it can access the obtained access point using this key, it can be determined that the accessible access point is the second access point being searched for. That is, the electronic device 100 can subsequently access the second access point using the same key, thereby experiencing the multi-band capabilities provided by the AP device 200. The specific implementation of this process is described below. Figure 6 The details of the steps shown will not be repeated here.
[0156] The above process requires no user intervention; electronic device 100 can automatically connect to access points on different frequency bands provided by the same AP device 200, thereby effectively simplifying user operation. Furthermore, by first identifying potential second access points through a passive scanning method and then confirming them through active scanning verification, the power consumption generated during the second access point determination process can be effectively reduced, as can the impact on the communication quality of electronic device 100, and consequently, the impact on the user.
[0157] Optionally, the above-described active scanning process is optional. For example, after the electronic device 100 determines at least one access point through passive scanning, it can also directly request access to that at least one access point using the key corresponding to the first access point. Then, the electronic device 100 determines the successfully accessed access point as the second access point to be searched.
[0158] In other embodiments, the electronic device 100 may also actively scan for nearby access points and attempt to access the scanned access point using the key in the first information. If the access is successful, the electronic device 100 may determine that the successfully accessed access point is the second access point.
[0159] Optionally, when the electronic device 100 actively scans for nearby access points, it can also select a preset number of access points ranked by signal strength from the scanned access points. Then, the electronic device 100 can verify the preset number of access points using the key in the first information, thereby improving the efficiency of determining the second access point.
[0160] In some embodiments, after acquiring the second access point, the electronic device 100 may obtain second information about the second access point, such as the SSID, key, BSSID, etc. of the second access point. The electronic device 100 then saves the second information about the second access point.
[0161] In this way, based on the already established first access point, electronic device 100 automatically obtains a second access point belonging to the same AP device 200 as the first access point. Subsequently, automatic connection to the second access point can be achieved without user intervention. This allows even non-professional users to experience the complementary advantages of a dual-band router and improve their internet browsing experience.
[0162] The above describes the overall process of the connection method provided in the embodiments of this application. The following describes in detail the specific process of determining the second access point.
[0163] Figure 6 This is a schematic flowchart illustrating another connection method provided in an embodiment of this application. The electronic device 100 connects via... Figure 6 The steps shown can be used to obtain a second access point. Optionally, step S502 above includes steps S601-S603 below.
[0164] S601, Electronic device 100 obtains at least one first access point to be verified in a second frequency band based on the first information.
[0165] In some embodiments, after determining that a first connection has been established with a first access point, the electronic device 100 may trigger a process of acquiring a second access point belonging to the same AP device 200 as the first access point. During the acquisition process, the electronic device 100 may acquire multiple access points, and the electronic device 100 also needs to verify these access points to determine the second access points included therein. Optionally, these access points that require further verification are identified as access points to be verified.
[0166] Figure 7 This is a schematic flowchart illustrating another connection method provided in an embodiment of this application. The electronic device 100 connects via... Figure 7 The steps shown can be used to obtain the access point to be verified. Optionally, the above step S601 includes the following steps S6011-S6013.
[0167] S6011, Electronic device 100 obtains the access point of the second frequency band.
[0168] In some embodiments, the AP device 200 sends Beacon frames to the electronic device 100 at preset intervals. These Beacon frames carry information about the access points included in the AP device 200, such as BSSID and SSID. The electronic device 100 can receive this information passively, even when the device is silent. That is, the electronic device 100 does not need to actively scan to obtain information about nearby access points.
[0169] For example, electronic device 100 can obtain access points for one or more 5G frequency bands in the vicinity. Among them, the access points for one or more 5G frequency bands include 5G frequency band access points provided by AP device 200.
[0170] S6012, Electronic device 100 determines whether the access point of the acquired second frequency band meets the preset conditions.
[0171] The preset conditions include one or more of the following: BSSID similarity exceeds threshold 1, SSID similarity exceeds threshold 2, the corresponding configuration file is not saved, RSSI is greater than threshold 3, and the encryption method is the preset encryption method.
[0172] In some embodiments, the AP device 200 provides access points for multiple frequency bands for other electronic devices to access. These multiple frequency bands have different SSIDs but the same key. In this case, if the electronic device 100 has already established a first connection with the first access point, it needs to determine a second access point belonging to the same AP device as the first access point, so that the electronic device 100 can access the second access point based on the same key. Based on this, the electronic device 100 can filter out first unverified access points from the already acquired access points using preset conditions, which may belong to the same AP device as the currently accessed first access point, so that these first unverified access points can be verified subsequently.
[0173] It should be understood that the preset conditions used to screen the first access point to be verified include not only the conditions in the examples above, but also other conditions.
[0174] like Figure 8 As shown, step S6012 may include steps S6012a-S6012d. The electronic device 100 filters the first access points to be verified that meet preset conditions through steps S6012a-S6012d. It should be understood that the embodiments of this application do not limit the execution steps of steps S6012a-S6012d, and some steps in steps S6012a-S6012d are optional. That is, the electronic device 100 may select some or all of the preset conditions to filter the access points to be verified.
[0175] S6012a, Electronic device 100 determines whether the similarity between the basic service set identifier and the basic service set identifier indicated by the first information exceeds a threshold 1.
[0176] In some embodiments, access points provided by the same AP device belong to the same BSS, and these access points have a certain degree of similarity in their Basic Service Set Identifiers (BSSIDs). Therefore, the electronic device 100 can determine, based on the BSSID, whether the access point currently being screened belongs to the same AP device as the first access point that has already been connected.
[0177] In some embodiments, during the screening process of the first access point to be verified, the electronic device 100 may obtain the BSSID of the first access point from the first information of the first access point.
[0178] In some embodiments, after obtaining the BSSID of the first access point, the electronic device 100 can compare the BSSID of the access point to be filtered with the BSSID of the first access point to determine whether the similarity between the two exceeds a threshold of 1. If the similarity exceeds the threshold of 1, the electronic device 100 can determine that the currently filtered access point may belong to the same AP device as the first access point that has already been connected.
[0179] For example, a BSSID typically consists of 6 bytes, with the middle 4 bytes of the BSSID belonging to access points within the same AP device generally being identical. Therefore, electronic device 100 can determine whether the middle 4 bytes of the currently selected access point's BSSID are the same as the middle 4 bytes of the BSSID of the first already connected access point. If they are the same, electronic device 100 can determine that the similarity between the currently selected access point's BSSID and the BSSID of the first already connected access point exceeds a threshold of 1. If they are different, electronic device 100 can determine that the similarity between the currently selected access point's BSSID and the BSSID of the first already connected access point is less than a threshold of 1.
[0180] In this way, electronic device 100 can filter out the first access point to be verified through BSSID. When a large number of nearby access points are obtained, pre-screening reduces the number of access points that need to be further verified, thereby reducing the difficulty of subsequent verification. Furthermore, the current process of filtering the first access point to be verified based on BSSID is a silent process, and electronic device 100 does not need to actively scan for nearby access points, thus avoiding affecting the user's current user experience.
[0181] S6012b, Electronic device 100 determines whether the similarity between the service set identifier and the service set identifier indicated by the first information exceeds threshold 2.
[0182] In some embodiments, access points on different frequency bands provided by the same AP device may have different Service Set Identifiers (SSIDs), but they may be quite similar. For example, ... Figure 3 As shown in the interface, for a dual-band router providing both 2.4GHz and 5GHz bands, the only difference between the SSID of the first access point on the 2.4GHz band and the SSID of the second access point on the 5GHz band is the presence of a "-5GHz" identifier in the second access point's SSID, making it easier for users to distinguish between them. Therefore, the electronic device 100 can determine, based on the SSID, whether the currently selected access point belongs to the same AP device as the already connected first access point.
[0183] In some embodiments, during the screening process of the first access point to be verified, the electronic device 100 may obtain the SSID of the first access point from the first information of the first access point.
[0184] In some embodiments, after obtaining the SSID of the first access point, the electronic device 100 can compare the SSID of the access point to be filtered with the SSID of the first access point to determine whether the similarity between the two exceeds a threshold of 2. If the similarity exceeds the threshold of 2, the electronic device 100 can determine that the currently filtered access point may belong to the same AP device as the already connected first access point.
[0185] For example, electronic device 100 first obtains the SSID of the first access point, and then determines whether the SSID of the currently selected access point has an additional "-5G" identifier after the BSSID of the first access point. If yes, electronic device 100 can determine that the similarity between the SSID of the currently selected access point and the SSID of the already connected first access point exceeds a threshold of 2. If no, electronic device 100 can determine that the similarity between the SSID of the currently selected access point and the SSID of the already connected first access point is less than the threshold of 2.
[0186] In this way, electronic device 100 can filter out the first access point to be verified through SSID. When a large number of nearby access points are obtained, pre-screening reduces the number of first access points to be verified in subsequent verifications, thereby reducing the difficulty of subsequent verifications. Furthermore, the current SSID-based filtering process is silent, and electronic device 100 does not need to actively scan for nearby access points, thus avoiding affecting the user's current experience.
[0187] S6012c, Electronic device 100 determines whether the corresponding configuration file has not been saved.
[0188] In some embodiments, if the electronic device 100 has connected to an access point and determined that the access point can communicate normally, it can save the configuration file corresponding to that access point. For example, if the electronic device 100 connects to 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 first information about the first access point.
[0189] The current first access point screening process is used to identify second access points that electronic device 100 has not previously connected to, in order to trigger the automatic access process of the second access point. Therefore, electronic device 100 should not have saved the configuration file for the second access point. Thus, during the screening of the first access point to be verified based on preset conditions, electronic device 100 can determine whether it has saved the configuration file for the currently selected access point. If yes, electronic device 100 can determine that the currently selected access point is not the first access point to be verified. If no, electronic device 100 can determine that the currently selected access point may be the first access point to be verified.
[0190] In this way, electronic device 100 can filter out the first access point to be verified by whether or not the corresponding configuration file is saved. If a large number of nearby access points are obtained, the number of access points to be further verified is reduced through pre-screening, thereby reducing the difficulty of subsequent verification. Moreover, the current filtering process based on whether or not the corresponding configuration file is saved is a silent process, and electronic device 100 does not need to actively scan for nearby access points, thus avoiding affecting the user's current user experience.
[0191] S6012d, Electronic device 100 determines whether the signal strength is greater than the threshold 3 and whether the encryption method is the preset encryption method.
[0192] In some embodiments, electronic device 100 has already connected to a first access point provided by AP device 200, and electronic device 100 now expects to obtain a second access point provided by the AP device 200. Since AP device 200 needs to be near electronic device 100 to provide better RSSI communication, AP device 200 providing the first access point is also near electronic device 100. Therefore, electronic device 100 needs to obtain an access point with a higher RSSI to potentially provide a second access point to the nearby AP device 200. Electronic device 100 determines whether an access point is provided by the nearby AP device 200 by checking if the RSSI of the currently selected access point is greater than a threshold of 3. For example, if the RSSI of the currently selected access point is greater than the threshold of 3, electronic device 100 can determine that the currently selected access point is the first access point to be verified. If the RSSI of the currently selected access point is less than or equal to the threshold of 3, electronic device 100 can determine that the currently selected access point is not the first access point to be verified.
[0193] In some embodiments, the AP device 200 encrypts its provided access points using a certain encryption method to ensure the security of communication with the electronic device 100. During the process of requesting access to the first access point of the AP device 200, the electronic device 100 can obtain the encryption method of the first access point. Optionally, if the electronic device 100 has already accessed the first access point provided by the AP device 200, it can also obtain the encryption method of the AP device 200 for the first access point; for example, the encryption method is a preset encryption method. Optionally, the preset encryption method is an encryption method that can ensure communication security. Optionally, the electronic device 100 can obtain the encryption methods of nearby access points in the second frequency band through passive scanning. Then, subsequently, during the process of selecting a second access point, the electronic device 100 can determine the access point with the preset encryption method as the access point to be verified.
[0194] Optionally, the preset encryption method is, for example, WPA1, WPA2, or WPA3. For instance, if the electronic device 100 determines that the encryption method of the access point in the second frequency band it scans is any one of WPA1, WPA2, or WPA3, it can determine that the access point is an access point to be verified. Optionally, the encryption method of the first access point and the encryption method of the access point to be verified may be the same or different.
[0195] In this way, electronic device 100 can filter out the first access point to be verified by whether the signal strength is greater than the threshold 3 and whether the encryption method is the preset encryption method. When a large number of nearby access points are obtained, the number of access points to be further verified is reduced by pre-screening, thereby reducing the difficulty of subsequent verification. Moreover, the current screening process of the first access point to be verified based on whether the signal strength is greater than the threshold 3 and whether the encryption method is the preset encryption method is a silent process. Electronic device 100 does not need to actively scan for nearby access points, thus avoiding affecting the user's current user experience.
[0196] In some embodiments, if the electronic device 100 determines that all the results of steps S6012a-S6012d are yes, the electronic device 100 may execute the following step S6013, that is, the electronic device 100 determines that the currently selected access point is the first access point to be verified. If the electronic device 100 determines that any one of the results of steps S6012a-S6012d is no, the electronic device 100 returns to continue filtering the next access point, that is, the electronic device 100 determines that the currently selected access point is not the first access point to be verified.
[0197] S6013, Electronic device 100 determines the access point that meets the preset conditions as the first access point to be verified.
[0198] In some embodiments, the electronic device 100 filters the acquired access points based on at least one preset condition, and determines the access points that meet the preset conditions as the first access points to be verified, so as to further verify the first access points to be verified through subsequent steps to obtain the final required second access point. Optionally, the frequency band of the first access points to be verified selected by the preset conditions is the second frequency band, and the number of such bands is at least one.
[0199] In some embodiments, when the AP device 200 is a dual-band router, if the electronic device 100 has already connected to the first access point provided by the AP device 200, then the number of possible second access points to be automatically connected is one. Therefore, the electronic device 100 selects one first access point to be verified based on preset conditions. Then, if the electronic device 100 selects multiple first access points to be verified based on preset conditions, the electronic device 100 can determine the final first access point to be verified based on RSSI. For example, the electronic device 100 determines the access point with the highest RSSI among the multiple first access points to be verified as the final first access point to be verified.
[0200] Optionally, the electronic device 100 can determine the number of access points supported by the AP device 200 based on the acquired Beacon frame (or other information), and then determine the number of first access points to be verified based on the number of access points.
[0201] The process of determining the first access point to be verified has been described above. The verification process of the first access point to be verified will be described below.
[0202] In some embodiments, the purpose of the electronic device 100 acquiring the second access point is to enable automatic access to the second access point in the future. Therefore, after acquiring the first access point to be verified, the electronic device 100 can establish a connection with the first access point to be verified based on the key request indicated by the first information. The second access point to be verified that has successfully established a connection among the first access points to be verified may be the second access point that needs to be acquired.
[0203] S602, Electronic device 100 obtains a second access point that can be accessed via the key indicated by the first information from the first access point to be verified.
[0204] In some embodiments, the electronic device 100 requests access to the first access point to be verified through the key indicated by the first information of the first access point, and obtains the second access point to be verified that was successfully accessed from the first access point to be verified.
[0205] In other embodiments, the electronic device 100 first actively scans nearby access points to determine whether the selected first access point to be verified actually exists among the nearby access points. Then, the electronic device 100 further verifies the third access point to be verified that actually exists among the first access points to be verified. For example, the electronic device 100 requests access to the third access point to be verified using the key indicated by the first information of the first access point, and obtains the second access point to be verified that was successfully accessed from the third access point to be verified.
[0206] In this way, the electronic device 100 uses the key corresponding to the first access point to determine the second access point that can be automatically accessed.
[0207] The following is through, as Figure 9A Steps S6021-S6022 illustrate the method of determining the second access point to be verified through active scanning. For example, step S602 may include steps S6021-S6022.
[0208] S6021. Electronic device 100 scans nearby access points and obtains the third access point to be verified from the first access point to be verified.
[0209] In some embodiments, after acquiring the first access point to be verified, the electronic device 100 may trigger an active scan to determine whether these first access points to be verified actually exist nearby. Wherein, only access points that actually exist nearby are connectable access points, such as those access points being in a connectable state.
[0210] S6022, Electronic device 100 requests access to the third access point to be verified through the key indicated by the first information, and obtains the second access point to be verified that was successfully accessed from the third access point to be verified.
[0211] In some embodiments, the access points provided by the AP device 200 for different frequency bands share the same key. Furthermore, after connecting to 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 completing the scan for a third access point to be verified, the electronic device 100 can attempt to connect to the scanned third access point to be verified using the key indicated by the first information.
[0212] If the third access point to be verified can be accessed through this key, then the electronic device 100 can determine that the third access point to be verified belongs to the same AP device as the currently accessed first access point. Then, the electronic device 100 can execute the following step S603 to trigger the availability detection of the third access point to be verified.
[0213] If the third access point to be verified cannot be accessed using the key, then the electronic device 100 can determine that the third access point to be verified is not an access point belonging to the same AP device as the currently accessed first access point. If all third access points to be verified cannot be accessed using the key, then the electronic device 100 can return to the above step S601 to re-determine the first access point to be verified.
[0214] In some embodiments, the AP device 200 can modify the provided access point key based on user operation. Therefore, there are scenarios where the key provided by the AP device for the first access point is different from the key for the second access point. If the electronic device 100 requests access to a first (or third) unverified access point based on the key of the first access point, it may be unable to connect. Optionally, during the process of the electronic device 100 requesting access to the first (or third) unverified access point using the key of the first access point, if it is determined that all first (or third) unverified access points are unavailable, the electronic device 100 displays a prompt message to ask the user to confirm whether they need to access the second access point and to enter the key of the second access point. Afterwards, the electronic device 100 can then attempt to access the first (or third) unverified access point again using the received key, and the successfully connected access point will be designated as the second unverified access point.
[0215] This avoids the problem that electronic device 100 cannot automatically access other frequency bands of the same AP device when the keys of different access points of the same AP device are different, thus ensuring the feasibility of the solution.
[0216] In other embodiments, after scanning for a third access point to be verified, the electronic device 100 may directly display a prompt message to ask the user to confirm whether they need to connect to the third access point and to enter a key. Afterwards, the electronic device 100 can attempt to connect to the third access point using the received key, and the successfully connected third access point will be designated as the second access point to be verified. This saves the process of attempting to connect to the third access point using the key from the first access point.
[0217] like Figure 9B As shown, step S6021 includes steps S60211-S60215.
[0218] S60211, Electronic device 100 triggers a scan of nearby access points and starts timer 1.
[0219] In some embodiments, after determining the first access point to be verified, the electronic device 100 may trigger an active scan of nearby access points to determine whether the first access point to be verified is a real access point.
[0220] S60212. Electronic device 100 determines whether timer 1 has timed out. If not, electronic device 100 executes step S60213; if yes, electronic device 100 executes step S60215.
[0221] S60213. Electronic device 100 determines whether a third access point to be verified has been scanned. If yes, electronic device 100 executes step S60214; if no, electronic device 100 executes step S60215.
[0222] In some embodiments, after triggering the active scanning process, the electronic device 100 starts a timer 1 to record the scanning time. If the electronic device 100 fails to scan for a third access point to be verified within a preset time, it can return to step S601 above and reacquire the first access point to be verified. That is, step S6025 is executed. If the electronic device 100 scans for a third access point to be verified within the preset time, it can trigger a connection availability probe for the scanned third access point to be verified. That is, step S603 is executed below.
[0223] It should be understood that the execution order between steps S60212 and S60213 is not limited in the embodiments of this application. That is, when the electronic device 100 starts scanning for the third access point to be verified, it starts timer 1. During the scanning process of the third access point to be verified, timer 1 continues to run until the third access point to be verified is detected, at which point timer 1 stops running. Alternatively, when timer 1 times out (e.g., the count exceeds a preset time), scanning for the third access point to be verified stops, and timer 1 stops running.
[0224] In some embodiments, during active scanning, the electronic device 100 sends a probe request management frame to the AP device 200 at a preset period to determine whether a third access point to be verified exists based on the probe response management frame sent by the AP device 200.
[0225] S60214, Electronic device 100 triggers connection available detection.
[0226] In some embodiments, after determining that a third access point to be verified has been scanned, the electronic device 100 can verify the third access point to be verified. The access key provided by the AP device 200 for the first access point and the access point in the second frequency band is the same. Therefore, the electronic device 100 can verify whether it can access the third access point to be verified using the key indicated by the first information of the first access point. Optionally, if access is possible, the electronic device 100 can also verify whether the communication connection of the electronic device 100 to the access point to be verified is normal. That is, connection availability detection includes detecting whether the scanned access point can be accessed, and whether the access to the scanned access point can communicate normally.
[0227] For details on the implementation of connecting available probes, please refer to step S603.
[0228] S60215, Electronic device 100 returns to acquire at least one first access point to be verified in a second frequency band.
[0229] In some embodiments, after determining that no first access point to be verified has been detected, the electronic device 100 may return to step S601 above and reacquire the first access point to be verified. That is, the electronic device 100 determines that the first access point to be verified, which was determined by the passive scanning method, does not actually exist in the vicinity and needs to reconfirm the first access point to be verified.
[0230] In this way, after the electronic device identifies the access point to be verified through passive scanning, it then uses active scanning to determine whether the access point exists in the real network environment. This improves scanning efficiency and reduces the impact on the communication quality of the electronic device 100 based on the first access point.
[0231] In some embodiments, since the active scanning process or the process of requesting access to the access point to be verified may affect the communication quality of the current electronic device 100, the electronic device 100 may trigger the active scanning process or the process of requesting access to the access point to be verified only when it is determined that the current discrimination conditions are met, so as to reduce the impact on the user experience.
[0232] like Figure 10As shown, step S1001 may be included before step S602.
[0233] S1001, Electronic device 100 determines that the current discrimination condition is met.
[0234] The discrimination criteria include, for example, one or more of the following: not a production line version, WLAN switch is on, access point automatic identification and connection switch is on, it is a product from the Chinese region, not in music playback mode, not in voice call mode, connected to the first access point and the first access point is available, the encryption method of the first access point is the preset encryption method, the number of identifications of the first access point is less than the preset identification number threshold, the duration of being in screen-off mode exceeds the preset screen-off time threshold, being in charging mode, VAP being in the preset VAP state, RSSI being greater than the preset signal reception strength threshold, and throughput being less than the preset throughput threshold.
[0235] Optionally, the production line version refers to the functional version set during the production process of the electronic device 100. To avoid impacting production, the production line version does not trigger automatic scanning and access of the access point. That is, the connection method provided in this application embodiment is applied to non-production line versions and takes effect in ordinary user scenarios.
[0236] Optionally, when WLAN is enabled, electronic device 100 can scan for and access nearby access points. Therefore, electronic device 100 needs to confirm that the WLAN switch is turned on before it can trigger the active scanning and access process.
[0237] Optionally, an access point automatic identification connection switch is used to enable the access point automatic identification connection function. Optionally, when the access point automatic identification connection switch is enabled, the electronic device 100 can automatically identify and connect to a second access point belonging to the same AP device as the first access point in response to the already connected first access point.
[0238] Optionally, since non-China AP devices may not be compatible with the current solution, a judgment on whether they are products from China is added to the discrimination criteria.
[0239] Optionally, to reduce the impact of the active scanning process (or the process of requesting access to the unverified access point) on user experience, in some usage scenarios, the electronic device 100 may not trigger the active scanning process; or, in certain scenarios, the electronic device 100 may trigger the active scanning process only. For example, when the electronic device 100 is in music playback mode (i.e., in a music playback scenario) or in voice call mode (i.e., in a voice call scenario), the electronic device 100 may not trigger the active scanning process to avoid affecting music playback or voice calls. Another example is when the electronic device 100 is in a screen-off state; the user may not need to use the electronic device 100 temporarily. Therefore, performing an active scan when the electronic device is in a screen-off state will not affect user experience. Optionally, if the screen-off state duration exceeds a preset screen-off time threshold, the likelihood of the user using the electronic device 100 is lower. Therefore, triggering the active scanning process after the screen-off time of the electronic device 100 exceeds the preset screen-off time threshold further reduces the possibility of affecting user experience. Optionally, the preset screen-off time threshold may be, for example, 120 seconds, 180 seconds, 240 seconds, etc. For example, the active scanning process consumes power. Therefore, the electronic device 100 can trigger the active scanning process when it determines that it is in a charging state. Optionally, the electronic device 100 can determine whether it is in music playback mode, voice call mode, screen-off mode, charging mode, etc., by obtaining system-reported events.
[0240] Optionally, the electronic device 100 may trigger an active scanning process if it determines that it has connected to an available first access point and the encryption method of the first access point is a preset encryption method. The preset encryption method may be, for example, WPA1, WPA2, or WPA3.
[0241] Optionally, the preset VAP state includes one or more of the following: non-point-to-point (P2P) connection state, non-HarmonyOS markup language (HML) state, non-soft-AP state, and non-multilink state. Optionally, in scenarios not in the preset VAP state, if WiFi connections are occupied, the automatic scanning and access of the access point may affect services currently running via WiFi. Therefore, if electronic device 100 and AP device 200 are in the preset VAP state, the scanning and access of the second access point is triggered only to avoid affecting user experience.
[0242] Optionally, if the electronic device 100 determines that the communication quality of the current first access point is good, it triggers an active scanning process (or a process of requesting access to the access point to be verified) to reduce the impact on user experience. For example, if the electronic device 100 determines that the number of identifications of the first access point is less than a preset identification number threshold and the RSSI is greater than a preset signal received strength threshold, the electronic device 100 can determine that the communication quality of the current first access point is good. Then, the electronic device 100 can trigger an active scanning process. Optionally, the preset identification number threshold is, for example, 3 times. The preset signal received strength threshold is, for example, -65 dBm.
[0243] Optionally, if the electronic device 100 determines that the current communication throughput is less than a preset throughput threshold, it may determine that the current communication is not busy and may trigger an active scanning process (or a process of requesting access to the access point to be verified). Optionally, the preset throughput threshold is, for example, 1 bit per second (mbps).
[0244] Thus, based on the above-mentioned discrimination conditions, the electronic device 100 will trigger the subsequent active scanning process or the process of requesting access to the access point to be verified only when it determines that the current situation is suitable for conducting an active scanning process or requesting access to the access point to be verified, so as to reduce the impact on the user.
[0245] In some embodiments, after determining that the duration of the screen-off state exceeds a preset screen-off time threshold, the electronic device 100 triggers an initial determination process for the discrimination conditions. If all discrimination conditions are met, the electronic device 100 may trigger an active scanning process or a process to request access to a pending access point. If all discrimination conditions are not met, the electronic device 100, upon determining that a first pending access point exists, may periodically and actively determine whether the discrimination conditions are met according to the cycle of the preset screen-off time threshold, thereby enabling timely determination of whether an active scanning process or a request to access a pending access point can be triggered.
[0246] It should be understood that the execution order of steps S601 and S1001 is not limited in the embodiments of this application. For example, the electronic device 100 may, after acquiring at least one first access point to be verified in the second frequency band, trigger a determination of whether the current discrimination condition is met. If the discrimination condition is met, it may then actively scan for possible first access points to be verified in the vicinity. That is, the electronic device 100 executes step S601 first, and then executes step S1001. Alternatively, the electronic device 100 may, after determining that the current discrimination condition is met, trigger the acquisition of at least one first access point to be verified in the second frequency band. That is, the electronic device 100 executes step S1001 first, and then executes step S601.
[0247] S603, Electronic device 100 stores the second information of the second access point available in the second access point to be verified.
[0248] In some embodiments, when the electronic device 100 determines that the second access point is available, it saves the second information of the second access point. Therefore, the electronic device 100 needs to first verify whether the second access point to be verified is available, select the available access point as the second access point to be searched, and save the second information of that second access point.
[0249] In some embodiments, after the electronic device 100 connects to the second access point to be verified provided by the AP device 200, the established communication connection may be unavailable, such as being unable to provide internet access services to the electronic device 100. Therefore, after the electronic device 100 connects to the second access point to be verified using the key indicated by the first information, it also needs to verify the availability of the communication connection corresponding to the second access point to be verified. If the communication connection is determined to be available, the electronic device can determine that the second access point to be verified has passed the verification and is the second access point to be found.
[0250] In this way, electronic device 100 determines the final usable second access point by connecting to the available access point. Subsequently, based on the stored second access point, electronic device 100 can automatically connect to the second access point when needed and provide users with communication services based on the second frequency band.
[0251] In some embodiments, some electronic devices are dual-WiFi devices, while others are not. Devices supporting dual-WiFi can simultaneously establish WiFi connections with different access points provided by the same AP device. Devices not supporting dual-WiFi can only establish one WiFi connection with the AP device. If an electronic device 100 needs to switch to a different access point, it must first disconnect the WiFi connection from the currently accessed frequency band and then re-establish a WiFi connection with the access point to be switched to.
[0252] The following is passed Figure 11 and Figure 12 The steps shown describe the process by which electronic device 100 detects connectivity availability when it does not support dual WiFi devices or when it does support dual WiFi devices.
[0253] Optionally, as described above, during the process of requesting access to a pending access point using the key indicated by the first information, the requested access point can be either the first pending access point or a third pending access point among the existing first pending access points determined by the electronic device 100 through active scanning. The following description uses the request to access the pending access point using the key indicated by the first information as an example to illustrate the connection availability detection process. It should be understood that the connection availability detection process described below also applies to the third pending access point.
[0254] Figure 11 This is a flowchart illustrating the process of detecting connectivity availability when the electronic device 100 provided in this embodiment does not support dual WiFi devices. Figure 11 As shown, the process includes the following steps.
[0255] S1101, Electronic device 100 disconnects the first connection and sends a first connection establishment request to the first access point to be verified.
[0256] In some embodiments, the electronic device 100 obtains a first access point to be verified and a key indicated by the first information, and the electronic device 100 disconnects the first WiFi connection with the AP device 200. Then, the electronic device 100 requests to establish a WiFi connection with the first access point to be verified using the key indicated by the first information.
[0257] In other words, since the electronic device 100 does not support dual WiFi connections, in the process of verifying whether it can access the first access point to be verified, the electronic device 100 needs to disconnect the established WiFi connection before it can re-establish a WiFi connection with the first access point to be verified.
[0258] S1102. Electronic device 100 determines whether it has successfully established a WiFi connection with the first access point to be verified. If yes, proceed to step S1103; if no, proceed to step S1105.
[0259] In some embodiments, after determining that a WiFi connection has been established with the first access point to be verified using the key indicated by the first information, the electronic device 100 may perform the following step S1103 to verify the availability of the WiFi connection. Alternatively, if the electronic device 100 determines that it has failed to establish a WiFi connection with the first access point to be verified using the key indicated by the first information, it may perform the following step S1105 to determine that the first access point to be verified has failed verification.
[0260] In some embodiments, the electronic device 100 triggers a timer to detect the WiFi connection establishment time with the first access point to be verified. If the electronic device 100 fails to establish a WiFi connection with the first access point to be verified using the key indicated by the first information within a preset WiFi connection establishment time threshold, it can be determined that the WiFi connection establishment has failed.
[0261] S1103. Electronic device 100 determines whether the successfully established WiFi connection is available. If yes, proceed to step S1104; otherwise, proceed to step S1105.
[0262] In some embodiments, after establishing a WiFi connection with the first access point to be verified, the electronic device 100 can send information to the AP device and receive information from the AP device via the WiFi connection. If the information is successfully sent, 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 access point to be verified has passed verification. If the information is not sent, it can be determined that the successfully established WiFi connection is unavailable, and the electronic device 100 can perform the following step S1105 to determine that the first access point to be verified has failed verification.
[0263] S1104. Electronic device 100 obtains a connection to the second access point corresponding to an available WiFi connection.
[0264] In some embodiments, the electronic device 100 determines that a WiFi connection can be established with a second access point in the first set of access points to be verified, and that the established WiFi connection is available. Then, the electronic device 100 can determine that the second access point has passed verification and identify it as the access point to be acquired.
[0265] S1105, Electronic device 100 deletes the first unverified access point that is not connectable or whose connection is unavailable.
[0266] In some embodiments, the electronic device 100 determines that a WiFi connection cannot be established with the first access point to be verified. Alternatively, after establishing a WiFi connection with the first access point to be verified, the electronic device 100 determines that the established WiFi connection is unavailable. In this case, the electronic device 100 can determine that the first access point to be verified has failed verification, and the electronic device 100 deletes the first access point that is unconnectable or unavailable.
[0267] S1106, Electronic device 100 disconnects the WiFi connection with the second access point and re-establishes the first connection.
[0268] In some embodiments, after acquiring the second access point, the electronic device 100 may save the second information of the second access point. Furthermore, the electronic device 100 may re-establish the first connection with the first access point to ensure continued communication between the electronic device 100 and the first access point, thus meeting the user's continued usage needs.
[0269] In some embodiments, after acquiring a second access point, the electronic device 100 may disconnect the WiFi connection with the second access point.
[0270] It should be understood that step S1106 is an optional step. After saving 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, then the electronic device 100 does not need to rebuild the first connection.
[0271] Furthermore, when there are multiple first access points to be verified, steps S1101-S1106 are cyclical steps until the connection availability detection of all first access points to be verified is completed. When there is only one first access point to be verified, if the verification of the first access point to be verified fails, the electronic device 100 can obtain the first access point to be verified again through the embodiment of the above example.
[0272] In some embodiments, the electronic device 100 is equipped with a self-healing function, which automatically triggers the use of cellular data to achieve network communication when the WiFi connection of the electronic device 100 fails. Therefore, in order to effectively detect the connection availability of the access point to be verified and avoid the automatic switching to cellular data affecting the determination of the connection availability of the first access point to be verified, the electronic device 100 may disable the self-healing function before performing a useful connection probe. For example, the electronic device 100 disables the self-healing function before step S1101. Furthermore, the electronic device 100 re-enables the self-healing function after completing the useful connection probe. For example, the electronic device 100 re-enables the self-healing function after step S1104 or step S1105.
[0273] Figure 12 This is a flowchart illustrating the process of detecting connectivity availability when the electronic device 100 provided in this embodiment supports dual WiFi devices. Figure 12 As shown, the process includes the following steps.
[0274] S1201, while maintaining the first connection, the electronic device 100 sends a second connection establishment request to the first access point to be verified.
[0275] S1202. Electronic device 100 determines whether it has successfully established a WiFi connection with the first access point to be verified. If yes, proceed to step S1203; if no, proceed to step S1205.
[0276] S1203. Electronic device 100 determines whether the successfully established WiFi connection is available. If yes, proceed to step S1204; otherwise, proceed to step S1205.
[0277] S1204. Electronic device 100 obtains a connection to the second access point corresponding to an available WiFi connection.
[0278] S1205, Electronic device 100 deletes the first unverified access point that is not connectable or whose connection is unavailable.
[0279] In some embodiments, electronic device 100 connects to the first access point of AP device 200 via WiFi 1 connection (such as the first connection). If it is determined that a connection availability probe of the first access point to be verified is needed, a request to access the first access point to be verified can be triggered using the key indicated by the first information. Since electronic device 100 supports dual WiFi connections, it can request to establish a WiFi connection with the first access point to be verified by establishing another WiFi connection (such as WiFi 2 connection) while maintaining the first connection. If electronic device 100 determines that the WiFi connection is successfully established and the successfully connected WiFi connection is available, then electronic device 100 can determine that the first access point to be verified has passed verification and designate it as the second access point to be acquired. Otherwise, electronic device 100 can determine that the first access point to be verified has failed verification and delete the unconnectable or unavailable first access point to be verified.
[0280] S1206, Electronic device 100 disconnects the WiFi connection with the second access point.
[0281] In some embodiments, after the electronic device 100 completes the connection availability detection of the access point to be verified by establishing a WiFi connection, it can delete the third connection. Subsequently, if needed, the electronic device 100 can trigger the establishment of a WiFi connection with the second access point.
[0282] Optionally, other contents of steps S1201-S1206 can be referred to the relevant contents of steps S1101-S1106 above, and will not be repeated here.
[0283] It should be understood that step S1206 is an optional step. That is, the electronic device 100 may not necessarily disconnect the established WiFi connection with the second access point.
[0284] Furthermore, if the electronic device 100 is a device that supports dual WiFi, the electronic device 100 may also be configured with a self-healing function. In this case, if the electronic device 100 is configured with a self-healing function, the electronic device 100 can disable the self-healing function before triggering the connection availability detection of the first access point to be verified, and can re-enable the self-healing function after completing the connection availability detection of the first access point to be verified.
[0285] In some embodiments, when the electronic device 100 is a dual-WiFi device, it 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 it via WiFi will not affect the communication of the first connection, or will have a minimal impact. Therefore, in step S1001 above, during the process of determining whether to trigger scanning of the second access point based on discrimination conditions, the electronic device 100 may not include discrimination conditions set because the scanning and connection processes may affect the currently ongoing WiFi service, such as not being in music playback mode, not being in voice call mode, or the VAP being in a preset VAP state.
[0286] For example, since the electronic device 100 is playing music through the first connection, triggering a frequency band scan for other WiFi connections will not affect the service being performed through the first connection. Therefore, the determination condition may not include determining whether the device is currently playing music.
[0287] In some scenarios, after acquiring the second access point, the electronic device 100 directly saves the second access point, thus completing the addition of the second access point.
[0288] In other scenarios, after acquiring a second access point, electronic device 100 notifies the user that the second access point has been detected. Then, based on user actions, electronic device 100 determines whether to save the second access point. For example, a professional user might prefer to decide whether electronic device 100 connects to the second access point themselves, rather than having electronic device 100 automatically connect to the second access point. This increases the flexibility of adding second access points.
[0289] Optionally, Figure 13A This is a schematic flowchart of another connection method provided in an embodiment of this application. For example, step S502 may include... Figure 13A The steps are shown below. Figure 13A As shown, the process includes the following steps.
[0290] S1301, Electronic device 100 obtains the second access point based on the first information of the first access point.
[0291] Optionally, the process of obtaining the second access point can refer to the various embodiments of the above examples, and will not be repeated here.
[0292] S1302, Electronic device 100 displays a prompt message to prompt the user whether to save the second access point.
[0293] In some embodiments, the electronic device 100 obtains a second access point through the various examples described above. The electronic device 100 may then prompt the user whether to add the second access point.
[0294] In some embodiments, the electronic device 100 may prompt the user whether to add a second access point by displaying a prompt message. Optionally, the prompt message may be displayed in one or more of the following ways: pop-up window display, notification bar display, card display, etc.
[0295] S1303. Electronic device 100 determines whether a user-instructed save operation has been detected. If yes, proceed to step S1304; otherwise, proceed to step S1305.
[0296] S1304, Electronic device 100 stores the second information of the second access point.
[0297] S1305, Electronic device 100 does not store the second information of the second access point.
[0298] In some embodiments, after determining that the user agrees to add a second access point, the electronic device 100 may determine to add a second access point and save the second information of the second access point.
[0299] For example, such as Figure 13B As shown, during the screen-off process, the electronic device 100 obtains a second access point based on the first information of the first access point already connected. The electronic device 100 can then display a prompt message 131, prompting the user to check if they want to save the found WLAN (such as the second access point) after discovering a better WLAN on the same router. In response to the user's operation of the save control 132, the electronic device 100 can save the second information of the acquired second access point.
[0300] Optionally, the electronic device 100 stores the second information for subsequent automatic access to the second access point based on the second information. For details regarding the automatic access process, please refer to the relevant content of step S503 below, which will not be repeated here.
[0301] Optionally, after adding the second access point, the electronic device 100 can continue to detect access points to be verified and, based on the detection results, continue to prompt the user to add the detected access points.
[0302] In other embodiments, after determining that the user does not agree to add a second access point, the electronic device 100 may determine not to add a second access point, such as not saving the second information of the second access point.
[0303] Optionally, once the electronic device 100 determines that it will not add a second access point, it may stop displaying the current prompt message.
[0304] Optionally, after determining that a second access point will not be added, the electronic device 100 may continue to detect access points to be verified and, based on the detection results, continue to prompt the user to add the detected access points. Optionally, the electronic device 100 may prompt the user for a new access point after a preset time (e.g., 24 hours) following the user's current refusal to save the access point. Optionally, if the user continuously refuses to save the access point a preset number of times (e.g., twice), the electronic device 100 may stop detecting access points to be verified, such as disabling the automatic access point identification and connection function. This avoids frequent prompts that could affect the user experience.
[0305] In some other embodiments, if the electronic device 100 receives neither the user's consent to save nor the user's disagreement to save within a preset time, then the electronic device 100 may stop displaying the prompt message. Optionally, the electronic device may display the prompt message again after a preset time (e.g., 24 hours). Optionally, within a preset period (e.g., 7 days), the electronic device 100 may display a notification to add the same second access point no more than a preset number of times (e.g., 2 times).
[0306] In this way, the electronic device 100 can choose whether to add a second access point according to the user's wishes, increasing the flexibility of user use and improving the user experience.
[0307] In some scenarios, users may choose to delete the automatically saved second access point. In this case, the electronic device 100, in response to the user's action, may no longer trigger automatic identification and connection to the second access point, such as disabling the automatic access point identification and connection function. For example, a professional user might prefer to decide whether the electronic device 100 connects to the second access point themselves, rather than having the electronic device 100 connect to the second access point automatically.
[0308] Optionally, such as Figure 14 As shown, the process of deleting an access point includes the following steps.
[0309] S1401, Electronic device 100 enables WLAN function.
[0310] In some embodiments, when the WLAN function is enabled, the electronic device 100 supports establishing a WiFi connection. That is, the electronic device 100 has the basic conditions to automatically connect to a second access point.
[0311] S1402. Electronic device 100 determines whether the access point automatic identification and connection function is enabled. If yes, proceed to step S1403; if no, proceed to step S1404.
[0312] S1403, Electronic device 100 starts the access point automatic identification and connection module.
[0313] S1404, Electronic device 100 does not start access point automatic identification and connection module.
[0314] In some embodiments, the electronic device 100 is configured with an automatic access point identification and connection function. When the automatic access point identification and connection function is enabled, the electronic device 100 can initiate the automatic access point identification and connection module to perform the automatic identification process of the second access point. When the automatic access point identification and connection function is not enabled, the electronic device 100 may not initiate the automatic access point identification and connection module, i.e., the automatic identification process of the second access point will not be performed.
[0315] Optionally, the automatic connection detection function is enabled by default.
[0316] Optionally, the automatic connection identification function can be turned on or off via an automatic connection identification switch.
[0317] S1405, Electronic device 100 triggers the process of acquiring the second access point.
[0318] In some embodiments, the electronic device 100 triggers the process of obtaining a second access point through an automatic identification connection module. The process of obtaining the second access point can be referred to in the various related embodiments described above, and will not be repeated here.
[0319] S1406. Electronic device 100 detects that the user has deleted a saved access point.
[0320] In some embodiments, the electronic device 100 may display one or more saved access points on the WLAN settings interface, and the user may choose to delete the saved access points on the interface.
[0321] Optionally, the one or more access points that have been saved and displayed on the WLAN settings interface may include access points that have been automatically identified by the connection module as second access points, or may not include access points that have been identified as second access points.
[0322] S1407. Electronic device 100 determines whether the deleted access point is the second access point. If yes, proceed to step S1408; if no, proceed to step S1409.
[0323] S1408, Electronic device 100 stops the process of acquiring the second access point.
[0324] S1409, Electronic device 100 ignores the deletion event.
[0325] In some embodiments, in response to a user's deletion of a saved access point, it can be determined whether the access point to be deleted by the user is a second access point automatically identified by the electronic device 100.
[0326] If the access point the user instructs to delete is a second access point automatically identified by electronic device 100, then electronic device 100 can determine that the user does not need electronic device 100 to automatically identify and connect to the second access point. Therefore, electronic device 100 can delete the second access point instructed by the user. Optionally, after the second access point is deleted, electronic device 100 can stop the process of acquiring the second access point; for example, the electronic device can turn off the automatic connection identification switch. Optionally, after the automatic connection identification switch is turned off, electronic device 100 ignores events related to the automatic connection identification of the second access point. Optionally, electronic device 100 can automatically turn on the automatic connection identification switch after restoring factory settings.
[0327] If the access point the user instructs to delete is not a second access point automatically identified by electronic device 100, for example, it is an access point manually accessed by the user. In this case, electronic device 100 can directly ignore the deletion event. That is, electronic device 100 can continue to automatically identify and connect to the second access point. It should be understood that electronic device 100 ignoring the deletion event means that the current deletion event does not affect the automatic identification and connection of the second access point; however, electronic device 100 will still delete the access point instructed by the user in response to the user's operation.
[0328] The following describes the process by which electronic device 100 automatically connects to the second access point based on the second information of the stored second access point.
[0329] In some scenarios, after saving the second information of the second access point, the electronic device 100 can automatically access the second access point based on that second information. For example, such as... Figure 15 As shown, step S503 may be included after step S502.
[0330] S503, Electronic device 100 automatically establishes a fourth connection with the second access point based on the second information.
[0331] In some embodiments, the electronic device 100 can determine whether an access point switch is needed based on stored second information, according to changes in the current communication state. For example, in... Figure 2In the scenario shown, when electronic device 100 is at location B, it accesses the first frequency band (e.g., the 2.4GHz band) provided by AP device 200. Subsequently, as electronic device 100 moves to location A, closer to AP device 200, it can automatically select a second access point with better signal quality and establish a connection based on the second frequency band (e.g., the 5GHz band) according to the stored second information. Thus, based on multi-band capabilities, it adaptively provides users with a better internet experience.
[0332] For example, such as Figure 3 As shown, electronic device 100 searches for a first access point 31 in the 2.4GHz band and a second access point 32 in the 5GHz band. The first access point 31 and the second access point 32 are access points provided by the same AP device 200. Then, electronic device 100 establishes a first connection with the first access point 31 according to user operation. Figure 16 As shown in (a), the connected WLAN displayed by the electronic device 100 includes a first access point 31 in the 2.4 GHz band, and the available WLAN still includes a second access point 32 in the 5 GHz band. In response to the current scenario, the electronic device 100 can, using the methods shown in the above embodiments, save the second information of the second access point 32 in the 5 GHz band based on the first information of the first access point 31 in the 2.4 GHz band. For example, as... Figure 16 In the interface shown in (b), the electronic device 100 has stored the second information of the second access point 32 in the 5G band. Therefore, in response to changes in communication quality, etc., the electronic device 100 can automatically access the second access point 32 in the 5G band based on this second information. For example, if the electronic device 100 is a device that supports dual WiFi, such as... Figure 16 As shown in (c), the connected WLAN displayed by the electronic device 100 includes a first access point 31 in the 2.4G band and a second access point 32 in the 5G band.
[0333] Optionally, if the electronic device 100 supports dual WiFi, the electronic device 100 establishes a first connection with the first access point, and the electronic device 100 establishes a fourth connection with the second access point. Based on communication quality, it adaptively selects whether to communicate via the first connection or the fourth connection. Both the first and fourth connections are WiFi connections. Optionally, the electronic device 100 may also establish only one WiFi connection with the AP device 200.
[0334] Optionally, if the electronic device 100 does not support dual WiFi, the electronic device 100 establishes a first connection with the first access point. When it is determined that a switch 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 re-establishing the WiFi connection.
[0335] Optionally, the above description uses the example of an AP device 200 being a dual-band router, where the electronic device 100 automatically connects to a second access point (e.g., a 5G band access point) provided by the AP device 200 based on the first access point (e.g., a 2.4G band access point) already connected to. It should be understood that the electronic device 100 can also automatically connect to the first access point (2.4G band) provided by the AP device 200 based on the second 5G band access point already connected to. Alternatively, if the AP device 200 is a tri-band router or other router supporting other frequency bands, the electronic device 100 can also automatically connect to one or more access points belonging to the same AP device 200 based on a previously connected access point using the connection method provided in this application. This will not be elaborated further in this application.
[0336] Furthermore, the connection method provided in this application embodiment can also be applied to scenarios with various communication methods such as Bluetooth connection and Zigbee. For example, if two Bluetooth gateways are configured near the electronic device 100, and the electronic device 100 is already connected to one Bluetooth gateway, an automatic identification and connection process to the other Bluetooth gateway can be triggered.
[0337] The above combination Figures 5-16 The connection method provided in the embodiments of this application is described in detail below. Figure 17 This application provides a detailed description of the electronic device provided in its embodiments.
[0338] In one possible design, Figure 17 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 17 As shown, the electronic device 1700 may 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.
[0339] Optionally, the transceiver unit 1701 is used to support the electronic device 1700 in performing... Figure 5 S501 in; and / or, for supporting electronic device 1700 to perform Figure 6 S602; and / or, for supporting electronic device 1700 to perform Figure 9A S6021 and S6022 in the above; and / or, for supporting the electronic device 1700 to perform Figure 9B S60211 and S60215; and / or, for supporting the electronic device 1700 to perform Figure 10 S1001 in; and / or, for supporting electronic device 1700 to perform Figure 11 S1101-S1106; and / or, for supporting the electronic device 1700 to perform Figure 12S1201-S1206; and / or, for supporting the electronic device 1700 to perform Figure 15 S503 in the middle.
[0340] Optionally, the processing unit 1702 is used to support the electronic device 1700 in performing operations. Figure 5 S502 in; and / or, for supporting electronic device 1700 to perform Figure 6 S601 and S603 in the above; and / or, for supporting the electronic device 1700 to perform Figure 7 S6011-S6013; and / or, for supporting the electronic device 1700 to perform Figure 8 S6012a-S6012d; and / or, for supporting electronic device 1700 to perform Figure 13A S1301, S1303-S1305; and / or, for supporting the electronic device 1700 to perform Figure 14 S1401-S1409 in the series.
[0341] The transceiver unit may include a receiving unit and a transmitting unit, and may be implemented by a transceiver or transceiver-related circuit components, and may be a transceiver or transceiver module. The operation and / or function of each unit in the electronic device 1700 are respectively for implementing the corresponding process of the connection method described in the above method embodiments. All relevant content of each step involved in the above method embodiments can be referred to the functional description of the corresponding functional unit, and for the sake of brevity, it will not be repeated here.
[0342] Optionally, the electronic device 1700 also includes a display unit ( Figure 17 (Not shown in the image), this display unit is used to support the electronic device 1700 in performing operations. Figure 13A S1302 in the middle.
[0343] Optionally, Figure 17 The illustrated electronic device 1700 may also include a storage unit ( Figure 17 (not shown in the image), this storage unit stores a program or instruction. When the transceiver unit 1701 and the processing unit 1702 execute the program or instruction, it causes... Figure 17 The electronic device 1700 shown can perform the connection method described in the above method embodiments.
[0344] Figure 17 The technical effects of the electronic device 1700 shown can be referred to the technical effects of the connection method described in the above method embodiments, and will not be repeated here.
[0345] In addition to being in the form of electronic device 1700, the technical solution provided in this application can also be a functional unit or chip in an electronic device, or a device used in conjunction with an electronic device.
[0346] This application also provides a chip system, including: a processor coupled to a memory, the memory being used to store programs or instructions, wherein when the program or instructions are executed by the processor, the chip system implements the methods in any of the above method embodiments.
[0347] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0348] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application embodiment does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application embodiment does not specifically limit the type of memory or the arrangement of the memory and processor.
[0349] For example, the chip system may 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.
[0350] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.
[0351] This application also provides a computer-readable storage medium storing a computer program. When the computer program is run on a computer, it causes the computer to perform the aforementioned steps to implement the connection method described in the above embodiments.
[0352] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the connection method described in the above embodiments.
[0353] In addition, this application also provides an apparatus. Specifically, the apparatus may be a component or module, and may include one or more processors and a memory connected together. The memory is used to store a computer program. When the computer program is executed by one or more processors, the apparatus performs the connection methods described in the above-described method embodiments.
[0354] The apparatus, computer-readable storage medium, computer program product, or chip provided in the embodiments of this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0355] The steps of the methods or algorithms described in conjunction with the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an application-specific integrated circuit (ASIC).
[0356] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, the division of the above functional modules is only used as an example. In practical applications, the above functions can be assigned to different functional modules as needed; that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0357] In the several embodiments provided in this application, it should be understood that the disclosed methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of modules or units may be electrical, mechanical or other forms.
[0358] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0359] Computer-readable storage media include, but are not limited to, any of the following: USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media capable of storing program code.
[0360] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A connection method, characterized in that, Applied to electronic devices, the method includes: The electronic device establishes a first connection with the first access point, wherein the frequency band of the first access point is the first frequency band; Based on the first information of the first access point, the second information of the second access point is saved, wherein the frequency band of the second access point is the second frequency band, and the first information includes the first 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 and the SSID of the second access point are different, but the secret key is the same.
2. The method according to claim 1, characterized in that, The step of saving the second information of the second access point based on the first information of the first access point includes: Based on the first information from the first access point, a second connection is established with the second access point; Save the second information of the second access point.
3. The method according to claim 2, characterized in that, The process of saving the second information of the second access point includes: When the second access point is available, save the second information of the second access point.
4. The method according to any one of claims 1-3, characterized in that, The second information for storing the second access point includes: 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 second information for storing the second access point includes: A prompt message is displayed, which prompts the user to save 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 includes: Based on the second information, a third connection is automatically established with the second access point.
7. The method according to any one of claims 1-6, characterized in that, The first information also includes one or more of the following: Basic Service Set Identifier (BSSID), SSID, encryption method, Received Signal Strength Indicator (RSSI), Virtual Access Point (VAP) status, number of identifications, and throughput.
8. The method according to any one of claims 1-7, characterized in that, The step of saving the second information of the second access point based on the first information of the first access point includes: Based on the first information, at least one first access point to be verified in the second frequency band is obtained; Obtain a second access point from the first access point to be verified. The second access point to be verified is an access point that can be accessed through the first key, and the second access point is an available access point among the second access points to be verified.
9. The method according to claim 8, characterized in that, The step of obtaining at least one first access point to be verified in a second frequency band based on the first information includes: Obtain the access point for the second frequency band; Determine whether the access point of the second frequency band obtained meets the preset conditions; The access point that meets the preset conditions is determined as the first access point to be verified.
10. The method according to claim 9, characterized in that, The preset conditions include one or more of the following: BSSID similarity exceeds the first threshold, SSID similarity exceeds the second threshold, the corresponding configuration file is not saved, RSSI is greater than the third threshold, and the encryption method is the preset encryption method.
11. The method according to any one of claims 8-10, characterized in that, The step of obtaining the second access point to be verified from the first access point to be verified includes: Scan nearby access points in the second frequency band to obtain the third access point to be verified from the first access point to be verified. The key is used to request access to the third access point to be verified, and the second access point to be verified that was successfully accessed from the third access point to be verified is obtained.
12. The method according to any one of claims 8-10, characterized in that, The step of obtaining a second access point that can be accessed from the first access point to be verified using the key indicated by the first information includes: By requesting access to the first access point to be verified using the key, the second access point to be verified that was successfully accessed from the first access point to be verified can be obtained.
13. The method according to any one of claims 1-7, characterized in that, The step of saving the second information of the second access point based on the first information of the first access point includes: Scan nearby access points; Access the scanned access point using the key indicated by the first information; Save the second information of the successfully connected and available second access point.
14. The method according to any one of claims 1-13, characterized in that, Before saving the second information of the second access point based on the first information of the first access point, the method further includes: The current condition is determined to be met. The condition includes one or more of the following: not a production line version, WLAN switch is on, access point auto-identification and connection switch is on, it is a product from China, not in music playback mode, not in voice call mode, connected to the first access point and the first access point is available, the encryption method of the first access point is a preset encryption method, the number of times the first access point is identified is less than a preset identification number threshold, the duration of the screen-off state exceeds a preset screen-off time threshold, it is in charging mode, the virtual access point (VAP) is in a preset VAP state, RSSI is greater than a preset signal reception strength threshold, and throughput is less than a preset throughput threshold.
15. The method according to any one of claims 1-14, characterized in that, The method further includes: The system detects a user instruction to delete the second access point and disables the automatic connection identification function.
16. An electronic device, characterized in that, include: A processor and a memory, the memory being coupled to the processor, the memory being used to store computer program code, the computer program code including computer instructions, which, when the processor reads the computer instructions from the memory, cause the electronic device to perform the method as described in any one of claims 1-15.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-15.
18. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-15.