A method and terminal for accessing wireless local area network

By using a virtual MAC address in the terminal instead of the device MAC address, the problem of MAC address being tracked in the prior art is solved, and the protection of terminal user location information is realized.

CN111954283BActive Publication Date: 2025-04-25NOKIA TECHNOLOGIES OY
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN201910411638.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-05-17
Publication Date
2025-04-25
Estimated Expiration
2039-05-17

AI Technical Summary

Technical Problem

In the prior art, when a terminal establishes a connection with a WiFi access point, it will send the real device MAC address to the access point, resulting in a third party that can track the terminal's location and usage track through the MAC address.

Method used

Use a virtual MAC address instead of the device MAC address to identify the terminal, ensure that the virtual MAC address is different from the device MAC address, and use the virtual MAC address when accessing the wireless LAN.

Benefits of technology

It effectively protects the security of the location information of the terminal users and prevents third parties from tracking the terminal's activity trajectory through the MAC address.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111954283B_ABST
    Figure CN111954283B_ABST
Patent Text Reader

Abstract

A method and terminal for accessing a wireless local area network, the method comprising: a terminal receiving type information of a wireless local area network and identification information of the wireless local area network sent by an access point, the wireless local area network being provided by the access point; the terminal determining the type of the wireless local area network according to the type information of the wireless local area network; if the terminal determines that the type of the wireless local area network belongs to type I, the terminal sends a message to the access point for requesting access to the wireless local area network, the message carrying a virtual MAC address, the virtual MAC address being used to identify the terminal, the virtual MAC address being different from the device MAC address of the terminal; after the terminal accesses the wireless local area network, the terminal saves the identification information of the wireless local area network. In the method, the terminal uses a virtual MAC address instead of a device MAC address, and a third party cannot obtain the device MAC address of the terminal based on the wireless local area network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of terminal equipment, and in particular to a method and a terminal for accessing a wireless local area network. Background Art

[0002] Wireless Fidelity (WiFi) technology is a wireless local area network technology established by the IEEE 802.11 standard. It is a technology that can wirelessly connect terminals such as personal computers, personal digital assistants (PDAs), and mobile phones to a wide area network.

[0003] The Media Access Control (MAC) address of a terminal is an identifier of the terminal. In the prior art, there are many WiFi access points distributed in the public network environment, and when the terminal is establishing a connection with these WiFi access points, it usually sends the terminal's real device MAC address to the WiFi access point. Therefore, the terminal's device MAC address can be obtained through the above-mentioned WiFi access point. A third party can use the terminal's device MAC address to obtain data such as the model price of the terminal during the production and sales process of the terminal, as well as the movement trajectory of the terminal during the user's use after the user purchases it. The third party establishes a connection between the two through the same device MAC address, and then the third party can obtain the user's location information and purchasing preferences. Summary of the invention

[0004] In view of this, the present application provides a method for accessing a wireless local area network, wherein the method uses a virtual MAC address instead of a device MAC address to identify a terminal device. The virtual MAC address is different from the device MAC address, thereby solving the technical problem that a third party can track the device MAC address of a terminal through a local area network, and then link the model price and other data of the terminal during the production and sales process together.

[0005] In a first aspect, the present application provides a method for accessing a wireless local area network, including: a terminal receives type information of a first wireless local area network and identification information of the first wireless local area network sent by a first access point, where the first wireless local area network is provided by the first access point; the terminal determines the type of the first wireless local area network according to the type information of the first wireless local area network; if the terminal determines that the type of the first wireless local area network belongs to the first type, the terminal sends a first message to the first access point, the first message is used to request access to the first wireless local area network, the first message carries a first virtual MAC address, the first virtual MAC address is used to identify the terminal, and the first virtual MAC address is different from the device MAC address of the terminal; after the terminal accesses the first wireless local area network, the terminal saves the identification information of the first wireless local area network.

[0006] Therefore, using this method, when the terminal makes a judgment based on the type of LAN, if the wireless LAN belongs to the first type, the security of this type of wireless LAN is relatively low, and the terminal uses a virtual MAC address different from the device MAC address to identify the terminal. Even if a third party passes through the above-mentioned wireless LAN, it can only obtain the virtual MAC address of the terminal, and cannot obtain the device MAC address of the terminal. Therefore, the third party cannot link the user information obtained through the device MAC address with the user information obtained through the virtual MAC address.

[0007] According to a possible implementation of the first aspect, the virtual MAC address includes a random MAC address or a function MAC address, etc. The random MAC address is generated by a processor, and the format of the random MAC address is XX-XX-XX-XX-XX-XX, wherein the first byte is X2, X6, XA or XE, wherein X is any number between 0 and F. The function MAC address is a MAC address with a certain function rule, such as 01-02-03-04-05-06 and 01-02-04-08-16-32, etc.

[0008] According to the first aspect, or any implementation of the first aspect above, the type information of the local area network is OPEN open network, WPA3Enhanced open network, Shared-key WEP network, WPA network, WPA2-PSK network, WPA3-PSK Only personal encrypted network, WPA2 / WPA3-PSK compatible mode personal encrypted network, WPA-802.1x enterprise encrypted network or WPA3-Enterprise enterprise-level encrypted network.

[0009] According to the first aspect, or any implementation of the first aspect above, after the terminal accesses the first wireless local area network, it also includes: saving the correspondence between the identification information of the first wireless local area network and the first virtual MAC address; the terminal leaves the first wireless local area network; the terminal again receives the type information of the first wireless local area network and the identification information of the first wireless local area network sent from the first access point; the terminal sends the first message to the first access point according to the correspondence between the identification information of the first wireless local area network and the first virtual MAC address. In this way, the terminal uses the same device address for identifying the terminal for a wireless local area network. When accessing again, the terminal does not need to judge again according to the type of the wireless local area network, but selects the device address to be used according to the saved record.

[0010] According to the first aspect, or any implementation method of the first aspect above, the correspondence between the identification information of the first wireless local area network and the first virtual MAC address can be a mapping relationship between the SSID of the wireless local area network and the random MAC address, or a mapping relationship between the SSID of the wireless local area network, the BSSID of the access point and the random MAC address, or a mapping relationship between the BSSID of the access point and the random MAC address.

[0011] According to the first aspect, or any implementation of the first aspect above, before the terminal accesses the first wireless local area network, it also includes: if the terminal determines that the terminal cannot access the first wireless local area network, the terminal sends a second message to the second access point, the second message is used to request access to the second wireless local area network, the second message carries a second virtual MAC address, the second virtual MAC address is used to identify the terminal, the second virtual MAC address is different from the device MAC address of the terminal, and the second wireless local area network is provided by the second access point. In this way, after the terminal determines that it cannot access the first wireless local area network, it accesses the second wireless local area network instead, which saves the user's time to access the wireless local area network and facilitates the user to access the wireless local area network. For different wireless local area networks, the virtual MAC address of the terminal is different. In this case, even if a third party can track the virtual MAC address of the terminal through the wireless local area network, the virtual MAC address obtained is different. Since there is no association between each virtual MAC address, the third party cannot link them together to obtain the complete activity track of the terminal, avoiding the third party from obtaining the complete activity track of the terminal by tracking the device MAC address of the terminal. It can be seen that this method effectively protects the location information security of the user using the terminal.

[0012] According to the first aspect, or any implementation of the first aspect above, the first type includes OPEN open network, WPA3Enhanced open network, Shared-key WEP network, WPA network, WPA2-PSK network, WPA3-PSKOnly personal encrypted network or WPA2 / WPA3-PSK compatible mode personal encrypted network.

[0013] According to the first aspect, or any implementation of the first aspect above, if the terminal determines that the type of the first wireless local area network belongs to the first type, before the terminal sends the first message to the first access point, the method further includes: the terminal determines that the correspondence between the identification information of the first wireless local area network and the virtual MAC address is not saved. In this way, if the terminal does not save the correspondence between the identification information of the first wireless local area network and the virtual MAC address, it is necessary to make a judgment when the terminal accesses the first wireless local area network, which saves the time of the user accessing the wireless local area network and facilitates the user to access the wireless local area network.

[0014] According to the first aspect, or any implementation manner of the first aspect above, after the terminal accesses the first wireless local area network, the method further includes: the terminal displays a first interface, the first interface includes a control for identification information of the first wireless local area network, an indication that the first wireless local area network is in a connected state, and an indication of the signal strength of the first wireless local area network; the terminal detects a first operation of the user on the control for identification information of the first wireless local area network; in response to the first operation, the terminal displays a second interface, the second interface includes a control for using a virtual MAC and a control for using a device MAC, wherein the control for using the virtual MAC is in a selected state, and the control for using the virtual MAC is in a selected state indicating that the terminal uses a virtual MAC. The terminal detects the first selection operation of the user on the control using the device MAC; in response to the first selection operation, the terminal displays a third interface, the third interface includes the control using the virtual MAC and the control using the device MAC, wherein the control using the device MAC is in a selected state, and the control using the device MAC is in a selected state, indicating that the terminal uses the device MAC address to access the first wireless LAN; the terminal leaves the first wireless LAN; the terminal sends the third message to the first access point, the third message is used to request access to the first wireless LAN, and the third message carries the device MAC address of the terminal. In this way, after the terminal accesses the first wireless LAN, the user can change the device address used to identify the terminal for accessing the first wireless LAN according to needs or preferences, and then the terminal automatically uses the device MAC address changed by the user to access the first wireless LAN.

[0015] According to the first aspect, or any implementation method of the first aspect above, the user turns on the wireless LAN function through the control, the terminal starts active scanning, and displays the control of the scanned available wireless LAN SSID on the interface, which includes the control of the SSID of the first wireless LAN and the signal strength indicator of the first wireless LAN. After the terminal accesses the first wireless local area network, the method further includes: the terminal displays a first interface, on which not only a control of the SSID of the first wireless local area network and an indicator of the signal strength of the first wireless local area network are displayed, but also an indicator that the first wireless local area network is in a connected state; the user clicks the control of the SSID of the first wireless local area network to enter a second interface, i.e., a network details interface of the first wireless local area network, which includes an IP setting control, a control of whether to use a proxy, or / and a privacy control, wherein the privacy control includes a control of using a virtual MAC and a control of using the device MAC, and the control of using the virtual MAC is in a selected state; the user clicks the control of using the device MAC, and in response to the above-mentioned click operation, the terminal displays a third interface, and the third interface also includes an IP setting control, a control of whether to use a proxy, or / and a privacy control, and different from the second interface, the control of using the device MAC is in a selected state; after the user clicks to save the control, the terminal returns to display the first interface, or the terminal automatically returns to display the first interface, and the terminal leaves the first wireless local area network and sends a message carrying the device MAC address to the first access point to request access to the first wireless local area network.

[0016] According to the first aspect, or any implementation manner of the first aspect above, after the terminal accesses the first wireless local area network, the method further includes: the terminal displays a fourth interface, the fourth interface includes a control for identification information of the first wireless local area network, an identification that the first wireless local area network is in a connected state, an identification of the signal strength of the first wireless local area network, and a control for identification information of a second wireless local area network, wherein the second wireless local area network is provided by a second access point; the terminal detects a second operation of the user on the control for identification information of the second wireless local area network; in response to the second operation, the terminal displays a fifth interface, the fifth interface includes a control for using a virtual MAC and a control for using a device MAC, wherein the control for using the virtual MAC is in a selected state, and the control for using the virtual MAC is in a selected state indicating that the terminal will use the virtual MAC address The terminal detects the user's second selection operation on the control using the device MAC; in response to the second selection operation, the terminal displays a sixth interface, the sixth interface including the control using the virtual MAC and the control using the device MAC, wherein the control using the device MAC is in a selected state, and the control using the device MAC is in a selected state, indicating that the terminal will use the device MAC address to access the second wireless LAN; the terminal detects the user's third operation on the control of the identification information of the second wireless LAN; in response to the third operation, the terminal leaves the first wireless LAN; the terminal sends the fourth message to the second access point, the fourth message is used to request access to the second wireless LAN, and the fourth message carries the device MAC address of the terminal. In this way, after the terminal accesses the first wireless LAN, the user can change the device address used to identify the terminal in the second wireless LAN that is not accessed according to needs or preferences; because the terminal is accessing the first wireless LAN, it needs to be triggered by the user to change the terminal to use the set device MAC address to start accessing the second wireless LAN, which increases the controllability of the user.

[0017] According to the first aspect, or any implementation of the first aspect above, the user turns on the wireless LAN function through the control, the terminal starts active scanning, and displays the control of the SSID of the scanned available wireless LAN on the interface, the interface including the control of the SSID of the first wireless LAN, the control of the SSID of the second wireless LAN, and the signal strength mark of the first wireless LAN. After the terminal accesses the first wireless LAN, the method further includes: the terminal displays a fourth interface, on which not only the control of the SSID of the first wireless LAN, the control of the SSID of the second wireless LAN, and the signal strength mark of the first wireless LAN are displayed, but also the mark that the first wireless LAN is in a connected state is displayed. The user clicks on the control of the SSID of the second wireless LAN to enter the fifth interface, i.e., the network details interface of the second wireless LAN, the fifth interface including an IP setting control, a control for whether to use a proxy, or / and a privacy control, wherein the privacy control includes a control for using a virtual MAC and a control for using the device MAC, and the control for using the virtual MAC is in a selected state; the user clicks on the control for using the device MAC, and in response to the above-mentioned click operation, the terminal displays a sixth interface, the sixth interface also including an IP setting control, a control for whether to use a proxy, or / and a privacy control, and the difference from the fifth interface is that the control for using the device MAC is in a selected state; after the user clicks on the save control, the terminal returns to display the fourth interface, or the terminal automatically returns to display the fourth interface; in the fourth interface, the user clicks on the control of the SSID of the second wireless LAN, and in response to the above-mentioned click operation, the terminal leaves the first wireless LAN; the terminal sends a message carrying the device MAC address to the second access point, requesting access to the second wireless LAN.

