Wireless network connection method, device and equipment, readable storage medium and product

By determining the encryption protocol of the access point at the terminal and prohibiting low security level connections, the problem of low data transmission security and connection success rate in wireless networks is solved, and higher security and stability are achieved.

CN119277381APending Publication Date: 2025-01-07VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411546630.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The prior art has problems with low data transmission security and connection success rate in wireless networks, especially in multi-access point environments, where the terminal fails due to mismatch in encryption protocols when switching or roaming.

Method used

By determining whether the access point supports a high security level encryption protocol at the terminal, and prohibiting the use of a low security level encryption protocol for connection when receiving a disable request, ensuring data transmission security and improving connection success rate.

Benefits of technology

It improves the security of data transmission and the success rate of wireless network connections, avoids connection failures caused by mismatch in encryption protocols, and enhances the stability of terminals during handover and roaming.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119277381A_ABST
    Figure CN119277381A_ABST
Patent Text Reader

Abstract

The invention discloses a wireless network connection method, device and equipment, a readable storage medium and a product, and relates to the technical field of electronic equipment. The wireless network connection method comprises the following steps: when a terminal is successfully connected with a wireless network through a first access point and receives a forbidding request sent by the first access point, judging whether the first access point performs wireless network connection through an encryption protocol of a first encryption type; under the condition that the first access point supports the encryption protocol of the first encryption type to carry out wireless network connection, wireless network connection through the encryption protocol of the second encryption type is forbidden, and the security level of the wireless network connection of the first encryption type is higher than that of the wireless network connection of the second encryption type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a method, apparatus, device, readable storage medium and computer program product for wireless network connection. Background Art

[0002] Currently, with the popularity of wireless networks, their security has become a focus of increasing concern for users. The encryption technology of wireless networks is constantly evolving to enhance the security of data transmission. However, while the upgrade of encryption technology improves security, it also brings about the problem of connection success rate, especially in a complex network environment where multiple access points (APs) support connecting to wireless networks through encryption protocols of different security levels. For example, when a terminal switches from one AP to another or roams to connect to a wireless network, it may fail to switch or connect to the wireless network because it first connects to the wireless network through an AP that supports an encryption type with a high security level. When switching or roaming to another AP, the AP does not support the encryption protocol of the encryption type with a high security level to connect to the wireless network, resulting in failure in switching or connecting to the wireless network.

[0003] However, in order to ensure the success rate of terminal connection, blindly using encryption protocols corresponding to encryption types with lower security levels to connect to wireless networks will result in poor data transmission security. Therefore, there are data transmission security risks and low connection success rate problems in the prior art. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a wireless network connection method, apparatus, device medium and product, which can solve the problems of data transmission security and low wireless network connection success rate.

[0005] In a first aspect, an embodiment of the present application provides a wireless network connection method, the method comprising:

[0006] When the terminal successfully connects to the wireless network through the first access point and receives a disable request sent by the first access point, determining whether the first access point connects to the wireless network through an encryption protocol of a first encryption type;

[0007] When the first access point performs wireless network connection through an encryption protocol of a first encryption type, performing wireless network connection through an encryption protocol of a second encryption type is prohibited, wherein the security level of the wireless network connection of the first encryption type is higher than the security level of the wireless network connection of the second encryption type.

[0008] In a second aspect, an embodiment of the present application provides a wireless network connection device, the device comprising:

[0009] a determination module, configured to determine, when the terminal successfully connects to the wireless network through the first access point and receives a disable request sent by the first access point, whether the first access point performs the wireless network connection through an encryption protocol of a first encryption type;

[0010] a processing module, configured to prohibit wireless network connection through an encryption protocol of a second encryption type when a first access point performs wireless network connection through an encryption protocol of a first encryption type, wherein the security level of the wireless network connection of the first encryption type is higher than the security level of the wireless network connection of the second encryption type

[0011] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the programs or instructions are executed by the processor, the method for wireless network connection as described in the first aspect is implemented.

[0012] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the method for wireless network connection as described in the first aspect is implemented.

[0013] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the wireless network connection method as described in the first aspect.

[0014] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the wireless network connection method as described in the first aspect.

[0015] In the embodiment of the present application, when the terminal is connected to a wireless network, or switches to a wireless network, or roams to connect to a wireless network, when the terminal successfully connects to the wireless network through the first access point and receives a disable request sent by the first access point, it is determined whether the first access point performs wireless network connection through an encryption protocol of the first encryption type with a high security level; when the terminal receives the disable request sent by the first access point, it means that the first access point has the function of supporting wireless network connection through an encryption protocol of the first encryption type with a high security level; determining whether the first access point performs wireless network connection through an encryption protocol of the first encryption type with a high security level is to determine whether the first access point has enabled the function of performing wireless network connection through an encryption protocol of the first encryption type. When the first access point enables the function of performing wireless network connection through an encryption protocol of the first encryption type, it is prohibited to perform wireless network connection through an encryption protocol of the second encryption type with a low security level, thereby improving the security of data transmission; at the same time, when the terminal switches and roams, it is also possible to determine whether the first access point has enabled the encryption protocol of the first encryption type with a higher security level to perform wireless network connection, thereby improving the success rate of wireless network connection. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of a wireless network connection method provided in an embodiment of the present application;

[0017] Figure 2 A flowchart of a wireless network connection method provided in an embodiment of the present application;

[0018] Figure 3 A flowchart of a wireless network connection method provided in an embodiment of the present application;

[0019] Figure 4 A flowchart of a wireless network connection method provided in an embodiment of the present application;

[0020] Figure 5 A flowchart of a wireless network connection method provided in an embodiment of the present application;

