Network connection control method, and terminal device and storage medium
By acquiring and determining the network hotspot information of the second network, the terminal device can automatically or prompt the user to switch to a network with higher network speed or better signal quality, thus solving the problem of low network speed caused by the fixed connection of the terminal device and improving the user experience.
Patent Information
- Application Number
- PCT/CN2024/082793
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-14
- Filing Date
- 2024-03-20
- Publication Date
- 2026-01-08
AI Technical Summary
When a terminal device is permanently connected to a Wi-Fi network, it cannot automatically switch to a network with a higher speed or better signal quality, resulting in a low network speed and affecting the user experience.
When the terminal device connects to the first network, it obtains the network hotspot information of the second network. If the preset conditions are met, it sends a prompt message or automatically connects to the second network to ensure that it connects to a network with higher network speed or better signal quality.
It improves the network speed and signal quality of terminal devices, and enhances the user's online experience by automatically or manually switching to a better network.
Smart Images

Figure CN2024082793_08012026_PF_FP_ABST
Abstract
Description
Network connection control method, terminal device, and storage medium
[0001] Cross-reference to Related Applications
[0002] The present application claims priority to the Chinese patent application No. 202310708990.3, filed on June 14, 2023, and entitled "Network connection control method, terminal device, and storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to the field of communication, in particular to a network connection control method, a terminal device, and a storage medium. BACKGROUND
[0004] The existing terminal device can be connected with different Wi-Fi networks, for example, can be connected with a 2.4G network or a 5G network. However, when a user uses the terminal device, the user often fixes the terminal device to connect on one frequency band, such as fixing the terminal device to connect on the 2.4G network or the 5G network. However, the performance of the Wi-Fi networks of different frequency bands is different. For example, the network rate of the 2.4G network is less than that of the 5G network, and the penetration and signal radiation capability of the 5G network is less than that of the 2.4G network. If the terminal device is fixed to connect on the 2.4G network, the high network rate service of the 5G network cannot be obtained. If the terminal device is fixed to connect on the 5G network, in the case that the 5G network signal is blocked, the penetration and radiation capability of the 5G network signal is weakened, resulting in low network rate, which affects the user's online experience.
[0005] SUMMARY
[0006] In view of the above, it is necessary to provide a network connection control method, an electronic device, and a storage medium to solve the technical problem that the terminal device is fixed to connect on one Wi-Fi network, resulting in that the Wi-Fi network cannot be switched when the network rate of the Wi-Fi network is low.
[0007] In a first aspect, an embodiment of the present application provides a network connection control method applied in a terminal device, the method comprising: obtaining network hotspot information of a second network when the terminal device is connected to a first network, the network rate of the second network being higher than that of the first network, the first network and the second network being networks of different frequency bands in at least one dual-frequency router, the at least one dual-frequency router being configured to separately set a network hotspot of the first network and a network hotspot of the second network; if it is determined that the network hotspot information of the second network meets a preset condition, issuing a prompt message to prompt the existence of the network hotspot of the second network; and if the terminal device is not connected to the second network within a preset time after the prompt message is issued, connecting the terminal device to the second network. In the above scheme, when the terminal device is connected to the first network, if the obtained network hotspot information of the second network meets the preset condition, a prompt message is issued to prompt the existence of the network hotspot of the second network for the user to connect, so as to facilitate the user to manually switch the network to which the terminal device is connected to the second network with higher network rate or better network signal quality, thereby improving the network rate and network signal quality of the terminal device. In addition, if the terminal device is not connected to the second network within the preset time after the prompt message is issued, the terminal device is automatically connected to the second network, so as to automatically switch the network of the terminal device to the second network, and enable the terminal device to be connected to the network with the highest rate.
[0008] In an embodiment of the present application, the obtaining of the network hotspot information of the second network comprises: receiving broadcast information sent by a network device of the second network; and parsing the network hotspot information of the second network from the broadcast information, the network hotspot information of the second network comprising a device identification number of the network device of the second network, an identification number of the network hotspot of the second network, and a network identification number of the second network. In the above scheme, the terminal device obtains the network hotspot information of the second network by scanning the surrounding broadcast information.
[0009] In an embodiment of the present application, the method further comprises: obtaining a device identification number of a network device of the first network, an identification number of a network hotspot of the first network, and a network identification number of the first network.
[0010] In an embodiment of the present application, the determining that the network hotspot information of the second network satisfies the preset condition comprises: if the device identification number of the network device of the second network is the same as the device identification number of the network device of the first network, and the identification number of the network hotspot of the second network is the same as the identification number of the network hotspot of the first network, it is determined that the network hotspot information of the second network satisfies the preset condition. In the above scheme, if the device identification number of the network device of the second network is the same as the device identification number of the network device of the first network, and the identification number of the network hotspot of the second network is the same as the identification number of the network hotspot of the first network, it can be determined that the second network and the first network come from the same network device, so as to facilitate the terminal device to switch between the Wi-Fi networks under the same network device.
[0011] In an embodiment of the present application, the determining that the network hotspot information of the second network satisfies the preset condition comprises: if the device identification number of the network device of the second network is different from the device identification number of the network device of the first network, but the network identification number of the second network matches the network identification number of the first network, it is determined that the network hotspot information of the second network satisfies the preset condition. In the above scheme, if the device identification number of the network device of the second network is different from the device identification number of the network device of the first network, but the network identification number of the second network matches the network identification number of the first network, it indicates that the second network and the first network belong to the network of the same user, so as to facilitate the mobile phone to switch between the first network and the second network.
[0012] In an embodiment of the present application, the network identification number of the second network matches the network identification number of the first network comprises: the network identification number of the second network is the same as part of the fields of the network identification number of the first network.
[0013] In an embodiment of the present application, the connecting the terminal device with the second network comprises: if it is detected that the terminal device is in a screen-off state, obtaining a login password of the first network; sending a connection request carrying the login password of the first network to the network hotspot of the second network, and connecting with the network hotspot of the second network after the login password is verified. In the above scheme, the terminal device is connected with the network hotspot of the second network when the terminal device is in a screen-off state, so that automatic connection or switching of the network can be realized in a state without awareness of the user.
[0014] In an embodiment of the present application, after sending the connection request carrying the login password of the first network to the network hotspot of the second network and connecting with the network hotspot of the second network after the login password is verified, the method further comprises: disconnecting the terminal device from the second network and recording the network hotspot information of the second network in the network list; sending the connection request carrying the login password of the first network to the network hotspot of the first network and connecting with the network hotspot of the first network after the login password is verified. The above technical solution can avoid affecting the network behavior of the user of the terminal device by reconnecting the terminal device with the network hotspot of the first network after disconnecting the terminal device from the second network.
[0015] In an embodiment of the present application, after disconnecting the terminal device from the second network, the method further comprises: prompting the user that the terminal device has automatically selected the hotspot of the second network for connection and prompting the user that the terminal device can be connected with the second network by selecting the network hotspot information of the second network recorded in the network list. The above technical solution can prompt the user to connect the terminal device with the second network with better network rate.
[0016] In an embodiment of the present application, after disconnecting the terminal device from the second network, the method further comprises: connecting the terminal device with the second network when the network rate of the terminal device is detected to be reduced to a preset speed value while connecting with the first network. The above technical solution can automatically connect the terminal device with the second network with higher network rate when the network rate of the terminal device is detected to be reduced to a preset speed value while connecting with the first network, thus improving the network rate of the terminal device.
[0017] In an embodiment of the present application, after disconnecting the terminal device from the second network, the method further comprises: connecting the terminal device with the second network when the network signal quality of the terminal device is detected to be reduced to a preset signal quality value while connecting with the first network. The above technical solution can automatically connect the terminal device with the second network with better network signal quality when the network signal quality of the terminal device is detected to be reduced to a preset signal quality value while connecting with the first network, thus improving the network rate of the terminal device.
[0018] In an embodiment of the present application, the connecting the terminal device to the second network comprises: if it is detected that the terminal device is in a screen-off state, obtaining a login password of the first network from the network list; sending a connection request to a network hotspot of the second network through the login password of the first network, and connecting the terminal device to the network hotspot of the first network after the connection request fails. In the above technical solution, if the connection request sent to the network hotspot of the second network fails, the terminal device is connected to the network hotspot of the first network, so as to ensure that the terminal device can be normally connected to the network.
[0019] In an embodiment of the present application, the obtaining the network hotspot information of the second network comprises: obtaining a network signal strength of the second network, and obtaining the network hotspot information of the first network when the network signal strength is less than a preset signal strength value. In the above technical solution, when the terminal device is connected to the second network, if the network signal strength of the second network is less than the preset signal strength value, the network hotspot information of the first network is obtained, and a prompt message is sent to prompt that there is a network hotspot of the first network for the user to connect, so as to facilitate the user to manually switch the network to which the terminal device is connected to the first network with higher network rate or better network signal quality, thereby improving the network rate and the network signal quality of the terminal device. In addition, if it is detected that the terminal device is not connected to the first network within a preset time, the terminal device is automatically connected to the first network, so as to automatically switch the network of the terminal device to the first network, so that the terminal device is connected to the optimal network.
[0020] In an embodiment of the present application, the sending the prompt message to prompt that there is the network hotspot of the second network comprises: prompting that there is the network hotspot of the second network through a notification message, and the notification message comprises a link address of a network connection interface, and the network connection interface is a network connection interface of the second network.
[0021] In a second aspect, embodiments of the present application provide a terminal device, comprising a processor and a memory; wherein the processor is connected to the memory; the memory is configured to store program instructions; and the processor is configured to read the program instructions stored in the memory to implement the network connection control method.
[0022] In a third aspect, embodiments of the present application provide a computer readable storage medium, which stores program instructions, and when the program instructions run on a terminal device, the terminal device executes the network connection control method.
[0023] In addition, the technical effects brought by the second aspect to the third aspect can be referred to the description of the methods of the above method part, which will not be repeated here. Attached Figure Description
[0024] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 is an application scenario diagram of a network connection control method provided in an embodiment of this application.
[0026] Figure 2 is a flowchart of a network connection control method provided in an embodiment of this application.
[0027] Figure 3 is a schematic diagram of notification information provided in an embodiment of this application.
[0028] Figure 4 is a schematic diagram of a network connection interface provided in an embodiment of this application.
[0029] Figure 5 is a flowchart of a network connection control method provided in another embodiment of this application.
[0030] Figure 6 is a schematic diagram of a network settings interface provided in an embodiment of this application.
[0031] Figure 7 is a flowchart of a network connection control method provided in another embodiment of this application.
[0032] Figure 8 is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0033] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It is to be understood that the use of "a", "an", "the" herein does not exclude a plurality, and "multiple" means two or more. It is to be understood that the terms "including", "comprising", "consisting" and "involving" as used herein are meant to be interpreted in an inclusive manner. That is, they are intended to mean the process, method, system, article or apparatus includes but is not limited to whatever is specifically named, and any equivalent process, method, system, article or apparatus that includes any of the recited steps or elements.
[0035] The existing terminal device can be connected with different Wi-Fi networks. For example, a home dual-frequency separation router can support a 2.4 GHz frequency band and a 5G frequency band, the 2.4 GHz frequency band provides a 2.4G network for use by a user, and the 5G frequency band is used for 5G network connection. However, when the user uses the terminal device, the user often fixes the terminal device to connect to one frequency band, such as fixing the terminal device to connect to the 2.4G network or the 5G network. However, the performance of different Wi-Fi networks is different. For example, under the condition that the network is working normally, the network rate of the 2.4G network is less than that of the 5G network, and the penetration and signal radiation capability of the 5G network is less than that of the 2.4G network. If the terminal device is fixedly connected to the 2.4G network, the high network rate service of the 5G network cannot be obtained. If the terminal device is fixedly connected to the 5G network, in the case that the 5G network signal is blocked, the penetration and radiation capability of the 5G network signal is weakened, resulting in low network rate of the Wi-Fi network, which affects the user's online experience. Therefore, if the terminal device is fixedly connected to one Wi-Fi network, the terminal device cannot be connected to the optimal network.
[0036] To solve the technical problem that terminal device is fixedly connected to one Wi-Fi network, resulting in that Wi-Fi network switching cannot be implemented when network rate of the Wi-Fi network is low. Embodiments of the present application provide a network connection control method. Referring to FIG. 1, it is a scenario diagram of application of the network connection control method provided by an embodiment of the present application. Terminal device 10 can be connected to first network 20 and second network 30. The network connection control method is used to control terminal device 10 to be connected to one of first network 20 and second network 30. For example, if network rate of second network 30 is higher than network rate of first network 20, the network connection control method provided by embodiments of the present application can control terminal device 10 to be connected to second network 30. If location of terminal device 10 changes, resulting in that network rate of first network 20 is higher than network rate of second network 30 at the current location, the network connection control method provided by embodiments of the present application can control the network to which terminal device 10 is connected to be switched from second network 30 to first network 20, thereby improving network rate of terminal device 10. In an embodiment of the present application, first network 20 and second network 30 are Wi-Fi networks, for example, first network 20 is 2.4G network and second network 30 is 5G network, or first network 20 is 5G network and second network 30 is 2.4G network, which is not limited in embodiments of the present application. In an embodiment of the present application, network rate of first network 20 is higher than network rate of second network 30 means that network rate of first network 20 in normal working state is higher than network rate of second network 30 in normal working state, for example, network rate of 5G network in normal working state is higher than network rate of 2.4G network in normal working state. In another embodiment of the present application, network rate of first network 20 is higher than network rate of second network 30 means that network rate of first network 20 in normal working state is higher than network rate of second network 30 in serious network interference, for example, network rate of 2.4G network in normal working state is higher than network rate of 5G network in serious network interference. The normal working state means that the network is not interfered by network or is interfered by network at a low level.In an embodiment of the present application, the terminal device 10 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, a smart city device, and / or the like.
[0037] Referring to FIG. 2, a flowchart of a network connection control method according to an embodiment of the present application is shown. The method disclosed in the embodiment of the present application or the method shown in the flowchart includes one or more steps for implementing the method, and the execution order of the steps can be interchanged with each other without departing from the scope of the claims, and some steps can also be omitted. Some embodiments will be described below in conjunction with the drawings. The embodiments and features in the embodiments described below can be combined with each other without conflict. The network connection control method includes the following steps.
[0038] In step S201, the terminal device acquires network hotspot information of a second network when connected to a first network, wherein the first network and the second network are networks of different frequency bands in at least one dual-frequency router, and the at least one dual-frequency router separately sets up a network hotspot of the first network and a network hotspot of the second network.
[0039] For the convenience of clear description of the examples, the following describes the specific implementation of the network connection control method by taking the terminal device 10 as a mobile phone, the first network 20 as a 2.4G network, and the second network 30 as a 5G network. The dual-frequency router separately sets the network hotspots of the 2.4G network and the 5G network, so that the mobile phone only connects the network hotspot of the 2.4G network in the use scenario. When the mobile phone is connected to the 2.4G network, the network hotspot information of the 2.4G network is recorded in the Wi-Fi saved network list. In an embodiment, the network hotspot information of the 2.4G network can at least include the device identification number of the network device of the 2.4G network, the identification number of the network hotspot of the 2.4G network, and the network identification number of the 2.4G network. The network device can be a router. The router is used to set the network hotspot. For example, the router of the 2.4G network is used to set the network hotspot of the 2.4G network. The device identification number of the network device can be an Organizationally Unique Identifier (OUI) of the network device, which is used to represent the identifier of the network device and can be used to uniquely identify a 32-bit identifier of a Media Access Control (MAC) address. The OUI can be used to identify and distinguish different MAC addresses, and can be used to realize functions such as routing, security authentication, and fault location.
[0040] The identification number of the network hotspot is a Broadcast Service Set Identifier (BSSID), which is an identifier in a Wi-Fi network and can identify an Access Point (AP). The BSSID can be a 6-byte hexadecimal number, for example, which usually starts with a capital letter "G". In a Wi-Fi network, each terminal device (such as a computer, a smartphone, etc.) needs a unique BSSID to identify itself. When the terminal device is connected to an AP, it can send a BSSID request to the AP and obtain a BSSID that matches the request. Once the BSSID is obtained, the terminal device can use the BSSID to communicate with other devices.
[0041] The network identification number is a service set identifier (SSID), which is used to represent the name of the network and distinguish different service sets. In network communication, a service set refers to a group of related network services that can share the same protocol, port, and data format characteristics. The service set identifier allows network devices to identify and select the appropriate service set based on a specific identifier, thereby achieving efficient data transmission and routing. The service set identifier is usually composed of a 32-bit binary number and can be represented as a hexadecimal number or a dotted decimal number. For example, a common service set identifier is the first 32 bits of an IPv4 address, or a unique 16-bit UUID value.
[0042] For example, the mobile phone can obtain the OUI of the network device of the 2.4G network, the BSSID of the network hotspot of the 2.4G network, and the SSID of the 2.4G network from the Wi-Fi saved network list. When the mobile phone connects to the 2.4G network, it scans the surrounding hotspots and obtains the broadcast information sent by the 5G network router. The mobile phone parses the 5G network hotspot information from the obtained broadcast information. The 5G network hotspot information includes the OUI of the network device of the 5G network, the BSSID of the network hotspot of the 5G network, and the SSID of the 5G network.
[0043] In an embodiment of the present application, if the network hotspot information of the second network meets the preset condition, step S203 is executed; if the network hotspot information of the second network does not meet the preset condition, the flow returns to step S201 to continue to obtain the network hotspot information of the next second network.
[0044] In an embodiment of the present application, the terminal device can compare the OUI, BSSID, and / or SSID corresponding to the second network with the OUI, BSSID, and / or SSID corresponding to the first network to determine whether the network hotspot information of the second network meets the preset condition. For example, the mobile phone obtains the device identification number OUI of the router of the 2.4G network, the identification number BSSID of the network hotspot, and the network identification number SSID from the Wi-Fi saved network list.
[0045] In an embodiment of the present application, if the device identification number of the network device of the 5G network is the same as the device identification number of the network device of the 2.4G network, and the identification number of the network hotspot of the 5G network is the same as the identification number of the network hotspot of the 2.4G network, it is determined that the network hotspot information of the 5G network satisfies the preset condition. In the embodiment of the present application, if the device identification number of the network device of the 5G network is the same as the device identification number of the network device of the 2.4G network, and the identification number of the network hotspot of the 5G network is the same as the identification number of the network hotspot of the 2.4G network, it can be determined that the 5G network and the 2.4G network come from the same network device (such as the same router), so as to facilitate the mobile phone to switch between the Wi-Fi networks under the same network device.
[0046] In another embodiment, if the device identification number of the router of the 5G network is different from the device identification number of the network device of the 2.4G network, but the network identification number of the 5G network matches the network identification number of the 2.4G network, it is determined that the network hotspot information of the 5G network satisfies the preset condition. In an embodiment of the present application, the network identification number of the 5G network matches the network identification number of the 2.4G network, which can mean that the network identification number of the 5G network and the network identification number of the 2.4G network have the same part of the field. For example, the network identification number of the 5G network is "WXW0101", and the network identification number of the 2.4G network is "WXW0001", since the part of the field "WXW0" of the network identification number "WXW0101" is the same as the network identification number "WXW0001", it can be determined that the network hotspot information of the 5G network satisfies the preset condition. In the embodiment of the present application, if the device identification number of the router of the 5G network is different from the device identification number of the network device of the 2.4G network, but the network identification number of the 5G network matches the network identification number of the 2.4G network, it indicates that the 5G network or the 2.4G network belongs to the network of the same user, so the login password of the 5G network and the 2.4G network is often set to be consistent, so as to facilitate the mobile phone to switch between the 5G network and the 2.4G network.
[0047] In step S203, a prompt message is sent to prompt the existence of the network hotspot of the second network.
[0048] In an embodiment of the present application, the terminal device can output a prompt message to inform the user that there is a network hotspot of the second network that can be connected. For example, the mobile phone prompts the existence of the network hotspot of the 5G network through a notification message. Referring to FIG. 3, a schematic diagram of the notification message provided in an embodiment of the present application is shown. The notification message prompts the existence of the network hotspot of the 5G network that can be connected to the mobile phone. The notification message can include a link address of a network connection interface, for example. The network connection interface can be a network connection interface of the 5G network. By clicking the link address, the network connection interface shown in FIG. 4 is displayed. The network connection interface includes a user name and a login password. After the user inputs the correct user name and login password in the network connection interface, the mobile phone can be connected to the 5G network. In an embodiment of the present application, the mobile phone can display the notification message in the form of a pop-up window, or the notification message can be displayed in the notification bar of the mobile phone.
[0049] In step S204, after the prompt message is sent, it is detected whether the terminal device is connected to the second network. If it is detected that the terminal device is not connected to the second network within a preset time, the terminal device is connected to the second network.
[0050] In an embodiment of the present application, after the mobile phone sends the prompt message, the time is counted. When the time reaches the preset time, if it is detected that the network hotspot information of the 5G network is not recorded in the Wi-Fi saved network list of the mobile phone, it is determined that the mobile phone is not connected to the 5G network within the preset time, and then the mobile phone is connected to the network hotspot of the 5G network. The preset time can be set according to the user's needs. For example, the preset time can be set to several minutes (e.g., 5 minutes), and the preset time is not limited in actual application. It should be noted that the mobile phone will disconnect the connection to the 2.4G network during the process of connecting to the network hotspot of the 5G network.
[0051] In an embodiment of the present application, if it is detected that the mobile phone is in the screen-off state, the login password of the 2.4G network is obtained from the network list. The mobile phone sends a connection request carrying the login password of the 2.4G network to the network hotspot of the 5G network. The router of the 5G network responds to the connection request and verifies the login password. After the login password is verified by the router of the 5G network, the mobile phone is connected to the network hotspot of the 5G network.
[0052] In an embodiment of the present application, if the login password fails to be verified by the router of the 5G network, the mobile phone sends a connection request carrying the login password of the 2.4G network to the network hotspot of the 2.4G network to be connected to the network hotspot of the 2.4G network. In an embodiment of the present application, the network speed of the 5G network is higher than that of the 2.4G network.
[0053] In an embodiment of the present application, the mobile phone obtains the screen-off state through the isScreenOn() function in the PowerManager class. If the isScreenOn() function returns true, it indicates that the mobile phone is currently in the screen-on state; if the isScreenOn() function returns false, it indicates that the mobile phone is currently in the screen-off state.
[0054] In an embodiment of the present application, the mobile phone can send a connection request carrying the login password of the 2.4G network to the network hotspot of the 5G network in the silent mode in the screen-off state, so as to realize automatic connection or switching of the network without the user's awareness, without interference to the user, and to ensure that the mobile phone is always connected to the high-speed network, ensuring the network speed when the user uses the mobile phone to surf the Internet and improving the user's Internet experience.
[0055] In the embodiment of the present application, when the terminal device is connected to the first network, if the obtained network hotspot information of the second network meets the preset condition, a prompt message is sent to prompt that the network hotspot of the second network exists for the user to connect, so as to facilitate the user to manually switch the network to which the terminal device is connected to the second network with higher network rate or better network signal quality, thereby improving the network rate and network signal quality of the terminal device. In addition, if it is detected that the terminal device is not connected to the second network within a preset time after the prompt message is sent, the terminal device is automatically roamed and connected to the second network, so as to automatically switch the network of the terminal device to the second network, so that the terminal device can be connected to the highest speed network.
[0056] Referring to FIG. 5, a flowchart of a network connection control method provided by another embodiment of the present application is shown. The method comprises the following steps.
[0057] In step S401, the terminal device obtains the network hotspot information of the 2.4G network and the network hotspot information of the 5G network when connected to the 2.4G network.
[0058] In an embodiment of the present application, the 2.4G network and the 5G network are networks of different frequency bands in at least one dual-frequency router, and the at least one dual-frequency router separately sets the network hotspot of the 2.4G network and the network hotspot of the 5G network, so that the terminal device is only connected to the network hotspot of the 2.4G network in the use scenario. The network hotspot information of the 5G network includes the device identification number OUI of the router of the 5G network, the identification number BSSID of the network hotspot of the 5G network, and the network identification number SSID of the 5G network. The network hotspot information of the 2.4G network includes the OUI of the router of the 2.4G network, the BSSID of the network hotspot of the 2.4G network, and the SSID of the 2.4G network.
[0059] The specific implementation of step S401 can refer to the specific implementation of step S201 in FIG. 2, which will not be described herein again.
[0060] In step S402, it is determined whether the OUI of the router of the 2.4G network is the same as the OUI of the router of the 5G network. If the OUI of the router of the 2.4G network is not the same as the OUI of the router of the 5G network, step S403 is performed, otherwise, if the OUI of the router of the 2.4G network is the same as the OUI of the router of the 5G network, step S404 is performed.
[0061] In step S403, it is determined whether the SSID of the router of the 2.4G network matches the SSID of the router of the 5G network. If the SSID of the router of the 2.4G network matches the SSID of the router of the 5G network, step S405 is performed, otherwise, if the SSID of the router of the 2.4G network does not match the SSID of the router of the 5G network, the flow returns to step S401 to re-compare the network hotspot information of the 2.4G network and the network hotspot information of the other 5G network. In an embodiment of the present application, the network hotspot information of the 5G network that does not match the network hotspot information of the 2.4G network after comparison can be recorded, and when the network hotspot information of the 2.4G network and the network hotspot information of the other 5G network are compared next time, the recorded network hotspot information of the 5G network is removed from the compared network hotspot information. In an embodiment of the present application, whether the SSID of the router of the 2.4G network matches the SSID of the router of the 5G network can be to determine whether the SSID of the router of the 2.4G network and the SSID of the router of the 5G network are the same in part.
[0062] In step S404, it is determined whether the BSSID of the router of the 2.4G network is the same as the BSSID of the router of the 5G network. If the BSSID of the router of the 2.4G network is the same as the BSSID of the router of the 5G network, step S405 is performed, otherwise, if the BSSID of the router of the 2.4G network is not the same as the BSSID of the router of the 5G network, the flow returns to step S401 to re-compare the network hotspot information of the 2.4G network and the network hotspot information of the other 5G network.
[0063] In step S405, a prompt message is sent to prompt that there is a network hotspot of the 5G network.
[0064] In an embodiment of the present application, the prompt message can be "There is a 5G network with better network quality nearby that can be connected to provide better network experience".
[0065] The specific implementation of step S405 can refer to the specific implementation of step S203 in FIG. 2, which will not be described herein again.
[0066] In step S406, it is determined whether the network hotspot information of the 5G network is recorded in the Wi-Fi saved network list within a preset time after the prompt message is sent. If the network hotspot information of the 5G network is recorded in the Wi-Fi saved network list, the process ends. Otherwise, if the network hotspot information of the 5G network is not recorded in the Wi-Fi saved network list, step S407 is performed. In an embodiment of the present application, if the network hotspot information of the 5G network is recorded in the Wi-Fi saved network list, it indicates that the mobile phone has had a behavior event of switching from the 2.4G network to the 5G network. Thus, when it is determined that the network hotspot information of the 5G network is recorded in the Wi-Fi saved network list, the current network behavior of the user is maintained, and no connection is sent to the 5G network, so as to avoid interference to the user.
[0067] In step S407, a connection request is sent to the 5G network.
[0068] In an embodiment of the present application, when it is detected that the terminal device is in the screen-off state, the login password of the 2.4G network is obtained, and a connection request carrying the login password of the 2.4G network is sent to the network hotspot of the 5G network.
[0069] In step S408, it is determined whether the 5G network is connected. If the 5G network is not connected, step S409 is performed; if the 5G network is connected, step S410 is performed.
[0070] In step S409, a connection request is sent to the network hotspot of the 2.4G network, so as to connect with the network hotspot of the 2.4G network.
[0071] In an embodiment of the present application, the terminal device sends a connection request carrying the login password of the 2.4G network to the network hotspot of the 2.4G network, so as to connect with the network hotspot of the 2.4G network. After the connection with the network hotspot of the 2.4G network, the terminal device does not prompt the user with the connection result.
[0072] In step S410, the connection between the terminal device and the 5G network is disconnected, the network hotspot information of the 5G network is recorded in the Wi-Fi saved network list, and the network hotspot of the 2.4G network is connected.
[0073] In an embodiment of the present application, after the connection between the terminal device and the 5G network is disconnected, the terminal device is reconnected with the network hotspot of the 2.4G network, so as to avoid affecting the network behavior of the user of the terminal device. Specifically, the terminal device sends a connection request carrying the login password of the 2.4G network to the network hotspot of the 2.4G network, and is connected with the network hotspot of the 2.4G network after the login password is verified.
[0074] Step S411, prompting the user that the 5G network hotspot has been automatically selected for connection, and prompting the user that the terminal device can be switched from the state of being connected to the 2.4G network to the state of being connected to the 5G network by selecting the 5G network hotspot information recorded in the Wi-Fi saved network list.
[0075] In an embodiment of the present application, the reminding system of the terminal device prompts the user that the 5G network hotspot has been automatically selected for connection, and prompts the user that the terminal device can be switched from the state of being connected to the 2.4G network to the state of being connected to the 5G network by selecting the 5G network hotspot information recorded in the Wi-Fi saved network list. Referring to FIG. 6, a schematic diagram of a network setting interface provided by an embodiment of the present application is shown. The network setting interface includes a Wi-Fi saved network list. The Wi-Fi saved network list includes the SSID of the 5G network and the SSID of the 2.4G network. The user selects the SSID of the 5G network in the network setting interface to switch the terminal device from the state of being connected to the 2.4G network to the state of being connected to the 5G network.
[0076] In an embodiment of the present application, after step S410, the method further includes: when the terminal device is connected to the 2.4G network, if it is detected that the network speed of the terminal device is reduced to a preset speed value, connecting the terminal device to the 5G network hotspot.
[0077] In an embodiment of the present application, after step S410, the method further includes: when the terminal device is connected to the 2.4G network, if it is detected that the network signal quality of the terminal device is reduced to a preset signal quality value, connecting the terminal device to the 5G network hotspot. In an embodiment of the present application, the network signal quality can be represented by the network signal strength, and the greater the network signal strength, the better the network signal quality. In an embodiment of the present application, the preset speed value and the preset signal quality value can be pre-set in the terminal device. The terminal device can automatically load the preset speed value and the preset signal quality value when starting up. The preset speed value and the preset signal quality value can be set or modified as needed, and the embodiments of the present application do not limit this.
[0078] In the embodiment of the present application, when the terminal device is connected to the 2.4G network, if the network hotspot information of the 5G network obtained satisfies the preset condition, a prompt message is sent to prompt that there is a network hotspot of the 5G network for the user to connect, so as to facilitate the user to manually switch the network of the terminal device to the 5G network with higher network rate or better network signal quality, thereby improving the network rate and network signal quality of the terminal device. In addition, if it is detected that the terminal device is not connected to the 5G network within the preset time, the terminal device can be automatically connected to the 5G network, thereby automatically switching the network of the terminal device to the 5G network, so that the terminal device can be connected to the optimal network without the user's awareness.
[0079] Referring to FIG. 7, a flowchart of a network connection control method provided by another embodiment of the present application is shown. The method comprises the following steps.
[0080] In step S601, when the terminal device is connected to the 5G network, the network signal strength of the terminal device of the 5G network is obtained, and it is determined whether the network signal strength is less than a preset signal strength value.
[0081] In an embodiment of the present application, the 2.4G network and the 5G network are networks of different frequency bands in at least one dual-frequency router, and the at least one dual-frequency router separately sets the network hotspot of the 2.4G network and the network hotspot of the 5G network, so that the terminal device is only connected to the network hotspot of the 5G network in the use scenario. In an embodiment of the present application, if it is detected that the network signal strength of the terminal device is less than the preset signal strength value, step S602 is performed, and if it is detected that the network signal strength of the terminal device is greater than or equal to the preset signal strength value, step S601 can be repeated until it is detected that the network signal strength of the terminal device is less than the preset signal strength value. In an embodiment of the present application, the preset signal strength value is -75dbm.
[0082] In step S602, the network hotspot information of the 5G network and the network hotspot information of the 2.4G network are obtained.
[0083] When the terminal device is connected to the 5G network, the network hotspot information of the 5G network is recorded in the Wi-Fi saved network list. The network hotspot information of the 5G network includes the OUI of the network device of the 5G network, the BSSID of the network hotspot of the 5G network, and the SSID of the 5G network. The terminal device can obtain the OUI of the network device of the 5G network, the BSSID of the network hotspot of the 5G network, and the SSID of the 5G network from the Wi-Fi saved network list.
[0084] When the terminal device is connected to the 5G network, the terminal device scans the surrounding hotspots and acquires the broadcast information sent by the router of the 2.4G network. The terminal device parses the network hotspot information of the 2.4G network from the acquired broadcast information. The network hotspot information of the 5G network includes the OUI of the network device of the 2.4G network, the BSSID of the network hotspot of the 2.4G network, and the SSID of the 2.4G network.
[0085] In step S603, it is determined whether the OUI of the router of the 5G network is the same as the OUI of the router of the 2.4G network. If the OUI of the router of the 5G network is not the same as the OUI of the router of the 2.4G network, step S604 is performed; if the OUI of the router of the 5G network is the same as the OUI of the router of the 2.4G network, step S605 is performed.
[0086] In step S604, it is determined whether the SSID of the router of the 5G network matches the SSID of the router of the 2.4G network. If the SSID of the router of the 5G network matches the SSID of the router of the 2.4G network, step S606 is performed; if the SSID of the router of the 5G network does not match the SSID of the router of the 2.4G network, the flow returns to step S601.
[0087] In an embodiment of the present application, whether the SSID of the router of the 5G network matches the SSID of the router of the 2.4G network can be determined by determining whether the partial fields of the SSID of the router of the 5G network and the SSID of the router of the 2.4G network are the same.
[0088] In step S605, it is determined whether the BSSID of the router of the 5G network is the same as the BSSID of the router of the 2.4G network, for example, whether the first eight bits of the BSSID of the router of the 5G network are the same as the first eight bits of the BSSID of the router of the 2.4G network. If the BSSID of the router of the 5G network is the same as the BSSID of the router of the 2.4G network, step S606 is performed; if the BSSID of the router of the 5G network is not the same as the BSSID of the router of the 2.4G network, the flow returns to step S601.
[0089] In step S606, a prompt message is sent to prompt the existence of the network hotspot of the 2.4G network.
[0090] Step S607, at the preset time after the time of sending the prompt message, it is judged whether the network hotspot information of the 2.4G network is recorded in the Wi-Fi saved network list. If the network hotspot information of the 2.4G network is recorded in the Wi-Fi saved network list, the flow ends. Otherwise, if the network hotspot information of the 2.4G network is not recorded in the Wi-Fi saved network list, step S608 is executed. In the embodiment of the present application, if the network hotspot information of the 2.4G network is recorded in the Wi-Fi saved network list, it indicates that the mobile phone has had the behavior event of switching from the 5G network to the 2.4G network. Therefore, when it is determined that the network hotspot information of the 2.4G network is recorded in the Wi-Fi saved network list, the current network behavior of the user is maintained, and the connection to the 2.4G network is avoided, so as to avoid interference to the user.
[0091] Step S608, a connection request is sent to the 2.4G network.
[0092] In an embodiment of the present application, when it is detected that the terminal device is in the screen-off state, the login password of the 5G network is obtained, and a connection request carrying the login password of the 5G network is sent to the network hotspot of the 2.4G network.
[0093] Step S609, it is judged whether the 2.4G network is connected. If the 2.4G network is not connected, step S610 is executed; if the 2.4G network is connected, step S611 is executed.
[0094] Step S610, a connection request is sent to the network hotspot of the 5G network, so as to connect with the network hotspot of the 5G network.
[0095] In an embodiment of the present application, the terminal device sends a connection request carrying the login password of the 5G network to the network hotspot of the 5G network, so as to connect with the network hotspot of the 5G network. After connecting with the network hotspot of the 5G network, the terminal device does not prompt the user with the connection result.
[0096] Step S611, the connection between the terminal device and the 2.4G network is disconnected, the network hotspot information of the 2.4G network is recorded in the Wi-Fi saved network list, and the network hotspot of the 5G network is connected.
[0097] In an embodiment of the present application, after disconnecting the terminal device from the 2.4G network, the terminal device is reconnected with the network hotspot of the 5G network, so as to avoid affecting the user behavior of the terminal device. Specifically, the terminal device sends a connection request carrying the login password of the 5G network to the network hotspot of the 5G network, and connects with the network hotspot of the 5G network after the login password is verified.
[0098] Step S612, prompting the user that the 2.4G network hotspot has been automatically selected for connection, and prompting the user that the terminal device can be switched from the state of being connected to the 5G network to the state of being connected to the 2.4G network by selecting the network hotspot information of the 2.4G network recorded in the Wi-Fi saved network list.
[0099] In an embodiment of the present application, the reminding system application program of the terminal device prompts the user that the 2.4G network hotspot has been automatically selected for connection, and prompts the user that the terminal device can be switched from the state of being connected to the 5G network to the state of being connected to the 2.4G network by selecting the network hotspot information of the 2.4G network recorded in the Wi-Fi saved network list.
[0100] In an embodiment of the present application, after step S611, the method further comprises: when the terminal device is connected to the 5G network, if it is detected that the network speed of the terminal device is reduced to a preset speed value, connecting the terminal device to the network hotspot of the 2.4G network.
[0101] In an embodiment of the present application, after step S611, the method further comprises: when the terminal device is connected to the 5G network, if it is detected that the network signal quality of the terminal device is reduced to a preset signal quality value, connecting the terminal device to the network hotspot of the 2.4G network. In an embodiment of the present application, the preset speed value and the preset signal quality value are preset in the terminal device. The terminal device loads the preset speed value and the preset signal quality value when starting. The preset speed value and the preset signal quality value can be set as needed, which is not limited in the present application.
[0102] In the embodiment of the present application, when the terminal device is connected to the 5G network, if the network signal strength of the 5G network is less than a preset signal strength value, the network hotspot information of the 2.4G network is acquired, and when the acquired network hotspot information of the 2.4G network meets a preset condition, a prompt message is sent to prompt that there is a network hotspot of the 2.4G network for the user to connect, so as to facilitate the user to manually switch the network of the terminal device to the 2.4G network with higher network speed or better network signal quality, thereby improving the network speed and network signal quality of the terminal device. In addition, if it is detected that the terminal device is not connected to the 2.4G network within a preset time, the terminal device is automatically connected to the 2.4G network, so as to automatically switch the network of the terminal device to the 2.4G network, so that the terminal device is connected to the optimal network.
[0103] The electronic device 100 related to the embodiment of the present application is introduced below. Referring to FIG. 8, it is a schematic diagram of the hardware structure of the electronic device 100 in an embodiment of the present application. The electronic device 100 can be the terminal device 10 in FIG. 1.
[0104] In this embodiment, the electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, and the like. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric 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, and the like.
[0105] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than illustrated, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0106] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), and the like. Different processing units can be independent devices, or can be integrated into one or more processors.
[0107] The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching instructions and executing instructions.
[0108] The processor 110 can also include a memory that stores instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The cache memory can hold instructions or data that the processor 110 has recently used or is likely to use again. If the processor 110 needs to use the instructions or data again, it can be retrieved directly from the cache memory. This avoids repeated accesses to the main memory, reducing the latency of the processor 110 and thus improving the efficiency of the system.
[0109] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0110] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 can include multiple sets of I2C buses. The processor 110 can 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 can be coupled to the touch sensor 180K through an I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface and implement the touch function of the electronic device 100.
[0111] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple sets of I2S buses. The processor 110 can be coupled to the audio module 170 through the I2S bus, enabling communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can deliver audio signals to the wireless communication module 160 through the I2S interface, enabling the function of answering a phone call through a Bluetooth headset.
[0112] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 can be coupled with the wireless communication module 160 through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, enabling the function of answering a phone call through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0113] The UART interface is a universal serial bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is usually 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, enabling Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, enabling the function of playing music through a Bluetooth headset.
[0114] The MIPI interface can be used to connect the processor 110 and peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes the camera serial interface (CSI), the display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through the CSI interface, enabling the camera function of the electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface, enabling the display function of the electronic device 100.
[0115] The GPIO interface can be configured through 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 and the camera 193, the display screen 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.
[0116] The USB interface 130 is an interface conforming to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect a headset to play audio through the headset. The interface can also be used to connect other electronic devices 100, such as AR devices, etc.
[0117] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation on the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection modes or combinations of multiple interface connection modes in the above embodiments.
[0118] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input through the wireless charging coil of the electronic device 100. The charging management module 140 can charge the battery 142 while also supplying power to the electronic device 100 through the power management module 141.
[0119] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to supply power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.
[0120] The wireless communication function of the electronic device 100 can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.
[0121] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.
[0122] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transfer the same to the modem processor for demodulation. The mobile communication module 150 can also amplify signals modulated by the modem processor, and radiate the same as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the same device as at least part of the modules of the processor 110.
[0123] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a 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. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the microphone 170B, etc.), or displays an image or a video through the display screen 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110, and disposed in the same device as the mobile communication module 150 or other functional modules.
[0124] The wireless communication module 160 can provide a solution for wireless communication, including wireless local area networks (WLAN), such as wireless fidelity (Wi-Fi) networks, Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 can also receive signals to be transmitted from the processor 110, frequency-modulate and amplify them, and radiate them as electromagnetic waves via the antenna 2.
[0125] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).
[0126] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs, which execute program instructions to generate or change display information.
[0127] The display screen 194 is configured to display images, videos, and the like. 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light emitting diode (QLED), or the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.
[0128] The electronic device 100 can implement the photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor.
[0129] The ISP is configured to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also optimize the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be disposed in the camera 193.
[0130] The camera 193 is configured to capture still images or videos. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1.
[0131] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals. For example, when the electronic device 100 is in frequency point selection, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0132] The video codec is used to compress or decompress digital video. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0133] The NPU is a neural-network (NN) computing processor, which processes input information quickly by drawing on the structure of a biological neural network, such as the transmission mode between human brain neurons, and can also constantly self-learn. Through the NPU, the electronic device 100 can realize intelligent cognitive applications, such as: image recognition, face recognition, voice recognition, text understanding, etc.
[0134] The internal memory 121 can include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs).
[0135] The random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, such as the fifth generation DDR SDRAM, commonly referred to as DDR5 SDRAM), etc.; the non-volatile memory can include a magnetic disk storage device, a flash memory.
[0136] The flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operation principle, single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential order, and universal flash storage (UFS), embedded multi media Card (eMMC), etc. according to the storage specification.
[0137] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of an operating system or other programs running, and can also be used to store data of users and application programs, etc.
[0138] The non-volatile memory can also store executable programs and store data of users and application programs, etc., which can be loaded in advance into the random access memory for direct reading and writing by the processor 110.
[0139] The external memory interface 120 can be used to connect an external non-volatile memory to realize the expansion of the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, files such as music and video are saved in the external non-volatile memory.
[0140] The internal memory 121 or the external memory interface 120 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 110. The one or more computer programs include a plurality of instructions, which when executed by the processor 110, can implement the network connection control method executed on the electronic device 100 in the above-mentioned embodiments to realize the network connection control function of the electronic device 100.
[0141] The electronic device 100 can realize the audio function through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music playing, recording, etc.
[0142] The audio module 170 is configured to convert digital audio information into an analog audio signal output, and to convert an analog audio input into a digital audio signal. The audio module 170 can also be configured to encode and decode audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or some of the functions of the audio module 170 can be disposed in the processor 110.
[0143] The speaker 170A, also referred to as a "loudspeaker", is configured to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0144] The receiver 170B, also referred to as a "earpiece", is configured to convert an audio electrical signal into a sound signal. When the electronic device 100 receives a call or a voice message, the user can listen to the voice by holding the receiver 170B close to the ear.
[0145] The microphone 170C, also referred to as a "microphone", "sound transducer", is configured to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can speak into the microphone 170C by holding the mouth close to the microphone 170C, and input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, in addition to collecting sound signals, noise reduction functions can also be achieved. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, in addition to collecting sound signals, noise reduction, and can also identify the source of the sound, and achieve directional recording functions, etc.
[0146] The earphone interface 170D is configured to connect a wired earphone. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0147] The pressure sensor 180A is configured to sense a pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. The pressure sensor 180A can be of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. The capacitive pressure sensor can include at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view a short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.
[0148] The gyroscope sensor 180B can be configured to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake photography. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of shaking of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and lets the lens offset the shaking of the electronic device 100 by reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and motion sensing game scenarios.
[0149] The barometric pressure sensor 180C is configured to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude, assists positioning and navigation by using the air pressure value measured by the barometric pressure sensor 180C.
[0150] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of a flip cover by using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the cover or the opening and closing state of the flip cover, the electronic device 100 can set a feature such as automatic unlocking of the flip cover.
[0151] The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the acceleration sensor 180E can detect the magnitude and direction of gravity. The acceleration sensor 180E can also be used to identify the attitude of the electronic device 100 and applied to applications such as landscape / portrait screen switching and pedometers.
[0152] Distance sensor 180F is configured to measure distance. Electronic device 100 can measure distance by infrared or laser. In some embodiments, electronic device 100 can utilize distance sensor 180F to measure distance for fast focusing when taking a picture.
[0153] Proximity light sensor 180G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode can be an infrared light emitting diode. Electronic device 100 emits infrared light outwardly through the light emitting diode. Electronic device 100 detects infrared reflected light from nearby objects using the photodiode. When sufficient reflected light is detected, electronic device 100 can determine that there is an object near electronic device 100. When insufficient reflected light is detected, electronic device 100 can determine that there is no object near electronic device 100. Electronic device 100 can utilize proximity light sensor 180G to detect that a user is holding electronic device 100 close to the ear for a phone call, so as to automatically turn off the screen to save power. Proximity light sensor 180G can also be used for automatic unlocking and locking of the screen in a holster mode or a pocket mode.
[0154] Ambient light sensor 180L is configured to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 according to the sensed ambient light brightness. Ambient light sensor 180L can also be used to automatically adjust white balance when taking a picture. Ambient light sensor 180L can also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touch.
[0155] Fingerprint sensor 180H is configured to collect a fingerprint. Electronic device 100 can utilize the collected fingerprint characteristics to implement fingerprint unlocking, access application lock, fingerprint picture taking, fingerprint call answering, and the like.
[0156] Temperature sensor 180J is configured to detect temperature. In some embodiments, electronic device 100 utilizes the temperature detected by temperature sensor 180J to implement temperature processing strategies. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 implements performance reduction of a processor located near temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, electronic device 100 heats battery 142 to avoid abnormal shutdown of electronic device 100 caused by low temperature. In other embodiments, when the temperature is lower than yet another threshold, electronic device 100 implements voltage boosting of the output voltage of battery 142 to avoid abnormal shutdown caused by low temperature.
[0157] Touch sensor 180K, also referred to as "touch device". Touch sensor 180K can be disposed on display screen 194, and touch sensor 180K and display screen 194 form a touch screen, also referred to as "touch panel". Touch sensor 180K is configured to detect touch operations applied to or near the touch sensor 180K. The touch sensor can transmit the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K can also be disposed on the surface of electronic device 100, which is different from the position of display screen 194.
[0158] Bone conduction sensor 180M can obtain vibration signals. In some embodiments, bone conduction sensor 180M can obtain vibration signals of the human body sound part vibration bone block. Bone conduction sensor 180M can also contact the human body pulse to receive blood pressure pulsation signals. In some embodiments, bone conduction sensor 180M can also be disposed in a headset to form a bone conduction headset. Audio module 170 can analyze voice signals based on the vibration signals of the sound part vibration bone block obtained by the bone conduction sensor 180M to realize voice functions. The application processor can analyze heart rate information based on the blood pressure pulsation signals obtained by the bone conduction sensor 180M to realize heart rate detection functions.
[0159] Keys 190 include power on / off keys, volume keys, and the like. Keys 190 can be mechanical keys. They can also be touch keys. Electronic device 100 can receive key inputs and generate key signals related to user settings and function control of electronic device 100.
[0160] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts and also for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. Touch operations applied to different regions of display screen 194 can also correspond to different vibration feedback effects. Different application scenarios (such as time reminders, received messages, alarms, games, etc.) can also correspond to different vibration feedback effects. Touch vibration feedback effects can also be customizable.
[0161] Indicator 192 can be an indicator light, which can be used to indicate charging status, power changes, and also to indicate messages, missed calls, notifications, and the like.
[0162] The SIM card interface 195 is configured to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by being inserted into or pulled out of the SIM card interface 195. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than one. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195. The types of the multiple cards can be the same or different. The SIM card interface 195 can be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with a network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0163] The embodiments also provide a computer storage medium having computer instructions stored therein, which, when executed on the electronic device 100, cause the electronic device 100 to perform the above related method steps to implement the network connection control method in the above embodiments.
[0164] The embodiments also provide a computer program product, which, when executed on a computer, causes the computer to perform the above related steps to implement the network connection control method in the above embodiments.
[0165] In addition, the embodiments of the present application also provide a device, which can be a chip, a component, or a module. The device can include a processor and a memory connected to each other. The memory is configured to store computer execution instructions. When the device is running, the processor can execute the computer execution instructions stored in the memory to cause the chip to perform the network connection control method in the above method embodiments.
[0166] The electronic device 100, the computer storage medium, the computer program product, or the chip provided by the embodiments can be used to execute the corresponding method provided above, and thus the beneficial effects achieved thereby can refer to those of the corresponding method provided above, which will not be described herein again.
[0167] Those skilled in the art can clearly understand the electronic device 100, the computer storage medium, the computer program product, or the chip provided by the embodiments through the above description of the embodiments, and for the convenience and brevity of description, only the division of the above functional modules is taken as an example. In actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0168] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the division of the above-described apparatus embodiments is merely a logical function division, and there can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another apparatus, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different apparatuses can be indirect couplings or communication connections through some interfaces, apparatuses or units, and can be in electrical, mechanical or other forms.
[0169] The units described as separate components can or can not be physically separate, and the components shown as units can be one physical unit or multiple physical units, i.e., can be located in one place or distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0170] In addition, each functional unit in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0171] When the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application essentially or the parts that make contributions to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to make a device (which can be a single chip, a chip, etc.) or a processor execute all or part of the steps of the various embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0172] The above embodiments are merely used to illustrate the technical solutions of the present application but not to limit the present application. Although the present application has been described in detail with reference to the above preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. A network connection control method applied in a terminal device, characterized in that, The method comprises: The terminal device acquires network hotspot information of a second network when connected to a first network, the network rate of the second network being higher than that of the first network; If it is determined that the network hotspot information of the second network meets preset conditions, a prompt message is sent to prompt the existence of the network hotspot of the second network; If the terminal device is not detected to be connected to the second network within a preset time after the prompt message is sent, the terminal device is connected to the second network.
2. The network connection control method according to claim 1, wherein The acquisition of the network hotspot information of the second network comprises: Receiving broadcast information sent by a network device of the second network; Parsing the network hotspot information of the second network from the broadcast information, the network hotspot information of the second network comprising a device identification number of the network device of the second network, an identification number of the network hotspot of the second network, and a network identification number of the second network.
3. The network connection control method according to claim 2, wherein The method further comprises: Acquiring a device identification number of a network device of the first network, an identification number of a network hotspot of the first network, and a network identification number of the first network.
4. The network connection control method according to claim 3, wherein The determination that the network hotspot information of the second network meets the preset conditions comprises: If the device identification number of the network device of the second network is the same as the device identification number of the network device of the first network, and the identification number of the network hotspot of the second network is the same as the identification number of the network hotspot of the first network, it is determined that the network hotspot information of the second network meets the preset conditions.
5. The network connection control method according to claim 3, wherein The determination that the network hotspot information of the second network meets the preset conditions comprises: If the device identification number of the network device of the second network is different from the device identification number of the network device of the first network, but the network identification number of the second network matches the network identification number of the first network, it is determined that the network hotspot information of the second network meets the preset conditions.
6. The network connection control method according to claim 5, wherein The matching of the network identification number of the second network with the network identification number of the first network comprises: The network identification number of the second network is the same as part of the network identification number of the first network.
7. The network connection control method of claim 1, wherein, The connection of the terminal device to the second network comprises: If the terminal device is detected to be in a screen-off state, a login password of the first network is acquired; A connection request carrying the login password of the first network is sent to the network hotspot of the second network, and the terminal device is connected to the network hotspot of the second network after the login password is verified.
8. The network connection control method according to claim 7, wherein After the sending of the connection request carrying the login password of the first network to the network hotspot of the second network, and the connection of the terminal device to the network hotspot of the second network after the login password is verified, the method further comprises: Disconnecting the terminal device from the second network, and recording the network hotspot information of the second network in the network list; Sending a connection request carrying the login password of the first network to the network hotspot of the first network, and connecting the terminal device to the network hotspot of the first network after the login password is verified.
9. The network connection control method according to Claim 8, wherein After the disconnection of the terminal device from the second network, the method further comprises: The user is prompted that the terminal device has automatically selected the hotspot of the second network for connection, and the user can connect the terminal device to the second network by selecting the network hotspot information of the second network recorded in the network list.
10. The network connection control method according to Claim 8, wherein After disconnecting the terminal device from the second network, the method further comprises: When connected to the first network, if it is detected that the network speed of the terminal device is reduced to a preset speed value, the terminal device is connected to the second network.
11. The network connection control method according to Claim 8, wherein After disconnecting the terminal device from the second network, the method further comprises: When connected to the first network, if it is detected that the network signal quality of the terminal device is reduced to a preset signal quality value, the terminal device is connected to the second network.
12. The network connection control method according to Claim 1, wherein The connection of the terminal device to the second network comprises: If it is detected that the terminal device is in a screen-off state, the login password of the first network is obtained from the network list. A connection request is sent to the network hotspot of the second network through the login password of the first network, and the terminal device is connected to the network hotspot of the first network after the connection request fails.
13. The network connection control method according to Claim 1, wherein The obtaining of the network hotspot information of the second network comprises: obtaining the network signal strength of the second network, and obtaining the network hotspot information of the second network when the network signal strength is less than a preset signal strength value.
14. The network connection control method according to any one of claims 1 to 13, wherein The sending of the prompt message to prompt the existence of the network hotspot of the second network comprises: The existence of the network hotspot of the second network is prompted through a notification message, and the notification message comprises a link address of a network connection interface, and the network connection interface is the network connection interface of the second network.
15. A terminal device, comprising: The terminal device comprises a processor and a memory, wherein the processor is connected to the memory. The memory is configured to store program instructions. The processor is configured to read the program instructions stored in the memory to implement the network connection control method according to any one of claims 1 to 14.
16. A computer-readable storage medium, characterized in that, The computer readable storage medium stores program instructions, and when the program instructions are run on the terminal device, the terminal device executes the network connection control method according to any one of claims 1 to 14.