[0018] According to the first aspect, or any implementation of the first aspect above, after the terminal accesses the first wireless local area network, the method further includes: the terminal displays a seventh interface, the seventh interface includes a control of the identification information of the first wireless local area network, a control of the identification information of the third wireless local area network, an identification that the first wireless local area network is in a connected state, and an identification of the signal strength of the first wireless local area network, and the third wireless local area network is provided by a third access point; the terminal detects a fourth operation of the user on the control of the identification information of the third wireless local area network; in response to the fourth operation, the terminal leaves the first wireless local area network; if the terminal determines that the type of the third wireless local area network belongs to the first type, the terminal sends a fifth message to the third access point, the fifth message is used to request access to the third wireless local area network, the fifth message carries a third virtual MAC address, the third virtual MAC address is used to identify the terminal, the third virtual MAC address is different from the first virtual MAC address and the device MAC address of the terminal, and the third wireless local area network is different from the first wireless local area network. For different wireless local area networks, the virtual MAC address of the terminal is different. In this case, even if a third party can track the virtual MAC address of the terminal through the wireless LAN, the virtual MAC address obtained is different. Since there is no correlation between each virtual MAC address, the third party cannot link them together to obtain the complete activity track of the terminal, which prevents the third party from obtaining the complete activity track of the terminal by tracking the device MAC address of the terminal. It can be seen that this method effectively protects the location information security of the user using the terminal. The terminal receives the type information of the third wireless LAN and the identification information of the third wireless LAN sent by the third access point, which can occur after the terminal accesses the first wireless LAN, when the terminal is accessing the first wireless LAN, or before the terminal accesses the first wireless LAN.

[0019] According to the first aspect, or any implementation of the first aspect above, if the terminal determines that the type of the third wireless local area network belongs to the first type, before the terminal sends the fifth message to the third access point, the method further includes: the terminal determines that the correspondence between the identification information of the third wireless local area network and the virtual MAC address is not saved. In this way, if the terminal does not save the correspondence between the identification information of the third wireless local area network and the virtual MAC address, it is necessary to make a judgment when the terminal accesses the third wireless local area network, which saves the time of the user accessing the wireless local area network and facilitates the user to access the wireless local area network.

[0020] According to the first aspect, or any implementation of the first aspect above, if the terminal determines that the type of the first wireless local area network belongs to type III, the terminal sends a third message to the first access point, the third message is used to request access to the first wireless local area network, and the third message carries the device MAC address of the terminal; after the terminal accesses the first wireless local area network, the terminal saves the identification information of the first wireless local area network. In this way, for a certain type of wireless local area network, its compatibility is guaranteed, so that the user can quickly access the above wireless local area network, and the time of multiple attempts is omitted.

[0021] According to the first aspect, or any implementation of the first aspect, Type III includes a WPA-802.1x enterprise encrypted network or a WPA3-Enterprise enterprise-level encrypted network.

[0022] According to the first aspect, or any implementation of the first aspect above, if the terminal determines that the type of the first wireless local area network belongs to the first type, the terminal sends a first message to the first access point, and the method further includes: the terminal displays an eighth interface, the eighth interface includes a control of the identification information of the first wireless local area network and an identification of the signal strength of the first wireless local area network; the terminal detects a fourth operation of the user on the control of the identification information of the first wireless local area network; if the terminal determines that the type of the first wireless local area network belongs to the first type, the terminal sends the first message to the first access point. In this way, the user selects the first wireless local area network, and then the terminal accesses the first wireless local area network. The user can make a selection according to his or her own needs and the situation at the time, which increases the controllability of the user.

[0023] According to the first aspect, or any implementation method of the first aspect above, the user turns on the wireless LAN function by clicking the wireless LAN switch control, the terminal starts active scanning, and displays the scanned available wireless LAN SSID control on the seventh interface, the available wireless LAN includes a first wireless LAN, and the seventh interface displays a control including the SSID of the first wireless LAN and an identifier of the signal strength of the first wireless LAN; the user clicks the SSID control of the first wireless LAN, and the terminal sends a first message requesting access to the first wireless LAN.

[0024] According to the first aspect, or any implementation of the first aspect above, the number of times the terminal requests access to the first wireless local area network is greater than or equal to N times, and the terminal determines that the terminal cannot access the first wireless local area network, where N is an integer. Wherein N includes integers such as 3, 4, 5, 6, and 7. In this way, after multiple attempts, the situation where the first wireless local area network cannot be accessed due to accidental factors such as obstruction and poor signal is avoided, and the possibility of accessing the first wireless local area network is increased.

[0025] According to the first aspect, or any implementation of the first aspect above, the identification information of the first, second and third wireless local area networks includes a service set identifier (Service Set Identifier, SSID) and / or a basic service set identifier (Basic Service Set Identifier, BSSID).

[0026] According to the first aspect, or any implementation of the first aspect above, the first message, the second message, the third message, the fourth message, and the fifth message include a Probe Request frame, an Authentication Request frame, or an Association Request frame. In this way, the terminal uses the virtual MAC address not only in the scanning phase, but also in the link authentication phase, the connection phase, and the access authentication phase.

[0027] According to the first aspect, or any implementation of the first aspect above, the first operation, the second operation, the third operation, the first selection operation, and the second selection operation include a click operation, a touch operation, a double-click operation, or a slide operation. In this way, the user can make a selection according to needs and preferences, which increases the controllability of the user.

[0028] In a second aspect, the present application provides a method for accessing a wireless local area network, the method comprising: a terminal receives type information of a first wireless local area network and identification information of the first wireless local area network sent by a first access point, the first wireless local area network being provided by the first access point; the terminal determines the type of the first wireless local area network according to the type information of the first wireless local area network; if the terminal determines that the type of the first wireless local area network belongs to type II, the terminal sends a first message to the first access point, the first message is used to request access to the first wireless local area network, the first message carries a first virtual MAC address, the first virtual MAC address is used to identify the terminal, and the first virtual MAC address is different from a device MAC address of the terminal; if the terminal determines that the terminal cannot access the first wireless local area network, the terminal sends a second message to the first access point, the second message is used to request access to the first wireless local area network, and the second message carries the device MAC address of the terminal; after the terminal accesses the first wireless local area network, the terminal saves the identification information of the first wireless local area network.

[0029] In this way, for a certain type of wireless LAN, if the terminal fails to access the wireless LAN after multiple attempts to use a random MAC address, the terminal will try to use the device MAC as the device address to access the wireless LAN. While protecting the terminal's device MAC address from being easily obtained by a third party, the terminal also takes into account the compatibility issues of the wireless LAN, avoiding the situation where the terminal cannot access the wireless LAN due to the whitelist setting of the access point.

[0030] According to a possible implementation of the second aspect, the virtual MAC address includes a random MAC address or a function MAC address, etc. The random MAC address is generated by a processor, and the format of the random MAC address is XX-XX-XX-XX-XX-XX, wherein the first byte is X2, X6, XA or XE, wherein X is any number between 0 and F. The function MAC address is a MAC address with a certain function rule, such as 01-02-03-04-05-06 and 01-02-04-08-16-32, etc.

[0031] According to the second aspect, or any implementation of the second aspect above, the correspondence between the identification information of the first wireless local area network and the first virtual MAC address may be a mapping relationship between the SSID of the wireless local area network and a random MAC address, or a mapping relationship between the SSID of the wireless local area network, the BSSID of the access point and a random MAC address, or a mapping relationship between the BSSID of the access point and a random MAC address. According to the second aspect, or any implementation of the second aspect above, after the terminal accesses the first wireless local area network, it also includes: saving the correspondence between the identification information of the first wireless local area network and the device MAC address; the terminal leaves the first wireless local area network; the terminal again receives the type information of the first wireless local area network and the identification information of the first wireless local area network sent from the first access point; the terminal sends the second message to the first access point according to the correspondence between the identification information of the first wireless local area network and the device MAC address. In this way, the terminal uses the same device address for identifying the terminal for a wireless local area network. When accessing again, the terminal does not need to judge again according to the type of the wireless local area network, but selects the device address to be used according to the saved record.

[0032] According to the second aspect, or any implementation of the second aspect above, if the terminal determines that the terminal cannot access the first wireless local area network, before the terminal sends the second message to the first access point, it also includes: if the terminal accesses the first wireless local area network, after access, saving the corresponding relationship between the identification information of the first wireless local area network and the first virtual MAC address; the terminal leaves the first wireless local area network; the terminal again receives the type information of the first wireless local area network and the identification information of the first wireless local area network sent from the first access point; the terminal sends the first message to the first access point according to the corresponding relationship between the identification information of the first wireless local area network and the first virtual MAC address. In this way, the terminal uses the same device address for identifying the terminal for a wireless local area network. When accessing again, the terminal does not need to judge again according to the type of the wireless local area network, but selects the device address to be used according to the saved record.

[0033] According to the second aspect, or any implementation of the second aspect above, the Type II includes a Shared-key WEP network, a WPA network, a WPA2-PSK network, a WPA3-PSK Only personal encrypted network, a WPA2 / WPA3-PSK compatible mode personal encrypted network, a WPA-802.1x enterprise encrypted network or a WPA3-Enterprise enterprise-level encrypted network.

[0034] According to the second aspect, or any implementation of the second aspect above, the method further includes: the number of times the terminal requests to access the first wireless local area network is greater than or equal to N times, and the terminal determines that the terminal cannot access the first wireless local area network, where N is an integer. Wherein N includes integers such as 3, 4, 5, 6, 7, etc. In this way, after multiple attempts, the situation where the first wireless local area network cannot be accessed due to accidental factors such as obstruction and poor signal is avoided, and the possibility of accessing the first wireless local area network is increased.

[0035] According to the second aspect, or any implementation manner of the second aspect above, if the terminal determines that the terminal cannot access the first wireless local area network, before the terminal sends the second message to the first access point, the method also includes: the terminal displays a first interface, the first interface includes a reminder message, and the reminder message is used to remind the user to choose to use the device MAC to access the first wireless local area network; the terminal displays a second interface, and the second interface includes a control for the identification information of the first wireless local area network and an identification of the signal strength of the first wireless local area network; the terminal detects a first operation of the user on the control for the identification information of the first wireless local area network; in response to the first operation, the terminal displays a third interface, and the third interface includes a control for using a virtual MAC and A control using device MAC, wherein the control using virtual MAC is in a selected state, and the control using virtual MAC is in a selected state indicating that the terminal uses the virtual MAC address to access the first wireless local area network; the terminal detects the user's first selection operation on the control using device MAC; in response to the first selection operation, the terminal displays a fourth interface, and the fourth interface includes the control using virtual MAC and the control using device MAC, wherein the control using device MAC is in a selected state, and the control using device MAC is in a selected state indicating that the terminal uses the device MAC address to access the first wireless local area network; the terminal sends the second message to the first access point. In this way, the user's controllability is increased, and the user can independently select the device address used to identify the terminal according to needs and preferences.

[0036] According to the second aspect, or any implementation of the second aspect above, the user turns on the wireless LAN function through the control, the terminal starts active scanning, and displays the control of the scanned available wireless LAN SSID on the interface, and the interface includes the control of the SSID of the first wireless LAN and the signal strength indicator of the first wireless LAN. If the terminal determines that the terminal cannot access the first wireless LAN, before the terminal sends the second message to the first access point, the terminal displays the first interface, and the first interface includes a reminder message, and the reminder message is used to remind the user to choose to use the device MAC to access the first wireless LAN; after the first interface disappears, the terminal displays the second interface, and the second interface includes a control for displaying the SSID of the scanned available wireless LAN, and the second interface includes a control for the SSID of the first wireless LAN and the signal strength indicator of the first wireless LAN. The terminal detects a first operation of a user on a control of the SSID of the first wireless local area network; in response to the first operation, the terminal displays a third interface, the third interface including a network details interface of the first wireless local area network, the interface including an IP setting control, a control for whether to use a proxy, or / and a privacy control, wherein the privacy control includes a control for using a virtual MAC and a control for using the device MAC, and the control for using the virtual MAC is in a selected state; the user clicks on the control for using the device MAC, and in response to the above-mentioned click operation, the terminal displays a fourth interface, the fourth interface also including an IP setting control, a control for whether to use a proxy, or / and a privacy control, and different from the third interface, the control for using the device MAC is in a selected state; after the user clicks to save the control, the terminal returns to display the second interface, or the terminal automatically returns to display the second interface, and the terminal leaves the first wireless local area network and sends a message carrying the device MAC address to the first access point, requesting access to the first wireless local area network.

[0037] According to the second aspect, or any implementation of the second aspect above, if the terminal determines that the type of the first wireless local area network belongs to type II, before the terminal sends the first message to the first access point, the method further includes: the terminal determines that the correspondence between the identification information of the first wireless local area network and the virtual MAC address is not saved. In this way, if the terminal does not save the correspondence between the identification information of the first wireless local area network and the virtual MAC address, it is necessary to make a judgment when accessing the first wireless local area network, which saves the time of the user accessing the wireless local area network and facilitates the user to access the wireless local area network.

[0038] According to the second aspect, or any implementation manner of the second aspect above, after the terminal accesses the first wireless local area network, the method further includes: the terminal displays a fifth interface, the fifth interface includes a control for identification information of the first wireless local area network, an indication that the first wireless local area network is in a connected state, and an indication of the signal strength of the first wireless local area network; the terminal detects a second operation of the user on the control for identification information of the first wireless local area network; in response to the second operation, the terminal displays a fourth interface, the fourth interface includes a control for using a virtual MAC and a control for using a device MAC, wherein the control using the device MAC is in a selected state, and the control using the device MAC is in a selected state indicating that the terminal Accessing the first wireless local area network using the device MAC address; the terminal detecting the second selection operation of the user on the control using the virtual MAC; in response to the second selection operation, the terminal displays a third interface, the third interface including the control using the virtual MAC and the control using the device MAC, wherein the control using the virtual MAC is in a selected state, and the control using the virtual MAC is in a selected state indicating that the terminal accesses the first wireless local area network using the virtual MAC address; the terminal leaves the first wireless local area network; the terminal sends the first message to the first access point, the first message is used to request access to the first wireless local area network, and the first message carries the first virtual MAC address. In this way, after the terminal accesses the first wireless local area network, the user can change the device address used to identify the terminal for accessing the first wireless local area network according to needs or preferences, and then the terminal automatically uses the device address changed by the user to access the first wireless local area network.

