Communication method, electronic device, storage medium, program product and chip

By disconnecting and reconnecting the Wi-Fi connection and obtaining the MAC address when signs of network access failure are detected, the problem of resource waste and access denial caused by frequent connection interruptions is solved, improving the success rate of network access recovery and user experience.

CN118450534BActive Publication Date: 2025-01-14HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311551716.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-20
Publication Date
2025-01-14
Estimated Expiration
2043-11-20

AI Technical Summary

Technical Problem

When a mobile phone cannot access the network through the router, frequently disconnecting and reconnecting to the Wi-Fi connection will consume system resources and increase the possibility that the router will refuse access, resulting in the inability to restore network access.

Method used

When signs of network inaccessibility are detected, the Wi-Fi connection is disconnected and reconnected, and the router's MAC address is obtained during the reconnection process. This avoids unnecessary connection interruptions, saves system resources, and reduces the likelihood of the router refusing access.

Benefits of technology

By optimizing Wi-Fi connection management, system resources are saved, the success rate of restoring network access is improved, the number of times the router denies access is reduced, and the user experience is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118450534B_ABST
    Figure CN118450534B_ABST
Patent Text Reader

Abstract

The present application provides a communication method and an electronic device. In the present application, if there is a possibility or sign that an electronic device cannot access the network via an access point, the communication connection between the electronic device and the access point is disconnected, and the access point is re-accessed. In the process of re-accessing the access point, the electronic device can obtain the MAC address of the access point, so that the electronic device can access the network via the access point through the MAC address. Through the present application, the process of "disconnecting the communication connection between the electronic device and the access point, and re-accessing the access point" can be omitted when it is not necessary, which can save the system resources and network resources of the electronic device, and can avoid increasing the number of times the electronic device accesses the access point in a short period of time, thereby avoiding as much as possible the access point from refusing the electronic device to access the access, and can increase the possibility of subsequent electronic devices being able to successfully access the access point, so as to increase the possibility of subsequent electronic devices being able to access the network via the access point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication method, electronic equipment, storage medium, program product and chip. Background Art

[0002] With the rapid development of communication technology, the application scenarios of Wi-Fi (Wireless Fidelity) networks are becoming more and more extensive. Routers can provide Wi-Fi networks, and mobile phones can access routers and access the Internet through routers.

[0003] When a mobile phone accesses the Internet via a router, anomalies may occur sometimes. For example, the mobile phone cannot access the Internet via the router, that is, the mobile phone is disconnected from the Internet. Summary of the invention

[0004] The present application provides a communication method, an electronic device, a storage medium, a program product and a chip. In the present application, when there is a possibility or sign that the electronic device cannot access the network via an access point, the communication connection between the electronic device and the access point is disconnected, and the access point is re-accessed. In the process of the electronic device re-accessing the access point, the electronic device can obtain the MAC address of the access point. In this way, the electronic device can send data to the access point through the MAC address of the access point, so that the electronic device can access the network via the access point, so that the electronic device can resume Internet access. It can be seen that the process of "disconnecting the communication connection between the electronic device and the access point and re-accessing the access point" can be omitted when it is not necessary, thereby saving system resources and network resources of the electronic device. In addition, it can avoid increasing the number of times that the electronic device accesses the access point in a short period of time, and thus it can avoid as much as possible that the access point refuses the electronic device to access. In this way, when the electronic device can access the network via the access point after objectively re-accessing the access point, the possibility of the subsequent electronic device successfully accessing the access point can be increased, so as to increase the possibility that the subsequent electronic device can access the network via the access point, that is, the possibility that the electronic device can resume Internet access can be increased.

[0005] In a first aspect, the present application provides a communication method, which is applied to an electronic device, where the electronic device has accessed an access point, and the method includes:

[0006] Searching for a media access control MAC address of the access point in an address resolution protocol ARP table entry in the electronic device;

[0007] If the MAC address of the access point is not found in the ARP table entry, disconnect the communication connection between the electronic device and the access point;

[0008] re-accessing the access point;

[0009] In the process of re-accessing the access point, obtaining the MAC address of the access point;

[0010] The MAC address is stored in the ARP table entry.

[0011] In the event that there is a possibility or sign that the electronic device cannot access the network via the access point, the communication connection between the electronic device and the access point is disconnected, and the access point is reconnected. In the event that there is no sign or possibility that the electronic device cannot access the network via the access point, the communication connection between the electronic device and the access point may not be disconnected, and the access point may not be reconnected.

[0012] Among them, after the electronic device disconnects the communication connection between the electronic device and the access point, the electronic device can obtain the MAC address of the access point during the process of the electronic device re-accessing the access point. In this way, after the electronic device re-accesses the access point, the electronic device can send data to the access point through the MAC address of the access point, thereby enabling the electronic device to access the network via the access point, so that the electronic device can resume Internet access.

[0013] It can be seen that, through the present application, on the one hand, the process of "disconnecting the communication connection between the electronic device and the access point, and re-accessing the access point" may not be executed when it is not necessary, but the process of "disconnecting the communication connection between the electronic device and the access point, and re-accessing the access point" may be executed when necessary, thereby saving the system resources and network resources of the electronic device. The unnecessary situation can be understood as: the electronic device does not show signs or possibilities of being unable to access the network via the access point. The necessary situation can be understood as: the electronic device shows signs or possibilities of being unable to access the network via the access point.

[0014] On the other hand, it is possible to avoid increasing the number of times that electronic devices access the access point in a short period of time, and thus it is possible to avoid as much as possible that the access point subsequently denies access to the electronic device. In this way, when the electronic device objectively can access the network via the access point after re-accessing the access point, it is possible to increase the possibility that subsequent electronic devices can successfully access the access point, thereby increasing the possibility that subsequent electronic devices can access the network via the access point, that is, it is possible to increase the possibility that the electronic device can resume Internet access.

[0015] In an optional implementation, the method further includes:

[0016] detecting whether the electronic device is unable to access the network via the access point;

[0017] In the case that the electronic device cannot access the network via the access point, the MAC address of the access point is searched in the ARP table entry in the electronic device.

[0018] In the present application, if an electronic device cannot access the network via an access point, it may be caused by "the MAC address of the access point does not exist in the ARP table entry in the electronic device", that is, it may be caused by "the MAC address of the access point is not stored in the electronic device". Therefore, when the electronic device cannot access the network via the access point, the MAC address of the access point may not exist in the ARP table entry in the electronic device. In this way, by executing "searching for the MAC address of the access point in the ARP table entry in the electronic device", it may be detected that the MAC address of the access point does not exist in the ARP table entry in the electronic device, thereby making it as meaningful as possible to execute "searching for the MAC address of the access point in the ARP table entry in the electronic device". In this way, when the electronic device cannot access the network via the access point, searching for the MAC address of the access point in the ARP table entry in the electronic device can avoid wasting system resources of the electronic device as much as possible.

[0019] In an optional implementation, the method further includes:

[0020] If the MAC address of the access point is not found in the ARP table entry, sending an ARP probe request to the access point, wherein the ARP probe request is used to obtain the MAC address of the access point;

[0021] If the MAC address returned by the access point is not received within a first preset time period after the ARP detection request is sent, the communication connection between the electronic device and the access point is disconnected.

[0022] According to statistics, the system resources and network resources of the electronic device consumed in the process of obtaining the MAC address of the access point through the ARP detection request are less than the system resources and network resources of the electronic device consumed in executing "disconnecting the communication connection between the electronic device and the access point, and re-accessing the access point". In this way, through this embodiment, the system resources and network resources of the electronic device can be saved.

[0023] Secondly, it is also possible to avoid increasing the number of times that the electronic device continuously executes "disconnecting the communication connection between the electronic device and the access point and re-accessing the access point", so as to minimize the possibility that the access point will refuse the electronic device access after the subsequent electronic device executes "disconnecting the communication connection between the electronic device and the access point and re-accessing the access point" again, thereby reducing the possibility that the subsequent electronic device cannot access the access point.

[0024] In an optional implementation, the method further includes:

[0025] In the case where the electronic device cannot access the network via the access point, sending an ARP probe request to the access point, wherein the ARP probe request is used to obtain a MAC address of the access point;

[0026] When the MAC address returned by the access point is not received within a first preset time period after the ARP detection request is sent, the MAC address of the access point is searched in the ARP table entry in the electronic device.

[0027] According to statistics, the system resources and network resources of the electronic device consumed in the process of obtaining the MAC address of the access point through the ARP detection request are less than the system resources and network resources of the electronic device consumed in executing "disconnecting the communication connection between the electronic device and the access point, and re-accessing the access point". In this way, through this embodiment, the system resources and network resources of the electronic device can be saved.

[0028] Secondly, it is also possible to avoid increasing the number of times that the electronic device continuously executes "disconnecting the communication connection between the electronic device and the access point and re-accessing the access point", so as to minimize the possibility that the access point will refuse the electronic device access after the subsequent electronic device executes "disconnecting the communication connection between the electronic device and the access point and re-accessing the access point" again, thereby reducing the possibility that the subsequent electronic device cannot access the access point.

[0029] In an optional implementation, the method further includes:

[0030] Sending an ARP probe request to the access point, wherein the ARP probe request is used to obtain the MAC address of the access point;

[0031] When the MAC address returned by the access point is not received within a first preset time period after the ARP detection request is sent, the MAC address of the access point is searched in the ARP table entry in the electronic device.

[0032] According to statistics, the system resources and network resources of the electronic device consumed in the process of obtaining the MAC address of the access point through the ARP detection request are less than the system resources and network resources of the electronic device consumed in executing "disconnecting the communication connection between the electronic device and the access point, and re-accessing the access point". In this way, through this embodiment, the system resources and network resources of the electronic device can be saved.

[0033] Secondly, it is also possible to avoid increasing the number of times that the electronic device continuously executes "disconnecting the communication connection between the electronic device and the access point and re-accessing the access point", so as to minimize the possibility that the access point will refuse the electronic device access after the subsequent electronic device executes "disconnecting the communication connection between the electronic device and the access point and re-accessing the access point" again, thereby reducing the possibility that the subsequent electronic device cannot access the access point.

[0034] In an optional implementation, the method further includes:

[0035] If the MAC address returned by the access point is not received within a first preset time period after sending the ARP probe request, detecting whether the electronic device is unable to access the network via the access point;

[0036] In the case that the electronic device cannot access the network via the access point, the MAC address of the access point is searched in the ARP table entry in the electronic device.

[0037] In the present application, if an electronic device cannot access the network via an access point, it may be caused by "the MAC address of the access point does not exist in the ARP table entry in the electronic device", that is, it may be caused by "the MAC address of the access point is not stored in the electronic device". Therefore, when the electronic device cannot access the network via the access point, the MAC address of the access point may not exist in the ARP table entry in the electronic device. In this way, by executing "searching for the MAC address of the access point in the ARP table entry in the electronic device", it may be detected that the MAC address of the access point does not exist in the ARP table entry in the electronic device, thereby making it as meaningful as possible to execute "searching for the MAC address of the access point in the ARP table entry in the electronic device". In this way, when the electronic device cannot access the network via the access point, searching for the MAC address of the access point in the ARP table entry in the electronic device can avoid wasting system resources of the electronic device as much as possible.

[0038] In an optional implementation, the method further includes:

[0039] Detecting whether the electronic device is being manipulated;

[0040] When the electronic device is being controlled, the ARP detection request is sent to the access point.

[0041] In this way, when a user operates an electronic device, the electronic device may need to access the network via an access point. In this way, the electronic device may need to use the MAC address of the access point. In this case, the electronic device can send an ARP probe request to the access point to obtain the MAC address of the access point.

[0042] Through this embodiment, when the electronic device may need to use the MAC address of the access point, it sends an ARP probe request to the access point to obtain the MAC address of the access point. When the electronic device does not need to use the MAC address of the access point temporarily, it does not need to send an ARP probe request to the access point, thereby saving system resources and network resources of the electronic device.

[0043] In an optional implementation, the method further includes:

[0044] Detecting whether the screen of the electronic device is lit;

[0045] When the screen of the electronic device is turned on, the ARP detection request is sent to the access point.

[0046] In this way, when the screen of the electronic device is turned on, the electronic device may need to access the network via the access point. In this way, the electronic device may need to use the MAC address of the access point. In this case, the electronic device can send an ARP probe request to the access point to obtain the MAC address of the access point.

[0047] Through this embodiment, when the electronic device may need to use the MAC address of the access point, it sends an ARP probe request to the access point to obtain the MAC address of the access point. When the electronic device does not need to use the MAC address of the access point temporarily, it does not need to send an ARP probe request to the access point, thereby saving system resources and network resources of the electronic device.

[0048] In an optional implementation, the method further includes:

[0049] When the screen of the electronic device is turned on, obtaining the lighting time when the screen of the electronic device is turned on;

[0050] Obtaining the duration between the current time of the electronic device and the lighting time;

[0051] When the duration is greater than or equal to the second preset duration, the ARP detection request is sent to the access point again.

[0052] In this way, after the screen of the electronic device is turned on, the electronic device can respond normally to the control operations input by the user as much as possible, or the electronic device can light up the screen normally as much as possible, or the electronic device can start the functions that need to be started normally.

[0053] In an optional implementation, the method further includes:

[0054] Acquire the sending time when the electronic device last sent the ARP detection request to the access point;

[0055] Acquire the time between the current time of the electronic device and the sending time;

[0056] When the duration is greater than or equal to a third preset duration, the ARP detection request is sent to the access point again.

[0057] In an optional implementation, the method further includes:

[0058] After disconnecting the communication connection and before reconnecting to the access point, detecting whether the interface of the electronic device jumps to a first interface, the first interface including a first area, the first area being used to display access prompt information when the electronic device has connected to the access point, the access prompt information being used to prompt that the electronic device has connected to the access point;

[0059] When the interface of the electronic device jumps to the first interface, the access prompt information is displayed in the first area of ​​the first interface.

[0060] In this way, the user will not perceive from the interface that the communication connection between the electronic device and the access point has been disconnected, that is, the user will not perceive from the interface that the electronic device has been disconnected from the network, which will not cause confusion to the user. The user will not think that there is a problem with the electronic device and check the electronic device, which will not cause a lot of trouble to the user and will avoid reducing the user experience.

[0061] In an optional implementation, before disconnecting the communication connection, the interface of the electronic device is a second interface, the second interface includes a second area, the second area is used to display access prompt information when the electronic device has accessed the access point, and the second area displays the access prompt information; the access prompt information is used to prompt that the electronic device has accessed the access point;

[0062] The method further comprises:

[0063] After disconnecting the communication connection and before re-accessing the access point, the access prompt information is continuously displayed in the second area on the second interface.

[0064] In this way, the user will not perceive from the interface that the communication connection between the electronic device and the access point has been disconnected, that is, the user will not perceive from the interface that the electronic device has been disconnected from the network, which will not cause confusion to the user. The user will not think that there is a problem with the electronic device and check the electronic device, which will not cause a lot of trouble to the user and will avoid reducing the user experience.

[0065] In an optional implementation, the communication connection is a Wi-Fi connection, and the electronic device has a system user interface System UI and a wireless fidelity framework Wi-Fi Framework, the System UI is used to manage content displayed on the interface of the electronic device, and the Wi-Fi Framework is at least used to detect the state of the communication connection between the electronic device and the access point;

[0066] The second area on the second interface continuously displays the access prompt information, including:

[0067] After the communication connection is disconnected, a disconnection notification message sent by the Wi-Fi Framework in the electronic device to the System UI is intercepted, where the disconnection notification message is equivalent to notifying that the communication connection has been disconnected.

[0068] In this way, the System UI will not receive the access notification message, and will not think that the electronic device is not connected to the access point. In this way, the System UI will not cancel the display of the access prompt information in the second area on the second interface, so that the access prompt information continues to be displayed in the second area on the second interface of the electronic device.

[0069] In an optional implementation, the second area on the second interface continuously displays the access prompt information, including:

[0070] Before disconnecting the communication connection, obtaining the mirror prompt information of the access prompt information;

[0071] The mirroring prompt information is displayed in the second area on the second interface.

[0072] The mirrored prompt information is identical to the connected prompt information in appearance / shape, and the mirrored prompt information may be superimposed on the outer layer of the connected prompt information.