[0021] Figure 6 A flowchart of a wireless network connection method provided in an embodiment of the present application;

[0022] Figure 7 A schematic diagram of the structure of a wireless network connection device provided in an embodiment of the present application;

[0023] Figure 8 A schematic diagram of the structure of a wireless network connection device provided in an embodiment of the present application;

[0024] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0025] Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0027] The terms "first", "second", etc. in the specification of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are usually a class, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0028] For ease of understanding, some contents involved in the embodiments of the present application are described below.

[0029] Data transmission via wireless networks is already a very common scenario in daily life. In order to improve data security, wireless network connections are performed through encryption protocols of different encryption types, such as WiFi. The encryption types of WiFi mainly include Wired Equivalent Privacy (WEP), Wi-Fi Protected Access (WPA), WPA2, WPA3, etc.

[0030] Among them, WEP is a method of encrypting data transmitted wirelessly between two devices to prevent intrusion into the wireless network.

[0031] WPA, WPA2, and WPA3 are security protocols used to protect wireless LAN (Wi-Fi) networks. WPA2 is an upgraded version of WPA, designed to provide a higher level of data encryption and network security. WPA3 is the latest security standard used to protect wireless LAN networks. It is an upgraded version of WPA2, designed to provide a higher level of data encryption and network security.

[0032] In this application, WPA3 has a TransitionDisable mechanism for protecting WPA3 networks from downgrade attacks. When the access point supports WPA3, the terminal connected to the wireless network through the access point will receive a disable request, i.e., a Transition Disable message. The terminal that receives the disable request will further determine whether the access point (AccessPoint, AP) has enabled the function of connecting to the wireless network through WPA3. If the function of connecting to the wireless network through WPA3 is enabled, wireless network connection through encryption protocols with low security levels (such as WEP, WPA2 and WPA3) is prohibited.

[0033] Among them, AP refers to the router device in the wireless network.

[0034] As described in the background technology, there are problems with data transmission security and low wireless network connection success rate in the related technology. Based on this, the embodiments of the present application provide a method, apparatus, device, readable storage medium and computer program product for wireless network connection. When a terminal is connected, switched or roaming, when the terminal successfully connects to the wireless network through a first access point and receives a disable request sent by the first access point, it is determined whether the first access point performs a wireless network connection through an encryption protocol of an encryption type; when the first access point performs a wireless network connection through an encryption protocol of a first interface type, it means that the first access not only has the function of supporting wireless network connection through an encryption protocol of the first encryption type, but also enables the function of performing wireless network connection through an encryption protocol of the first encryption type. At this time, it is prohibited to perform a wireless network connection through an encryption protocol of a second encryption type, that is, to perform a wireless network connection through an encryption protocol of a first encryption type with a high security level, and to perform a wireless network connection through an encryption protocol of a second encryption type with a low security level, thereby improving the security of data transmission.

[0035] At the same time, by judging whether the first access point starts to connect to the wireless network through an encryption protocol of the first encryption type with a higher security level, it is determined whether to connect to the wireless network through an encryption protocol of the encryption type with a higher security level, thereby avoiding the situation where the wireless network connection fails by directly connecting to the wireless network through the encryption protocol of the encryption type used by the access point before switching and roaming, thereby improving the success rate of the wireless network connection. For example, before the terminal switches or roams, the access point connects to the wireless network through WPA3, and the access point after switching or roaming also connects to the wireless network through WPA3, but the access point after switching or roaming may not support WPA3, or the user manually turns off WPA3, which will result in switching or roaming failure when switching or roaming to an access point that does not support WPA3.

[0036] It should be noted that the terminal in the embodiment of the present application can be any electronic device that can be connected to a wireless network, for example, it can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car-mounted electronic device, or other electronic device.

[0037] The wireless network connection method provided in the embodiment of the present application is described below with reference to the accompanying drawings.

[0038] Figure 1 A flowchart of a wireless network connection method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the execution subject of the wireless network connection method is a terminal, and the method may include the following steps S110 and S120.

[0039] S110: When the terminal successfully connects to the wireless network through the first access point and receives a disable request sent by the first access point, determine whether the first access point performs the wireless network connection through an encryption protocol of a first encryption type.

[0040] An access point is an intermediate device for a terminal to connect to a wireless network. Multiple access points can be set up in different areas. When a terminal enters an area, it can connect to the wireless network through the access point set up in this area.

[0041] The first access point is an access point in the current area, and the terminal accesses the wireless network through the first access point. The first access point may also be an access point through which the terminal roams to the current area and connects to the wireless network through the access point. The first access point may also be another access point in which the terminal switches from connecting to the wireless network through one access point to accessing the wireless network through another access point in the current area.

[0042] The terminal can connect to the wireless network through an encryption protocol of the encryption type of the first access point. The encryption type of the first access point may include a first encryption type and a second encryption type. The security level of the first encryption type is higher than the security level of the second encryption type. In one embodiment, the first encryption type may be WPA3, and the second encryption type may be WPA2, or WPA, or WPE or other encryption types.

[0043] When the terminal successfully connects to the wireless network through the first access point and the terminal receives a disable request sent by the first access point, it means that the first access point supports wireless network connection through an encryption protocol of the first encryption type, that is, the first access point has the function of connecting to the wireless network through an encryption protocol of the first encryption type.

[0044] It should be noted that, in the embodiment of the present application, the first access point has the function of connecting to the wireless network through an encryption protocol of the first encryption type, and will send a disable request to the terminal connected to the wireless network through the first access point.