[0039] According to the second aspect, or any implementation of the second aspect above, the user turns on the wireless LAN function through the control, the terminal starts active scanning, and displays the control of the SSID of the scanned available wireless LAN on the interface, the interface including the control of the SSID of the first wireless LAN and the mark of the signal strength of the first wireless LAN. After the terminal accesses the first wireless LAN, the method also includes: the terminal displays a fifth interface, on which not only the control of the SSID of the first wireless LAN and the mark of the signal strength of the first wireless LAN are displayed, but also the mark that the first wireless LAN is in a connected state is displayed. The user clicks the control of the SSID of the first wireless LAN to enter the fourth interface, i.e., the network details interface of the first wireless LAN, which includes The terminal includes an IP setting control, a control for whether to use a proxy, or / and a privacy control, wherein the privacy control includes a control for using a virtual MAC and a control for using the device MAC, and the control for using the device MAC is in a selected state; the user clicks on the control for using the virtual MAC, and in response to the above-mentioned click operation, the terminal displays a third interface, and the third interface also includes an IP setting control, a control for whether to use a proxy, or / and a privacy control. Unlike the fourth interface, the control for using the virtual MAC is in a selected state; after the user clicks to save the control, the terminal returns to display the fifth interface, or the terminal automatically returns to display the fifth interface, and the terminal leaves the first wireless local area network and sends a message carrying the device MAC address to the first access point, requesting access to the first wireless local area network.

[0040] According to the second aspect, or any implementation manner of the second aspect above, after the terminal accesses the first wireless local area network, the method also includes: the terminal displays a sixth interface, the sixth interface includes a control for identification information of the first wireless local area network, an identification that the first wireless local area network is in a connected state, an identification of the signal strength of the first wireless local area network, and a control for identification information of a second wireless local area network, wherein the second wireless local area network is provided by a second access point; the terminal detects a third operation of the user on the control for identification information of the second wireless local area network; in response to the third operation, the terminal displays a seventh interface, the seventh interface includes a control for using a virtual MAC and a control for using a device MAC, wherein the control for using the virtual MAC is in a selected state, and the control for using the virtual MAC is in a selected state indicating that the terminal will use the virtual MAC address Accessing the second wireless local area network; the terminal detects the user's third selection operation on the control using the device MAC; in response to the third selection operation, the terminal displays an eighth interface, the eighth interface includes the control using the virtual MAC and the control using the device MAC, wherein the control using the device MAC is in a selected state, and the control using the device MAC is in a selected state indicating that the terminal will use the device MAC address to access the second wireless local area network; the terminal detects the user's fourth operation on the control of the identification information of the second wireless local area network; in response to the fourth operation, the terminal leaves the first wireless local area network; the terminal sends the third message to the second access point, the third message is used to request access to the second wireless local area network, and the third message carries the device MAC address of the terminal. In this way, after the terminal accesses the first wireless local area network, the user can change the device address used to identify the terminal in the second wireless local area network that is not accessed according to needs or preferences; because the terminal is accessing the first wireless local area network, it needs to be triggered by the user to change the terminal to use the set device address to start accessing the second wireless local area network, which increases the controllability of the user.

[0041] According to the second aspect, or any implementation of the second aspect above, the user turns on the wireless LAN function through the control, the terminal starts active scanning, and displays the control of the scanned available wireless LAN SSID on the interface, the interface including the control of the SSID of the first wireless LAN, the control of the SSID of the second wireless LAN, and the signal strength of the first wireless LAN. After the terminal accesses the first wireless LAN, the method also includes: the terminal displays a sixth interface, and the sixth interface not only displays the control of the SSID of the first wireless LAN, the control of the SSID of the second wireless LAN, and the signal strength of the first wireless LAN, but also displays the indicator that the first wireless LAN is in a connected state. The user clicks on the control of the SSID of the second wireless LAN to enter the seventh interface, i.e., the network details interface of the second wireless LAN, the seventh interface including an IP setting control, a control for whether to use a proxy, or / and a privacy control, wherein the privacy control includes a control for using a virtual MAC and a control for using the device MAC, and the control for using the virtual MAC is in a selected state; the user clicks on the control for using the device MAC, and in response to the above-mentioned click operation, the terminal displays an eighth interface, the eighth interface also including an IP setting control, a control for whether to use a proxy, or / and a privacy control, and the difference from the seventh interface is that the control for using the device MAC is in a selected state; after the user clicks on the save control, the terminal returns to display the sixth interface, or the terminal automatically returns to display the sixth interface; in the sixth interface, the user clicks on the control of the SSID of the second wireless LAN, and in response to the above-mentioned click operation, the terminal leaves the first wireless LAN; the terminal sends a message carrying the device MAC address to the second access point, requesting access to the second wireless LAN.

[0042] According to the second aspect, or any implementation of the second aspect above, after the terminal accesses the first wireless local area network, it also includes: the terminal displays a ninth interface, the ninth interface includes a control for the identification information of the first wireless local area network, a control for the identification information of the third wireless local area network, an identification that the first wireless local area network is in a connected state, and an identification of the signal strength of the first wireless local area network; the terminal detects a fifth operation of the user on the control for the identification information of the third wireless local area network; in response to the fifth operation, the terminal leaves the first wireless local area network; if the terminal determines that the type of the third wireless local area network belongs to type II, the terminal A fourth message is sent to the third access point, the fourth message is used to request access to the third wireless local area network, the fourth message carries a second virtual MAC address, the second virtual MAC address is used to identify the terminal, the second virtual MAC address is different from the first virtual MAC address and the device MAC address of the terminal, and the third wireless local area network is different from the first wireless local area network; if the terminal determines that the terminal cannot access the third wireless local area network, the terminal sends a fifth message to the third access point, the fifth message is used to request access to the third wireless local area network, and the fifth message carries the device MAC address of the terminal. For different wireless local area networks, the virtual MAC address of the terminal is different. In this case, even if a third party can track the virtual MAC address of the terminal through the wireless local area network, the virtual MAC address obtained is different. Since there is no association between each virtual MAC address, the third party cannot link them together to obtain the complete activity track of the terminal, which prevents the third party from obtaining the complete activity track of the terminal by tracking the device MAC address of the terminal. It can be seen that this method effectively protects the location information security of the user using the terminal. The terminal receives the type information of the third wireless local area network and the identification information of the third wireless local area network sent by the third access point, which may occur after the terminal accesses the first wireless local area network, when the terminal is accessing the first wireless local area network, or before the terminal accesses the first wireless local area network.

[0043] According to the second aspect, or any implementation of the second aspect above, if the terminal determines that the type of the third wireless local area network belongs to type II, before the terminal sends the fourth message to the third access point, the method further includes: the terminal determines that the correspondence between the identification information of the third wireless local area network and the virtual MAC address is not saved. In this way, if the terminal does not save the correspondence between the identification information of the third wireless local area network and the virtual MAC address, it is necessary to make a judgment when the terminal accesses the third wireless local area network, which saves the time of the user accessing the wireless local area network and facilitates the user to access the wireless local area network.

[0044] According to the second aspect, or any implementation of the second aspect above, if the terminal determines that the type of the first wireless local area network belongs to type I, the terminal sends a first message to the first access point, the first message is used to request access to the first wireless local area network, and the first message carries a first virtual MAC address of the terminal; after the terminal accesses the first wireless local area network, the terminal saves identification information of the first wireless local area network. In this way, for different types of wireless local area networks, different types of methods are used to ensure that the device MAC address of the terminal is not obtained by a third party as much as possible.

[0045] According to the second aspect, or any implementation of the second aspect above, the first type includes an OPEN open network or a WPA3Enhanced open network.

[0046] According to the second aspect, or any implementation of the second aspect above, if the terminal determines that the terminal cannot access the first wireless LAN, after the terminal sends the second message to the first access point, if the terminal determines that the terminal cannot access the first wireless LAN, the terminal saves the identification information of the first wireless LAN; the terminal leaves the first wireless LAN; the terminal again receives the type information of the first wireless LAN and the identification information of the first wireless LAN sent from the first access point; the terminal no longer sends the first message. In this way, when using the device MAC address, the terminal still cannot access the first wireless LAN, and even if the terminal scans the wireless LAN in the future, it will no longer access the wireless LAN, avoiding the security problem of forged access points.

[0047] According to the second aspect, or any implementation of the second aspect above, the terminal receives type information of a first wireless local area network and identification information of the first wireless local area network sent by a first access point, and the first wireless local area network is provided by the first access point; the terminal receives type information of a third wireless local area network and identification information of the third wireless local area network sent by a third access point, and the third wireless local area network is provided by the third access point; after the terminal sends a fourth message to the first access point, the terminal determines that the terminal cannot access the first wireless local area network; the terminal determines the type of the third wireless local area network according to the type information of the third wireless local area network; if the terminal determines that the type of the third wireless local area network belongs to type II, the terminal sends a fourth message to the third access point, the fourth message is used to request access to the third wireless local area network, the fourth message carries a second virtual MAC address, the second virtual MAC address is used to identify the terminal, and the second virtual MAC address is different from the device MAC address of the terminal. For different wireless local area networks, the virtual MAC address of the terminal is different. In this case, even if a third party can track the virtual MAC address of the terminal through the wireless LAN, the virtual MAC address obtained is different. Since there is no correlation between each virtual MAC address, the third party cannot link them together to obtain the complete activity track of the terminal, thus preventing the third party from obtaining the complete activity track of the terminal by tracking the device MAC address of the terminal. It can be seen that this method effectively protects the location information security of the user using the terminal.

[0048] According to the second aspect, or any implementation of the second aspect above, if the terminal determines that the type of the first wireless local area network belongs to type II, the terminal sends a first message to the first access point, and the method further includes: the terminal displays a sixth interface, the sixth interface includes a control of the identification information of the first wireless local area network and an identification of the signal strength of the first wireless local area network; the terminal detects the fourth operation of the user on the control of the identification information of the first wireless local area network; if the terminal determines that the type of the first wireless local area network belongs to type II, the terminal sends the first message to the first access point. In this way, the user selects the first wireless local area network, and then the terminal accesses the first wireless local area network. The user can make a choice according to his or her needs and the situation at the time, which increases the controllability of the user.

[0049] According to the second aspect, or any implementation of the second aspect above, the identification information of the first, second and third wireless local area networks includes a service set identifier (Service Set Identifier, SSID) and / or a basic service set identifier (Basic Service Set Identifier, BSSID).

[0050] According to the second aspect, or any implementation of the second aspect above, the first message, the second message, the third message, and the fourth message include a Probe Request frame, an Authentication Request frame, or an Association Request frame. In this way, the terminal uses the virtual MAC address not only in the scanning phase, but also in the link authentication phase, the connection phase, and the access authentication phase.

[0051] According to the second aspect, or any implementation of the second aspect, the first operation, the second operation, the third operation, the fourth operation, the first selection operation, and the second selection operation include a click operation, a touch operation, a double-click operation, or a slide operation. In this way, the user can make a selection according to needs and preferences, which increases the controllability of the user.

[0052] In addition, any implementation method of the second aspect and the technical effects brought about by it can refer to any implementation method of the first aspect mentioned above and the technical effects brought about by it, and will not be repeated here.

[0053] In a third aspect, the present application provides a method for accessing a wireless local area network, the method comprising: a terminal receives type information of a first wireless local area network and identification information of the first wireless local area network sent by a first access point, the first wireless local area network being provided by the first access point; the terminal determines the type of the first wireless local area network according to the type information of the first wireless local area network; if the terminal determines that the type of the first wireless local area network belongs to type III, the terminal sends a first message to the first access point, the first message is used to request access to the first wireless local area network, the first message carries the device MAC address of the terminal; after the terminal accesses the first wireless local area network, the terminal saves the identification information of the first wireless local area network. In this way, when the terminal accesses a wireless local area network with higher security, the device MAC address of the terminal is directly used to identify the terminal, avoiding the situation where the terminal cannot access the wireless local area network due to setting a whitelist, saving the user's time.

[0054] According to a possible implementation of the third aspect, after the terminal accesses the first wireless local area network, the method further includes: saving the correspondence between the identification information of the first wireless local area network and the device MAC address; the terminal leaves the first wireless local area network; the terminal again receives the type information of the first wireless local area network and the identification information of the first wireless local area network sent from the first access point; the terminal sends the first message to the first access point according to the correspondence between the identification information of the first wireless local area network and the device MAC address. In this way, the terminal uses the same device address for identifying the terminal for a wireless local area network. When accessing again, the terminal does not need to judge again according to the type of the wireless local area network, but selects the device address to be used according to the saved record.

[0055] According to the third aspect, or any implementation of the third aspect above, before the terminal accesses the first wireless local area network, the method further includes: if the terminal determines that the terminal cannot access the first wireless local area network, the terminal sends a second message to a second access point, the second message is used to request access to a second wireless local area network, and the second wireless local area network is provided by the second access point. In this way, after the terminal determines that it cannot access the first wireless local area network, it accesses the second wireless local area network instead, which saves the user's time in accessing the wireless local area network and facilitates the user to access the wireless local area network.

[0056] According to the third aspect, or any implementation of the third aspect above, before the terminal accesses the first wireless local area network, it also includes: if the terminal determines that the terminal cannot access the first wireless local area network, the terminal saves the identification information of the first wireless local area network; the terminal again receives the type information of the first wireless local area network and the identification information of the first wireless local area network sent from the first access point; the terminal no longer sends the first message. In this way, when using the device MAC address, the terminal still cannot access the first wireless local area network. In the future, even if the terminal scans the wireless local area network, it will no longer access the wireless local area network, avoiding the security problem of fake access points.