[0073] For example, before the communication connection between the electronic device and the access point is disconnected, the second area on the second interface of the electronic device also displays the connected prompt information. In this way, before the communication connection between the electronic device and the access point is disconnected, the mirror prompt information of the connected prompt information can be obtained. In this way, before or when the communication connection between the electronic device and the access point is disconnected, the mirror prompt information can be superimposed on the connected prompt information displayed in the second area on the second interface of the electronic device, so that the second area always displays the connected prompt information or the mirror prompt information for a period of time before and after the communication connection between the electronic device and the access point is disconnected, thereby achieving the effect that before the communication connection between the electronic device and the access point is disconnected, after the communication connection between the electronic device and the access point is disconnected and before re-accessing the access point, and after re-accessing the access point, the second area always displays the connected prompt information or the mirror prompt information.

[0074] In an optional implementation, the detecting whether the electronic device is unable to access the network via the access point includes:

[0075] Send a probe request to the Domain Name System DNS server;

[0076] If a detection response returned by the DNS server according to the detection request is not received within a fourth preset time period after sending the detection request, determining that the electronic device cannot access the network via the access point;

[0077] or,

[0078] When a detection response returned by the DNS server according to the detection request is received within a fourth preset time period after the detection request is sent, it is determined that the electronic device can access the network via the access point.

[0079] In an optional implementation, the detecting whether the electronic device is unable to access the network via the access point includes:

[0080] Sending a data access request to a preset data server;

[0081] If no data access response returned by the data server according to the data access request is received within a fifth preset time period after sending the data access request, determining that the electronic device cannot access the network via the access point;

[0082] or,

[0083] In a case where a data access response returned by the data server according to the data access request is received within a fifth preset time period after sending the data access request, it is determined that the electronic device can access the network via the access point.

[0084] In an optional implementation, the detecting whether the electronic device is unable to access the network via the access point includes:

[0085] Determining whether data is continuously sent to the access point but data sent by the access point is continuously not received within a sixth preset time period;

[0086] In a case where data is continuously sent to the access point but data sent by the access point is continuously not received within a sixth preset time period, determining that the electronic device cannot access the network via the access point;

[0087] or,

[0088] When data is continuously sent to the access point and data sent by the access point is received within a sixth preset time period, it is determined that the electronic device can access the network via the access point.

[0089] In a second aspect, the present application provides an electronic device, which has been connected to an access point; the electronic device includes:

[0090] One or more processors, memory;

[0091] and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps:

[0092] Searching for a media access control MAC address of the access point in an address resolution protocol ARP table entry in the electronic device;

[0093] If the MAC address of the access point is not found in the ARP table entry, disconnect the communication connection between the electronic device and the access point;

[0094] re-accessing the access point;

[0095] In the process of re-accessing the access point, obtaining the MAC address of the access point;

[0096] The MAC address is stored in the ARP table entry.

[0097] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0098] detecting whether the electronic device is unable to access the network via the access point;

[0099] In the case that the electronic device cannot access the network via the access point, the MAC address of the access point is searched in the ARP table entry in the electronic device.

[0100] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0101] If the MAC address of the access point is not found in the ARP table entry, sending an ARP probe request to the access point, wherein the ARP probe request is used to obtain the MAC address of the access point;

[0102] If the MAC address returned by the access point is not received within a first preset time period after the ARP detection request is sent, the communication connection between the electronic device and the access point is disconnected.

[0103] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0104] In the case where the electronic device cannot access the network via the access point, sending an ARP probe request to the access point, wherein the ARP probe request is used to obtain a MAC address of the access point;

[0105] When the MAC address returned by the access point is not received within a first preset time period after the ARP detection request is sent, the MAC address of the access point is searched in the ARP table entry in the electronic device.

[0106] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0107] Sending an ARP probe request to the access point, wherein the ARP probe request is used to obtain the MAC address of the access point;

[0108] When the MAC address returned by the access point is not received within a first preset time period after the ARP detection request is sent, the MAC address of the access point is searched in the ARP table entry in the electronic device.

[0109] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0110] If the MAC address returned by the access point is not received within a first preset time period after sending the ARP probe request, detecting whether the electronic device is unable to access the network via the access point;

[0111] In the case that the electronic device cannot access the network via the access point, the MAC address of the access point is searched in the ARP table entry in the electronic device.

[0112] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0113] Detecting whether the electronic device is being manipulated;

[0114] When the electronic device is being controlled, the ARP detection request is sent to the access point.

[0115] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0116] Detecting whether the screen of the electronic device is lit;

[0117] When the screen of the electronic device is turned on, the ARP detection request is sent to the access point.

[0118] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0119] When the screen of the electronic device is turned on, obtaining the lighting time when the screen of the electronic device is turned on;

[0120] Obtaining the duration between the current time of the electronic device and the lighting time;

[0121] When the duration is greater than or equal to the second preset duration, the ARP detection request is sent to the access point again.

[0122] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0123] Acquire the sending time when the electronic device last sent the ARP detection request to the access point;

[0124] Acquire the time between the current time of the electronic device and the sending time;

[0125] When the duration is greater than or equal to a third preset duration, the ARP detection request is sent to the access point again.

[0126] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0127] After disconnecting the communication connection and before reconnecting to the access point, detecting whether the interface of the electronic device jumps to a first interface, the first interface including a first area, the first area being used to display access prompt information when the electronic device has connected to the access point, the access prompt information being used to prompt that the electronic device has connected to the access point;

[0128] When the interface of the electronic device jumps to the first interface, the access prompt information is displayed in the first area of ​​the first interface.

[0129] In an optional implementation, before disconnecting the communication connection, the interface of the electronic device is a second interface, the second interface includes a second area, the second area is used to display access prompt information when the electronic device has accessed the access point, and the second area displays the access prompt information; the access prompt information is used to prompt that the electronic device has accessed the access point; when the program instructions are executed by the processor, the electronic device performs the following steps:

[0130] After disconnecting the communication connection and before re-accessing the access point, the access prompt information is continuously displayed in the second area on the second interface.

[0131] In an optional implementation, the communication connection is a Wi-Fi connection, the electronic device has a system user interface System UI and a wireless fidelity framework Wi-Fi Framework, the System UI is used to manage content displayed on the interface of the electronic device, and the Wi-Fi Framework is at least used to detect the state of the communication connection between the electronic device and the access point; when the program instructions are executed by the processor, the electronic device performs the following steps:

[0132] After the communication connection is disconnected, a disconnection notification message sent by the Wi-Fi Framework in the electronic device to the System UI is intercepted, where the disconnection notification message is equivalent to notifying that the communication connection has been disconnected.

[0133] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0134] Before disconnecting the communication connection, obtaining the mirror prompt information of the access prompt information;

[0135] The mirroring prompt information is displayed in the second area on the second interface.

[0136] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0137] Send a probe request to the Domain Name System DNS server;

[0138] If a detection response returned by the DNS server according to the detection request is not received within a fourth preset time period after sending the detection request, determining that the electronic device cannot access the network via the access point;

[0139] or,

[0140] When a detection response returned by the DNS server according to the detection request is received within a fourth preset time period after the detection request is sent, it is determined that the electronic device can access the network via the access point.

[0141] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0142] Sending a data access request to a preset data server;

[0143] If no data access response returned by the data server according to the data access request is received within a fifth preset time period after sending the data access request, determining that the electronic device cannot access the network via the access point;

[0144] or,

[0145] In a case where a data access response returned by the data server according to the data access request is received within a fifth preset time period after sending the data access request, it is determined that the electronic device can access the network via the access point.

[0146] In an optional implementation, when the program instructions are executed by the processor, the electronic device performs the following steps:

[0147] Determining whether data is continuously sent to the access point but data sent by the access point is continuously not received within a sixth preset time period;

[0148] In a case where data is continuously sent to the access point but data sent by the access point is continuously not received within a sixth preset time period, determining that the electronic device cannot access the network via the access point;

[0149] or,

[0150] When data is continuously sent to the access point and data sent by the access point is received within a sixth preset time period, it is determined that the electronic device can access the network via the access point.

[0151] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0152] In a third aspect, the present application provides a computer storage medium comprising computer instructions, which, when executed on an electronic device, causes the electronic device to execute the steps of the method executed by the electronic device as shown in the first aspect and any one of the implementations of the first aspect.

[0153] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0154] In a fourth aspect, the present application provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the steps of the method executed by the electronic device shown in the first aspect and any one of the implementations of the first aspect.

[0155] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0156] In a fifth aspect, the present application provides a chip, comprising one or more interface circuits and one or more processors. The interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, wherein the signal includes a computer instruction stored in the memory. When the processor executes the computer instruction, the electronic device executes the steps of the method performed by the electronic device as shown in the first aspect and any one of the implementations of the first aspect.

[0157] The fifth aspect and any implementation of the fifth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0158] Figure 1 The figure is a schematic diagram showing an exemplary scenario of Wi-Fi communication between a mobile phone and a router.

[0159] Figure 2 The figure is a schematic diagram of the structure of an electronic device shown as an example.

[0160] Figure 3 FIG. 4 is a schematic diagram showing the structure of a Wi-Fi Frameworks.

[0161] Figure 4 The figure is a schematic diagram of the software structure of an electronic device.

[0162] Figure 5 The figure is a schematic diagram showing an exemplary process of a mobile phone accessing a router.

[0163] Figure 6 The figure is a schematic diagram of an exemplary mobile phone interface.

[0164] Figure 7 The figure is a schematic diagram of an exemplary mobile phone interface.

[0165] Figure 8 The figure is a schematic diagram of an exemplary mobile phone interface.

[0166] Fig. 9 The figure is a schematic diagram of an exemplary mobile phone interface.

[0167] Fig.10 The figure is a schematic diagram of an exemplary mobile phone interface.

[0168] Fig.11 The figure is a schematic diagram of an exemplary mobile phone interface.

[0169] Fig.12 The figure is a schematic diagram of an exemplary mobile phone interface.

[0170] Fig.13 The figure is a schematic diagram of an exemplary mobile phone interface.

[0171] Fig.14 The figure is a schematic diagram showing an exemplary flow of communication between a mobile phone and a router.

[0172] Fig.15 The figure is a schematic diagram showing an exemplary flow of communication between a mobile phone and a router.

[0173] Fig.16 The figure is a schematic diagram showing an exemplary flow of communication between a mobile phone and a router.

[0174] Fig.17 The figure is a schematic diagram showing an exemplary flow of communication between a mobile phone and a router.

[0175] Fig.18 The figure is a schematic diagram showing an exemplary flow of communication between a mobile phone and a router.

[0176] Fig.19 The figure is a schematic diagram showing an exemplary flow of communication between a mobile phone and a router.

[0177] Fig. 20 The figure is a schematic diagram showing an exemplary flow of communication between a mobile phone and a router.

[0178] Fig.21 The figure is a schematic diagram of the structure of a device shown as an example. DETAILED DESCRIPTION

[0179] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0180] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0181] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.

[0182] In the embodiments of the present 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 the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0183] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more. For example, multiple processing units refer to two or more processing units. Multiple systems refer to two or more systems.

[0184] If the mobile phone cannot access the Internet through the router, the user can control the mobile phone to disconnect the Wi-Fi connection between the mobile phone and the router and reconnect to the router.

[0185] However, sometimes, after the phone is reconnected to the router, it still cannot access the Internet through the router.

[0186] Afterwards, the user will control the mobile phone to disconnect the Wi-Fi connection between the mobile phone and the router, and reconnect to the router. However, it is possible that the mobile phone still cannot access the Internet through the router. In this case, the user may continue to repeat the process of "controlling the mobile phone to disconnect the Wi-Fi connection between the mobile phone and the router, and reconnect to the router".

[0187] However, sometimes, repeatedly controlling the process of "disconnecting the Wi-Fi connection between the phone and the router, and reconnecting to the router" will not only prevent the phone from accessing the Internet through the router, but also cause the router to deny the phone access if the phone reconnects to the router too many times.

[0188] It can be seen that the above method has the following problems:

[0189] 1. The process of repeatedly "disconnecting the Wi-Fi connection between the phone and the router, and reconnecting to the router" will consume the phone's system resources and network resources.

[0190] 2. After repeatedly disconnecting the Wi-Fi connection between the mobile phone and the router, and reconnecting to the router, the mobile phone is connected to the router too many times in a short period of time, causing the router to refuse access to the mobile phone. In this way, even if the mobile phone can objectively access the Internet through the router after connecting to the router, the router refuses the mobile phone's access. Therefore, the mobile phone cannot actually access the router, which will cause the mobile phone to be unable to access the Internet through the router in the future.

[0191] Among them, after the mobile phone is connected to the router, if the mobile phone cannot access the network through the router, there are often many reasons why the mobile phone cannot access the network through the router. For example, sometimes the mobile phone cannot access the network through the router because data cannot be exchanged between the mobile phone and the router, and sometimes the mobile phone cannot access the network through the router because data cannot be exchanged between the router and the outside (for example, the router is disconnected from the network).

[0192] If the mobile phone cannot access the Internet through the router because data cannot be exchanged between the router and the outside world, then disconnecting the Wi-Fi connection between the mobile phone and the router and reconnecting to the router often does not enable data exchange between the router and the outside world, and thus does not enable the mobile phone to access the Internet through the router. In this case, "disconnecting the Wi-Fi connection between the mobile phone and the router and reconnecting to the router" does not work and will consume the system resources and network resources of the mobile phone.

[0193] However, if the mobile phone cannot access the Internet through the router because data cannot be exchanged between the mobile phone and the router, then disconnecting the Wi-Fi connection between the mobile phone and the router and reconnecting to the router may enable data exchange between the mobile phone and the router, and then the mobile phone may be able to access the Internet through the router. In this case, "disconnecting the Wi-Fi connection between the mobile phone and the router and reconnecting to the router" may work.

[0194] There are many reasons why data exchange between a mobile phone and a router cannot be performed. For example, the mobile phone does not store the MAC (Media Access Control) address of the router. For example, the ARP (Address Resolution Protocol) table of the mobile phone does not store the correspondence between the IP (Internet Protocol) address of the router and the MAC address of the router. In this way, the mobile phone cannot obtain the MAC address of the router. Without the MAC address of the router, the mobile phone cannot send data to the router, which makes the mobile phone unable to access the network through the router.

[0195] In view of this, the present application proposes a method, in the case where there is a possibility or sign that the mobile phone cannot access the network via the router, the Wi-Fi connection between the mobile phone and the router is disconnected, and the router is reconnected. Also, in the case where the mobile phone does not show signs or possibility that it cannot access the network via the router, the Wi-Fi connection between the mobile phone and the router can be kept and the router can be reconnected.

[0196] Among them, after the mobile phone disconnects the Wi-Fi connection between the mobile phone and the router, the mobile phone can obtain the MAC address of the router while the mobile phone reconnects to the router. In this way, after the mobile phone reconnects to the router, the mobile phone can send data to the router through the MAC address of the router, thereby enabling the mobile phone to access the network through the router, so that the mobile phone can resume Internet access.

[0197] It can be seen that through this application, on the one hand, the process of "disconnecting the Wi-Fi connection between the mobile phone and the router, and reconnecting to the router" can be omitted when it is not necessary, but the process of "disconnecting the Wi-Fi connection between the mobile phone and the router, and reconnecting to the router" can be executed when necessary, thereby saving the system resources and network resources of the mobile phone. The unnecessary situation can be understood as: the mobile phone does not show signs or possibilities of being unable to access the network via the router. The necessary situation can be understood as: the mobile phone shows signs or possibilities of being unable to access the network via the router.

[0198] On the other hand, it can avoid increasing the number of times the mobile phone accesses the router in a short period of time, and thus can avoid as much as possible the router refusing the mobile phone access in the future. In this way, under the circumstance that the mobile phone can objectively access the Internet through the router after reconnecting to the router, it can increase the possibility that the subsequent mobile phone can successfully access the router, thereby increasing the possibility that the subsequent mobile phone can access the Internet through the router, that is, it can increase the possibility that the mobile phone can resume Internet access.

[0199] Before describing the technical solution of the embodiments of the present application, the application scenarios of the embodiments of the present application are first described with reference to the accompanying drawings.

[0200] The application scenarios of the embodiments of the present application may include: electronic devices and access points (APs), where the electronic devices can access the access points. After the electronic devices access the access points, there is a communication connection between the electronic devices and the access points, such as a Wi-Fi connection, and the network can be accessed via the access points through the communication connection. The electronic devices can access one or more access points simultaneously through Wi-Fi technology.