[0045] When the terminal successfully connects to the wireless network through the first access point and receives a disable request sent by the first access point, it is determined whether the first access point performs the wireless network connection through an encryption protocol of the first encryption type, that is, when it is determined that the first access point supports the wireless network connection through an encryption protocol of the first encryption type, it is determined whether the first access point has enabled the function of performing the wireless network connection through the encryption protocol of the first encryption type, and the wireless network connection is performed through the encryption protocol of the first encryption type.

[0046] In the case where the first access point establishes a wireless network connection through an encryption protocol of the first encryption type, the terminal will respond to the disabling request, that is, perform an operation corresponding to the disabling request, that is, perform S120.

[0047] In one embodiment, the first encryption type is WPA3, and when the terminal successfully connects to the wireless network through the first access point and receives a Transition Disable message, i.e., a disable request, it is determined whether the first access point performs a wireless network connection through WPA3. When the first access point performs a wireless network connection through WPA3, an operation corresponding to the Transition Disable message is performed to protect the network from downgrade attacks.

[0048] S120: When the first access point performs a wireless network connection through an encryption protocol of a first encryption type, prohibiting the wireless network connection through an encryption protocol of a second encryption type.

[0049] In the case where the first access point performs a wireless network connection through an encryption protocol of a first encryption type, the terminal prohibits the wireless network connection through an encryption protocol of a second encryption type in response to a disabling request. That is, in the case where the terminal receives a disabling request sent by the first access point and the terminal receives a disabling request sent by the first access point, the wireless network connection is prohibited through an encryption protocol of the second encryption type.

[0050] In one embodiment, the first encryption type may be WPA3, and the second encryption type may be WPA2, or WPA, or WPE, etc., which have a lower security level than WPA3. When the terminal receives a disable request sent by the first access point, and the terminal receives a disable request sent by the first access point, wireless network connection is prohibited through encryption protocols such as WPA2, WPA, or WPE, etc., which have a lower security level than WPA3.

[0051] In one embodiment, when the first access point does not establish a wireless network connection through an encryption protocol of the first encryption type, establishing a wireless network connection through an encryption protocol such as WPA2, WPA, or WPE with a security level lower than WPA3 is not prohibited.

[0052] In this way, when the terminal successfully connects to the wireless network through the first access point and receives a disable request sent by the first access point, the terminal can determine whether the first access point connects to the wireless network through the encryption protocol of the first encryption type; when the first access point connects to the wireless network through the encryption protocol of the first encryption type, it indicates that the mechanism for responding to the disable request is triggered, and the wireless network connection through the encryption protocol of the second encryption type is prohibited, that is, the wireless network connection is made through the encryption protocol of the first encryption type with a high security level, and the wireless network connection is prohibited through the encryption protocol of the second encryption type with a low security level, thereby improving the security of data transmission and improving the access success rate of the terminal to the wireless network through the access point when the terminal is connected, switched, and roamed. In one embodiment, Figure 2 As shown, when the wireless network is successfully connected through the first access point and a disable request sent by the first access point is received, before determining whether the first access point performs the wireless network connection through an encryption protocol of the first encryption type, the method further includes S130 to S160.

[0053] S130: Determine whether the first access point supports wireless network connection through an encryption protocol of the first encryption type or the second encryption type.

[0054] When the terminal is connected, switched or roaming to connect to a wireless network through an access point, it is first determined whether the first access point supports wireless network connection through an encryption protocol of the first encryption type or the second encryption type, that is, it is determined whether the first access point has the function of connecting to a wireless network through an encryption protocol of the first encryption type or the second encryption type.

[0055] If the first access point has the capability to perform wireless network connection through the encryption protocol of the first encryption type or the second encryption type, S140 is executed. If the first access point does not have the capability to perform wireless network connection through the encryption protocol of the first encryption type or the second encryption type, the wireless network connection is performed through the encryption protocol of the encryption type supported by the first access point.

[0056] In this embodiment, the encryption protocol of the first encryption type may be WPA3, and the encryption protocol of the second encryption type may be WPA2.

[0057] S140: When the first access point supports wireless network connection through an encryption protocol of the first encryption type or the second encryption type, obtain historical connection record information, where the historical record information includes the number of times the terminal connects to the wireless network through the first access point.

[0058] The historical connection record information includes historical connection record information of connecting to a wireless network through an access point. In one embodiment, the historical connection record information may include access point information, encryption type, number of connections, successful connection information or failed connection information, and connection time point information.

[0059] In the embodiment of the present application, the data structure of the historical connection record information can adopt a key value data structure, such as a Hashmap<key,value> , where hashmap is a data structure consisting of multiple key-value pairs. The corresponding value can be obtained according to the key. The key part is used to store the Wi-Fi service set identifier (Basic Service Set Identifier, BSSID), which is used to uniquely identify the physical access control (Medium Access Control, MAC) address of a Wi-Fi network.

[0060] In an example, the data of the historical connection record information is of String type, as follows:

[0061]

[0062] Among them, security_type_policy indicates the encryption type used by the BSSID pointed to by the key value. 1 indicates the use of WPA2, and 2 indicates the use of WPA3. wpa3_connection_history indicates the history of successful or failed connections using the WPA3 wireless network when connecting to the BSSID, where 1 indicates a successful connection and -1 indicates a failed connection. wpa3_connection_timestamp records the time point when the BSSID was connected.

[0063] In one embodiment, the historical connection record information may retain connection records of a preset number of connections, such as 10 times. In the embodiment of the present application, the preset number of connections may be set based on demand.

[0064] In one embodiment, the method may further include, when it is detected that the connection record included in the historical connection record information exceeds a preset number of connections, deleting the connection record information with a relatively long connection time and retaining the connection record information with the most recent preset number of times. In this embodiment, retaining the preset number of connection times can reduce the storage of the terminal and improve the performance of the terminal.