[0057] According to the third aspect, or any implementation of the third aspect above, if the terminal determines that the type of the first wireless local area network belongs to type III, before the terminal sends the first message to the first access point, the method further includes: the terminal determines that the correspondence between the identification information of the first wireless local area network and the MAC address of the device is not saved. In this way, if the terminal does not save the correspondence between the identification information of the first wireless local area network and the MAC address of the device, it is necessary to make a judgment when accessing the first wireless local area network, which saves the time of the user accessing the wireless local area network and facilitates the user to access the wireless local area network.

[0058] According to the third aspect, or any implementation of the third aspect, the type III includes a WPA-802.1x enterprise encrypted network or a WPA3-Enterprise enterprise-level encrypted network.

[0059] According to the third aspect, or any implementation manner of the third aspect above, after the terminal accesses the first wireless local area network, the method further includes: the terminal displays a first interface, the first interface includes a control for identification information of the first wireless local area network, an identification that the first wireless local area network is in a connected state, and an identification of the signal strength of the first wireless local area network; the terminal detects a first operation of the user on the control for identification information of the first wireless local area network; in response to the first operation, the terminal displays a second interface, the second interface includes a control for using a virtual MAC and a control for using a device MAC, wherein the control using the device MAC is in a selected state, and the control using the device MAC is in a selected state indicating that the terminal The terminal uses the device MAC address to access the first wireless local area network; the terminal detects the user's first selection operation on the control using the virtual MAC; in response to the first selection operation, the terminal displays a third interface, the third interface includes the control using the virtual MAC and the control using the device MAC, wherein the control using the virtual MAC is in a selected state, and the control using the virtual MAC is in a selected state indicating that the terminal uses the virtual MAC address to access the first wireless local area network; the terminal leaves the first wireless local area network; the terminal sends the second message to the first access point, the second message is used to request access to the first wireless local area network, and the second message carries the first virtual MAC address. In this way, after the terminal accesses the first wireless local area network, the user can change the device address used to identify the terminal for accessing the first wireless local area network according to needs or preferences, and then the terminal automatically uses the device address changed by the user to access the first wireless local area network.

[0060] According to the third aspect, or any implementation manner of the third aspect above, after the terminal accesses the first wireless local area network, the method further includes: the terminal displays a fourth interface, the fourth interface includes a control for identification information of the first wireless local area network, an identification that the first wireless local area network is in a connected state, an identification of the signal strength of the first wireless local area network, and a control for identification information of a third wireless local area network, wherein the third wireless local area network is provided by a third access point; the terminal detects a second operation of the user on the control for identification information of the third wireless local area network; in response to the second operation, the terminal displays a fifth interface, the fifth interface includes a control for using a virtual MAC and a control for using a device MAC, wherein the control for using the virtual MAC is in a selected state, and the control for using the virtual MAC is in a selected state indicating that the terminal will use the virtual MAC address Accessing the third wireless local area network; the terminal detects the second selection operation of the user on the control using the device MAC; in response to the second selection operation, the terminal displays a sixth interface, the sixth interface includes the control using the virtual MAC and the control using the device MAC, wherein the control using the device MAC is in a selected state, and the control using the device MAC is in a selected state indicating that the terminal will use the device MAC address to access the third wireless local area network; the terminal detects the third operation of the user on the control of the identification information of the third wireless local area network; in response to the third operation, the terminal leaves the first wireless local area network; the terminal sends the third message to the third access point, the third message is used to request access to the third wireless local area network, and the third message carries the device MAC address of the terminal. In this way, after the terminal accesses the first wireless local area network, the user can change the device address used to identify the terminal in the second wireless local area network that is not accessed according to needs or preferences; because the terminal is accessing the first wireless local area network, the user's trigger is required to change the terminal to use the set device address to start accessing the second wireless local area network, which increases the user's controllability.

[0061] According to the third aspect, or any implementation of the third aspect above, if the terminal determines that the type of the first wireless local area network belongs to the first type, the terminal sends a second message to the first access point, the second message is used to request access to the first wireless local area network, the second message carries a first virtual MAC address, the first virtual MAC address is used to identify the terminal, and the first virtual MAC address is different from the device MAC address of the terminal; after the terminal accesses the first wireless local area network, the terminal saves the identification information of the first wireless local area network. In this way, different types of wireless local area networks are used to ensure the security of the user's location information. Different device addresses for identifying the terminal are used for different types of wireless local area networks. Even if a third party can track the movement trajectory of the virtual MAC address and the device MAC address of the terminal through the wireless local area network, the virtual MAC address and the device MAC address cannot be linked together, which prevents the third party from obtaining the complete activity trajectory of the terminal by tracking the device MAC address of the terminal. It can be seen that this method effectively protects the location information security of the user using the terminal.

[0062] According to the third aspect, or any implementation of the third aspect above, the first type includes OPEN open network, WPA3Enhanced open network, Shared-key WEP network, WPA network, WPA2-PSK network, WPA3-PSKOnly personal encrypted network or WPA2 / WPA3-PSK compatible mode personal encrypted network.

[0063] According to the third aspect, or any implementation of the third aspect, the virtual MAC address includes a random MAC address or a function MAC address. The random MAC address is generated by a processor, and the format of the random MAC address is XX-XX-XX-XX-XX-XX, where the first byte is X2, X6, XA or XE, where X is any number between 0 and F. The function MAC address is a MAC address with a certain function rule, such as 01-02-03-04-05-06 and 01-02-04-08-16-32.

[0064] According to the third aspect, or any implementation of the third aspect above, if the terminal determines that the type of the first wireless local area network belongs to type III, the terminal sends a first message to the first access point, and the method further includes: the terminal displays a seventh interface, the seventh interface includes a control of the identification information of the first wireless local area network and an identification of the signal strength of the first wireless local area network; the terminal detects the fourth operation of the user on the control of the identification information of the first wireless local area network; if the terminal determines that the type of the first wireless local area network belongs to type III, the terminal sends the first message to the first access point. In this way, the user selects the first wireless local area network, and then the terminal accesses the first wireless local area network. The user can make a choice according to his or her needs and the situation at the time, which increases the controllability of the user.

[0065] According to the third aspect, or any implementation of the third aspect, the identification information of the first, second and third wireless local area networks includes a service set identifier (Service Set Identifier, SSID) and / or a basic service set identifier (Basic Service Set Identifier, BSSID).

[0066] According to the third aspect, or any implementation method of the third aspect above, the correspondence between the identification information of the first wireless local area network and the first virtual MAC address can be a mapping relationship between the SSID of the wireless local area network and the random MAC address, or a mapping relationship between the SSID of the wireless local area network, the BSSID of the access point and the random MAC address, or a mapping relationship between the BSSID of the access point and the random MAC address.

[0067] According to the third aspect, or any implementation of the third aspect, the first message, the second message and the third message include a Probe Request frame, an Authentication Request frame or an Association Request frame.

[0068] According to the third aspect, or any implementation of the third aspect, the first operation, the second operation, the third operation, the fourth operation, the first selection operation, and the second selection operation include a click operation, a touch operation, a double-click operation, or a slide operation. In this way, the user can make a selection according to needs and preferences, which increases the controllability of the user.

[0069] According to the third aspect, or any implementation of the third aspect above, the method further includes: the number of times the terminal requests to access the first wireless local area network is greater than or equal to N times, and the terminal determines that the terminal cannot access the first wireless local area network, where N is an integer. Wherein N includes integers such as 3, 4, 5, 6, 7, etc. In this way, after multiple attempts, the situation where the first wireless local area network cannot be accessed due to accidental factors such as obstruction and poor signal is avoided, and the possibility of accessing the first wireless local area network is increased.

[0070] In addition, any implementation method of the third aspect and the technical effects brought about by it can refer to any implementation method of the first aspect mentioned above and the technical effects brought about by it, and will not be repeated here.

[0071] In a fourth aspect, the present application provides a method for accessing a wireless local area network, the method comprising: a terminal receiving type information of a first wireless local area network and identification information of the first wireless local area network sent by a first access point, the first wireless local area network being provided by the first access point; the terminal displaying a first interface, the first interface comprising a control for the identification information of the first wireless local area network and an identification of the signal strength of the first wireless local area network; the terminal detecting a first operation of a user on the control for the identification information of the first wireless local area network; in response to the first operation, the terminal displaying a second interface, the second interface comprising a control for using a virtual MAC and a control for using a device MAC, wherein the control for using the virtual MAC is in a selected state, and the control for using the virtual MAC is in a selected state indicating that the terminal uses a first virtual MAC address to access the first wireless local area network; the terminal The terminal detects the first selection operation of the user on the control using the device MAC; in response to the selection operation, the terminal displays a third interface, the third interface includes the control using the virtual MAC and the control using the device MAC, wherein the control using the device MAC is in a selected state, and the control using the device MAC is in a selected state indicating that the terminal uses the device MAC address to access the first wireless local area network; the terminal detects the second operation of the control using the identification information of the first wireless local area network; in response to the second operation, the terminal sends the first message to the first access point, the first message is used to request access to the first wireless local area network, and the first message carries the device MAC address of the terminal; after the terminal accesses the first wireless local area network, the terminal saves the identification information of the first wireless local area network. In this way, after the scanning stage, the terminal displays the available wireless local area networks on the interface, and the user can make a selection, and can set the selected wireless local area network, and select the device address used to identify the terminal, which increases the controllability of the user, and the user can make a selection according to specific needs, specific circumstances and sequence numbers.

[0072] According to a possible implementation of the fourth aspect, before the terminal receives the type information of the first wireless local area network and the identification information of the first wireless local area network sent by the first access point, the method further includes: the terminal displays a fourth interface, the fourth interface includes a control of a WLAN switch and a control of a virtual MAC address switch, the control of the WLAN switch and the control of the virtual MAC address switch are in a closed state; the terminal detects a first opening operation of the control of the virtual MAC address switch by the user; in response to the first opening operation, the control of the virtual MAC address switch is in an open state; the terminal detects a second opening operation of the control of the WLAN switch by the user; in response to the second opening operation, the control of the WLAN switch is in an open state; the message requesting access to the wireless local area network sent by the terminal to all access points carries a virtual MAC address, and the virtual MAC address is used to identify the terminal. In this way, when the WLAN on / off switch is turned off, the setting is performed uniformly, and after the WLAN is turned on / off, the terminal uses the user's uniform setting method to use the set device address for identifying the terminal to access the wireless local area network.

[0073] According to the fourth aspect, or any implementation of the fourth aspect above, before the terminal receives the type information of the first wireless local area network and the identification information of the first wireless local area network sent by the first access point, the method further includes: the terminal displays a fourth interface, the fourth interface includes a WLAN switch control and a virtual MAC address switch control, the WLAN switch control and the virtual MAC address switch control are in a closed state; the terminal detects the second opening operation of the user on the WLAN switch control; in response to the second opening operation, the WLAN switch control is in an open state; the terminal sends a message requesting access to the wireless local area network, and the message requesting access to the wireless local area network carries a device MAC address; the terminal detects the first opening operation of the user on the virtual MAC address switch control; in response to the first opening operation, the virtual MAC address switch control is in an open state; the terminal sends a message requesting access to the wireless local area network again, and the message requesting access to the wireless local area network carries a virtual MAC address, and the virtual MAC address is used to identify the terminal. In this way, the user performs unified settings in the scanning stage of the terminal but before the connection, and after the user settings, the wireless local area network is accessed using the set device address for identifying the terminal.

[0074] According to the fourth aspect, or any implementation manner of the fourth aspect above, after the terminal accesses the first wireless local area network, the method further includes: the terminal displays a fifth interface, the fifth interface includes a control for identification information of the first wireless local area network, an identification of the signal strength of the first wireless local area network, and an identification that the first wireless local area network is in a connected state; the terminal detects a third operation of the user on the control for identification information of the first wireless local area network; in response to the third operation, the terminal displays a third interface, the third interface includes a control for using a virtual MAC and a control for using a device MAC, wherein the control for using the device MAC is in a selected state; the terminal detects a second selection operation of the user on the control for using the virtual MAC; in response to the second selection operation, the terminal displays a second interface, the second interface includes a control for using the virtual MAC and a control for using the device MAC, wherein the control for using the virtual MAC is in a selected state; the terminal leaves the first wireless local area network; the terminal sends the second message to the first access point, the second message is used to request access to the first wireless local area network, and the second message carries the first virtual MAC address of the terminal. In this way, after the terminal accesses the first wireless LAN, the user can change the device address for identifying the terminal accessing the first wireless LAN according to needs or preferences, and then the terminal automatically uses the device MAC address changed by the user to access the first wireless LAN.

[0075] According to the fourth aspect, or any implementation manner of the fourth aspect above, after the terminal accesses the first wireless local area network, the method further includes: the terminal displays a sixth interface, the sixth interface includes a control for identification information of the first wireless local area network, an identification of the signal strength of the first wireless local area network, an identification that the first wireless local area network is in a connected state, and a control for identification information of a second wireless local area network, wherein the second wireless local area network is provided by the second access point; the terminal detects a fourth operation of the user on the control for identification information of the second wireless local area network; in response to the fourth operation, the terminal displays a seventh interface, the seventh interface includes a control for using a virtual MAC and a control for using a device MAC, wherein the control for using the virtual MAC is in a selected state, and the control for using the virtual MAC is in a selected state indicating that the terminal will use the second virtual MAC address accesses the second wireless LAN; the terminal detects the user's third selection operation on the control using the device MAC; in response to the third selection operation, the terminal displays an eighth interface, the eighth interface includes the control using the virtual MAC and the control using the device MAC, wherein the control using the device MAC is in a selected state, and the control using the device MAC is in a selected state indicating that the terminal will use the device MAC address to access the second wireless LAN; the terminal detects the user's fifth operation on the identification information of the second wireless LAN; in response to the fifth operation, the terminal leaves the first wireless LAN; the terminal sends the third message to the second access point, the third message is used to request access to the second wireless LAN, and the third message carries the device MAC address of the terminal. In this way, after the terminal accesses the first wireless LAN, the user can change the device address used to identify the terminal in the second wireless LAN that is not accessed according to needs or preferences; because the terminal is accessing the first wireless LAN, it needs the user's trigger to change the terminal to use the set device MAC address to start accessing the second wireless LAN, which increases the user's controllability.