[0201] In one embodiment, the electronic device may include a terminal, and the terminal may include a terminal supporting 802.11 series standards, etc.

[0202] For example, a terminal in a BSS (Basic Service Set) may also be referred to as a station (STA), and a so-called station refers to a terminal that has a Wi-Fi communication function and can connect to a wireless network. The station can support multiple wireless local area networks (WLAN) standards of the 802.11 family, such as 802.11be, 802.11ax, 802.11ac, 802.11n, 802.11g, 802.11b and 802.11a.

[0203] The terminal may include: a mobile phone, a tablet computer, a laptop computer, a desktop computer, an ultra-mobile personal computer (UMPC), a media player (such as MP3, MP4, etc.), a personal digital assistant (PDA), a smart screen (such as a smart TV or a large screen, etc.), a vehicle-mounted device, a netbook, a projector, and other possible terminals, etc. The embodiment of the present application does not specifically limit the type of the terminal.

[0204] In one embodiment, the access point may include a network device or other device with a Wi-Fi chip, and illustratively, the access point may include a router or a switch.

[0205] For example, the access point may support multiple wireless local area network standards of the 802.11 family, such as 802.11be, 802.11ax, 802.11ac, 802.11n, 802.11g, 802.11b and 802.11a. The embodiment of the present application does not specifically limit the type of the access point.

[0206] In the evolution from 802.11a to 802.11g, 802.11n, 802.11ac and 802.11ax, the available frequency bands include 2.4 GHz and 5 GHz. As more and more frequency bands are opened, the maximum channel bandwidth supported by 802.11 has expanded from 20 MHz to 40 MHz and then to 160 MHz. In 2017, the Federal Communications Commission (FCC) of the United States opened a new free frequency band of 6 GHz (5925-7125 MHz). In the 802.11ax Project Authorization Requests (PAR), 802.11ax standard workers expanded the operating range of 802.11ax devices from 2.4 GHz and 5 GHz to 2.4 GHz, 5 GHz and 6 GHz, etc.

[0207] This application is only described by taking the example of an electronic device and an access point operating at 2.4 GHz. The embodiments of this application are also applicable to data transmission scenarios between electronic devices and access points in other operating frequency bands.

[0208] In one example, the communication scenarios in the embodiments of the present application may include: scenarios of Wi-Fi communication between a mobile phone and a router. Of course, it can be understood that the communication scenarios in the embodiments of the present application may also include scenarios of Wi-Fi communication between other devices. The present application does not limit the types of devices involved in the Wi-Fi communication scenarios, and no longer gives examples one by one.

[0209] Figure 1 The figure is a schematic diagram showing an exemplary scenario of Wi-Fi communication between a mobile phone and a router.

[0210] Among them, after detecting the router, the mobile phone can perform authentication, association, four-way handshake and DHCP processes with the router to access the router. After that, the mobile phone can access the network through the router.

[0211] in, Figure 1 This is merely an illustrative example of the Wi-Fi communication scenario of the present application and is not intended to limit the Wi-Fi communication scenario of the present application.

[0212] Figure 2 The figure is a schematic diagram of the structure of an electronic device shown as an example.

[0213] It is clear to those skilled in the art that Figure 2 The structure of the electronic device in can be applied to Figure 1 The mobile phone shown in the figure, it is understandable that Figure 2The structure of the electronic device in the figure can also be applied to the above-mentioned terminals, for example, tablet computers, laptop computers, desktop computers, super mobile personal computers, media players, personal digital assistants, smart screens, vehicle-mounted devices, netbooks, projectors, etc., which are not shown in the figure, and other possible electronic devices. The embodiment of the present application does not impose any restrictions on the specific type of the electronic device 100.

[0214] It should be understood that Figure 2 The electronic device 100 shown is only an example of an electronic device in an embodiment of the present application, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have a different component configuration. Figure 2 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0215] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

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

[0217] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0218] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0219] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

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

[0221] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170.

[0222] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface.

[0223] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Wi-Fi Frameworks in the wireless communication module 160 through the UART interface to implement the Wi-Fi function.

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

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

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

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

[0228] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0229] 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, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

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

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

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

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

[0234] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0235] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0236] in, Figure 3 This is a schematic diagram of the structure of a Wi-Fi Frameworks in a wireless communication module 160. By way of example, a Wi-Fi CPU (i.e., a Wi-Fi processor) 201 is loaded in the Wi-Fi Frameworks 200. The Wi-Fi CPU 201 is optionally a core processor of the Wi-Fi Frameworks, and is used to process Wi-Fi-related computing functions, such as congestion control, carrier aggregation, frame filtering, key control, and management frame sending and receiving.

[0237] It is understandable that the processor and Wi-Fi Frameworks 200 can be integrated on the same chip, or on different chips and connected through a bus, and this application does not limit this.

[0238] Exemplarily, Wi-Fi Frameworks 200 may integrate N Wi-Fi radio frequency circuits, where N is a natural number greater than or equal to 1. Figure 3 The example of integrating one Wi-Fi radio frequency circuit in Wi-Fi Frameworks 200 is used for illustration, but it is not intended to limit the protection scope of the present application.

[0239] Among them, one Wi-Fi radio frequency circuit is used to access a corresponding Wi-Fi network, and one Wi-Fi radio frequency circuit corresponds to an independent set of media access control (Media Access Control, MAC) 202 and physical layer (physical layer, PHY) 203, and MAC 202 and PHY 203 can be connected to Wi-Fi CPU 201.

[0240] For example, if N is 2, that is, the Wi-Fi Frameworks 200 includes two Wi-Fi radio frequency circuits. Optionally, the two Wi-Fi radio frequency circuits can access Wi-Fi networks of different frequencies.

[0241] For example, one Wi-Fi radio frequency circuit can access a 2.4 GHz Wi-Fi network, and another Wi-Fi radio frequency circuit can access a 5 GHz Wi-Fi network.

[0242] Still refer to Figure 3 The functions of MAC 202 mainly include channel access, frame decomposition, data transmission and reception, encryption and decryption, and energy saving control. Of course, MAC 202 can also be implemented by Wi-Fi CPU 201, that is, its functions are implemented by Wi-Fi CPU 201. PHY203 mainly implements physical layer functions, such as digital baseband processing.

[0243] Optionally, Wi-Fi Frameworks 200 can be coupled to RF component 204, which is used to convert the baseband signal processed by MAC 202 and PHY 203 into RF signal and transmit it, and convert the RF signal received from the antenna into baseband signal for further processing by PHY 203 and MAC 202.

[0244] Optionally, one radio frequency circuit may be connected to an independent radio frequency component 204 , and one radio frequency circuit corresponds to an independent radio frequency component 204 .

[0245] Optionally, the radio frequency component 204 may be integrated on a Wi-Fi chip where the Wi-Fi Frameworks are located, or may be outside the chip, which is not limited in this application.

[0246] It is understandable that the Wi-Fi CPU 201 may also be replaced by a DSP (digital signal processor) or an independent FPGA (field programmable gate array) chip. The specific form of the processor for implementing Wi-Fi processing may be flexible and variable. Figure 3 The number and layout of each device are for reference only and are not intended to be limiting.

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

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

[0249] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0250] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and 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 ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0251] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted 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 other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0252] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0253] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0254] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0255] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

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

[0257] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0258] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0259] The hardware system of the electronic device 100 is described in detail above. Figure 2 The connection relationship between the modules shown is only a schematic illustration and does not constitute a limitation on the connection relationship between the modules of the electronic device 100. Optionally, the modules of the electronic device 100 may also adopt a combination of multiple connection modes in the above embodiments.

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

[0261] Figure 4 FIG. 1 is a schematic diagram of the software structure of the electronic device 100 exemplarily shown.

[0262] The layered architecture of the electronic device 100 divides the software into several layers, each layer has a clear role and division of labor, and the layers communicate with each other through software interfaces.

[0263] In some embodiments, the Android system is divided into an application layer, an application framework layer, and a kernel layer from top to bottom.

[0264] The application layer can include a series of applications. For example, the application layer can include camera, gallery, calendar, screen projection, WLAN, music, call, navigation, video, map, Bluetooth, music, video, multi-screen collaboration, Honor sharing, short message and other applications.

[0265] It should be noted that Figure 4 The application programs included in the application program layer shown in the figure are only exemplary, and the present application does not limit this. It can be understood that the application programs included in the application program layer do not constitute a specific limitation on the electronic device 100.

[0266] In other embodiments of the present application, compared to Figure 4 The application layer shown includes applications, and the electronic device 100 may include more or fewer applications, or the electronic device 100 may include completely different applications.

[0267] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer, and can include various components and services to support developers' Android development. The application framework layer includes some predefined functions.

[0268] like Figure 4 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, Wi-Fi Frameworks, and a DHCP (Dynamic Host Configuration Protocol) module, etc.

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

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

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

[0272] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

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

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

[0275] Wi-Fi Frameworks, used to access access points, for example, to detect access points, to establish a Wi-Fi connection between the electronic device 100 and the access point, to manage the Wi-Fi connection between the electronic device 100 and the access point, to interact with the access point through the established Wi-Fi connection, to disconnect the Wi-Fi connection between the electronic device 100 and the access point, to maintain the Wi-Fi connection between the electronic device 100 and the access point, and to save fingerprint library information, etc.

[0276] Optionally, the fingerprint library information may also be referred to as historical connection information. Optionally, the historical connection information may include relevant information of the Wi-Fi network to which the electronic device 100 has been connected, including but not limited to at least one of the following: SSID (Service Set Identifier), BSSID (Basic Service Set Identifier), account number, password, encryption method, etc.

[0277] The DHCP module is used to obtain DHCP information corresponding to the saved Wi-Fi connection, and the DHCP information includes but is not limited to at least one of the following: IP (Internet Protocol) address, subnet mask, DNS (Domain Name System) server related information, etc.

[0278] The kernel layer is a layer between hardware and software. The kernel layer includes at least a display driver, an audio driver, a sensor driver, and a Wi-Fi driver. Among them, the Wi-Fi driver is used to process the data on the Wi-Fi connection between the electronic device 100 and the access point accordingly.

[0279] Understandably, Figure 4 The layers in the software structure shown and the components included in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include Figure 4 More or fewer layers are shown, and each layer may include more or fewer components, which is not limited in the present application.

[0280] Optionally, a mobile phone is used as an electronic device and a router is used as an access point for illustration. For example, the mobile phone can first access the router, and then the mobile phone can access the network via the router.

[0281] It should be noted that in other embodiments, a mobile phone, tablet computer, laptop computer, wearable device, smart home device, vehicle-mounted device, etc. may be connected to a router, and network access may be performed via the router, and this application does not limit this.

[0282] See also Figure 5 , Figure 5 The schematic diagram of the process of mobile phone accessing router is shown as an example, and the access process of mobile phone accessing router is described in detail. Figure 5 , exemplary, access process includes:

[0283] S301, the mobile phone turns on the Wi-Fi function.

[0284] In this application, the mobile phone can turn on the Wi-Fi function. After the Wi-Fi function is turned on, the mobile phone can enter the scanning phase to discover Wi-Fi networks near the mobile phone.

[0285] The embodiment of the present application does not specifically limit the method for enabling the Wi-Fi function of the mobile phone, and the following are illustrative examples.

[0286] In one example, a user may enter the WLAN setting interface of the mobile phone through the setting application of the mobile phone, and turn on the Wi-Fi function of the mobile phone through the WLAN switch control in the WLAN setting interface.

[0287] In another example, the user can enter the sliding notification bar (or status bar) of the mobile phone and turn on the Wi-Fi function of the mobile phone through the WLAN switch control in the sliding notification bar of the mobile phone.

[0288] For example, in one embodiment, Figure 6This is a schematic diagram of an exemplary mobile phone interface, which illustrates that "a user can enter the WLAN settings interface of the mobile phone through the settings application of the mobile phone, and turn on the Wi-Fi function of the mobile phone through the WLAN switch control in the WLAN settings interface."

[0289] Reference Figure 6 (1), illustratively, the main interface 401 of the mobile phone may include one or more controls, for example, including but not limited to: an icon of the mobile phone's battery level, an icon of the mobile network signal, an icon of the time, and icons of multiple applications, etc. Among them, the application icons include but are not limited to: an icon 402 of the settings application, an icon of the calendar application, and an icon of the gallery application, etc. For details, see Figure 6 (1) and will not be elaborated here.

[0290] It should be noted that Figure 6 The application icons shown in (1) are merely illustrative application icons. Depending on actual conditions, other application icons may also be included, and this application does not limit this.

[0291] If the user needs to turn on the Wi-Fi function of the mobile phone, the user can input a single click operation on the icon 402 of the setting application in the main interface 401 of the mobile phone to enter the interface 403 of the setting application. In response to the single click operation input by the user on the icon 402 of the setting application, the mobile phone displays the interface 403 of the setting application.

[0292] Reference Figure 6 (2) Exemplarily, the interface 403 of the setting application may include one or more controls, for example, including but not limited to: WLAN setting option 404, Bluetooth setting option, mobile network setting option and more connection setting options.

[0293] It should be noted that Figure 6 The various controls shown in (2) are merely illustrative controls. Other controls may also be included depending on actual conditions, and this application does not limit this.

[0294] At this time, the Wi-Fi function of the mobile phone is turned off, so Figure 6 The WLAN setting option 404 in the setting application interface 403 shown in (2) indicates that the Wi-Fi function of the mobile phone is turned off (the word "disabled" is displayed in the WLAN setting option 404). Figure 6 (2) The WLAN setting option 404 in the setting application interface 403 shows that the Wi-Fi function of the mobile phone is turned off. Figure 6 (2) will not be elaborated here.

[0295] If the user needs to enable the Wi-Fi function of the mobile phone, the user can input a single click operation on the WLAN setting option 404 to enter the WLAN setting interface 405. In response to the single click operation input by the user on the WLAN setting option 404, the mobile phone displays the WLAN setting interface 405.

[0296] Reference Figure 6 (3) Exemplarily, the WLAN setting interface 405 may include one or more controls, such as but not limited to: a WLAN switch control 406, a network acceleration control, and more WLAN setting controls.

[0297] It should be noted that Figure 6 The controls shown in (3) are merely illustrative controls and may include other controls depending on actual conditions. This application does not limit this.

[0298] At this time, the Wi-Fi function of the mobile phone is turned off, so Figure 6 (3) The WLAN switch control 406 in the WLAN setting interface 405 indicates that the Wi-Fi function of the mobile phone is turned off. Figure 6 (3) The WLAN switch control 406 in the WLAN setting interface 405 shown in FIG. 4 shows that the Wi-Fi function of the mobile phone is in a turned-off state. Figure 6 (3) will not be elaborated here.

[0299] If the user needs to turn on the Wi-Fi function of the mobile phone, the user can input a single click operation to the WLAN switch control 406 to turn on the Wi-Fi function of the mobile phone. In response to the single click operation input by the user to the WLAN switch control 406, the mobile phone turns on the Wi-Fi function of the mobile phone.

[0300] Further, refer to Figure 6 (4) After the Wi-Fi function of the mobile phone is turned on, the content in the WLAN setting interface 405 changes.

[0301] For example, the Wi-Fi function of the mobile phone is turned on at this time, so Figure 6 The WLAN switch control 406 in the WLAN setting interface 405 shown in (4) indicates that the Wi-Fi function of the mobile phone is turned on. Figure 6 (4) The WLAN switch control 406 in the WLAN setting interface 405 shown in FIG. 4 indicates that the Wi-Fi function of the mobile phone is turned on. Figure 6 (4) will not be elaborated here.

[0302] For example, in one embodiment, Figure 7 This is a schematic diagram of an exemplary mobile phone interface, which illustrates that "a user can enter the sliding notification bar (or status bar) of the mobile phone and turn on the Wi-Fi function of the mobile phone through the WLAN switch control in the sliding notification bar of the mobile phone."

[0303] Reference Figure 7 (1), illustratively, the main interface 501 of the mobile phone may include one or more controls, for example, including but not limited to: an icon of the mobile phone's battery level, an icon of the mobile network signal, an icon of the time, and icons of multiple applications, etc. Among them, the application icons include but are not limited to: an icon of the setting application, an icon of the calendar application, and an icon of the gallery application, etc. For details, please refer to Figure 7 (1) and will not be elaborated here.