[0065] In one embodiment, the historical connection record information may be stored in the terminal.

[0066] S150: Determine an encryption type policy for the terminal to connect to the network through the first access point based on the number of connections.

[0067] The encryption type policy is the encryption protocol used by the BSSID indicated by the key value in the historical connection record information.

[0068] In one embodiment, Figure 3 As shown, determining the encryption type strategy for the terminal to connect to the network through the first access point based on the number of connections includes:

[0069] S151: When the number of times that the terminal connects to the wireless network through the first access point is zero, determine that the encryption type in the encryption type policy is the first encryption type. That is, when the terminal connects for the first time through the first access point, the terminal performs wireless communication connection through the encryption protocol of the first encryption type with the highest security level of the first access point, thereby improving the security of data transmission.

[0070] In this embodiment, the first encryption type is WPA3. For example, in the historical connection record information, the connection history (connection_history) is empty, indicating that the number of times the wireless network is connected through the BSSID indicated by the key is zero. At this time, the encryption type policy of the access point corresponding to the BSSID is determined to be WPA3, which has the highest wireless network connection security level.

[0071] In one embodiment, Figure 3 As shown, the historical connection record information includes the time of connecting to the network. Determining the encryption type strategy for the terminal to connect to the network through the first access point based on the number of connections includes S152 and S153.

[0072] S152: When the number of times the terminal connects to the wireless network through the first access point is greater than zero and less than or equal to a first threshold, determine whether the most recent wireless network connection through an encryption protocol of the first encryption type in the historical connection record information is successful.

[0073] The first threshold is a value greater than zero and less than the maximum value of the number of connections in the historical connection record information. The first threshold is an arbitrary value set based on demand.

[0074] When the number of times the terminal connects to the wireless network through the first access point is greater than zero and less than the first threshold, or when the number of times the terminal connects to the wireless network through the first access point is equal to the first threshold, determine whether the most recent wireless network connection from the current time in the historical connection record information is made through an encryption protocol of the first encryption type, and whether the wireless network connection is successful, that is, determine whether the last wireless connection through the encryption protocol of the first encryption type is successful.

[0075] If the most recent wireless connection using the encryption protocol of the first encryption type is successful, execute S153; if the most recent wireless connection using the encryption protocol of the first encryption type fails, execute S156.

[0076] S153: When a wireless network connection is successfully established through an encryption protocol of the first encryption type at a time relatively recently, determine that the encryption type in the encryption type policy is the first encryption type.

[0077] In the case where a wireless network connection was successfully established last time using an encryption protocol of the first encryption type, the encryption type in the encryption type policy is determined to be the first encryption type, and then the terminal connects to the wireless network through the encryption protocol of the first encryption type of the first access point, thereby improving the security of data transmission.

[0078] In one embodiment, when the number of times the terminal connects to the wireless network through the first access point is greater than zero and less than or equal to the first threshold, it can also be determined whether the wireless network connection is successfully established through the encryption protocol of the first encryption type for a preset number of times closer to the current time in the historical connection record information.

[0079] The preset number of times is less than or equal to the number of connections in the historical connection record information. The preset number of times closer to the current time refers to the last time before the current time, the last time of the last time, and other consecutive preset numbers. If the wireless network connection is successfully performed through the encryption protocol of the first encryption type for the preset number of times closer to the current time, the encryption type in the encryption type policy is determined to be the first encryption type.

[0080] Alternatively, in one embodiment, when the number of successful wireless network connections through the encryption protocol of the first encryption type for a preset number of times close to the current time meets the preset condition, the encryption type in the encryption type policy is determined to be the first encryption type. The preset condition can be set based on demand, for example, it can be the number of successful connections corresponding to a success rate threshold for successful connections, for example, the number of successful connections corresponding to a success rate of 80%.

[0081] In one embodiment, Figure 3As shown, determining the encryption type strategy for the terminal to connect to the network through the first access point based on the number of connections includes S154 and S155.

[0082] S154: When the number of times the terminal connects to the wireless network through the first access point is greater than the first threshold, determine whether the wireless network connections are successfully made through the encryption protocol of the first encryption type for a preset number of times in the historical connection record information that are closer to the current time.

[0083] The preset number is less than or equal to the number of connections in the historical connection record information. The preset number closer to the current time refers to the preset number before the current time and closer to the current time, and can be the number of connections of multiple consecutive connections before the current time and closer to the current time.

[0084] When the number of times the terminal connects to the wireless network through the first access point is greater than the first threshold, determine whether the wireless network connection through the encryption protocol of the first encryption type for a preset number of times close to the current time is successful. If the wireless network connection through the encryption protocol of the first encryption type is successful for the preset number of times, execute S155; if the wireless network connection through the encryption protocol of the first encryption type fails for the preset number of times, or the connection fails some times, execute S156.

[0085] S155: When wireless network connection is successfully performed through the encryption protocol of the first encryption type for a preset number of times, determine that the encryption type in the encryption type policy is the first encryption type.

[0086] When the wireless network connection is successfully performed through the encryption protocol of the first encryption type for a preset number of times, the encryption type in the encryption type policy is determined to be the first encryption type, and then the terminal connects to the wireless network through the encryption protocol of the first encryption type of the first access point, thereby improving the security of data transmission.

[0087] In one embodiment, Figure 3 As shown, the method also includes S156 to S158.

[0088] S156. Determine the success rate of wireless network connection using the encryption protocol of the first encryption type in the historical connection record information when the most recent wireless network connection using the encryption protocol of the first encryption type has failed or when the wireless network connection using the encryption protocol of the first encryption type has failed or partially failed for a preset number of times.