[0076] According to the fourth aspect, or any implementation of the fourth aspect, the virtual MAC address includes a random MAC address or a function MAC address. The random MAC address is generated by a processor, and the format of the random MAC address is XX-XX-XX-XX-XX-XX, where the first byte is X2, X6, XA or XE, where X is any number between 0 and F. The function MAC address is a MAC address with a certain function rule, such as 01-02-03-04-05-06 and 01-02-04-08-16-32.

[0077] In addition, any implementation method according to the fourth aspect and the technical effects brought about by it can refer to any implementation method in the above-mentioned first aspect and the technical effects brought about by it, which will not be repeated here. In the fifth aspect, the present application provides a terminal, including one or more touch screens, one or more memories, and one or more processors; wherein the one or more memories store one or more programs; it is characterized in that when the one or more processors execute the one or more programs, the terminal implements the method of any implementation method of the first to fourth aspects. Based on the above-mentioned terminal, the above-mentioned functions can be realized.

[0078] In a sixth aspect, the present application provides a graphical user interface (GUI), which is stored in a terminal, the terminal including a touch screen, a memory, and one or more processors, the one or more processors being used to execute one or more computer programs stored in the memory, characterized in that the graphical user interface includes: a first GUI displayed on the touch screen, the first GUI including a control for identification information of the first wireless local area network and an identification of the signal strength of the first wireless local area network; in response to a first touch event of the control for the identification information of the first wireless local area network, a second GUI is displayed on the touch screen, the second GUI including a control for using a virtual MAC and a control for using a device MAC, wherein the control for using the virtual MAC is selected In response to a second touch event for the control using the device MAC, a third GUI is displayed on the touch screen, the third GUI includes the control using the virtual MAC and the control using the device MAC, wherein the control using the device MAC is in a selected state, and the control using the device MAC is in a selected state, indicating that the terminal uses the device MAC address to access the first wireless LAN; in response to a third touch event for the control for the identification information of the first wireless LAN, a fourth GUI is displayed on the touch screen, the fourth GUI includes an identification that the first wireless LAN is in a connected state. Based on the above graphical user interface, the user can realize the control function for identifying the device address of the terminal, thereby improving the intelligent interaction capability between the terminal and the user.

[0079] According to a possible implementation of the sixth aspect, the virtual MAC address includes a random MAC address or a function MAC address, etc. The random MAC address is generated by a processor, and the format of the random MAC address is XX-XX-XX-XX-XX-XX, wherein the first byte is X2, X6, XA or XE, wherein X is any number between 0 and F. The function MAC address is a MAC address with a certain function rule, such as 01-02-03-04-05-06 and 01-02-04-08-16-32, etc.

[0080] In addition, any implementation method of the sixth aspect and the technical effects brought about by it can refer to any implementation method of the first aspect mentioned above and the technical effects brought about by it, and will not be repeated here.

[0081] In a seventh aspect, the present application provides a computer-readable storage medium, comprising instructions, characterized in that when the instructions are executed on an electronic device, the electronic device executes a method as in any one of the implementations of the first to fourth aspects. The computer-readable storage medium can be used to implement the above functions.

[0082] Based on the above method, since a virtual MAC address is used to replace the device MAC address for identifying the terminal device, the virtual MAC address is different from the device MAC address, which solves the technical problem that the device MAC address of the terminal can be tracked through the local area network. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] Figure 1 A schematic diagram of a terminal usage scenario is provided for an embodiment of the present application;

[0084] Figure 2 A schematic diagram of the structure of a terminal provided in an embodiment of the present application;

[0085] Figure 3 A software structure block diagram of a terminal provided in an embodiment of the present application;

[0086] Figure 4 A schematic diagram of Capability Information performance information bits provided in an embodiment of the present application;

[0087] Figure 5 A schematic diagram of a Robust Security Network information element provided in an embodiment of the present application;

[0088] Figure 6 A schematic diagram of a method for accessing a wireless local area network provided in an embodiment of the present application;

[0089] Figure 7-Figure 9A schematic diagram of human-computer interaction provided in an embodiment of the present application;

[0090] Fig.10 A flowchart of a method for accessing a wireless local area network provided in an embodiment of the present application;

[0091] Fig.11 A schematic diagram of human-computer interaction provided in an embodiment of the present application;

[0092] Fig.12 A flowchart of another method for accessing a wireless local area network provided in an embodiment of the present application;

[0093] Fig.13 A flowchart of another method for accessing a wireless local area network provided in an embodiment of the present application;

[0094] Figure 14-17 A schematic diagram of human-computer interaction provided in an embodiment of the present application. DETAILED DESCRIPTION

[0095] The embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0096] The IEEE802.11 standard defines AP (access point) and STA (Station) in a WiFi network. Figure 1 A schematic diagram of a terminal usage scenario is provided for an embodiment of the present application, such as Figure 1As shown, taking STA as terminal 10 as an example, Tom was on a business trip on April 18, 2019. At 9:00 a.m., he was near Starbucks Shenzhen store and used terminal 10 to connect to WiFi named WiFi201 provided by service provider A. At 15:00 p.m., he arrived near Starbucks Guangzhou store and used terminal 10 to connect to WiFi named WiFi202 provided by service provider B. At 20:00 p.m., he was near Starbucks Zhuhai store and used terminal 10 to connect to WiFi named WiFi203 provided by service provider C in order to check Twitter. Since terminal 10 usually sends the MAC address of terminal 10 to the WiFi access point during the process of establishing a connection with these WiFi access points, server 30 can obtain information on the activity trajectory of terminal 10 through access points AP201, AP202 and AP203 distributed in multiple locations. The activity trajectory of terminal 10 can be regarded as the activity trajectory of the user, thereby obtaining the user's location information. In other scenarios, even if the terminal has not established a WiFi connection with the AP, since the Probe request carries the terminal's MAC address, a third party can still obtain the terminal's MAC address by listening to the Probe Request frames periodically sent by the terminal, so that the third party can track the user and the user's location information cannot be protected. The user's location information can also be tracked by other means, which are not limited here.

[0097] The method provided in the embodiment of the present application is applicable to WiFi networks and can be applied to Figure 2 In the terminal 100 shown. Figure 2 A schematic structural diagram of the terminal 100 is shown.

[0098] The terminal 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0099] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal 100. In other embodiments of the present application, the terminal 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0100] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor, a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0101] In some embodiments of the present application, the processor generates a virtual MAC address for use in place of the device MAC address during the WiFi connection process. The virtual MAC address includes a random MAC address and a function MAC address. The random MAC address is generated by the processor, and the format of the random MAC address is XX-XX-XX-XX-XX-XX, where the first byte is X2, X6, XA or XE, where X is any number between 0 and F. The function MAC address is a MAC address with a certain function rule, such as 01-02-03-04-05-06 and 01-02-04-08-16-32.

[0102] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0103] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system. In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0104] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the terminal 100.

[0105] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0106] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0107] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0108] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the terminal 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal 100.

[0109] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0110] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal 100, and can also be used to transmit data between the terminal 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other terminals, such as AR devices, etc.

[0111] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal 100. In other embodiments of the present application, the terminal 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0112] The charging management module 140 is used to receive charging input from a charger.

[0113] The power management module 141 is used to connect the battery 142 , the charging management module 140 and the processor 110 .

[0114] The wireless communication function of the terminal 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0115] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0116] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied on the terminal 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0117] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0118] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (WiFi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the terminal 100. 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 the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0119] In some embodiments of the present application, the wireless communication module sends information such as a Probe Request frame carrying the device MAC address or random MAC address of the terminal to the AP, and receives information such as a service set identifier (SSID) and a basic service set identifier (BSSID) sent by the AP.

[0120] In some embodiments, the antenna 1 of the terminal 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal 100 can communicate with the network and other devices through 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 technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0121] The terminal 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0122] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0123] The terminal 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor. ISP is used to process the data fed back by camera 193. Camera 193 is used to capture static images or videos. Digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. Video codec is used to compress or decompress digital video. NPU is a neural network (NN) computing processor, which draws on the structure of biological neural network.

[0124] The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal 100 .

[0125] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the terminal 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.

[0126] In some embodiments of the present application, the internal memory 121 stores the device MAC address of the terminal, which is stored in the internal memory 121 when the terminal device manufacturer produces it. The internal memory 121 is also used to store the virtual MAC address generated by the processor, and the terminal can use different virtual MAC addresses when accessing different APs.

[0127] In the scenario where the terminal accesses a wireless local area network, both the device MAC address and the virtual MAC address can be used to identify the terminal 100. During the process of establishing a connection between the terminal and the AP and the process of the terminal connecting to the wide area network through the AP, when it is necessary to send information carrying the device address of the terminal, the processor will retrieve the device MAC address or one of the virtual MAC addresses and send it to the AP to identify the terminal.

[0128] In some embodiments of the present application, the internal memory 121 also stores the correspondence between the identification information of the wireless local area network and the virtual MAC address. The correspondence between the identification information of the wireless local area network and the virtual MAC address can be a mapping relationship between the SSID of the wireless local area network and the random MAC address, or a mapping relationship between the SSID of the wireless local area network, the BSSID of the access point and the random MAC address, or a mapping relationship between the BSSID of the access point and the random MAC address. The SSID can also be used as the identification information of the wireless local area network.

[0129] The terminal 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.

[0130] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The terminal 100 can listen to music or listen to hands-free calls through the speaker 170A. The receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. The headphone jack 170D is used to connect wired headphones.

[0131] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. The gyroscope sensor 180B can be used to determine the motion posture of the terminal 100. The air pressure sensor 180C is used to measure the air pressure. The magnetic sensor 180D includes a Hall sensor. The terminal 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal 100 in all directions (generally three axes). The distance sensor 180F is used to measure the distance. The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The ambient light sensor 180L is used to sense the brightness of the ambient light.

[0132] The fingerprint sensor 180H is used to collect fingerprints. The terminal 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0133] The temperature sensor 180J is used to detect the temperature. The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the terminal 100, which is different from the position of the display screen 194.

[0134] Bone conduction sensor 180M can obtain vibration signals.

[0135] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal 100 may receive key input and generate key signal input related to user settings and function control of the terminal 100.

[0136] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0137] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0138] The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the terminal 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The terminal 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The terminal 100 interacts with the network through the SIM card to realize functions such as calls and data communications. In some embodiments, the terminal 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal 100 and cannot be separated from the terminal 100.

[0139] The software system of the terminal 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the terminal 100.

[0140] Figure 3 It is a software structure block diagram of the terminal 100 according to an embodiment of the present application.

[0141] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0142] The application layer can include a series of application packages.

[0143] like Figure 3 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0144] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0145] like Figure 3As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0146] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0147] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0148] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0149] The phone manager is used to provide communication functions of the terminal 100, such as management of call status (including connection, disconnection, etc.).

[0150] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0151] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, the terminal vibrates, the indicator light flashes, etc.

[0152] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0153] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0154] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0155] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0156] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0157] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0158] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0159] A 2D graphics engine is a drawing engine for 2D drawings.

[0160] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0161] See also Figure 6 , Figure 6 This is a flowchart of a method for accessing a wireless local area network provided by the prior art. According to the relevant content defined in the IEEE802.11 standard, if a STA wants to establish a connection with an AP, it must go through three stages:

[0162] 1. Scanning phase. There are usually two scanning modes: passive scanning and active scanning.

[0163] In passive scanning, the STA will continuously switch between the channels listed in the channel table and wait for the Beacon frame sent by the AP. The Beacon frame carries the basic information of the corresponding AP, including parameters such as SSID and BSSID.

[0164] In active scanning, on each channel, the STA will send a Probe Request frame to request the AP to respond. When sending the Probe Request frame, the information carried will include the MAC address of the STA. When the AP receives the Probe Request frame, it will send a Probe Response frame to reply. The Probe Response frame contains information such as the AP's SSID and BSSID.

[0165] The Capability Information bit is marked in both the Beacon frame and the Probe Response frame, such as Figure 4 As shown, Figure 4 The Capability Information field is 16 bits long and is used to inform the STA of the capabilities of the network it belongs to. The Privacy field is used to indicate whether the network is encrypted. A Privacy bit value of 0 indicates that the network is not encrypted, and a Privacy bit value of 1 indicates that the network is encrypted. For other fields, see IEEE Std 802.11 TM -Chapter 8.4.1.4 in 2012 is not repeated here.

[0166] In order to improve network security, 802.11i has designed two new link layer encryption protocols and a mechanism for generating and transmitting keys. Some network types, such as WPA2-PSK and WPA-802.1x networks, define the Robust Security Network (RSN) information element in the Beacon / Probe Response frame, namely the RSN Information element, which is used to identify network security information elements, such as Figure 5 As shown, Figure 5 The entire information 501 represents the RSN Information element. The RSN Information element includes information such as version (Version), group cipher suite (Group cipher suite), pair cipher suite (count + list) and link authentication and key management suite (count + list) (Authentication and Key Management (AKM) suites (count + list)). Figure 5 502 in the RSN Information element indicates the AKM field, and the AKM contains an OUl ( Figure 5 503 represents the OUI field) and a set of type numbers (not shown in the figure), which identify the link authentication type of the subsequent steps. The access authentication method corresponding to the network can be determined based on the OUI field and type number in the AKM field of the network.