[0304] It should be noted that Figure 7 The application icons shown in (1) are merely illustrative application icons. Depending on actual conditions, other application icons may also be included, and this application does not limit this.

[0305] If the user needs to turn on the Wi-Fi function of the mobile phone, the user can slide in the direction of the input from the right side of the upper edge of the mobile phone screen. The mobile phone responds to the sliding in the direction of the input from the right side of the upper edge of the mobile phone screen by displaying the sliding notification bar 502. For example, illustratively, the sliding notification bar 502 is displayed in a floating manner in the area above the main interface 501 of the mobile phone.

[0306] Reference Figure 7 (2) Exemplarily, the sliding notification bar 502 may include one or more controls, for example, including but not limited to: a WLAN switch control 503, a Bluetooth switch control, a volume adjustment control, a screenshot control, and a screen recording control.

[0307] It should be noted that Figure 7 The various controls shown in (2) are merely illustrative controls. Other controls may also be included depending on actual conditions, and this application does not limit this.

[0308] At this time, the Wi-Fi function of the mobile phone is turned off, so Figure 7 (2) The WLAN switch control 503 in the sliding notification bar 502 indicates that the Wi-Fi function of the mobile phone is turned off. Figure 7 (2) The WLAN switch control 503 in the sliding notification bar 502 indicates that the Wi-Fi function of the mobile phone is turned off. Figure 7 (2) will not be elaborated here.

[0309] If the user needs to turn on the Wi-Fi function of the mobile phone, the user can input a single click operation to the WLAN switch control 503 to turn on the Wi-Fi function of the mobile phone. In response to the single click operation input by the user to the WLAN switch control 503, the mobile phone turns on the Wi-Fi function of the mobile phone.

[0310] Further, refer to Figure 7 (3) After the Wi-Fi function of the mobile phone is turned on, the content in the sliding notification bar 502 changes.

[0311] For example, the Wi-Fi function of the mobile phone is turned on at this time. Figure 7 (3) In the example, the color of the WLAN switch control 503 changes. Figure 7 (3) The WLAN switch control 503 shown indicates that the Wi-Fi function of the mobile phone is turned on. Figure 7 (3) The WLAN switch control 503 shown can be used to know that the Wi-Fi function of the mobile phone is turned on. Figure 7 (3) will not be elaborated here.

[0312] Furthermore, after the Wi-Fi function of the mobile phone is turned on, Figure 7 In (3), a WLAN extension control 504 is also displayed on the right side of the WLAN switch control 503.

[0313] For example, Figure 7 The WLAN extension control 504 in (3) is in a triangular shape. Of course, it is understandable that the WLAN extension control 504 may also be in other shapes, and the present application does not limit the shape of the WLAN extension control 504.

[0314] Continue to refer to Figure 5 , exemplarily, after turning on the Wi-Fi function of the mobile phone, the mobile phone enters a scanning phase to discover the Wi-Fi network.

[0315] S302, the mobile phone sends a Probe Request message to the router.

[0316] S303, after receiving the Probe Request message, the router sends a Probe Response message to the mobile phone.

[0317] For example, Figure 1 Take the router in as an example, the router is a 2.4GHz router. Figure 5 ,In the scanning phase, the mobile phone performs full channel scanning, e.g. Figure 5As shown on the right, the 2.4 GHz frequency band includes channels 1 to 13. The mobile phone sends two Probe Request messages on each channel to detect whether there is a Wi-Fi network on the channel where the Probe Request message is sent.

[0318] Exemplarily, if the mobile phone receives a Probe Response message returned by the router, the mobile phone can determine that a Wi-Fi network exists on the corresponding channel. Optionally, the Probe Response message includes but is not limited to: the BSSID and SSID of the router. Among them, the BSSID of the router can be regarded as the MAC address of the router, which is used to uniquely identify the Wi-Fi network interface of the router.

[0319] Exemplarily, each time the mobile phone sends a Probe Request message, it waits for 20 ms to detect whether a Probe Response message returned by the router on the channel is received.

[0320] It should be noted that the mobile phone can determine the channel on which the router that sent the Probe Response message works, based on the channel on which the Probe Response message is received.

[0321] For example, after the mobile phone sends a Probe Request message on channel 1, it receives a Probe Response message returned by router 1 on channel 1. The mobile phone can determine that the operating channel of router 1 is channel 1 of the 2.4 GHz frequency band.

[0322] Exemplarily, after the mobile phone scans all channels, namely, channels 1 to 13, the scanning result is displayed, wherein the scanning result displays the Wi-Fi network corresponding to the router that returns the Probe Response message (and the mobile phone successfully receives the Probe Response message).

[0323] Exemplarily, the mobile phone scans Wi-Fi networks including Wi-Fi networks corresponding to SSID "Honor1", SSID "Honor2", SSID "AAA" and SSID "BBB", where each Wi-Fi network can be on the same channel or on different channels, which is not limited in this application.

[0324] Further, illustratively, in one embodiment, Figure 8 A schematic diagram of an exemplary mobile phone interface, based on Figure 6 (4) The embodiment shown in FIG. Figure 8After scanning the surrounding Wi-Fi networks, an available WLAN list 407 will be displayed at the bottom of the more WLAN setting controls. The available WLAN list 407 may include the SSIDs of multiple Wi-Fi networks scanned by the mobile phone.

[0325] Figure 8 The SSIDs of the multiple Wi-Fi networks scanned by the mobile phone in the available WLAN list 407 shown in FIG. 4 may include: “Honor1”, “Honor2”, “AAA”, and “BBB”.

[0326] It should be noted that Figure 8 The SSID of the Wi-Fi network scanned by the mobile phone in the available WLAN list 407 shown in FIG. 4 is merely an example. According to actual conditions, the SSID of other Wi-Fi networks scanned by the mobile phone may also be included, and this application does not limit this.

[0327] Further, illustratively, in one embodiment, Fig. 9 A schematic diagram of an exemplary mobile phone interface, based on Figure 7 (3) In the embodiment shown, after turning on the WI-FI function of the mobile phone, if the user needs to control the mobile phone to connect to a Wi-Fi network, see Fig. 9 (1) Users can Fig. 9 The WLAN extension control 504 in (1) is clicked. In response to the user's click on the WLAN extension control 504, the mobile phone displays the WLAN interface 505. For example, the WLAN interface 505 is displayed in a floating manner on the main interface 501 of the mobile phone.

[0328] For example, see Fig. 9 (2) An available WLAN list 506 is displayed in the WLAN interface 505 , and the available WLAN list 506 includes SSIDs of multiple Wi-Fi networks scanned by the mobile phone.

[0329] Exemplarily, the mobile phone scans Wi-Fi networks including Wi-Fi networks corresponding to SSID "Honor1", SSID "Honor2", SSID "AAA" and SSID "BBB", where each Wi-Fi network can be on the same channel or on different channels, which is not limited in this application.

[0330] in this way, Fig. 9 The SSIDs of the multiple Wi-Fi networks scanned by the mobile phone in the available WLAN list 506 shown in (2) may include: "Honor1", "Honor2", "AAA" and "BBB".

[0331] It should be noted that Fig. 9 The SSID of the Wi-Fi network scanned by the mobile phone in the available WLAN list 506 shown in (2) is only an example. According to actual conditions, it may also include the SSID of other Wi-Fi networks scanned by the mobile phone, and this application is not limited to this.

[0332] Continue to refer to Figure 5 ,Exemplarily, after the scanning phase is completed, the mobile phone enters the network selection phase.

[0333] During the network selection stage, the mobile phone can obtain the signal strength of the corresponding Wi-Fi network based on the received probe response message. The mobile phone can select and connect to one of the scanned one or more Wi-Fi networks based on the set network selection conditions.

[0334] Optionally, the network selection condition includes but is not limited to at least one of the following: communication quality parameters of the Wi-Fi network, historical connection information, encryption method, user specification, etc.

[0335] Exemplarily, the communication quality parameters of the Wi-Fi network include, but are not limited to: SNR (SIGNAL NOISE RATIO), RSRP (Reference Signal Receiving Power), RSRQ (Reference Signal Receiving Quality), RSSI (Received Signal Strength Indication), etc.

[0336] For example, if the mobile phone does not detect the user's network selection operation, the mobile phone can select and connect to the Wi-Fi network with the best communication quality parameters and the communication quality parameters exceeding the threshold (which can be set according to needs) among the multiple Wi-Fi networks scanned.

[0337] It should be noted that if the communication quality parameters of the Wi-Fi networks scanned by the mobile phone do not exceed the threshold, the mobile phone can optionally re-execute the scanning operation, or wait for the user's selection.

[0338] Exemplarily, the historical connection information of a Wi-Fi network is used to indicate that the mobile phone has accessed the Wi-Fi network before. For example, the historical connection information of the Wi-Fi network includes the BSSID, SSID and other information of the Wi-Fi network. Optionally, if the Wi-Fi network is an encrypted network, the historical connection information may also include the account number, password and other information of the encrypted network.

[0339] For example: if the mobile phone does not detect the user's network selection operation, the mobile phone can match the BSSID of each Wi-Fi network among the scanned multiple Wi-Fi networks with the BSSID of the connected Wi-Fi network recorded in the historical connection information, and select and connect to the Wi-Fi network that has been connected before (i.e., the match is successful). Optionally, if multiple previously connected Wi-Fi networks are matched, the Wi-Fi network with the strongest signal strength is optionally connected.

[0340] Exemplarily, the encryption method is used to characterize the security level of the Wi-Fi network. Optionally, the encryption method includes but is not limited to: open, psk, wpa2, wpa3, etc. For example, if the mobile phone does not detect the user's network selection operation, the mobile phone can access a network with a specified encryption method (such as wpa3) among the scanned multiple Wi-Fi networks.

[0341] In addition, for users actively selecting a network, in one example, based on Figure 8 For the example shown, see Fig.10 , assuming that the user needs to control the mobile phone to access the Wi-Fi network corresponding to SSID “Honor1” 408 . The user can input a single-click operation on SSID “Honor1” 408 in the available WLAN list 407 to specify access to the Wi-Fi network corresponding to SSID “Honor1” 408 .

[0342] In response to the user's single-click operation on the SSID “Honor1” 408 in the available WLAN list 407 , the mobile phone may learn that it needs to access the Wi-Fi network corresponding to the SSID “Honor1” 408 , and execute the subsequent access process.

[0343] Optionally, if the Wi-Fi network corresponding to SSID "Honor1" 408 is an encrypted network, the mobile phone responds to the user's single-click operation on SSID "Honor1" 408 in the available WLAN list 407, and displays a prompt box on the WLAN setting interface 405. The prompt box includes a password input box. The user can enter a password in the password input box, and then perform subsequent access procedures based on the entered password.

[0344] Optionally, if the Wi-Fi network corresponding to SSID “Honor1” 408 is a non-encrypted network, the mobile phone directly performs a subsequent access process in response to the user's single-click operation on SSID “Honor1” 408 in the available WLAN list 407 .

[0345] In addition, for users actively selecting a network, in another example, based on Fig. 9 (2) shows an example, see Fig.11, assuming that the user needs to control the mobile phone to access the Wi-Fi network corresponding to SSID “Honor1” 507 . The user can input a single-click operation on SSID “Honor1” 507 in the available WLAN list 506 to specify access to the Wi-Fi network corresponding to SSID “Honor1” 507 .

[0346] In response to the user's single-click operation on the SSID “Honor1” 507 in the available WLAN list 506 , the mobile phone may learn that it needs to access the Wi-Fi network corresponding to the SSID “Honor1” 507 , and execute the subsequent access process.

[0347] Optionally, if the Wi-Fi network corresponding to SSID "Honor1" 507 is an encrypted network, the mobile phone responds to the user's single-click operation on SSID "Honor1" 507 in the available WLAN list 506, and displays a prompt box on the WLAN interface 505. The prompt box includes a password input box. The user can enter a password in the password input box, and then perform subsequent access procedures based on the entered password.

[0348] Optionally, if the Wi-Fi network corresponding to SSID “Honor1” 507 is a non-encrypted network, the mobile phone directly performs a subsequent access process in response to the user's single-click operation on SSID “Honor1” 507 in the available WLAN list 506 .

[0349] Continue to refer to Figure 5 , exemplarily, after the network selection phase is completed, the mobile phone selects the corresponding Wi-Fi network, and then the mobile phone enters the connection phase.

[0350] S304, the mobile phone and the router perform authentication processing.

[0351] S305, the mobile phone is associated with the router.

[0352] S306, the mobile phone and the router perform a four-way handshake phase.

[0353] In S304 to S306, the mobile phone and the router will perform multiple signaling interactions. For example, for the password of the encrypted network entered by the user, the entered password may be optionally verified in the four-way handshake stage. For specific details, please refer to the detailed description in the 802.11 protocol, which will not be repeated in this application.

[0354] At this point, the mobile phone successfully establishes a communication connection with the router. Optionally, the mobile phone can write relevant information of the Wi-Fi network into the historical connection information, and the relevant information includes but is not limited to the BSSID of the Wi-Fi network, the account number of the Wi-Fi network, the password of the Wi-Fi network, etc.

[0355] Continue to refer to Figure 5 ,Exemplarily, after the connection phase is completed, the mobile phone enters the DHCP phase.

[0356] After the DHCP process is completed, the router access process is completed, and the mobile phone can then access the network through the router.

[0357] Continue to refer to Figure 5 , the DHCP process may include:

[0358] S307, the mobile phone sends a DHCP Discovery message to the router.

[0359] Exemplarily, the mobile phone sends a DHCP Discovery message to the router. Optionally, the DHCP Discovery message may carry the DHCP MAC address of the mobile phone.

[0360] It should be noted that, refer to Figure 4 The Wi-Fi radio frequency circuit in the mobile phone corresponds to the Wi-Fi Frameworks and the DHCP module in the application framework layer. Thus, in S307, if a Wi-Fi connection is established between the mobile phone and the router, the DHCP Discovery message may carry the MAC address of the DHCP module of the mobile phone.

[0361] S308: The router sends a DHCP Offer message to the mobile phone.

[0362] Exemplarily, the router sends a DHCP Offer message to the mobile phone. Optionally, the DHCP Offer message may carry DHCP information allocated by the router based on the MAC address of the DHCP module.

[0363] Optionally, the DHCP information may include an IP address, subnet mask information, and DNS (Domain Name System) server information.

[0364] S309, the mobile phone sends a DHCP Request message to the router.

[0365] Exemplarily, based on the DHCP information in the received DHCP Offer message, the mobile phone may send a DHCP Request message to the router after determining that the DHCP information can be used.

[0366] Optionally, the DHCP Request message may carry an IP address to indicate that the mobile phone will use the IP address. It should be noted that the IP address is the IP address assigned to the mobile phone by the router in S308.

[0367] S310, the router sends a DHCP ACK (Acknowledge character) message to the mobile phone.

[0368] Exemplarily, after the router receives the DHCP Request message sent by the mobile phone, it sends a DHCPACK message to the mobile phone to indicate that the router has successfully received the DHCP Request message sent by the mobile phone, and the mobile phone can use the DHCP information to access the network via the router.

[0369] Furthermore, the IP address assigned by the router to the mobile phone is related to the IP address of the router, and there is a specific conversion rule between the two. In this way, the mobile phone can calculate the IP address of the router based on the IP address assigned by the router to the mobile phone.

[0370] Afterwards, the mobile phone can store the correspondence between the router's IP address and the router's MAC address in the ARP table entry, which is convenient for the mobile phone to use when accessing the network via the router later.

[0371] Continue to refer to Figure 5 After the mobile phone and the router execute S301 to S310, the mobile phone is connected to the router, and the mobile phone can access the network through the router based on the obtained DHCP information.

[0372] Furthermore, in another embodiment of the present application, during the process of the mobile phone executing S304 to S309, the mobile phone can also display an access prompt message on the interface. The access prompt message is used to prompt that the mobile phone is accessing a router, so that the user can know that the mobile phone is accessing a router according to the access prompt message, that is, the user can know that the mobile phone is accessing a Wi-Fi network.

[0373] Furthermore, in another embodiment of the present application, after the mobile phone and the router execute S301 to S310, that is, after the mobile phone successfully connects to the router, the mobile phone can also display a connected prompt information on the interface. The connected prompt information is used to prompt that the mobile phone has connected to the router, so that the user can know that the mobile phone has connected to the router according to the connected prompt information, that is, it can be known that the mobile phone has connected to the Wi-Fi network.