[0089] S157: When the success rate is greater than the second threshold, determine that the encryption type in the encryption type policy is the first encryption type.

[0090] The second threshold value may be set based on demand. In one example, the second threshold value may be 50%. When the success rate is greater than the second threshold value, it is determined that the terminal performs a wireless network connection through an encryption protocol of a first encryption type of the first access point.

[0091] S158: When the success rate is less than or equal to the second threshold, determine that the encryption type in the encryption type policy is the second encryption type.

[0092] In this embodiment, the second encryption type may be an encryption type with a lower security level than the first encryption type, and may be an encryption type with the highest security level except the first encryption type. In one embodiment, the second encryption type may be WPA2. When the success rate is less than or equal to the second threshold, it is determined that the terminal is connected to the wireless network through WPA2.

[0093] In an example, the first threshold may be 3, the second threshold may be 50%, the preset number of times close to the current time is 2, the encryption protocol of the first encryption type is WPA3, and the encryption protocol of the second encryption type is WPA2.

[0094] When the number of connections recorded in the historical connection record information is zero, it is assumed that the terminal connects to the wireless network through the WPA3 of the access point.

[0095] When the number of connections recorded in the historical connection record information is greater than zero and less than or equal to 3, determine whether the last connection to the wireless network through the access point's WPA3 was successful. When the connection to the wireless network is successful, the terminal connects to the wireless network through the access point's WPA3; when the connection to the wireless network is unsuccessful, obtain the success rate of connecting to the wireless network through WPA3 in the historical connection record information. When the success rate is greater than 50%, the terminal connects to the wireless network through the access point's WPA3; when the success rate is less than or equal to 50%, the terminal connects to the wireless network through the access point's WPA2.

[0096] When the number of connections recorded in the historical connection record information is greater than 3 times, determine whether the first two times of connecting to the wireless network through the access point's WPA3 were successful. When the connections to the wireless network are successful, the terminal connects to the wireless network through the access point's WPA3; when the connections to the wireless network are not successful, obtain the success rate of connecting to the wireless network through WPA3 in the historical connection record information. When the success rate is greater than 50%, the terminal connects to the wireless network through the access point's WPA3; when the success rate is less than or equal to 50%, the terminal connects to the wireless network through the access point's WPA2.

[0097] Through the above embodiments, the encryption type can be flexibly determined based on the number of connections in the historical connection record information, thereby improving data security and the success rate of connecting to the wireless network through the first access point.

[0098] S160: Perform a wireless network connection based on an encryption protocol corresponding to the encryption type in the encryption type policy.

[0099] In any one of the embodiments including steps S151 to S158 , the encryption type is determined, and the terminal performs wireless network connection based on an encryption protocol of the determined encryption type.

[0100] Specifically, Figure 4 As shown, S41, when the terminal initiates to connect to a wireless network, or switches a wireless network, or roams to an area to connect to a wireless network, the terminal scans the information of the access point that can be connected to obtain the scanning result, and the scanning result includes the BSSID of the access point that can be connected; S42, reads the network configuration information of the access point corresponding to the BSSID, thereby obtaining the information of the encryption protocol of the encryption type supported by the access point. S43, determines whether the access point supports wireless network connection through WPA3 or WPA2; S44, when the access point supports wireless network connection through WPA3 or WPA2, reads the file stored in the terminal, obtains the historical connection record information from the file, and determines the encryption type strategy of the access point based on the number of connections in the historical connection record information; S45, determines whether the encryption type strategy of the access point is to connect to the wireless network through WPA3; S46, when the encryption type strategy of the access point is to connect to the wireless network through WPA3, the terminal connects to the wireless network through the WPA3 of the access point; S47, when the encryption type strategy of the access point is to connect to the wireless network through WPA2, the terminal connects to the wireless network through the WPA2 of the access point.

[0101] like Figure 4 As shown, in this embodiment, the wireless connection method may also include: S48, when the access point does not support wireless network connection through WPA3 or WPA2, the wireless network connection is performed through the encryption protocol of the encryption type of the access point. At this time, the encryption protocol of the encryption type of the access point can be other encryption protocols such as WPA or WPE.

[0102] In one embodiment, Figure 3 S160: After the wireless network connection is established based on the encryption protocol corresponding to the encryption type in the encryption type policy, such as Figure 5 As shown, the method may further include S170 to S190 and S100.

[0103] S170: Determine whether the terminal fails to connect to the wireless network through the encryption protocol of the encryption type of the first access point.

[0104] If it is determined that the terminal fails to connect to the wireless network through the encryption protocol of the encryption type of the first access point, S180 is executed; if it is determined that the terminal successfully connects to the wireless network through the encryption protocol of the encryption type of the first access point, S110 is executed, that is, Figure 1 The S110 in the.

[0105] Specifically, in one example, Figure 6 As shown, the process of executing S110 may be specifically as follows: S61, when the terminal successfully connects to the wireless network through the first access point, the historical connection record information may be updated. At this time, the terminal is successfully connected, and a +1 is added to the historical connection information, where +1 indicates a successful connection, and the corresponding connection time t is recorded. x . S62. When the terminal receives a disable request sent by the first access point, the terminal scans the information of the access point that can be connected and obtains the scan result, which includes the BSSID of the access point that can be connected; S63. Read the network configuration information of the access point corresponding to the BSSID, so as to obtain the information of the encryption protocol of the encryption type supported by the access point. S64. Determine whether to connect to the wireless network through the first access point WPA3, that is, determine whether to enable the function of connecting to the wireless network through the first access point WPA3; S65. When it is determined that the wireless network connection is made through the WPA3 of the first access point, prohibit the wireless network connection through the encryption protocol of the encryption type with a low security level; S66. When it is determined that the wireless network is not connected through the WPA3 of the first access point, it is not prohibited to connect to the wireless network through the encryption protocol of the encryption type with a low security level. In this example, the encryption protocol of the encryption type with a low security level can be an encryption protocol of an encryption type with a security level lower than that of WPA3, such as WPA2, or encryption protocols of other encryption types such as WPA or WPE.