[0167] 2. Link Authentication Phase: After the STA selects an AP, it initiates a link authentication process to it.

[0168] According to the definition of IEEE802.11 standard, STA needs to confirm its identity before the connection phase.

[0169] In 802.11, STA uses MAC address as identification, and the first frame sent to AP is a link authentication request frame. In open system link authentication, AP will process the link authentication request and then send back the result. WEP must be used in shared-key link authentication. Its theoretical basis is that if it can successfully respond to the challenge information sent to it, it proves that STA has the shared key.

[0170] 3. Association phase: After completing link authentication, the STA can connect to the AP (or reconnect to a new AP) to gain full access to the network.

[0171] According to the definition of IEEE802.11 standard, connection is a kind of recording procedure, the purpose of which is to establish a mapping relationship between AP and STA. The connection process is initiated by STA. After STA and AP complete link authentication, STA can send an Association Request frame. AP will then process the connection request, respond, and send an Association Response frame to establish a connection.

[0172] Many existing networks still only need the above three processes to establish a connection between a STA and an AP, and then the STA can access the WAN through the AP. Take the STA as an example to illustrate.

[0173] For example, in an OPEN network, in the link authentication phase, the terminal can use its device MAC address for authentication. After this type of network is connected, the message is sent directly during the message transmission process without encryption. Figure 6 As shown, the process of establishing a connection between the terminal and the AP requires completing the scanning phase, link authentication phase and connection phase before the connection can be established. The terminal can access the wide area network through the AP without the need for the user to enter a password or download a certificate and other human-computer interaction steps. In the embodiment of the present application, the OPEN open network belongs to type I.

[0174] Exemplary Figure 7 An embodiment of a method for a user to enable a terminal to access an OPEN open network is shown.

[0175] like Figure 7As shown in FIG. a, the display screen of the terminal displays the WLAN setting interface, which includes the WLAN on / off switch 701. The on / off switch 701 indicates whether the WiFi function is turned on, and the user can turn the WiFi function on or off by operating the control 701. The user's operation may be a click operation of the user on the WLAN on / off switch 701. In some embodiments, not limited to the setting interface, the interface output by the system may also include interface elements of the system boundary, such as a status bar, a navigation bar, etc. Among them, the status bar may include the name of the operator (such as China Mobile), time, WiFi icon, signal strength, current remaining power, etc. The navigation bar may include a back key icon, a main display key icon, and a menu key icon, etc.

[0176] like Figure 7 As shown in FIG. 1 , in response to the user clicking the on / off switch 701 of the WLAN option in the setting interface, the terminal starts active scanning. 702 displayed on the display screen of the terminal indicates that the terminal is scanning the available WiFi nearby. Specifically, the processor 110 of the terminal retrieves the device MAC address, carries the device MAC address and sends a Probe Request frame to the AP through the wireless communication module 160. The terminal receives a Probe Response frame from the AP. The Probe Response frame includes Capability Information information and RSN information elements. The wireless communication module 160 sends the received signal from the AP to the processor 110 of the terminal. The processor 110 parses the above signal and determines the link authentication and access authentication method required to access the AP. Then the display screen of the terminal displays the SSID of the BSS ( Figure 7 In b, library, home and company are the SSIDs of the corresponding BSSs) and types (such as open or encrypted) for the user to select. For example, Figure 7 As shown in FIG. 1 , the available WLAN list 707 lists the SSIDs of the BSSs that the terminal can access. The SSIDs of the BSSs displayed on the display screen of the terminal, such as 703, indicate that the SSID of the BSS is library. 704 and 705 may indicate that the type of the AP is open or encrypted. 704 is directly indicated by text, while 705 more intuitively identifies the type of AP and the signal strength of the WiFi provided by the AP through an icon, such as Figure 7In b, 705 indicates that the AP is open, and 706 includes a lock mark, indicating that the AP is encrypted. The sector-shaped figure in 705 can indicate the signal strength. There is a grayscale line in the sector-shaped figure 705, indicating that the WiFi signal with SSID library is weaker than the WiFi signal with SSID home. 708 indicates that the user can manually add an AP with a known SSID by clicking on the control.

[0177] like Figure 7 As shown in Figure c, in response to the user clicking on the AP with SSID library in the setting interface, the terminal starts to establish a connection with the AP. Specifically, the terminal carries the device MAC address to initiate link authentication to the AP. After link authentication, the terminal still sends an Association Request frame carrying the device MAC address information to the AP, and receives an Association Response frame sent by the AP. The terminal successfully establishes a connection with the AP, and the terminal can access the wide area network through the AP. A successful connection mark is displayed on the terminal display. For example, Figure 7 As shown in c, 702 disappears and becomes invisible, and 724 changes from the AP type to connected, which is used to indicate that the terminal has established a connection with the AP.

[0178] In existing networks such as Share-key WEP networks, the terminal uses the device MAC address for authentication during the link authentication phase, and the process of the terminal accessing the AP is also implemented through three steps: scanning phase, link authentication phase, and connection phase. However, unlike the OPEN open network, the user needs to enter a password for human-computer interaction before the link authentication phase, and the message in the link authentication phase needs to be WEP encrypted. In the embodiment of the present application, the Share-key WEP network belongs to Type II.

[0179] Due to improvements in security issues, according to the definition of 802.11i WLAN security standards, STAs that have passed 802.11 link authentication with a shared key are not allowed to connect to the Gu'an network (Robust Security Network, RSN). It can be understood that for the Gu'an network, a further access authentication stage is required after the connection stage. Only after the connection is established can the terminal access the WAN through the AP.

[0180] Future applications, such as WPA3Enhanced open networks, are the same as OPEN open networks. In the process of establishing a connection between a terminal and an AP, they go through a scanning phase, a link authentication phase, and a connection phase. However, the difference is that a four-way handshake access authentication phase is required between the terminal and the AP, and in the connection phase, the terminal and the AP will negotiate a connection key, which is used for message encryption during the four-way handshake and message transmission encryption after the terminal accesses the AP. Although the terminal and the AP will negotiate a connection key in the above process, the user will not be aware of it. In an embodiment of the present application, the network belongs to Type I, and the process of establishing a connection between the terminal and the AP is the same as that of Type I. Figure 7 The steps are the same as those shown in , without requiring the user to enter a password or download a certificate.

[0181] In existing networks such as WPA networks and WPA2-PSK networks, as well as future WPA3-PSK Only personal encryption networks and WPA2 / WPA3-PSK compatible mode personal encryption networks, the access authentication stage is performed through the EAPOL four-way handshake between the terminal and the AP. After the access authentication is successful, the message between the terminal and the AP will be encrypted before being sent. In the embodiment of the present application, the above four networks belong to type II, such as Figure 6 As shown in FIG. 1 , the process of establishing a connection between a terminal and an AP requires completing four steps: a scanning phase, a link authentication phase, a connection phase, and an access authentication phase. After the connection is established, the terminal can access the WAN through the AP. Before the link authentication phase, the user needs to enter a password for human-computer interaction.

[0182] Exemplary Figure 8 An embodiment of a method for a user to enable a terminal to access a WiFi whose SSID is home and belongs to a WPA2-PSK network is shown. Figure 8 a and Figure 8 For a description of b, see Figure 7 a and Figure 7 The description of b is not repeated here.

[0183] See also Figure 8As shown in c, in response to the user clicking on the option AP 709 with the SSID of home in the setting interface, the terminal starts to establish a connection with the AP, and prompts the user to enter a password on the display screen interface 710. The user enters a password, such as 123456, and then clicks the save option 711 in the interface 710. In response to the user's operation on the interface 710, the terminal stores the password in the internal memory 121. The terminal carries the device MAC address information retrieved by the processor to initiate link authentication to the AP. After the link authentication, the terminal sends an Association Request frame carrying the device MAC address information to the AP, and receives an Association Response frame sent by the AP. The terminal again carries the MAC address information to initiate access authentication to the AP. The access authentication stage is completed between the terminal and the AP. If successful, the terminal can access the wide area network through the AP, and a successful connection mark is displayed on the terminal display. For example, as Figure 8 As shown in d, 712 indicates that the terminal has established a connection with the AP.

[0184] In existing networks, such as WPA-802.1x enterprise encrypted networks and future WPA3-Enterprise enterprise-level encrypted networks, the above network system is a typical Client / Server structure. Its access authentication phase uses the Extensible Authentication Protocol (EAP) to implement the exchange of authentication information between the client, device, and authentication server. After the access authentication is successful, the message will be sent in an encrypted manner. In the embodiments of the present application, the above two types of networks belong to Type III, see Figure 6 The process of establishing a connection between the terminal and the AP requires completing four steps: scanning phase, link authentication phase, connection phase, and access authentication phase. After the connection, the terminal can access the wide area network through the AP. Unlike type II, the user is required to download a certificate or enter identity information for human-computer interaction during the access authentication phase.

[0185] Exemplary Fig. 9 A possible method for a user to enable a terminal to access a WiFi of type III with an SSID of company is shown. The access process is similar to type II, except that during the access authentication phase, the terminal displays a different interface to the user on the display screen. In response to a user clicking on the option AP 713 with an SSID of company in the setting interface, the terminal selects to establish a connection with the AP. During the access authentication phase, the terminal displays a different interface to the user on the display screen. Fig. 9As shown in Figure b, the user needs to download the certificate and fill in the identity information (such as user ID). After the terminal access authentication is successful, the terminal can access the WAN through the AP.

[0186] In the prior art, during the scanning phase, the terminal sends a probe request frame carrying a random MAC address to the AP. The random MAC address is used to identify the device, and the terminal receives Probe Response frames and beacon frames from all APs. In order to ensure the compatibility of the AP, after the terminal chooses to access the WiFi provided by AP0, the terminal will again send a probe request frame carrying the device MAC address and SSID0 (i.e., SSID0 of the WiFi provided by AP0) to complete the scanning phase, link authentication phase, connection phase, etc. to access the WiFi provided by AP0. However, during the above process, the device MAC address of the terminal can still be obtained. For example, some WiFi allows the scanning phase and link authentication phase to pass, but rejects the Association Request frame sent by the terminal during the connection phase. Therefore, the above WiFi can still obtain the device MAC address of the terminal, resulting in the leakage of the user's location privacy. The embodiments of the present application can not only ensure that the WiFi cannot obtain the device MAC address, but also take into account the compatibility of the AP, the user experience is good, and the user's time is saved; for different APs, different random MAC addresses are used to identify the terminal, so in Figure 1 In the scenario, the user's location information cannot be obtained through the terminal's device MAC address or random MAC address, which effectively protects the user's location information.

[0187] The terminal in this application is not limited to mobile phones, but can also be other portable electronic devices, such as tablet computers, laptops, vehicle-mounted devices, and wearable electronic devices with WiFi communication functions (such as smart watches). AP is not only found in routers, but can also be other electronic devices that provide access points, such as mobile hotspots, etc. There is no limitation here.

[0188] The following will take STA as a terminal, AP as a router, and a random MAC address as an example for the virtual MAC address, and describe the method for accessing a wireless local area network provided in an embodiment of the present application in conjunction with the accompanying drawings.

[0189] See also Fig.10 , Fig.10 A flowchart of a method for accessing a wireless local area network provided in an embodiment of the present application. Fig.10 As shown, the method includes:

[0190] S1001: The terminal sends a Probe Request frame carrying information of a first random MAC address.

[0191] like Figure 7 As shown in FIG. 8b or 8b, similar to the prior art, the user can turn on the WiFi function by operating the control 701. The terminal sends a Probe Request frame carrying the information of the first random MAC address, and the first random MAC address is used as the device address of the terminal to identify the terminal. However, the difference is that the processor 110 of the terminal in the present application generates the first random MAC address after the user turns on the WiFi function or before the user turns on the WiFi function. Optionally, the application processor of the terminal generates the first random MAC address.

[0192] S1002: The terminal receives a Probe Response frame sent by the AP, and determines the types of WiFi provided by all APs that the terminal can access based on information carried in the Probe Response frame.

[0193] Similar to the prior art, the AP replies with the first random MAC address as the destination address to the Probe Response frame, which carries the SSID of the WiFi provided by the AP, the BSSID of the AP, CapabilityInformation and RSN Information elements, etc. The processor 110 determines the type of all WiFi provided by the AP that the terminal can receive based on the information carried in the Probe Response frame. Figure 7 b. The display screen displays the SSIDs of all the WiFi provided by the APs that the user terminal can connect to in the available WLAN list 707 ( Figure 7 The library, home, and company in b are the SSID) and type (such as open or encrypted) of the WiFi provided by the corresponding AP.

[0194] The difference from the prior art is that the terminal reads the historical records in the internal memory to determine whether the WiFi provided by all the APs that can be received is saved. Exemplarily, the processor of the terminal reads the historical records in the memory, compares the received AP SSID with the historical records stored in the memory, and after comparison, if the historical records do not exist, proceeds to step S1003. There may be other judgment methods, which are not limited in the embodiments of the present application.

[0195] If there is a historical record, the terminal uses the device MAC address or the second random MAC address corresponding to the AP in the historical record for identifying the terminal to automatically start establishing a connection with the AP; if there are multiple APs that have successfully established connections, the terminal automatically selects the AP that provides the strongest WiFi signal to start establishing a connection, or the terminal automatically selects the AP with the most successful connection establishments to start establishing a connection.

[0196] For WiFi that has no history saved in the internal memory, the terminal waits for the user to select the AP to which the connection is to be established, and the user can select by operating the SSID on the display screen. The user's operation can be a click operation on the SSID of the AP. If all received WiFi are not saved in the internal memory, the terminal can also automatically select the AP1 with the strongest WiFi signal or other selection methods, which is not limited in the embodiment of the present application.

[0197] If the terminal automatically starts to establish a connection with AP0, during the connection establishment process or after connecting to AP0, the user can change the SSID by operating the display screen, for example, reselecting the WiFi provided by AP1 to be connected. The user's operation can be a click operation on the SSID of the WiFi provided by AP1.