[0374] In one embodiment, Fig.12 The figure is a schematic diagram of an exemplary mobile phone interface.

[0375] For example, in one example, see Fig.12 (1) Fig.10Based on the example shown, after the user inputs a single-click operation on SSID "Honor1" 408 in the available WLAN list 407, the mobile phone responds to the user's single-click operation on SSID "Honor1" 408 in the available WLAN list 407, and can determine that the user has selected SSID "Honor1" 408, and can know that it is necessary to access the Wi-Fi network corresponding to SSID "Honor1" 408. In the process of executing S304 to S309, the mobile phone can display an accessing prompt information 409 at the bottom of SSID "Honor1" 408, and the accessing prompt information 409 is used to prompt that the mobile phone is accessing the Wi-Fi network corresponding to SSID "Honor1" 408.

[0376] In this way, users can Fig.12 As shown in (1), the access prompt information 409 displayed below the SSID “Honor1” 408 indicates that the mobile phone is currently accessing the Wi-Fi network corresponding to the SSID “Honor1” 408 .

[0377] Exemplarily, the access prompt information 409 may include "Connecting..." or "Accessing...", etc. Fig.12 In (1), the example of the access prompt information 409 including "Connecting..." is used for illustration, but it is not intended to limit the solution of the present application.

[0378] And, in another example, see Fig.12 (2) Fig.12 Based on the example shown in (1), when the mobile phone has connected to the Wi-Fi network corresponding to SSID “Honor1” 408, the mobile phone can display the connected prompt information 410 at the bottom of SSID “Honor1” 408. The connected prompt information 410 is used to prompt that the mobile phone has connected to the Wi-Fi network corresponding to SSID “Honor1” 408.

[0379] In this way, users can Fig.12 As shown in (2), the connected prompt information 410 displayed below the SSID “Honor1” 408 indicates that the mobile phone has connected to the Wi-Fi network corresponding to the SSID “Honor1” 408 .

[0380] Exemplarily, the connected prompt information 410 may include "connected" or "connected", etc. Fig.12 In (2), the example of the connected prompt information 410 including "connected" is used for illustration, but it is not intended to limit the solution of the present application.

[0381] Second, for example, Fig.12In (2), a WLAN icon 411 is also displayed on the left side of the battery icon of the mobile phone. The WLAN icon 411 is used to indicate that the Wi-Fi function of the mobile phone is turned on and the mobile phone has connected to the Wi-Fi network.

[0382] In this way, users can Fig.12 As shown in (2), the WLAN icon 411 displayed on the left side of the battery icon of the mobile phone indicates that the Wi-Fi function of the mobile phone is turned on and the mobile phone has connected to the Wi-Fi network.

[0383] In another embodiment, Fig.13 The figure is a schematic diagram of an exemplary mobile phone interface.

[0384] For example, in one example, see Fig.13 (1) Fig.11 Based on the example shown, after the user inputs a single-click operation on the SSID "Honor1" 507 in the available WLAN list 506, the mobile phone responds to the user's single-click operation on the SSID "Honor1" 507 in the available WLAN list 506, and can determine that the user has selected SSID "Honor1" 507, and can know that it is necessary to access the Wi-Fi network corresponding to SSID "Honor1" 507. In the process of executing S304 to S109, the mobile phone can display an accessing prompt information 508 at the bottom of SSID "Honor1" 507, and the accessing prompt information 508 is used to prompt the mobile phone that it is accessing the Wi-Fi network corresponding to SSID "Honor1" 507.

[0385] In this way, users can Fig.13 As shown in (1), the access prompt information 508 displayed below the SSID “Honor1” 507 indicates that the mobile phone is currently accessing the Wi-Fi network corresponding to the SSID “Honor1” 507 .

[0386] For example, the access prompt information 508 may include “Connecting…” or “Accessing…”, etc. Fig.13 In (1), the example of the access prompt information 508 including "Connecting..." is used for illustration, but it is not intended to limit the solution of the present application.

[0387] And, in another example, see Fig.13 (2) Fig.13Based on the example shown in (1), when the mobile phone has connected to the Wi-Fi network corresponding to SSID “Honor1” 507, the mobile phone can display connected prompt information 509 at the bottom of SSID “Honor1” 507. The connected prompt information 509 is used to prompt that the mobile phone has connected to the Wi-Fi network corresponding to SSID “Honor1” 507.

[0388] In this way, users can Fig.13 As shown in (2), the connected prompt information 509 displayed at the bottom of the SSID “Honor1” 507 indicates that the mobile phone has connected to the Wi-Fi network corresponding to the SSID “Honor1” 507 .

[0389] Exemplarily, the connected prompt information 509 may include "connected" or "connected", etc. Fig.13 In (2), the access prompt information 509 including "connected" is used as an example for illustration, but it is not intended to limit the solution of the present application.

[0390] Second, for example, Fig.13 In (2), a WLAN icon 510 is also displayed on the left side of the battery icon of the mobile phone. The WLAN icon 510 is used to indicate that the Wi-Fi function of the mobile phone is turned on and the mobile phone has connected to the Wi-Fi network.

[0391] In this way, users can Fig.13 As shown in (2), the WLAN icon 510 displayed on the left side of the battery icon of the mobile phone indicates that the Wi-Fi function of the mobile phone is turned on and the mobile phone has connected to the Wi-Fi network.

[0392] Fig.14 The schematic diagram of the process of communication between a mobile phone and a router is shown as an example. The method of the process is applied to a mobile phone, and the mobile phone has been connected to the router. Fig.14 , the method comprising:

[0393] S601, searching the ARP table in the mobile phone for the MAC address of the router.

[0394] At least one correspondence is stored in the ARP table entry, and the correspondence includes the correspondence between the IP address of the device connected to the mobile phone and the MAC address of the device connected to the mobile phone. For example, the correspondence includes the correspondence between the IP address of the router mentioned above and the MAC address of the router.

[0395] The mobile phone may search for the MAC address of the router in the ARP table entry in the mobile phone according to the IP address of the router. For example, the mobile phone may search for the MAC address of the router corresponding to the IP address of the router in the ARP table entry.

[0396] In one embodiment of the present application, the mobile phone can continuously search the MAC address of the router in the ARP table in the mobile phone in real time.

[0397] Alternatively, in another embodiment of the present application, the mobile phone may use time as a trigger condition and may periodically or regularly search for the MAC address of the router in the ARP table entry in the mobile phone.

[0398] This application does not limit the duration of the cycle, which can be determined based on actual conditions.

[0399] The present application does not limit the timing of the timing, which can be determined according to actual conditions.

[0400] Alternatively, in another embodiment of the present application, the mobile phone may use a specific event as a trigger condition. For example, when the mobile phone triggers a specific event, the MAC address of the router is searched in the ARP table entry in the mobile phone.

[0401] Exemplarily, specific events may include: the mobile phone cannot access the network via the router, the mobile phone does not receive data sent by the router for a period of time, the user enters a search operation in the mobile phone (the search operation is used to indicate to search for the MAC address of the router in the ARP table entry in the mobile phone), the mobile phone sends an ARP probe request to the router to request the MAC address of the router but does not receive the MAC address of the router returned by the router within a first preset period of time after sending the ARP probe request, etc.

[0402] Among them, this application does not limit the specific values ​​of the "period of time" and the "first preset time" mentioned above, and the specific values ​​can be determined according to actual conditions.

[0403] Among them, "the mobile phone has been connected to the router" is a state. Previously, when the mobile phone was connected to the router, it would obtain the IP address and MAC address of the router, and store the correspondence between the IP address and MAC address of the router in the ARP table entry.

[0404] The MAC address of the router may be deleted from the ARP table entry later because the MAC address of the router expires. Thus, when S601 is executed, the MAC address of the router cannot be found in the ARP table entry.

[0405] In addition, if the MAC address of the router has not been deleted from the ARP table entry (for example, the MAC address of the router has not expired), when S601 is executed, the MAC address of the router can be found in the ARP table entry.

[0406] When the MAC address of the router is not found in the ARP table entry, S602, the communication connection between the mobile phone and the router is disconnected.

[0407] Alternatively, in another embodiment, when the MAC address of the router is found in the ARP table entry, the process can be terminated, or the process can return to execute S601. If the process returns to execute S601, the triggering condition for returning to execute S601 can refer to the triggering condition described in S601, which will not be described in detail here.

[0408] S603, reconnect to the router.

[0409] When the mobile phone reconnects to the router, the process of S302 to S310 may be referred to, thereby reconnecting to the router.

[0410] It should be noted that when reconnecting to the router, during the scanning phase, you can only scan the channel where the router is located (the channel where the router is located has been recorded in the mobile phone), without scanning all channels. This can save time and save system resources of the mobile phone.

[0411] S604, when the mobile phone is reconnected to the router, the MAC address of the router is obtained.

[0412] When the mobile phone reconnects to the router, in a similar S303, the mobile phone can obtain the MAC address of the router.

[0413] S605: Store the MAC address of the router in the ARP table entry.

[0414] For example, when the mobile phone reconnects to the router, in a similar S310, the mobile phone can obtain the IP address of the router. Thus, in this step, the corresponding relationship between the IP address of the router and the MAC address of the router can be stored in the ARP table entry.

[0415] This will facilitate the use of the router's MAC address when the mobile phone subsequently accesses the Internet through the router.

[0416] If the mobile phone shows a possibility or sign that it cannot access the Internet through the router, disconnect the Wi-Fi connection between the mobile phone and the router and reconnect to the router. If the mobile phone does not show a sign or possibility that it cannot access the Internet through the router, you do not need to disconnect the Wi-Fi connection between the mobile phone and the router or reconnect to the router.

[0417] Among them, after the mobile phone disconnects the Wi-Fi connection between the mobile phone and the router, the mobile phone can obtain the MAC address of the router while the mobile phone reconnects to the router. In this way, after the mobile phone reconnects to the router, the mobile phone can send data to the router through the MAC address of the router, thereby enabling the mobile phone to access the network through the router, so that the mobile phone can resume Internet access.

[0418] It can be seen that through this application, on the one hand, the process of "disconnecting the Wi-Fi connection between the mobile phone and the router, and reconnecting to the router" can be omitted when it is not necessary, but the process of "disconnecting the Wi-Fi connection between the mobile phone and the router, and reconnecting to the router" can be executed when necessary, thereby saving the system resources and network resources of the mobile phone. The unnecessary situation can be understood as: the mobile phone does not show signs or possibilities of being unable to access the network via the router. The necessary situation can be understood as: the mobile phone shows signs or possibilities of being unable to access the network via the router.

[0419] On the other hand, it can avoid increasing the number of times the mobile phone accesses the router in a short period of time, and thus can avoid as much as possible the router refusing the mobile phone access in the future. In this way, under the circumstance that the mobile phone can objectively access the Internet through the router after reconnecting to the router, it can increase the possibility that the subsequent mobile phone can successfully access the router, thereby increasing the possibility that the subsequent mobile phone can access the Internet through the router, that is, it can increase the possibility that the mobile phone can resume Internet access.

[0420] In this application, the purpose of the mobile phone executing S601 is to determine whether there is a MAC address of the router in the ARP table entry in the mobile phone. If the MAC address of the router does not exist in the ARP table entry in the mobile phone, it often means that the MAC address of the router is not stored in the mobile phone. In this case, it is necessary to obtain the MAC address of the router by executing the process of S602 to S603, so that the mobile phone can exchange data with the router through the MAC address of the router, and then access the network through the router.

[0421] However, when the MAC address of the router exists in the ARP table entry in the mobile phone, it often means that the MAC address of the router is stored in the mobile phone. The mobile phone can access the network through the router based on the stored MAC address of the router. In this way, the mobile phone does not need to repeatedly obtain the MAC address of the router by executing the process of S602 to S603, otherwise it will waste the system resources and network resources of the mobile phone.

[0422] Secondly, according to statistics, after the mobile phone is connected to the router, in many cases, the MAC address of the router exists in the ARP table of the mobile phone, that is, in many cases, the MAC address of the router is stored in the mobile phone.

[0423] Therefore, in many cases, the result obtained after executing S601 is that the MAC address of the router exists in the ARP table entry in the mobile phone, that is, the result obtained is that the MAC address of the router is stored in the mobile phone.

[0424] However, in the present application, when the MAC address of the router does not exist in the ARP table entry in the mobile phone, S601 is executed to detect that the MAC address of the router does not exist in the ARP table entry in the mobile phone, and then the process of S602 to S603 is executed to obtain the MAC address of the router.

[0425] It can be seen that in many cases (the MAC address of the router exists in the ARP table entry in the mobile phone), it is meaningless for the mobile phone to execute S601, and it will waste the system resources of the mobile phone.

[0426] Therefore, in Fig.14 Based on the embodiment shown, see Fig.15 The present application provides another embodiment. Optionally, before the mobile phone executes S601, S701 may be executed first: detecting whether the mobile phone is unable to access the network via the router (when the mobile phone is connected to the router through communication and the router can exchange data with the outside, it can be explained that the mobile phone is able to access the network via the router, or, when the mobile phone is connected to the router through communication and the router cannot exchange data with the outside, it can be explained that the mobile phone is unable to access the network via the router).

[0427] The specific method of detecting whether the mobile phone cannot access the network via the router can be found in the following embodiments and will not be described in detail here.

[0428] If the mobile phone can access the network via the router, S601 may not be executed and the process may be terminated.

[0429] Alternatively, when the mobile phone cannot access the network via the router, S601 is executed again: searching the MAC address of the router in the ARP table entry in the mobile phone.

[0430] In the present application, if the mobile phone cannot access the network via the router, it may be caused by "the router's MAC address does not exist in the ARP table entry in the mobile phone", that is, it may be caused by "the router's MAC address is not stored in the mobile phone". Therefore, when the mobile phone cannot access the network via the router, the router's MAC address may not exist in the ARP table entry in the mobile phone. In this way, by executing S601, it may be detected that the router's MAC address does not exist in the ARP table entry in the mobile phone, thereby making the execution of S601 as meaningful as possible. In this way, when the mobile phone cannot access the network via the router, searching the router's MAC address in the ARP table entry in the mobile phone can avoid wasting the mobile phone's system resources as much as possible.

[0431] Secondly, in another embodiment of the present application, when the result after executing S601 is that the MAC address of the router does not exist in the ARP table entry in the mobile phone, S602 to S603 can be executed. Executing S602 to S603 can enable the mobile phone to obtain the MAC address of the router. However, according to statistics, the process of executing S602 to S603 consumes a lot of system resources, and if the mobile phone has executed S603 multiple times in succession before, the router may refuse the mobile phone to access after executing S603 this time, resulting in the mobile phone being unable to access the router.

[0432] Therefore, in Fig.14 Based on the embodiment shown, see Fig.16 , or, in Fig.15 Based on the embodiment shown, see Fig.17 The present application provides another embodiment. Optionally, after executing S601, if the MAC address of the router is not found in the ARP table entry, S602 may not be executed first, and S801 may be executed first: an ARP probe request is sent to the router, and the ARP probe request is used to obtain the MAC address of the router.

[0433] The mobile phone may broadcast an ARP detection request, and the ARP detection request may carry at least the IP address of the router to indicate the MAC address of the router corresponding to the IP address for obtaining.

[0434] In one possible case, after receiving the ARP probe request, the router can return a first acquisition response to the mobile phone when it determines that the IP address of the router is the same as the IP address in the ARP probe request. The first acquisition response carries the MAC address of the router. After the mobile phone receives the first acquisition response, it can extract the MAC address of the router from the first acquisition response, thereby obtaining the MAC address of the router.

[0435] Moreover, according to statistics, under normal circumstances, the time between when the mobile phone sends an ARP detection request to the router and when the mobile phone obtains the MAC address of the router returned by the router is very short. For example, it is often shorter than the first preset time, which can be determined according to actual statistical results, and this application does not limit this.

[0436] However, in another possible situation, the router does not return the MAC address of the router to the mobile phone within the first preset time period after the mobile phone sends the ARP probe request. For example, in a period of time before and after the mobile phone sends the ARP probe request to the router, there is a problem with the air interface resources of the router, for example, there is a problem with the port of the router for ARP detection, resulting in the router not receiving the ARP probe request, and thus failing to return the AMC address of the router to the mobile phone.