[0106] In one embodiment, the method may further include, when updating the historical connection record information, if it is detected that the connection record included in the historical connection record information exceeds the preset connection times, deleting the connection record information with a relatively long connection time, and retaining the connection record information with the most recent preset times. In this embodiment, retaining the preset number of connection times can reduce the storage of the terminal and improve the performance of the terminal.

[0107] S180: When the terminal fails to connect to the wireless network through the encryption protocol of the encryption type of the first access point, determine whether the BSSID cannot be found.

[0108] When the terminal fails to connect to the wireless network through the encryption protocol of the encryption type of the first access point, determine whether the reason for the connection failure is that the encryption type is incorrect, that is, the key value does not match and the first access point corresponding to the BSSID to be connected cannot be found; when it is determined that the BSSID is found, execute S190; when it is determined that the BSSID cannot be found, execute S100.

[0109] S190: When it is determined that the BSSID is found, switch the encryption type of the first access point, and establish a wireless network connection through an encryption protocol of the switched encryption type of the first access point.

[0110] When it is determined that the BSSID is found, the encryption type of the first access point is switched from the original encryption type to another encryption type. For example, if the original encryption type is WPA3, it can be switched to WPA2, or from the original encryption type WPA2 to WPA3, or from the original encryption type WPA2 to another encryption type. The other encryption type here can be WPA, WPE or other encryption types.

[0111] S100: When it is determined that the BSSID cannot be found, terminate the wireless connection of the terminal.

[0112] In one embodiment, Figure 5 S190: When it is determined that the BSSID is found, the encryption type of the first access point is switched, and before the wireless network connection is established through the encryption protocol of the switched encryption type of the first access point, the method may further include: updating the historical connection record information.

[0113] Specifically, in one example, when it is determined that the BSSID is found, the historical connection information in the historical connection record information is updated. At this time, the terminal connection fails, and a -1 is added to the historical connection information, where -1 indicates a connection failure, and the corresponding connection time t is recorded. y After the historical connection record information is updated, the encryption type of the first access point is switched, and then the terminal reconnects to the wireless network based on the encryption protocol of the switched encryption type.

[0114] In one embodiment, the method may further include, when updating the historical connection record information, if it is detected that the connection record included in the historical connection record information exceeds the preset connection times, deleting the connection record information with a relatively long connection time, and retaining the connection record information with the most recent preset times. In this embodiment, retaining the preset number of connection times can reduce the storage of the terminal and improve the performance of the terminal.

[0115] The wireless network connection method provided in the embodiment of the present application can be executed by a wireless network connection device. In the embodiment of the present application, the wireless network connection device provided in the embodiment of the present application is described by taking the wireless network connection method executed by the wireless network connection device as an example.

[0116] Figure 7 A schematic diagram of the structure of a wireless network connection device provided in an embodiment of the present application.

[0117] like Figure 7 As shown, the wireless network connection device 700 may include:

[0118] The determination module 710 is configured to determine whether the first access point performs wireless network connection through an encryption protocol of a first encryption type when the terminal successfully connects to the wireless network through the first access point and receives a disable request sent by the first access point;

[0119] The processing module 720 is used to prohibit the wireless network connection through the encryption protocol of the second encryption type when the first access point uses the encryption protocol of the first encryption type to connect to the wireless network, wherein the security level of the wireless network connection of the first encryption type is higher than the security level of the wireless network connection of the second encryption type.

[0120] In one embodiment, Figure 8 As shown, the device may further include an acquisition module 730 , a determination module 740 and a connection module 750 .

[0121] The determination module 710 is further used to determine whether the first access point supports wireless network connection through an encryption protocol of the first encryption type or the second encryption type;

[0122] An acquisition module 730 is configured to acquire historical connection record information when the first access point supports wireless network connection through an encryption protocol of a first encryption type or a second encryption type, the historical record information including the number of times the terminal connects to the wireless network through the first access point;

[0123] A determination module 740, configured to determine an encryption type policy for the terminal to connect to the network through the first access point based on the number of connections;

[0124] The connection module 750 is used to connect to the wireless network based on the encryption protocol corresponding to the encryption type in the encryption type policy.

[0125] In one embodiment, the determination module is specifically used to:

[0126] When the number of times that the terminal connects to the wireless network through the first access point is zero, the encryption type in the encryption type policy is determined to be the first encryption type.

[0127] In one embodiment, the historical connection record information includes the time of connecting to the network; the determination module is specifically used to:

[0128] When the number of times the terminal connects to the wireless network through the first access point is greater than zero and less than or equal to the first threshold, determining whether the most recent wireless network connection through the encryption protocol of the first encryption type from the current time in the historical connection record information is successful;

[0129] In the case that a wireless network connection is successfully performed by using an encryption protocol of the first encryption type more recently than the current time, the encryption type in the encryption type policy is determined to be the first encryption type.

[0130] In one embodiment, the determination module is further configured to:

[0131] When the number of times the terminal connects to the wireless network through the first access point is greater than the first threshold, determining whether the wireless network connections are all successful through the encryption protocol of the first encryption type for a preset number of times closer to the current time in the historical connection record information;

[0132] When wireless network connections are successfully performed through the encryption protocol of the first encryption type for a preset number of times, the encryption type in the encryption type policy is determined to be the first encryption type.