[0198] S1003: If the WiFi provided by the AP1 to which the terminal is connected does not save the historical records, the terminal selects a device address according to the type of WiFi provided by the AP1, and uses the selected device address to establish a connection with the AP1.

[0199] The user clicks the SSID on the display screen to select the WiFi provided by the AP1 to be accessed, and the terminal detects the user's operation and starts to establish a connection with the AP1; alternatively, the terminal automatically selects the AP1 with the strongest WiFi signal and starts to establish a connection with the AP1.

[0200] If the WiFi provided by AP1 to which the terminal is to access is a WPA-802.1x enterprise encrypted network or a WPA3-Enterprise enterprise-level encrypted network (that is, it belongs to Type III), according to the above judgment result, the processor retrieves the device MAC address stored in the internal memory 121, and sends a Probe Request frame carrying the device MAC address and SSID1 information to AP1. The SSID1 corresponds to AP1. In the scanning stage, link authentication stage, connection stage, and access authentication stage of the process of establishing a connection with AP1, as well as in the process of accessing the wide area network through the AP1, the device MAC address is used as the device address to identify the terminal. The specific implementation can refer to the relevant implementation of the prior art, and the embodiment of the present application does not limit this. After the terminal accesses AP1, the SSID1 of the WiFi provided by AP1 is saved in the internal memory. Further, the mapping relationship between SSID1 and the device MAC address is saved, wherein the mapping relationship indicates that the device MAC address corresponds to the AP1, and the device MAC address is used as the device address of the terminal to identify the terminal.

[0201] If the WiFi provided by the AP1 to be accessed by the terminal is an OPEN open network, a WPA3 Enhanced open network, a Shared-key WEP network, a WPA network, a WPA2-PSK network, a WPA3-PSK Only personal encrypted network or a WPA2 / WPA3-PSK compatible mode personal encrypted network (that is, one of type I and type II), the processor generates a second random MAC address, the second random MAC address forms a mapping relationship with the AP1, the second random MAC address and the first random MAC address may be the same or different, and the terminal sends a Probe Request frame carrying the second random MAC address and SSID1 information to the AP1, the SSID1 corresponds to the AP1. If the WiFi provided by the AP1 selected by the user is an OPEN open network or a Shared-key WEP network, the second random MAC address is used as the device address to identify the terminal in the scanning stage, link authentication stage and connection stage of the process of establishing a connection with the AP1 and in the process of accessing the wide area network through the AP1. The specific implementation can refer to the relevant implementation of the prior art, and the embodiment of the present application does not limit this. If the WiFi provided by the AP1 selected by the user is a WPA3Enhanced open network, a WPA network, a WPA2-PSK network, a WPA3-PSKOnly personal encrypted network, or a WPA2 / WPA3-PSK compatible mode personal encrypted network, the second random MAC address is used as the device address to identify the terminal during the scanning phase, link authentication phase, connection phase, and access authentication phase of the process of establishing a connection with AP1, as well as in the process of accessing the wide area network through the AP1. The specific implementation can refer to the relevant implementation of the prior art, and the embodiment of the present application does not limit this. After the terminal accesses AP1, the SSID1 of the WiFi provided by AP1 is saved in the internal memory. Furthermore, the mapping relationship between SSID1 and the random MAC address is saved. Among them, the mapping relationship indicates that the second random MAC address is used as the device address of the terminal to identify the terminal corresponding to the AP1.

[0202] Optionally, the application processor of the terminal generates a second random MAC address.

[0203] The internal memory 121 stores N second random MAC addresses and N WiFi SSIDs provided by N APs that are mapped to the second random MAC addresses. That is, for one SSID, there is one corresponding second random MAC address.

[0204] In an optional implementation, if the terminal cannot access WiFi1 provided by AP1, the terminal will automatically choose to access other WiFi, or access other WiFi in response to the user's selection, or automatically restart scanning (for example, return to step S1001).

[0205] It should be noted that if the WiFi provided by the AP1 selected by the user belongs to the type I and II network, before the processor generates the second random MAC address, the processor compares the SSID1 of the WiFi provided by AP1 with the N SSIDs stored in the historical records of the internal memory 121. If there is SSID1 among the N stored SSIDs, the second random MAC address with a mapping relationship with the SSID1 is directly obtained; if there is no SSID1 in the stored content, the processor generates a new second random MAC address. The above mapping relationship can be expressed in a variety of ways such as lists and labels, and the embodiments of the present application do not limit this.

[0206] Exemplarily, after the terminal accesses AP1, the historical record will be stored in the internal memory. The historical record includes the WiFi SSID1 provided by AP1 and the device MAC address or the second random MAC address used by the terminal to identify the terminal. When the terminal scans the AP1 again, it will automatically choose to access the AP, and the device MAC address or the second random MAC address included in the historical record will be used to identify the terminal.

[0207] In an optional implementation, the terminal uses the second random MAC address as the device address to identify the terminal. If the number of accesses is equal to N times (N is an integer) and still fails during the access process, the process returns to step S1001. N can be selected from 3, 4, 5, 6, 7, etc., and is set by the terminal manufacturer based on user experience and comfort.

[0208] In an optional implementation, if the terminal cannot access the WiFi provided by AP1, the terminal will save the SSID1 of the WiFi provided by AP1. Next time the terminal scans the WiFi provided by AP1 again, it will no longer send a Probe Request frame to request access to the AP1.

[0209] In a possible implementation, the internal memory 121 stores N second random MAC addresses, and also stores BSSIDs of N APs and SSIDs of WiFi provided by N APs that have a mapping relationship with the N second random MAC addresses. That is, for one BSSID and one SSID, there will be a second random MAC address to correspond. In this case, if the WiFi provided by AP1 selected by the user belongs to the type I and II network, before the processor generates the second random MAC address, the processor compares the BSSID1 of AP1 and the SSID1 of WiFi provided by AP1 with the N BSSIDs and N SSIDs stored in the internal memory 121. If there are SSID1 and BSSID1 in the stored content, the second random MAC address with a mapping relationship with the SSID1 and BSSID1 is directly retrieved; if there is no SSID1 in the stored content, the processor generates a second random MAC address; if there are SSID1 and BSSID11 in the stored content, the processor finds that they are different after comparison, and the processor generates a second random MAC address. The above-mentioned mapping relationship can be expressed in a variety of ways such as lists, labels, etc., and the embodiments of the present application do not limit this.

[0210] The MAC address is generally represented by a 6-byte hexadecimal, such as XX-XX-XX-XX-XX-XX. The lowest bit of the first byte is used to indicate whether it is a multicast address or a unicast address. If this bit is 0, it indicates that the MAC address is a unicast address. If this bit is 1, it indicates that the MAC address is a multicast address. If the second lowest bit of the first byte is 0, it indicates that it is a MAC address uniformly managed and issued by IEEE. If it is 1, it indicates that it is not a MAC address uniformly managed and issued by IEEE. Corresponding to the terminal described in the embodiment of the present application, the lowest bit of the first byte of the second random MAC address generated by the processor is 0, and the second lowest bit is 1, that is, the first byte of the second random MAC address can only be used to identify the terminal if it is X2, X6, XA or XE, where X is any number between 0 and F. If the processor determines that the first byte of the generated second random MAC address is X2, X6, XA or XE, it is stored in the internal memory 121 for use in subsequent steps; if not, it needs to be randomly generated again until the first byte is X2, X6, XA or XE.

[0211] In a possible implementation, the terminal can retrieve the random MAC address assigned to a certain WiFi by calling getRandomizedMacAddress(). The terminal can retrieve the device MAC address by calling getWifiMacAddress().

[0212] By adopting the method of the embodiment of the present application, for the type III network, the device MAC address is used to identify the terminal to avoid the possibility that the terminal cannot access WiFi due to compatibility issues, saving the user's operation time; for the type I and II networks, the device MAC address is protected from being easily obtained by a third party due to the use of a random MAC address; and further, different random MAC addresses correspond to different WiFis, that is, different WiFi terminals have different identifiers. Even if a third party obtains the location information of each virtual MAC address through the above wireless local area network, since there is no association between each virtual MAC address, it is impossible to link them together to obtain the complete activity track of the terminal, thereby avoiding the third party from tracking the complete activity track of the terminal by tracking the device MAC address of the terminal, and then tracking the user's location information, effectively protecting the location information security of the user using the terminal. Setting N to a value greater than 1 can avoid unexpected situations where the network cannot be accessed due to obstruction or weak signal, and increase the possibility of successfully accessing WiFi using a random MAC address.

[0213] Another method for accessing a wireless local area network provided by an embodiment of the present application, in which a terminal directly determines a device address for identifying the terminal through a user's selection and setting mode, thereby facilitating the user's independent selection of the terminal.

[0214] The user can select whether the device address used to identify the terminal is the device MAC address or a random MAC address in the network details interface. Fig.11 , the network details interface with SSID as home, the terminal uses a random MAC address as the terminal identification by default, the user can click control 1102 to change it to use the device MAC, and click Save. In response to the above operation of the user, the terminal begins to establish a connection with the AP, and sends a probe request frame carrying the device MAC and the WiFi SSID provided by the AP. During the scanning phase, link authentication phase, connection phase, and access authentication phase of establishing a connection with the AP, as well as when the terminal accesses the WAN through the AP and interacts with the AP, the device MAC address is used to identify the terminal and send information. Similarly, the user can also Fig.11 In the interface shown in a, change the use of device MAC to use random MAC.

[0215] The user can also select the device address used to identify the terminal by turning on the privacy protection mode. After the user turns on the privacy protection mode, in response to the user's above operation, the terminal uses a random MAC address as the device address to identify the terminal when it accesses all WiFi, instead of using the device MAC as the device address to identify the terminal. The privacy protection mode will be explained later and will not be described here. A control for a random MAC address switch can also be set in the terminal. After the user turns on the switch, in response to the user's above operation, the terminal uses a random MAC address as the device address to identify the terminal when it accesses all WiFi.

[0216] The user selects the device address used to identify the terminal and can set it before turning on the WiFi switch, such as Figure 7 When the WLAN on / off switch 701 in a is in the off state, the setting is performed by turning on the privacy protection mode.

[0217] After the terminal scans, when the display screen displays all the WiFi provided by the accessible APs, the user can select the network details of the SSID of the WiFi provided by an AP and select and set them separately. For example, Figure 8 b. In response to the user clicking on the control 705 or 706 of the WiFi SSID provided by the AP, the terminal displays the network details interface of the SSID.

[0218] When the terminal is accessing a WiFi (e.g., in the scanning phase, link authentication phase, connection phase, or access authentication phase), or when the terminal is accessing a wide area network through an AP after establishing a connection with the AP, the user can select and set the currently connected WiFi or other WiFi in the network details interface; the user can also set it by turning on or off the privacy protection mode. After the user selects and sets other WiFi, the selected setting will take effect when the terminal accesses the WiFi0. For example, when the terminal accesses the wide area network through the WiFi with SSID library, Fig.11 , the user passes Fig.11 To operate the WiFi with SSID home, after the user clicks Save, the terminal displays a list of available WLANs, and the user clicks the control with SSID home (for example Figure 8 b), the terminal starts to establish a connection with the corresponding AP. During the process of the terminal accessing the WiFi with SSID home (for example, in the scanning stage, link authentication stage, connection stage or access authentication stage), or during the process of the terminal accessing the wide area network through the AP after establishing a connection with the AP, the terminal uses the device MAC as the device address to identify the terminal.

[0219] Users can also turn off the WiFi switch at any time, such as Figure 7 In a, the WLAN on / off switch 701 is turned off, and in response to the above operation of the user, the terminal stops interacting with the AP.

[0220] If the user is not satisfied with the WiFi currently connected to the terminal or wants to access other WiFi, whether the terminal is in the process of establishing a connection with the AP or the terminal is connected to the WAN through the AP after establishing a connection with the AP, the user can click Figure 7 b) selects an SSID from the available WLAN list 707, and in response to the user's operation, the terminal starts to establish a connection with other APs.

[0221] Through the above method, the operability and controllability of the terminal by the user are guaranteed, and the user can make selections and settings according to his or her preferences, needs and circumstances, and the user experience is good.

[0222] See also Fig.12 , Fig.12 A flowchart of another method for accessing a wireless local area network provided in an embodiment of the present application. Fig.12 As shown, the method comprises the following steps:

[0223] S1201: The terminal sends a Probe Request frame carrying information of a first random MAC address.

[0224] For specific explanations, please refer to the corresponding instructions in step S1001, which will not be repeated here.

[0225] S1202: The terminal receives a Probe Response frame sent by the AP, and determines the type of WiFi provided by all APs that the terminal can receive according to the information carried in the Probe Response frame.

[0226] For specific explanations, please refer to the corresponding instructions in step S1002, which will not be repeated here.

[0227] S1203: If the WiFi provided by the AP1 to which the terminal is connected does not save the historical records, the terminal selects a device address according to the type of WiFi provided by the AP1, and uses the selected device address to establish a connection with the AP1.

[0228] The difference from step S1003 is that if the WiFi provided by the AP1 selected by the user belongs to the type II network, in the process of establishing a connection with AP1, the terminal uses the processor to generate a second random MAC address for identifying the terminal; in the access process, if the number of accesses is equal to N times (N is an integer) and still fails, the processor retrieves the device MAC address stored in the internal memory 121 to identify the terminal, sends a Probe Request frame carrying the device MAC address information to AP1, and tries to establish a connection with AP1. If the connection is successfully established, the historical record is stored in the internal memory, and the historical record includes the device address corresponding to the AP1, and the device address used by the terminal to identify the terminal is the device MAC address. If the access is unsuccessful, the historical record is stored in the internal memory, and the historical record includes the device address corresponding to the AP1, and the device address used by the terminal to identify the terminal is the second random MAC address. Or if the access is unsuccessful, the SSID1 of AP1 is saved, and when the terminal scans the AP1 again, it no longer sends access to the AP1 (for example, no longer sends a Probe Request frame to AP1).