[0437] Thus, in this embodiment, after executing S801, S802 may be executed: detecting whether a MAC address returned by the router is received within a first preset time period after the mobile phone sends an ARP detection request to the router.

[0438] If the mobile phone receives the MAC address returned by the router within the first preset time after sending the ARP detection request to the router, the mobile phone will obtain the MAC address of the router, and the mobile phone no longer needs to obtain the MAC address of the router by executing the process of S602 to S603, and the process can be ended.

[0439] If the mobile phone does not receive the MAC address returned by the router within the first preset time after sending the ARP detection request, it often means that the mobile phone cannot obtain the MAC address of the router through the ARP detection request, at least in the short term. In this case, the mobile phone can execute S602: disconnect the communication connection between the mobile phone and the router.

[0440] According to statistics, the system resources and network resources of the mobile phone consumed in the process of obtaining the MAC address of the router through ARP detection request are less than the system resources and network resources of the mobile phone consumed in executing the process of S602 to S603. In this way, through this embodiment, the system resources and network resources of the mobile phone can be saved.

[0441] Secondly, it can also avoid increasing the number of times the mobile phone continuously executes S602-S603, so as to reduce the possibility of the router refusing the mobile phone to access after the mobile phone executes S602-S603 again, thereby reducing the possibility of the mobile phone being unable to access the router.

[0442] Or, in Fig.15 Based on the embodiment shown, see Fig.18The present application provides another embodiment. Optionally, after executing S701, if the mobile phone cannot access the network via the router, the mobile phone may not execute S601 first, but may execute S801 first: sending an ARP probe request to the router, where the ARP probe request is used to obtain the MAC address of the router.

[0443] Thus, in this embodiment, after executing S801, S802 may be executed: detecting whether a MAC address returned by the router is received within a first preset time period after the mobile phone sends an ARP detection request to the router.

[0444] If the MAC address returned by the router is not received within the first preset time after sending the ARP probe request, it often means that the mobile phone cannot obtain the MAC address of the router through the ARP probe request, at least in the short term. In this case, the mobile phone can execute S601 again: search for the MAC address of the router in the ARP table entry in the mobile phone.

[0445] Alternatively, if the mobile phone receives the MAC address returned by the router within the first preset time after sending the ARP detection request, the mobile phone will obtain the MAC address of the router, and the mobile phone can no longer obtain the MAC address of the router by executing the process of S602-S603. Since the mobile phone no longer needs to obtain the MAC address of the router by executing the process of S602-S603, the mobile phone does not need to search for the MAC address of the router in the ARP table in the mobile phone, that is, the mobile phone does not need to execute S601, for example, the process can be terminated.

[0446] According to statistics, the system resources and network resources of the mobile phone consumed in the process of obtaining the MAC address of the router through ARP detection request are less than the system resources and network resources of the mobile phone consumed in executing the process of S602 to S603. In this way, through this embodiment, the system resources and network resources of the mobile phone can be saved.

[0447] Secondly, it can also avoid increasing the number of times the mobile phone continuously executes S602-S603, so as to reduce the possibility of the router refusing the mobile phone to access after the mobile phone executes S602-S603 again, thereby reducing the possibility of the mobile phone being unable to access the router.

[0448] In one example, after a mobile phone is connected to a router, the mobile phone will automatically send an ARP probe request to the router. The ARP probe request is used to obtain the MAC address of the router, so that the mobile phone can interact with the router through the obtained MAC address of the router. Optionally, the mobile phone can also use the obtained MAC address of the router to update the ARP table entry in the mobile phone.

[0449] As mentioned above, if the mobile phone receives the MAC address returned by the router within the first preset time period after sending the ARP detection request, the mobile phone will obtain the MAC address of the router, and the mobile phone can access the network through the router based on the MAC address of the router. In this way, the mobile phone does not need to obtain the MAC address of the router by executing S602 to S603, and further, the mobile phone does not need to determine whether the MAC address of the router exists in the ARP table entry in the mobile phone by executing S601 (because the MAC address of the router must be stored in the mobile phone).

[0450] Alternatively, if the mobile phone does not receive the MAC address returned by the router within the first preset time after sending the ARP detection request, the mobile phone will not obtain the MAC address of the router. At this time, the mobile phone may store the MAC address of the router or may not store the MAC address of the mobile phone. At this time, the mobile phone can execute S601 again: search for the MAC address of the router in the ARP table entry in the mobile phone to determine whether the MAC address of the router exists in the ARP table entry in the mobile phone.

[0451] So, in Fig.14 Based on the embodiment shown, see Fig.19 In another embodiment of the present application, the method further includes:

[0452] S801: Send an ARP probe request to the router, where the ARP probe request is used to obtain the MAC address of the router.

[0453] S802: Detect whether a MAC address returned by the router is received within a first preset time period after the mobile phone sends the ARP detection request.

[0454] In the case where the mobile phone receives the MAC address returned by the router within the first preset time period after sending the ARP detection request, the mobile phone may no longer execute S601, for example, the mobile phone may end the process.

[0455] Alternatively, when the mobile phone does not receive the MAC address returned by the router within the first preset time period after sending the ARP detection request, the mobile phone may execute S601 again: searching the ARP table entry in the mobile phone for the MAC address of the router.

[0456] Among them, when the MAC address of the router exists in the ARP table entry in the mobile phone, it means that the MAC address of the router is stored in the mobile phone. It can be seen that the mobile phone can access the network through routing based on the MAC address of the router.

[0457] Alternatively, when the MAC address of the router does not exist in the ARP table entry in the mobile phone, it means that the MAC address of the router is not stored in the mobile phone. In this way, the mobile phone can execute the process of S602 to S603 again to enable the mobile phone to obtain the MAC address of the router, and then enable the mobile phone to access the network through routing based on the MAC address of the router.

[0458] According to statistics, the system resources and network resources of the mobile phone consumed in the process of obtaining the MAC address of the router through ARP detection request are less than the system resources and network resources of the mobile phone consumed in executing the process of S602 to S603. In this way, through this embodiment, the system resources and network resources of the mobile phone can be saved.

[0459] Secondly, it can also avoid increasing the number of times the mobile phone continuously executes S602-S603, so as to reduce the possibility of the router refusing the mobile phone to access after the mobile phone executes S602-S603 again, thereby reducing the possibility of the mobile phone being unable to access the router.

[0460] As mentioned above, if the mobile phone does not receive the MAC address returned by the router within the first preset time after sending the ARP detection request, it can be explained that: the request for the router's MAC address was unsuccessful, but at this time the mobile phone may not be able to access the network through the router, or the mobile phone may be able to access the network through the router.

[0461] If the mobile phone can access the Internet through the router, it means that although the request for the router's MAC address was unsuccessful this time, the router's MAC address is stored in the mobile phone.

[0462] Secondly, if the mobile phone cannot access the Internet through the router, it may be caused by "the router's MAC address does not exist in the ARP table of the mobile phone", or it may not be caused by "the router's MAC address does not exist in the ARP table of the mobile phone". For example, at this time, the router's MAC address exists in the ARP table of the mobile phone, and the mobile phone cannot access the Internet through the router due to other reasons.

[0463] If the mobile phone's inability to access the Internet through the router is not caused by the fact that "the router's MAC address does not exist in the ARP table of the mobile phone", the router's MAC address is likely to exist in the ARP table of the mobile phone.

[0464] When the MAC address of the router exists in the ARP table entry in the mobile phone, it means that the MAC address of the router is stored in the mobile phone, and the mobile phone can access the network through the router based on the stored MAC address of the router.

[0465] Therefore, in Fig.19Based on the embodiment shown, see Fig. 20 The present application provides an embodiment, in which, when the mobile phone does not receive a MAC address returned by the router within a first preset time period after sending an ARP detection request, S701: detect whether the mobile phone can access the network via the router.

[0466] If the mobile phone can access the network via the router, it usually means that the MAC address of the router is stored in the mobile phone, and then the mobile phone does not need to execute S601 and can end the process.

[0467] Alternatively, if the mobile phone cannot access the network via the router, it means that the MAC address of the router may not exist in the ARP table entry in the mobile phone. In this case, the mobile phone can execute S601 again: search for the MAC address of the router in the ARP table entry in the mobile phone.

[0468] In the present application, if the mobile phone cannot access the network via the router, it may be caused by "the router's MAC address does not exist in the ARP table entry in the mobile phone", that is, it may be caused by "the router's MAC address is not stored in the mobile phone". Therefore, when the mobile phone cannot access the network via the router, the router's MAC address may not exist in the ARP table entry in the mobile phone. In this way, by executing "searching for the router's MAC address in the ARP table entry in the mobile phone", it may be detected that the router's MAC address does not exist in the ARP table entry in the mobile phone, thereby making the execution of "searching for the router's MAC address in the ARP table entry in the mobile phone" as meaningful as possible. In this way, when the mobile phone cannot access the network via the router, searching for the router's MAC address in the ARP table entry in the mobile phone can avoid wasting the mobile phone's system resources as much as possible.

[0469] Regarding the aforementioned "after the mobile phone is connected to the router, the mobile phone will automatically send an ARP detection request to the router", in one embodiment, the mobile phone can obtain the sending time when the mobile phone last sent an ARP detection request to the router. If the time between the current time of the mobile phone and the sending time is greater than or equal to the third preset time, the mobile phone will send an ARP acquisition request to the router.

[0470] The third preset duration can be determined according to actual conditions, for example, including 10s (seconds), 40s, 50s, 40s, 50s, 60s, 90s or 140s, etc. It can be determined according to actual conditions, and this application does not limit this.

[0471] The shorter the third preset time is, the higher the frequency at which the mobile phone sends ARP detection requests to the router is, and the longer the third preset time is, the lower the frequency at which the mobile phone sends ARP detection requests to the router is.

[0472] In one example, the mobile phone may automatically send ARP detection requests to the router periodically at a high frequency.

[0473] However, if the mobile phone continuously sends ARP detection requests to the router at a high frequency, it will waste the system resources and network resources of the mobile phone.

[0474] The purpose of the mobile phone sending an ARP probe request to the router is to obtain the MAC address of the router.

[0475] The purpose of a mobile phone using the router's MAC address is to exchange data with the router through the router's MAC address, and then access the network through the router.

[0476] However, mobile phones do not need to access the Internet through a router all the time.

[0477] When the mobile phone temporarily does not need to access the Internet through a router, the mobile phone also temporarily does not need to use the MAC address of the router.

[0478] When the mobile phone does not need to use the MAC address of the router temporarily, even if the mobile phone does not currently store the MAC address of the router, the mobile phone does not need to obtain the MAC address of the router temporarily.

[0479] In addition, when a mobile phone needs to use the MAC address of a router, the mobile phone can obtain the MAC address of the router by sending an ARP probe request to the router, thereby using the MAC address of the router. For example, the mobile phone can exchange data with the router through the MAC address of the router, and then access the network through the router.

[0480] However, when the mobile phone does not need to use the MAC address of the router temporarily, the mobile phone does not need to send an ARP detection request to the router to obtain the MAC address of the router, otherwise it will waste the system resources and network resources of the mobile phone.

[0481] Therefore, the present application provides another embodiment. Optionally, it may be possible to re-probe and send an ARP probe request to the router when necessary.

[0482] For example, according to statistics, in a scenario where a mobile phone accesses the Internet via a router, usually, the user is operating the mobile phone, or the screen of the mobile phone is in a bright state.

[0483] In this way, when the user operates the mobile phone and / or when the screen of the mobile phone is turned on (from an off state to a bright screen state), the mobile phone may need to access the network through a router. In this case, the mobile phone may need to use the MAC address of the router. In this case, the mobile phone can send an ARP probe request to the router to obtain the MAC address of the router.

[0484] Through this embodiment, when the mobile phone may need to use the MAC address of the router, it will send an ARP probe request to the router to obtain the MAC address of the router. When the mobile phone does not need to use the MAC address of the router temporarily, it does not need to send an ARP probe request to the router, thereby saving system resources and network resources of the mobile phone.

[0485] Among them, sometimes, when the screen of the mobile phone is in an off state, if the user needs to control the mobile phone, the mobile phone will light up the screen of the mobile phone. After lighting up the screen of the mobile phone, usually, the user tends to input control operations to the mobile phone immediately, and the mobile phone will respond to the user's control operations. In addition, according to statistics, after lighting up the screen of the mobile phone, the user tends to immediately input multiple control operations to the mobile phone in succession, and the mobile phone needs to continuously respond to the multiple control operations input by the user. The process of the mobile phone continuously responding to the multiple control operations input by the user will consume a lot of system resources of the mobile phone. In addition, the process of lighting up the screen will also consume a lot of system resources of the mobile phone. Secondly, after the mobile phone lights up the screen, the mobile phone will start many functions that were in sleep state when the screen was off. Starting these functions will also consume a lot of system resources of the mobile phone.

[0486] It can be seen that after the screen of the mobile phone is turned on, the amount of system resources consumed by the mobile phone is very large. In this case, sending an ARP detection request to the router will increase the load on the mobile phone, which may cause the mobile phone to be unable to respond normally to the user's input control operations, or cause the mobile phone to be unable to light up the screen normally, or cause the mobile phone to be unable to start the above-mentioned functions normally.

[0487] Therefore, the present application provides another embodiment, in which when the screen of the mobile phone is turned on, the lighting time of the screen of the mobile phone is obtained, and when the duration between the current time of the mobile phone and the lighting time is greater than or equal to the second preset time, the mobile phone sends an ARP detection request to the router.

[0488] The second preset duration may include 1s (second), 1.5s, 2s, 2.5s or 3s, etc., which may be determined according to actual conditions and is not limited in this application.

[0489] In this way, after the screen of the mobile phone is turned on, the mobile phone can respond normally to the control operations input by the user as much as possible, or the screen can be turned on normally as much as possible, or the mobile phone can start the above-mentioned functions normally as much as possible.

[0490] In the present application, before the communication connection between the mobile phone and the router is disconnected, the mobile phone has been connected to the router, and the mobile phone interface may or may not display a connected prompt message, and the connected prompt message is used to prompt that the mobile phone has been connected to the router.

[0491] For example, among various interfaces that can be displayed on a mobile phone, some interfaces have specific areas, and the specific areas are used to display a connected prompt message when the mobile phone has been connected to a router, and the connected prompt message is used to prompt that the mobile phone has been connected to the router.

[0492] That is, when the mobile phone displays these interfaces, if the mobile phone is connected to the router, a connection prompt message will be displayed in the specific area of ​​these interfaces to prompt that the mobile phone is connected to the router, or, if the mobile phone is not connected to the router, the connection prompt message will not be displayed in the specific area of ​​these interfaces.

[0493] However, if the MAC address of the router is not found in the ARP table, the communication connection between the mobile phone and the router will be disconnected in the aforementioned S602, and before the mobile phone reconnects to the router, even if the mobile phone jumps to the above-mentioned interfaces, since the mobile phone has not yet connected to the router, the mobile phone will not display the connected prompt information in the specific areas of these interfaces.

[0494] In this way, the user cannot see the connected prompt information in the specific areas of these interfaces. In this case, the user will subjectively believe that the mobile phone is not connected to the router, that is, the mobile phone is disconnected from the network.

[0495] For example, see Fig.12 In the example shown in (2), the mobile phone has successfully connected to the Wi-Fi network corresponding to SSID “Honor1” 408 .

[0496] So, in Fig.12 In (2), an access prompt message 410 of “Connected” is displayed below the SSID “Honor1” 408 to prompt that the mobile phone has successfully connected to the Wi-Fi network corresponding to the SSID “Honor1” 408 .

[0497] Secondly, in Fig.12In (2), a WLAN icon 411 is displayed on the left side of the battery icon of the mobile phone to indicate that the Wi-Fi function of the mobile phone is turned on and the mobile phone has successfully connected to the Wi-Fi network. The WLAN icon 411 can be regarded as a prompt message of connection.

[0498] After the communication connection between the mobile phone and the router is disconnected and before the mobile phone reconnects to the router, if the mobile phone's interface jumps to the WLAN setting interface 405, since the mobile phone has not yet connected to the router, the mobile phone does not display the "connected" prompt information below the SSID "Honor1" 408. Secondly, the WLAN icon is not displayed on the left side of the mobile phone's battery icon.