[0133] In one embodiment, the determination module is further configured to:

[0134] In the case where the most recent wireless network connection through the encryption protocol of the first encryption type fails from the current time, or in the case where the wireless network connection through the encryption protocol of the first encryption type fails for a preset number of times, determining the success rate of successful connections through the first encryption type in the historical connection record information;

[0135] When the success rate is greater than the second threshold, the encryption type in the encryption type policy is determined to be the first encryption type.

[0136] In one embodiment, the determination module is further configured to:

[0137] When the success rate is less than or equal to the second threshold, the encryption type in the encryption type policy is determined to be the second encryption type.

[0138] In one embodiment, the processing module may also be used to update historical connection record information based on the connection status of the terminal successfully or unsuccessfully connecting to the wireless network. This process has been described in detail in the aforementioned embodiment and will not be repeated here for the sake of brevity.

[0139] Figure 7 and Figure 8 The various modules in the wireless network connection device shown can be implemented Figures 1 to 6The steps shown achieve the corresponding technical effects and will not be repeated here for the sake of brevity.

[0140] The wireless network connection device in the embodiment of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. The non-mobile electronic device can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0141] The wireless network connection device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0142] The wireless network connection device provided in the embodiment of the present application can implement each process implemented in the embodiment of the wireless network connection method, and will not be described again here to avoid repetition.

[0143] like Fig. 9 As shown, an embodiment of the present application also provides an electronic device 900, including a processor 901, and a memory 902, where the memory 902 stores a program or instruction that can be executed on the processor 901. When the program or instruction is executed by the processor 901, the various process steps of the above-mentioned wireless network connection method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0144] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0145] Fig.10A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0146] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1009, a memory 1009, and a processor 1010 and other components.

[0147] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0148] The processor 1010 is configured to determine whether the first access point performs wireless network connection through an encryption protocol of a first encryption type when the terminal successfully connects to the wireless network through the first access point and receives a disable request sent by the first access point;

[0149] Processor 1010 is further configured to prohibit wireless network connection through an encryption protocol of a second encryption type when the first access point uses an encryption protocol of a first encryption type to connect to the wireless network, wherein the security level of the wireless network connection of the first encryption type is higher than the security level of the wireless network connection of the second encryption type.

[0150] In one embodiment, the processor 1010 is further configured to:

[0151] Determining whether the first access point supports wireless network connection through an encryption protocol of a first encryption type or a second encryption type;

[0152] When the first access point supports wireless network connection through an encryption protocol of the first encryption type or the second encryption type, obtaining historical connection record information, where the historical record information includes the number of times the terminal connects to the wireless network through the first access point;

[0153] Determining an encryption type policy for the terminal to connect to the network through the first access point based on the number of connections;

[0154] Connect to the wireless network based on the encryption protocol corresponding to the encryption type in the encryption type policy.

[0155] In one embodiment, the processor 1010 is specifically configured to:

[0156] When the number of times that the terminal connects to the wireless network through the first access point is zero, the encryption type in the encryption type policy is determined to be the first encryption type.

[0157] In one embodiment, the historical connection record information includes the time of connecting to the network; the processor 1010 is specifically configured to:

[0158] When the number of times the terminal connects to the wireless network through the first access point is greater than zero but less than or equal to the first threshold, determining whether the most recent wireless network connection through the encryption protocol of the first encryption type from the current time in the historical connection record information is successful;

[0159] In the case that a wireless network connection is successfully performed by using an encryption protocol of the first encryption type more recently than the current time, the encryption type in the encryption type policy is determined to be the first encryption type.

[0160] In one embodiment, the processor 1010 is further configured to:

[0161] When the number of times the terminal connects to the wireless network through the first access point is greater than the first threshold, determining whether the wireless network connections are all successful through the encryption protocol of the first encryption type for a preset number of times closer to the current time in the historical connection record information;

[0162] When wireless network connections are successfully performed through the encryption protocol of the first encryption type for a preset number of times, the encryption type in the encryption type policy is determined to be the first encryption type.

[0163] In one embodiment, the processor 1010 is further configured to:

[0164] In the case where the most recent wireless network connection through the encryption protocol of the first encryption type fails from the current time, or in the case where the wireless network connection through the encryption protocol of the first encryption type fails for a preset number of times, determining the success rate of successful connections through the first encryption type in the historical connection record information;

[0165] When the success rate is greater than the second threshold, the encryption type in the encryption type policy is determined to be the first encryption type.

[0166] In one embodiment, the processor 1010 is further configured to:

[0167] When the success rate is less than or equal to the second threshold, the encryption type in the encryption type policy is determined to be the second encryption type.

[0168] In one embodiment, the processor 1010 may also be used to update historical connection record information based on the connection status of the terminal successfully or unsuccessfully connecting to the wireless network. This process has been described in detail in the aforementioned embodiment and will not be repeated here for the sake of brevity.

[0169] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0170] The memory 1009 can be used to store software programs and various data, including but not limited to application programs and operating systems. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 809 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0171] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations involving an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understood that the above-mentioned modem processor may not be integrated into the processor 1010. The application processor and the modem processor may be integrated, wherein the application processor mainly processes an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication. It is understood that the above-mentioned modem processor may not be integrated into the processor 1010.

[0172] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned wireless network connection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0173] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0174] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned wireless network connection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0175] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0176] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned wireless network connection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0177] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0178] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0179] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A wireless network connection method, characterized in that: include: When the terminal successfully connects to the wireless network through the first access point and receives a disable request sent by the first access point, determining whether the first access point connects to the wireless network through an encryption protocol of a first encryption type; When the first access point performs wireless network connection through an encryption protocol of a first encryption type, performing wireless network connection through an encryption protocol of a second encryption type is prohibited, wherein the security level of the wireless network connection of the first encryption type is higher than the security level of the wireless network connection of the second encryption type.