[0229] For other specific explanations, please refer to the corresponding instructions in step S1003, which will not be repeated here.

[0230] N can be 3, 4, 5, 6, 7, etc., and is set by the terminal manufacturer based on user experience and comfort.

[0231] By adopting the method of the embodiment of the present application, for the type II network, if the random MAC address is used for multiple times and still cannot be successfully accessed, the device MAC is tried to be used as the device address to establish a connection with the AP, so as to avoid the situation where the terminal cannot access due to the whitelist setting of the AP; in this method, the terminal sets both the random MAC address and the device MAC address to identify the terminal, thereby reducing the possibility of a third party obtaining a complete terminal activity track through the device MAC of the terminal, while taking into account the situation where WiFi cannot be accessed due to AP compatibility issues; if the AP is a risky pseudo-AP, although the terminal has tried to access it using the device MAC address, for the pseudo-AP, after the access attempt is unsuccessful, when the terminal finds the pseudo-AP again, the terminal's device address will use a random MAC address or the terminal will no longer access the pseudo-AP to avoid accessing an AP with poor security.

[0232] See also Fig.13 , Fig.13 A flowchart of another method for accessing a wireless local area network provided in an embodiment of the present application. Fig.13 As shown, the method comprises the following steps:

[0233] S1301: The terminal sends a Probe Request frame carrying information of a first random MAC address.

[0234] For specific explanations, please refer to the corresponding instructions in step S1001, which will not be repeated here.

[0235] S1302: The terminal receives a Probe Response frame sent by the AP, and determines the types of all WiFi provided by the AP that the terminal can receive according to the information carried in the Probe Response frame.

[0236] For specific explanations, please refer to the corresponding instructions in step S1002, which will not be repeated here.

[0237] S1303: If the WiFi provided by the AP1 to which the terminal is connected does not save the history record, the terminal selects a device address according to the type of WiFi provided by the AP1, and uses the selected device address to establish a connection with the AP1.

[0238] The difference from step S1203 is that if the WiFi provided by AP1 selected by the user belongs to the Type III network, in the process of establishing a connection with AP1, the terminal adopts the same processing method as the Type II network in S1203. For specific explanation, please refer to step S1203 and will not be repeated here.

[0239] In another optional implementation, the Type II network terminal may adopt the processing method of the Type II network in step S1003, which will not be described in detail here.

[0240] By adopting the method of the embodiment of the present application, for the Type III network, an attempt is made to use a random MAC address as the device address. If access is possible, the random MAC address is used as the device address. If access is not possible, the terminal uses the device MAC address as the device address. By setting both the random MAC address and the device MAC address to identify the terminal, the possibility of a third party obtaining the device MAC address of the terminal is reduced. If the random MAC address can be used to access WiFi, the random MAC address is used to identify the terminal device. In this way, a third party cannot obtain the complete terminal activity track through the device MAC address of the terminal, while taking into account the situation where the terminal cannot access WiFi due to AP compatibility issues.

[0241] In some embodiments of the present application, the terminal may be provided with a privacy protection mode, and the user may enable the privacy protection mode as required. Exemplarily, after the terminal enables the privacy protection mode, a random MAC address is used during WiFi access.

[0242] For example, Fig.14A possible method for a user to enable privacy protection mode is shown. Fig.14 As shown in the figure on the left, the terminal display screen displays the interface currently output by the system, which includes a settings interface. In some embodiments, the interface output by the terminal is output by the terminal in response to an input user operation, which may include a user clicking an icon of a settings icon on the desktop displayed by the terminal. Fig.14 As shown in the attached figure on the left, the setting interface may include multiple setting options (such as wireless and network, device connection, storage, notification center, display, desktop and wallpaper, sound, security and privacy, smart assistance, etc.). Users can click on any setting option to make corresponding settings (for example, enter the device connection settings to turn on Bluetooth, enter the display settings to adjust the display brightness, etc.).

[0243] In some embodiments, the interface output by the system may include system-specific interface elements, such as a status bar, a navigation bar, etc. The status bar may include the name of the operator (such as China Mobile), time, WiFi icon, signal strength, current remaining power, etc. The navigation bar may include a back button icon, a main display button icon, and a menu button icon, etc.

[0244] like Fig.14 As shown in the figure on the right, in response to the user clicking on the option wireless and network 1401 in the setting interface, the display screen of the terminal displays the wireless and network setting interface. Fig.14 As shown in the figure on the right, the wireless and network settings interface may include: a privacy protection mode on / off switch 1402, and instructions for the privacy protection mode. Fig.14 In the figure on the right, the privacy protection mode is in the off state, and the user can click the on / off switch 1402 to turn on the privacy protection mode. The description of the privacy protection mode can briefly introduce the function of the privacy protection mode to the user. For example, Fig.14 As shown in the figure on the right, the description of the privacy protection mode can be: the privacy protection mode will hide the MAC of the device, which will increase the possibility of not being able to access Wifi. In some possible implementations, the description of the privacy protection mode can also include richer information, such as specific measures taken by the terminal after turning on the privacy protection mode.

[0245] In some embodiments, the interface displayed on the negative first screen of the terminal includes an icon of the privacy protection mode, and the user turns the privacy protection mode on and off by clicking the icon. Exemplarily, the user can directly click the icon, and in response to the user's click operation, the terminal turns on the privacy protection mode; when the privacy protection mode is turned on, the user clicks the icon, and in response to the user's click operation, the terminal turns off the privacy protection mode. Turning the privacy protection mode on and off can also be achieved in other ways, which are not limited here.

[0246] After the user turns on the privacy protection mode, the terminal will use the random MAC address generated by the processor as the device address to access WiFi, instead of using the device MAC as the device address. This increases the user's operability and allows the terminal user to make their own choices based on different needs and different environments.

[0247] In some embodiments of the present application, for a Type I network or a Type II network, when a user turns on the option to use the device MAC for the network, the terminal may prompt the user that the location privacy cannot be protected. Fig.15 As shown in FIG. 15 , in response to the user clicking the user device MAC 1501 on the privacy option in the network detail setting interface, the display screen of the terminal displays a prompt message. Fig.15 b. The terminal can prompt the user in the form of a floating window 1502 on the interface currently output by the system: your location privacy is at risk of being leaked, and it is recommended not to make changes. In some embodiments, as shown in the floating window 15c, the privacy option has been selected to use the device MAC, and the user clicks the save option 1504. In response to the user's click operation, the setting is saved. In some embodiments, the user can also click the "Cancel Change" option to close the floating window 1502. Here, it is not limited to Fig.15 As shown in the floating window 1502, the terminal can also prompt the user that the location privacy is at risk of being leaked by displaying a pop-up window at the top of the display screen or displaying a prompt message in the notification bar.

[0248] Similarly, in some embodiments of the present application, for Type III networks, when the user turns on the random MAC option for the network, and the terminal fails to connect to the Internet N times, the terminal can prompt the user to change the privacy settings to use the device MAC. For example, the terminal can prompt the user to change the option settings by using a floating window or a pop-up window at the top of the display or by displaying a prompt message in the notification bar. There is no limitation here. N can be selected from 3, 4, 5, 6, 7, etc., and is set by the terminal manufacturer based on user experience and comfort. In this way, after the user learns about the current status of the terminal through the prompt of the terminal, he can choose an appropriate solution according to his needs.

[0249] In some embodiments of the present application, a connection failure may occur due to weak signal or object shielding. When the terminal fails to access the WiFi after 5 attempts, it is considered as a WiFi access failure. The terminal display screen displays a prompt message indicating the connection failure, and optionally gives suggestions to change the network. For example, see Fig.16, the terminal can prompt the user in the form of a floating window 1601 on the interface currently output by the system: Connection failed! It is recommended to change the network. In some embodiments, the floating window 1601 can also include a "try again" option and an "accept the suggestion" option. The user can click the "try again" option to try to continue connecting to the network. In this way, the user can know the access status of the WiFi through the prompt of the terminal, so that he can choose to deal with the situation.

[0250] In some embodiments of the present application, when the user selects the first type of WiFi in the available WLAN list, the display screen of the terminal can use a floating window to remind the user that the WiFi has the risk of location privacy leakage. For example, see Fig.17 , the terminal can prompt the user in the form of a floating window 1701 on the interface currently output by the system: there is a potential risk, and it is recommended to change to another network. In some embodiments, the user can click "Persist in Selection" to continue to access the WiFi. In some embodiments, the user can also click the "Return" option to close the floating window 1701 and make a new selection. In some embodiments, when the user selects the "Persist in Selection" option, the user is reminded to turn on the privacy protection mode. For example, the terminal can use a floating window to prompt the user. After the user chooses to turn it on, the privacy protection mode is turned on before accessing the WiFi. In this way, the user can learn about the security status of the WiFi through the prompt of the terminal, so that he can choose to deal with the situation.

[0251] An embodiment of the present application also provides a terminal, one or more touch screens, one or more memories, and one or more processors; wherein the one or more memories store one or more programs; it is characterized in that when the one or more processors execute the one or more programs, the terminal can implement the technical solutions of the methods involved in the above-mentioned embodiments, which will not be repeated here.

[0252] The embodiment of the present application also provides a graphical user interface (GUI), which is stored in a terminal, and the terminal includes a touch screen, a memory, and one or more processors, and the one or more processors are used to execute one or more computer programs stored in the memory, characterized in that the graphical user interface includes: a first GUI displayed on the touch screen, the first GUI including a control for identification information of the first wireless local area network and an identification of the signal strength of the first wireless local area network; in response to a first touch event of the control for the identification information of the first wireless local area network, a second GUI is displayed on the touch screen, the second GUI including a control for using a virtual MAC and a control for using a device MAC, wherein the control for using the virtual MAC is in a selected state In response to a second touch event for the control using the device MAC, a third GUI is displayed on the touch screen, the third GUI includes the control using the virtual MAC and the control using the device MAC, wherein the control using the device MAC is in a selected state, and the control using the device MAC is in a selected state, indicating that the terminal uses the device MAC address to access the first wireless LAN; in response to a third touch event for the control for the identification information of the first wireless LAN, a fourth GUI is displayed on the touch screen, the fourth GUI includes an identification that the first wireless LAN is in a connected state. Based on the above graphical user interface, the user can realize the control function for identifying the device address of the terminal, thereby improving the intelligent interaction capability between the terminal and the user.

[0253] An embodiment of the present application further provides a computer-readable storage medium, including instructions, characterized in that when the instructions are executed on an electronic device, the electronic device executes the methods involved in the above-mentioned embodiments, which will not be repeated here.

[0254] The terminal provided in the embodiment of the present application adopts different technical solutions for different network types, which not only takes into account the compatibility of APs but also improves the success rate of accessing WiFi without affecting the user experience; the terminal avoids using the terminal's device MAC address as a fixed identifier, and then tracking the terminal based on the fixed identifier, thereby tracking the user's whereabouts, effectively protecting the user's location privacy, meeting the needs of terminal users, and improving the security of user location information.

Claims

1. A method for accessing a wireless local area network, characterized in that: The method comprises: The terminal sends an initial probe request frame carrying information of a first random media access control MAC address to the first access point, where the first random MAC address is used to identify the terminal; The terminal receives a detection response frame carrying type information of a first wireless local area network and identification information of the first wireless local area network from the first access point, where the first wireless local area network is provided by the first access point; The terminal determines the type of the first wireless local area network according to the type information of the first wireless local area network; The terminal determines whether to save a record of the first wireless local area network provided by the first access point accessed by the terminal; If the record is saved, the terminal uses the device MAC address or the second random MAC address to establish a connection with the first access point, the device MAC address or the second random MAC address corresponds to the first access point and is used to identify the terminal in the record; If the record is not saved, the terminal selects a device address according to the type of the first wireless local area network; The terminal accesses the first wireless local area network according to the device address; The terminal stores identification information of the first wireless local area network; The terminal selects a device address according to the type of the first wireless local area network, including: If the type of the first wireless local area network is an OPEN open network or a WPA3 Enhanced open network, the terminal sends a first probe request frame to the first access point, where the first probe request frame is used to request access to the first wireless local area network, and the first probe request frame carries a second random MAC address, where the second random MAC address is used to identify the terminal; the second random MAC address is different from the device MAC address of the terminal; If the type of the first wireless LAN is any one of a Shared-key WEP network, a WPA network, a WPA2-PSK network, a WPA3-PSK Only personal encryption network, and a WPA2 / WPA3-PSK compatible mode personal encryption network, the terminal sends a second probe request frame to the first access point, where the second probe request frame is used to request access to the first wireless LAN, and the second probe request frame carries the second random MAC address; if accessing the first wireless LAN using the second random MAC address of the second probe request frame fails N times, where N is an integer, the terminal sends a third probe request frame to the first access point, where the third probe request frame is used to request access to the first wireless LAN, and the third probe request frame carries the device MAC address of the terminal; If the type of the first wireless LAN is a WPA-802.1x enterprise encrypted network or a WPA3-Enterprise enterprise-level encrypted network, the terminal sends a fourth probe request frame to the first access point, and the fourth probe request frame is used to request access to the first wireless LAN, and the fourth probe request frame carries the device MAC address of the terminal.

2. A terminal comprising one or more touch screens, one or more memories, and one or more processors; wherein the one or more memories store one or more programs; characterized in that: When the one or more processors execute the one or more programs, the terminal is enabled to implement the method as claimed in claim 1.

3. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in claim 1 .

Citation Information

Patent Citations

  • Communication device, communication method and communication control program

    CN102027767A

  • Method and device for prompting Wi-Fi signals

    CN103167488A

  • Mobile terminal anti-tracking method and mobile terminal

    CN105208206A

  • Access method, device and system based on temporary MAC address

    CN105228144A

  • Method in a wireless communication network for notifying a communication device that context storing is employed in the network

    CN106664552A