[0499] That is, after disconnecting the communication between the mobile phone and the router, the mobile phone displays Figure 8 When the mobile phone is connecting to the router, the mobile phone displays Fig.12 (1) The interface shown. After the mobile phone is connected to the router, the mobile phone displays Fig.12 (2) The interface shown.

[0500] When users see the mobile phone display Figure 8 After seeing the interface shown, the user will subjectively believe that the mobile phone is not connected to the router, that is, the mobile phone is disconnected from the Internet.

[0501] And, when users see the mobile phone display Fig.12 After seeing the interface shown in (1), the user will subjectively believe that the mobile phone is not connected to the router and is connecting to the router, that is, the mobile phone is disconnected from the network and is connecting to the network.

[0502] However, if the user does not perform any disconnection operation for disconnecting the communication connection between the mobile phone and the router, the user will think that the mobile phone should be connected to the router.

[0503] In this way, the user sees the mobile phone display Figure 8 The interface shown and Fig.12 After seeing the interface shown in (1), users often become confused and may think that the phone is faulty and go to check the phone, which causes a lot of trouble to the user and leads to a poor user experience.

[0504] Therefore, the present application provides another embodiment. For example, after disconnecting the communication connection between the mobile phone and the router and before reconnecting to the router, it is detected whether the interface of the mobile phone jumps to the first interface. The first interface includes a first area. The first area is used to display a connected prompt information when the mobile phone is connected to the router. The connected prompt information is used to prompt that the mobile phone has been connected to the router.

[0505] Also, when the interface of the mobile phone jumps to the first interface, a prompt message indicating that the connection has been made is displayed in the first area of ​​the first interface.

[0506] The second region may include Fig.12 The area below the SSID "Honor1" 408 in (2) displays the "connected" prompt information, and may also include the area on the left side of the icon of the battery level of the mobile phone.

[0507] In one example, when the mobile phone renders the first interface, the connected prompt information is simultaneously rendered in the first area of ​​the first interface, so that the first interface and the connected prompt information in the first area can be displayed simultaneously.

[0508] In this way, the user will not perceive from the interface that the communication connection between the mobile phone and the router has been disconnected, that is, the user will not perceive from the interface that the mobile phone has been disconnected from the Internet, which will not cause confusion to the user. The user will not think that there is a problem with the mobile phone and check the mobile phone, which will not cause a lot of trouble to the user and will avoid reducing the user experience.

[0509] Secondly, the process of executing S602 to S603 is very short. After the communication connection between the mobile phone and the router is disconnected, the mobile phone can quickly reconnect to the router so that the mobile phone can access the network through the router. Therefore, in fact, the impact on the user's use of the mobile phone to access the network is very small.

[0510] In one example, after the communication connection between the mobile phone and the router is disconnected and before the mobile phone reconnects to the router, if the mobile phone interface jumps to the WLAN setting interface, even if the mobile phone has not yet connected to the router, the mobile phone will display the "connected" prompt message under the SSID "Honor1" in the WLAN setting interface. Secondly, the WLAN icon is displayed on the left side of the mobile phone's battery icon, that is, the mobile phone displays Fig.12 (2) The interface shown in the figure, and when the mobile phone is connecting to the router, the mobile phone also displays Fig.12 (2) The interface shown. After the mobile phone is connected to the router, the mobile phone also displays Fig.12 (2) The interface shown.

[0511] It can be seen that after the communication connection between the mobile phone and the router is disconnected and before the mobile phone reconnects to the router, the mobile phone has been displaying Fig.12 (2) The user sees the interface displayed on the phone. Fig.12 After the interface shown in (2) is displayed, the user will think that the mobile phone is always connected to the router, that is, the mobile phone is not disconnected from the network. In this way, it can avoid causing confusion to the user and avoid reducing the user experience.

[0512] In a possible scenario of the present application, before the communication connection between the mobile phone and the router is disconnected, the mobile phone has been connected to the router, and a connected prompt message is displayed on the interface of the mobile phone, and the connected prompt message is used to prompt that the mobile phone has been connected to the router.

[0513] For example, among various interfaces that can be displayed on a mobile phone, some interfaces have specific areas, and the specific areas are used to display a connected prompt message when the mobile phone has been connected to a router, and the connected prompt message is used to prompt that the mobile phone has been connected to the router.

[0514] That is, when the mobile phone displays these interfaces, if the mobile phone is connected to the router, a connection prompt message will be displayed in the specific area of ​​these interfaces to prompt that the mobile phone is connected to the router, or, if the mobile phone is not connected to the router, the connection prompt message will not be displayed in the specific area of ​​these interfaces.

[0515] If the MAC address of the router is not found in the ARP table, in the aforementioned S602, the communication connection between the mobile phone and the router will be disconnected. Before the communication connection between the mobile phone and the router is disconnected, the interface displayed by the mobile phone is the second interface, which includes a second area, and the second area displays a connected prompt information. The second area is used to display the connected prompt information when the mobile phone is connected to the router, and the connected prompt information is used to prompt that the mobile phone has been connected to the router.

[0516] However, after the communication connection between the mobile phone and the router is disconnected and before the mobile phone is reconnected to the router, since the mobile phone has not yet been connected to the router, the mobile phone will not continue to display the connected prompt information in the second area of ​​the second interface.

[0517] In this way, the user cannot see the connected prompt information in the second area of ​​the second interface. In this case, the user will subjectively believe that the mobile phone is not connected to the router, that is, the mobile phone is disconnected from the network.

[0518] For example, see Fig.12 In the example shown in (2), the mobile phone has successfully connected to the Wi-Fi network corresponding to SSID “Honor1” 408 .

[0519] So, in Fig.12 In (2), an access prompt message 410 of “Connected” is displayed below the SSID “Honor1” 408 to prompt that the mobile phone has successfully connected to the Wi-Fi network corresponding to the SSID “Honor1” 408 .

[0520] Secondly, in Fig.12In (2), a WLAN icon 411 is displayed on the left side of the battery icon of the mobile phone to indicate that the Wi-Fi function of the mobile phone is turned on and the mobile phone has successfully connected to the Wi-Fi network. The WLAN icon 411 can be regarded as a prompt message of connection.

[0521] After the communication connection between the mobile phone and the router is disconnected and before the mobile phone reconnects to the router, if the interface of the mobile phone still stays on the WLAN setting interface 405, since the mobile phone has not yet connected to the router, the mobile phone does not display the "connected" access prompt information under the SSID "Honor1" 408, and secondly, the WLAN icon 411 is not displayed on the left side of the mobile phone's battery icon.

[0522] That is, after the mobile phone is disconnected from the router and before the mobile phone is reconnected to the router, the mobile phone displays Figure 8 When the mobile phone is connecting to the router, the mobile phone displays Fig.12 (1) The interface shown. After the mobile phone is connected to the router, the mobile phone displays Fig.12 (2) The interface shown.

[0523] When users see the mobile phone display Figure 8 After seeing the interface shown, the user will subjectively believe that the mobile phone is not connected to the router, that is, the mobile phone is disconnected from the Internet.

[0524] And, when users see the mobile phone display Fig.12 After seeing the interface shown in (1), the user will subjectively believe that the mobile phone is not connected to the router and is connecting to the router, that is, the mobile phone is disconnected from the network and is connecting to the router.

[0525] However, if the user does not perform any disconnection operation for disconnecting the communication connection between the mobile phone and the router, the user will think that the mobile phone should be connected to the router.

[0526] Therefore, the user sees the phone display Figure 8 The interface shown and Fig.12 After seeing the interface shown in (1), users often become confused and may think that the phone is faulty and go to check the phone, which causes a lot of trouble to the user and leads to a poor user experience.

[0527] Therefore, the present application provides another embodiment. For example, after the communication connection between the mobile phone and the router is disconnected and before the router is reconnected, the access prompt information is continuously displayed in the second area on the second interface of the mobile phone.

[0528] The second region may include Fig.12(2) The area where the "connected" access prompt information is displayed below the SSID "Honor1" 408, and the area on the left side of the icon of the battery level of the mobile phone may also be included.

[0529] In this way, the user will not perceive from the interface that the communication connection between the mobile phone and the router has been disconnected, that is, the user will not perceive from the interface that the mobile phone has been disconnected from the Internet, which will not cause confusion to the user. The user will not think that there is a problem with the mobile phone and check the mobile phone, which will not cause a lot of trouble to the user and will avoid reducing the user experience.

[0530] Secondly, the process of executing S602 to S603 is very short. After the communication connection between the mobile phone and the router is disconnected, the mobile phone can quickly reconnect to the router so that the mobile phone can access the network. Therefore, in fact, the impact on the user's use of the mobile phone to access the network is very small.

[0531] In one example, before the communication connection between the mobile phone and the router is disconnected, if the mobile phone interface displays the WLAN setting interface, then after the communication connection between the mobile phone and the router is disconnected and before the mobile phone reconnects to the router, if the mobile phone interface continues to display the WLAN setting interface, even if the mobile phone has not yet connected to the router, the mobile phone will continue to display the "connected" prompt message under the SSID "Honor1" in the WLAN setting interface. Secondly, the WLAN icon is continuously displayed on the left side of the mobile phone's battery icon, that is, the mobile phone displays Fig.12 (2) The interface shown in the figure, and when the mobile phone is connecting to the router, the mobile phone also displays Fig.12 (2) The interface shown. After the mobile phone is connected to the router, the mobile phone also displays Fig.12 (2) The interface shown.

[0532] It can be seen that after the communication connection between the mobile phone and the router is disconnected and before the mobile phone reconnects to the router, the mobile phone continues to display Fig.12 (2) The user sees the interface displayed on the phone. Fig.12 After the interface shown in (2) is displayed, the user will think that the mobile phone is always connected to the router, that is, the mobile phone is not disconnected from the network. In this way, it can avoid causing confusion to the user and avoid reducing the user experience.

[0533] Among them, for "continuously displaying the connected prompt information in the second area on the second interface of the mobile phone", in a possible embodiment, before disconnecting the communication connection between the mobile phone and the router, the mirror prompt information of the connected prompt information can be obtained, and the mirror prompt information is displayed in the second area on the second interface of the mobile phone.

[0534] The mirrored prompt information is identical to the connected prompt information in appearance / shape, and the mirrored prompt information may be superimposed on the outer layer of the connected prompt information.

[0535] For example, before disconnecting the communication connection between the mobile phone and the router, the second area on the second interface of the mobile phone also displays the connected prompt information. In this way, before disconnecting the communication connection between the mobile phone and the router, the mirror prompt information of the connected prompt information can be obtained. In this way, before disconnecting the communication connection between the mobile phone and the router or when disconnecting the communication connection between the mobile phone and the router, the mirror prompt information can be superimposed on the connected prompt information displayed in the second area on the second interface of the mobile phone, so that for a period of time before and after the communication connection between the mobile phone and the router is disconnected, the second area always displays the connected prompt information or the mirror prompt information, thereby achieving the effect that before disconnecting the communication connection between the mobile phone and the router, after disconnecting the communication connection between the mobile phone and the router and before reconnecting to the router, and after reconnecting to the router, the second area always displays the connected prompt information or the mirror prompt information.

[0536] Alternatively, with respect to "continuously displaying the connected prompt information in the second area on the second interface of the mobile phone", in another possible embodiment, the communication connection between the mobile phone and the router includes a Wi-Fi connection, and the mobile phone has a System UI (System User Interface) and a Wi-Fi Framework. The System UI module is used to manage the content displayed on the mobile phone's interface. The Wi-Fi Framework is at least used to detect the status of the communication connection between the mobile phone and the router. Of course, it can be understood that the Wi-Fi Framework may also have other functions, which will not be described in detail in this application.

[0537] For example, if the Wi-Fi Framework detects that a mobile phone is connected to a router, the Wi-Fi Framework will send an access notification message to the System UI. The access notification message is used to notify the mobile phone that it has been connected to the router. After receiving the access notification message, the System UI can know that the mobile phone has been connected to the router. In this way, if the interface currently displayed by the mobile phone has a specific area for displaying an access prompt message, the access prompt message can be displayed in the specific area of ​​the currently displayed interface. The access prompt message is used to prompt the mobile phone that it has been connected to the router.

[0538] Later, for example, if the Wi-Fi Framework detects that the mobile phone is no longer connected to the router (for example, the Wi-Fi connection between the mobile phone and the router is disconnected), the Wi-Fi Framework will send a disconnect notification message to the System UI. The disconnect notification message is used to notify the mobile phone that it is not connected to the router. After receiving the disconnect notification message, the System UI can know that the mobile phone is not connected to the router. In this way, if the interface currently displayed by the mobile phone has a specific area for displaying the connected prompt information and the connected prompt information is displayed in the specific area on the currently displayed interface, the connected prompt information can be cancelled in the specific area on the currently displayed interface to no longer prompt the connected mobile phone that it has been connected to the router.

[0539] Thus, in the present application, after the communication connection between the mobile phone and the router is disconnected, the Wi-Fi Framework will detect that the mobile phone is no longer connected to the router (for example, the Wi-Fi connection between the mobile phone and the router is disconnected), and the Wi-Fi Framework will send a disconnect notification message to the System UI. The disconnect notification message is used to notify the mobile phone that it is not connected to the router. After receiving the disconnect notification message, the System UI can know that the mobile phone is not connected to the router. In this way, the System UI will cancel the display of the connected prompt information in the second area on the second interface to no longer prompt the connected mobile phone that it has been connected to the router.

[0540] However, the purpose of this embodiment is to continuously display the access prompt information in the second area on the second interface of the mobile phone.

[0541] Therefore, in this embodiment, after the communication connection between the mobile phone and the router is disconnected, the disconnection notification message sent by the Wi-Fi Framework in the mobile phone to the System UI can be intercepted, and the disconnection notification message is used to notify the mobile phone that it is not connected to the router.

[0542] In this way, System UI will not receive the access notification message, and will not think that the mobile phone is not connected to the router. In this way, System UI will not cancel the display of the access prompt information in the second area on the second interface, so that the access prompt information continues to be displayed in the second area on the second interface of the mobile phone.

[0543] In addition, with respect to "detecting whether the mobile phone cannot access the network via the router", in one embodiment of the present application, the mobile phone may send a data detection request to a DNS (Domain Name System) server. Figure 5In S308 shown, the DHCP Offer message sent by the router to the mobile phone carries DHCP information, and the DHCP information contains DNS server information, such as the IP address of the DNS server and the MAC address of the DNS server, etc. In this way, a data detection request can be sent to the DNS server according to the IP address of the DNS server and the MAC address of the DNS server.

[0544] The mobile phone sends a data detection request to the DNS server via the router. For example, the mobile phone sends a data detection request to the router, the router receives the data detection request, and then sends the data detection request to the DNS server. After the DNS server receives the data detection request, it returns a data detection response to the mobile phone according to the data detection request. For example, the DNS server can send a data detection response to the router, the router receives the data detection response, and then sends a data detection response to the mobile phone. After the mobile phone receives the data detection response, the mobile phone can determine that the link between the mobile phone-router-DNS server is connected, that is, the mobile phone and the router can interact with data normally, and the router can also interact with the outside world normally. In this way, it can be determined that the mobile phone can access the network through the router.

[0545] However, if the data detection request sent by the mobile phone cannot reach the router, for example, because the mobile phone does not have the MAC address of the router, although the mobile phone executes the action of sending the data detection request, the data detection request cannot reach the router, and then the data detection request cannot reach the DNS server, and then the DNS server will not return a data detection response to the mobile phone, and the mobile phone will not receive the data detection response. In this way, it can be determined that the mobile phone cannot access the network through the router.

[0546] Thus, if the mobile phone does not receive a data detection response returned by the DNS server according to the data detection request within the fourth preset time period after the mobile phone sends the data detection request, it can be determined that the mobile phone cannot access the network via the router. Alternatively, if the mobile phone receives a data detection response returned by the DNS server according to the data detection request within the fourth preset time period after the mobile phone sends the data detection request, it can be determined that the mobile phone can access the network via the router.

[0547] The fourth preset duration can be determined based on actual conditions, and this application does not impose any limitation on this.

[0548] Alternatively, in another embodiment of the present application, the mobile phone may send a data access request to a preset data server.

[0549] The preset data server may include an HTTP (Hypertext Transfer Protocol) server or an HTTPS (Hypertext Transfer Protocol Secure) server, etc.

[0550] The mobile phone pre-stores the IP address of the preset data server and the MAC address of the preset data server. In this way, the mobile phone can send a data access request to the preset data server according to the IP address of the preset data server and the MAC address of the preset data server.