2. The method according to claim 1, characterized in that In the case where the wireless network is successfully connected through the first access point and a disable request sent by the first access point is received, before determining whether the first access point performs the wireless network connection through an encryption protocol of the first encryption type, the method further includes: Determining whether the first access point supports wireless network connection through an encryption protocol of a first encryption type or a second encryption type; When the first access point supports wireless network connection through an encryption protocol of a first encryption type or a second encryption type, acquiring historical connection record information, the historical record information including the number of times the terminal connects to the wireless network through the first access point; Determine, based on the number of connections, an encryption type policy for the terminal to connect to the network through the first access point; The wireless network is connected based on the encryption protocol corresponding to the encryption type in the encryption type policy.

3. The method according to claim 2, characterized in that The step of determining, based on the number of connections, an encryption type strategy for the terminal to connect to the network through the first access point includes: When the number of times that the terminal connects to the wireless network through the first access point is zero, the encryption type in the encryption type policy is determined to be the first encryption type.

4. The method according to claim 2, characterized in that: The historical connection record information includes the time of connecting to the network; the encryption type strategy of determining the terminal to connect to the network through the first access point based on the number of connections includes: When the number of times the terminal connects to the wireless network through the first access point is greater than zero and less than or equal to a first threshold, determining whether the most recent wireless network connection through the encryption protocol of the first encryption type in the historical connection record information is successful; In the case that a wireless network connection is successfully established by using the first encryption type more recently than the current time, the encryption type in the encryption type policy is determined to be the first encryption type.

5. The method according to claim 3, characterized in that: The method further comprises: When the number of times the terminal connects to the wireless network through the first access point is greater than a first threshold, determining whether the connections made through the encryption protocol of the first encryption type for a preset number of times closer to the current time in the historical connection record information are all successful; When the preset number of connections through the encryption protocol of the first encryption type are successful, the encryption type in the encryption type policy is determined to be the first encryption type.

6. The method according to claim 5, characterized in that The method further comprises: In the case where the most recent connection attempt through the encryption protocol of the first encryption type fails from the current time, or in the case where the wireless network connection attempts through the encryption protocol of the first encryption type fail for the preset number of times, determining the success rate of successful connections through the encryption protocol of the first encryption type in the historical connection record information; When the success rate is greater than a second threshold, it is determined that the encryption type in the encryption type policy is the first encryption type.

7. The method according to claim 6, characterized in that The method further comprises: When the success rate is less than or equal to the second threshold, the encryption type in the encryption type policy is determined to be the second encryption type.

8. A wireless network connection device, characterized in that: include: a determination module, configured to determine, when the terminal successfully connects to the wireless network through the first access point and receives a disable request sent by the first access point, whether the first access point performs the wireless network connection through an encryption protocol of a first encryption type; The processing module is used to prohibit the wireless network connection through the encryption protocol of the second encryption type when the first access point uses the encryption protocol of the first encryption type to connect to the wireless network, wherein the security level of the wireless network connection of the first encryption type is higher than the security level of the wireless network connection of the second encryption type.

9. The device according to claim 8, characterized in that The device also includes an acquisition module, a determination module and a connection module; The determination module is further used to determine whether the first access point supports wireless network connection through an encryption protocol of a first encryption type or a second encryption type; The acquisition module is configured to acquire historical connection record information when the first access point supports wireless network connection through an encryption protocol of a first encryption type or a second encryption type, wherein the historical record information includes a number of times the terminal connects to the wireless network through the first access point; The determination module is used to determine the encryption type strategy for the terminal to connect to the network through the first access point based on the number of connections; The connection module is used to connect to a wireless network based on an encryption protocol corresponding to the encryption type in the encryption type policy.

10. The device according to claim 9, characterized in that The determination module is specifically used for: When the number of times that the terminal connects to the wireless network through the first access point is zero, the encryption type in the encryption type policy is determined to be the first encryption type.

11. The device according to claim 9, characterized in that The historical connection record information includes the time of connecting to the network; the determination module is specifically used for: When the number of times that the terminal connects to the wireless network through the first access point is greater than zero and less than or equal to a first threshold, determining whether the most recent wireless network connection through the encryption protocol of the first encryption type in the historical connection record information from the current time is successful; In the case that a wireless network connection is successfully performed by using an encryption protocol of the first encryption type more recently than the current time, the encryption type in the encryption type policy is determined to be the first encryption type.

12. The device according to claim 10, characterized in that The determining module is also used for: When the number of times the terminal connects to the wireless network through the first access point is greater than a first threshold, determining whether the wireless network connections are all successful through the encryption protocol of the first encryption type for a preset number of times closer to the current time in the historical connection record information; When the wireless network connection is successfully performed through the encryption protocol of the first encryption type for the preset number of times, the encryption type in the encryption type policy is determined to be the first encryption type.

13. The device according to claim 12, characterized in that The determining module is also used for: In the case where the most recent connection attempt using the first encryption type fails from the current time, or in the case where the connection attempts using the first encryption type fail the preset number of times, determining the success rate of successful connections using the first encryption type in the historical connection record information; When the success rate is greater than a second threshold, it is determined that the encryption type in the encryption type policy is the first encryption type.

14. The device according to claim 13, characterized in that The determining module is also used for: When the success rate is less than or equal to the second threshold, the encryption type in the encryption type policy is determined to be the second encryption type.

15. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the method for wireless network connection according to any one of claims 1 to 7 is implemented.