[0551] The mobile phone sends a data access request to the preset data server by sending the data access request to the preset data server via the router. For example, the mobile phone sends a data access request to the router, the router receives the data access request, and then sends the data access request to the preset data server. After the preset data server receives the data access request, it will return a data access response to the mobile phone according to the data access request. For example, the preset data server can send a data access response to the router, the router receives the data access response, and then sends the data access response to the mobile phone. After the mobile phone receives the data access response, the mobile phone can determine that the link between the mobile phone-router-preset data server is connected, that is, the mobile phone and the router can interact with data normally, and the router can also interact with the outside world normally. In this way, it can be determined that the mobile phone can access the network via the router.

[0552] However, if the data access request sent by the mobile phone cannot reach the router, for example, because the mobile phone does not have the MAC address of the router, although the mobile phone executes the action of sending the data access request, the data access request cannot reach the router, and then the data access request cannot reach the preset data server, and then the preset data server will not return a data access response to the mobile phone, and the mobile phone will not receive the data access response. In this way, it can be determined that the mobile phone cannot access the network through the router.

[0553] Thus, if the mobile phone does not receive a data access response returned by the preset data server according to the data access request within the fifth preset time period after the mobile phone sends the data access request, it can be determined that the mobile phone cannot access the network via the router. Alternatively, if the mobile phone receives a data access response returned by the preset data server according to the data access request within the fifth preset time period after the mobile phone sends the data access request, it can be determined that the mobile phone can access the network via the router.

[0554] The fifth preset duration can be determined based on actual conditions, and this application does not impose any limitation on this.

[0555] Alternatively, in another embodiment of the present application, it can be determined whether data is continuously sent to the router but data returned by the router is continuously not received within the sixth preset time period. In the case where data is continuously sent to the router but data sent by the router is continuously not received within the sixth preset time period, it can be determined that the mobile phone cannot access the network via the router. Alternatively, in the case where data is continuously sent to the router and data sent by the router is received within the sixth preset time period, it can be determined that the mobile phone can access the network via the router.

[0556] The sixth preset duration can be determined based on actual conditions, and this application does not impose any limitation on this.

[0557] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the interaction between various network elements. It can be understood that in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in this document, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of this application.

[0558] The embodiment of the present application can divide the functional modules of the electronic device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0559] In one example, Fig.21 A schematic block diagram of a device 900 according to an embodiment of the present application is shown. The device 900 may include: a processor 901 and a transceiver / transceiver pin 902 , and optionally, may further include a memory 903 .

[0560] The components of the device 900 are coupled together via a bus 904, wherein the bus 904 may include a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, various buses are referred to as bus 904 in the figure.

[0561] Optionally, the memory 903 may be used for the instructions in the aforementioned method embodiment. The processor 901 may be used to execute the instructions in the memory 903, and control the receiving pin to receive a signal, and control the sending pin to send a signal.

[0562] The apparatus 900 may be the electronic device or a chip of the electronic device in the above method embodiment.

[0563] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0564] This embodiment further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the communication method in the above-mentioned embodiment.

[0565] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the communication method in the above-mentioned embodiment.

[0566] In addition, an embodiment of the present application further provides a device, which may be a chip, a component or a module, and the device may include a connected processor and a memory. The memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory, so that the chip executes the above-mentioned related method steps to implement the communication method in the above-mentioned embodiment.

[0567] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.

[0568] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0569] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0570] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0571] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0572] Any content of each embodiment of the present application, as well as any content of the same embodiment, can be freely combined. Any combination of the above content is within the scope of the present application.

[0573] If the integrated unit is implemented 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 solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and may include several instructions to enable a device (which may be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium may include: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

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

[0575] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in a hardware manner, or can be implemented by a processor executing a software instruction. The software instruction can be composed of corresponding software modules, and the software module can be stored in a random access memory (Random Access Memory, RAM), a flash memory, a read-only memory (Read Only Memory, ROM), an erasable programmable read-only memory (Erasable Programmable ROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disk (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a network device. Of course, the processor and the storage medium can also be present in a network device as discrete components.

[0576] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media may include computer storage media and communication media, wherein the communication media may include any medium that is convenient for transmitting a computer program from one place to another. The storage medium may be any available medium that a general or special-purpose computer can access.

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

Claims

1. A communication method, characterized in that: Applied to an electronic device, the electronic device has been connected to an access point, and the method includes: Searching for a media access control MAC address of the access point in an address resolution protocol ARP table entry in the electronic device; If the MAC address of the access point is not found in the ARP table entry, disconnect the communication connection between the electronic device and the access point; re-accessing the access point; In the process of re-accessing the access point, obtaining the MAC address of the access point; The MAC address is stored in the ARP table entry.

2. The method according to claim 1, characterized in that The method further comprises: detecting whether the electronic device is unable to access the network via the access point; In the case that the electronic device cannot access the network via the access point, the MAC address of the access point is searched in the ARP table entry in the electronic device.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: If the MAC address of the access point is not found in the ARP table entry, sending an ARP probe request to the access point, wherein the ARP probe request is used to obtain the MAC address of the access point; If the MAC address returned by the access point is not received within a first preset time period after the ARP detection request is sent, the communication connection between the electronic device and the access point is disconnected.

4. The method according to claim 2, characterized in that: The method further comprises: In the case where the electronic device cannot access the network via the access point, sending an ARP probe request to the access point, wherein the ARP probe request is used to obtain a MAC address of the access point; When the MAC address returned by the access point is not received within a first preset time period after the ARP detection request is sent, the MAC address of the access point is searched in the ARP table entry in the electronic device.

5. The method according to claim 1, characterized in that The method further comprises: Sending an ARP probe request to the access point, wherein the ARP probe request is used to obtain the MAC address of the access point; When the MAC address returned by the access point is not received within a first preset time period after the ARP detection request is sent, the MAC address of the access point is searched in the ARP table entry in the electronic device.

6. The method according to claim 5, characterized in that The method further comprises: If the MAC address returned by the access point is not received within a first preset time period after sending the ARP probe request, detecting whether the electronic device is unable to access the network via the access point; In the case that the electronic device cannot access the network via the access point, the MAC address of the access point is searched in the ARP table entry in the electronic device.

7. The method according to claim 5, characterized in that The method further comprises: Detecting whether the electronic device is being manipulated; When the electronic device is being controlled, the ARP detection request is sent to the access point.

8. The method according to claim 5, characterized in that The method further comprises: Detecting whether the screen of the electronic device is lit; When the screen of the electronic device is turned on, the ARP detection request is sent to the access point.

9. The method according to claim 8, characterized in that The method further comprises: When the screen of the electronic device is turned on, obtaining the lighting time when the screen of the electronic device is turned on; Obtaining the duration between the current time of the electronic device and the lighting time; When the duration is greater than or equal to the second preset duration, the ARP detection request is sent to the access point again.

10. The method according to claim 5, characterized in that The method further comprises: Acquire the sending time when the electronic device last sent the ARP detection request to the access point; Acquire the time between the current time of the electronic device and the sending time; When the duration is greater than or equal to a third preset duration, the ARP detection request is sent to the access point again.

11. The method according to claim 1, characterized in that: The method further comprises: After disconnecting the communication connection and before reconnecting to the access point, detecting whether the interface of the electronic device jumps to a first interface, the first interface including a first area, the first area being used to display access prompt information when the electronic device has connected to the access point, the access prompt information being used to prompt that the electronic device has connected to the access point; When the interface of the electronic device jumps to the first interface, the access prompt information is displayed in the first area of ​​the first interface.

12. The method according to claim 1, characterized in that Before disconnecting the communication connection, the interface of the electronic device is a second interface, the second interface includes a second area, the second area is used to display access prompt information when the electronic device has accessed the access point, and the second area displays the access prompt information; The access prompt information is used to prompt that the electronic device has accessed the access point; The method further comprises: After disconnecting the communication connection and before re-accessing the access point, the access prompt information is continuously displayed in the second area on the second interface.

13. The method according to claim 12, characterized in that The communication connection is a Wi-Fi connection, the electronic device has a system user interface System UI and a wireless fidelity framework Wi-Fi Framework, the System UI is used to manage content displayed on the interface of the electronic device, and the Wi-Fi Framework is at least used to detect the state of the communication connection between the electronic device and the access point; The second area on the second interface continuously displays the access prompt information, including: After the communication connection is disconnected, a disconnection notification message sent by the Wi-Fi Framework in the electronic device to the System UI is intercepted, where the disconnection notification message is equivalent to notifying that the communication connection has been disconnected.

14. The method according to claim 12, characterized in that The second area on the second interface continuously displays the access prompt information, including: Before disconnecting the communication connection, obtaining the mirror prompt information of the access prompt information; The mirroring prompt information is displayed in the second area on the second interface.

15. The method according to claim 2 or 6, characterized in that: The detecting whether the electronic device is unable to access the network via the access point comprises: Send a probe request to the Domain Name System DNS server; If a detection response returned by the DNS server according to the detection request is not received within a fourth preset time period after sending the detection request, determining that the electronic device cannot access the network via the access point; or, When a detection response returned by the DNS server according to the detection request is received within a fourth preset time period after the detection request is sent, it is determined that the electronic device can access the network via the access point.

16. The method according to claim 2 or 6, characterized in that: The detecting whether the electronic device is unable to access the network via the access point comprises: Sending a data access request to a preset data server; If no data access response returned by the data server according to the data access request is received within a fifth preset time period after sending the data access request, determining that the electronic device cannot access the network via the access point; or, In a case where a data access response returned by the data server according to the data access request is received within a fifth preset time period after sending the data access request, it is determined that the electronic device can access the network via the access point.

17. The method according to claim 2 or 6, characterized in that: The detecting whether the electronic device is unable to access the network via the access point comprises: Determining whether data is continuously sent to the access point but data sent by the access point is continuously not received within a sixth preset time period; In a case where data is continuously sent to the access point but data sent by the access point is continuously not received within a sixth preset time period, determining that the electronic device cannot access the network via the access point; or, When data is continuously sent to the access point and data sent by the access point is received within a sixth preset time period, it is determined that the electronic device can access the network via the access point.

18. An electronic device, characterized in that: The electronic device has been connected to the access point; the electronic device includes: One or more processors, memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: Searching for a media access control MAC address of the access point in an address resolution protocol ARP table entry in the electronic device; If the MAC address of the access point is not found in the ARP table entry, disconnect the communication connection between the electronic device and the access point; re-accessing the access point; In the process of re-accessing the access point, obtaining the MAC address of the access point; The MAC address is stored in the ARP table entry.

19. The electronic device according to claim 18, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: detecting whether the electronic device is unable to access the network via the access point; In the case that the electronic device cannot access the network via the access point, the MAC address of the access point is searched in the ARP table entry in the electronic device.

20. The electronic device according to claim 18 or 19, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: If the MAC address of the access point is not found in the ARP table entry, sending an ARP probe request to the access point, wherein the ARP probe request is used to obtain the MAC address of the access point; If the MAC address returned by the access point is not received within a first preset time period after the ARP detection request is sent, the communication connection between the electronic device and the access point is disconnected.

21. The electronic device according to claim 19, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: In the case where the electronic device cannot access the network via the access point, sending an ARP probe request to the access point, wherein the ARP probe request is used to obtain a MAC address of the access point; When the MAC address returned by the access point is not received within a first preset time period after the ARP detection request is sent, the MAC address of the access point is searched in the ARP table entry in the electronic device.

22. The electronic device according to claim 18, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: Sending an ARP probe request to the access point, wherein the ARP probe request is used to obtain the MAC address of the access point; When the MAC address returned by the access point is not received within a first preset time period after the ARP detection request is sent, the MAC address of the access point is searched in the ARP table entry in the electronic device.

23. The electronic device according to claim 22, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: If the MAC address returned by the access point is not received within a first preset time period after sending the ARP probe request, detecting whether the electronic device is unable to access the network via the access point; In the case that the electronic device cannot access the network via the access point, the MAC address of the access point is searched in the ARP table entry in the electronic device.

24. The electronic device according to claim 22, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: Detecting whether the electronic device is being manipulated; When the electronic device is being controlled, the ARP detection request is sent to the access point.

25. The electronic device according to claim 22, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: Detecting whether the screen of the electronic device is lit; When the screen of the electronic device is turned on, the ARP detection request is sent to the access point.

26. The electronic device according to claim 25, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: When the screen of the electronic device is turned on, obtaining the lighting time when the screen of the electronic device is turned on; Obtaining the duration between the current time of the electronic device and the lighting time; When the duration is greater than or equal to the second preset duration, the ARP detection request is sent to the access point again.

27. The electronic device according to claim 22, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: Acquire the sending time when the electronic device last sent the ARP detection request to the access point; Acquire the time between the current time of the electronic device and the sending time; When the duration is greater than or equal to a third preset duration, the ARP detection request is sent to the access point again.

28. The electronic device according to claim 18, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: After disconnecting the communication connection and before reconnecting to the access point, detecting whether the interface of the electronic device jumps to a first interface, the first interface including a first area, the first area being used to display access prompt information when the electronic device has connected to the access point, the access prompt information being used to prompt that the electronic device has connected to the access point; When the interface of the electronic device jumps to the first interface, the access prompt information is displayed in the first area of ​​the first interface.

29. The electronic device according to claim 18, characterized in that Before disconnecting the communication connection, the interface of the electronic device is a second interface, the second interface includes a second area, the second area is used to display access prompt information when the electronic device has accessed the access point, and the second area displays the access prompt information; the access prompt information is used to prompt that the electronic device has accessed the access point; when the computer program is executed by the processor, the electronic device performs the following steps: After disconnecting the communication connection and before re-accessing the access point, the access prompt information is continuously displayed in the second area on the second interface.

30. The electronic device according to claim 29, characterized in that The communication connection is a Wi-Fi connection, the electronic device has a system user interface System UI and a wireless fidelity framework Wi-Fi Framework, the System UI is used to manage the content displayed on the interface of the electronic device, and the Wi-Fi Framework is at least used to detect the state of the communication connection between the electronic device and the access point; when the computer program is executed by the processor, the electronic device executes the following steps: After the communication connection is disconnected, a disconnection notification message sent by the Wi-Fi Framework in the electronic device to the System UI is intercepted, where the disconnection notification message is equivalent to notifying that the communication connection has been disconnected.

31. The electronic device according to claim 29, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: Before disconnecting the communication connection, obtaining the mirror prompt information of the access prompt information; The mirroring prompt information is displayed in the second area on the second interface.

32. The electronic device according to claim 19 or 23, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: Send a probe request to the Domain Name System DNS server; If a detection response returned by the DNS server according to the detection request is not received within a fourth preset time period after sending the detection request, determining that the electronic device cannot access the network via the access point; or, When a detection response returned by the DNS server according to the detection request is received within a fourth preset time period after the detection request is sent, it is determined that the electronic device can access the network via the access point.

33. The electronic device according to claim 19 or 23, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: Sending a data access request to a preset data server; If no data access response returned by the data server according to the data access request is received within a fifth preset time period after sending the data access request, determining that the electronic device cannot access the network via the access point; or, In a case where a data access response returned by the data server according to the data access request is received within a fifth preset time period after sending the data access request, it is determined that the electronic device can access the network via the access point.

34. The electronic device according to claim 19 or 23, characterized in that: When the computer program is executed by the processor, the electronic device performs the following steps: Determining whether data is continuously sent to the access point but data sent by the access point is continuously not received within a sixth preset time period; In a case where data is continuously sent to the access point but data sent by the access point is continuously not received within a sixth preset time period, determining that the electronic device cannot access the network via the access point; or, When data is continuously sent to the access point and data sent by the access point is received within a sixth preset time period, it is determined that the electronic device can access the network via the access point.

35. A computer storage medium, characterized in that The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the steps of the method according to any one of claims 1 to 17.

36. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to execute the steps of the method according to any one of claims 1 to 17.

37. A chip, characterized in that: It comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, wherein the signal includes a computer instruction stored in the memory; when the processor executes the computer instruction, the electronic device executes the steps of the method described in any one of claims 1 to 17.

Citation Information

Patent Citations

  • ARP (Address Resolution Protocol) interaction based method and equipment for detecting and recovering link fault

    CN102035676A

  • Access point (AP) fault detecting and recovering method and device

    CN103249075A