Internet access connection method, terminal device, network device and storage medium
The terminal device detects the channel load and interference value, and switches to the channel with the smallest interference value, which solves the problem of lag caused by poor channel air interface quality in Wi-Fi networks, improving network stability and user experience.
Patent Information
- Application Number
- CN202311435363.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2043-10-30
AI Technical Summary
When the terminal device is connected in a Wi-Fi network, the network speed is affected by the quality of the channel air interface, resulting in lag. Existing solutions such as switching routers or connecting to cellular base stations have stability and traffic consumption problems.
By detecting the channel load and interference value of the working channel, the terminal device determines whether there is a stuttering event caused by air interface. If no user can perceive the service, switch to the channel with the smallest interference value, sends a switching command to the network device, and resets the working channel.
It effectively solves the problem of network lag in terminal devices, improves users' online experience, and avoids user perception problems when network devices restart.
Smart Images

Figure CN119967514A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to an Internet connection method, a terminal device, a network device, and a storage medium. Background Art
[0002] When a terminal device is connected to a Wi-Fi network, the network speed of the terminal device is related to the channel air interface quality of the current channel of the terminal device. On the channel of the terminal device, the more routers are connected to the channel for communication, or the larger the data traffic of the router, the higher the channel load is, and the lower the network speed of the terminal device is, causing the terminal device to be stuck when accessing the Internet. In the related art, the solution to the problem of stuck access to the Internet by the terminal device is to connect the terminal device to other routers or to connect the terminal device to a cellular base station. However, if the terminal device cannot use other routers for network connection, for example, a private router requires password verification before allowing the terminal device to connect, and by connecting the terminal device to a cellular base station, the terminal device's own traffic will be consumed in addition, so the stability of the terminal device's network connection cannot be ensured, and the user's Internet experience is affected. Summary of the invention
[0003] In view of the above, it is necessary to provide an Internet connection method, a terminal device, a network device and a storage medium to solve the problem of Internet access lag.
[0004] In a first aspect, an embodiment of the present application provides an Internet connection method, which is applied to a communication system, wherein the communication system includes a terminal device and a network device, and the method includes: when the terminal device determines that the network device has a channel switching function, the terminal device obtains the channel load of the working channel of the terminal device; if it is determined that an Internet freeze event caused by an air interface occurs according to the channel load of the working channel, the terminal device determines whether an interference value of a channel is detected to be less than a preset interference value; if it is detected that the interference value of at least one channel is less than the preset interference value, the terminal device obtains a screen state and a motion state; if it is determined that the terminal device has no user-perceivable service according to the screen state and the motion state, the terminal device determines a switching channel from at least one detected channel, and sends a switching instruction carrying the switching channel to the network device; the network device responds to the switching instruction, parses the switching instruction to determine the switching channel, sets the switching channel to an updated working channel and restarts the network device; in response to a notification of successful channel setting sent from the network device, the terminal device re-establishes a communication connection with the network device. In the above technical solution, when the terminal device determines that an Internet access freeze event has occurred due to air interface reasons, it scans the interference values of other channels and selects the channel with the smallest interference value as the switching channel. When it is determined that the terminal device has no user-perceivable service, it sends a channel switching instruction to the network device. The network device parses the switching channel from the switching instruction, sets the working channel of the network device to the switching channel, restarts the network device, and makes the network device work on the new working channel. After the terminal device reconnects to the network device, it communicates with the network device through the new working channel, thereby solving the problem of Internet freeze in the terminal device and improving the user's Internet experience. In addition, the above technical solution confirms the user-perceivable service, so as to avoid the problem of the user perceiving the network disconnection when the network device is restarting and setting the channel due to the presence of user-perceivable service at the terminal device.
[0005] In one embodiment of the present application, determining that an Internet access freeze event caused by an air interface reason occurs according to the channel load of the working channel includes: if the channel load of the working channel is greater than or equal to a preset channel load threshold, determining that the air interface quality of the working channel does not meet a preset condition, and determining that an Internet access freeze event caused by an air interface reason occurs. In the above technical solution, by comparing the channel load of the working channel with the preset channel load threshold, it is possible to accurately determine whether an Internet access freeze event caused by an air interface reason occurs in the terminal device.
[0006] In one embodiment of the present application, detecting that the interference value of a channel is less than a preset interference value includes: obtaining beacon frames of multiple channels other than the working channel; parsing the beacon frame of each channel to obtain the identity information of at least one device carried by the beacon frame of each channel, and determining the number of devices connected to each channel based on the identity information of at least one device, and using the number of devices connected to each channel as the interference value of the corresponding channel; comparing the interference value of each channel with the preset interference value, and when the interference value of at least one channel is less than the preset interference value, determining that the channel whose interference value is less than the preset interference value is detected. In the above technical solution, by obtaining the number of devices connected to multiple channels other than the working channel, the channel whose interference value is less than the preset interference value can be accurately detected.
[0007] In one embodiment of the present application, determining the switching channel from at least one detected channel includes: selecting a channel corresponding to a minimum interference value from all channels having interference values less than a preset interference value as the switching channel. In the above scheme, selecting the channel corresponding to the minimum interference value as the switching channel can reduce the channel load of the working channel between the terminal device and the network device, and improve the data transmission rate between the terminal device and the network device.
[0008] In one embodiment of the present application, the network device responds to the switching instruction, and the parsing of the switching instruction to determine the switching channel includes: the network device determines the number of devices connected to the network device; if the network device is connected to one device, obtains the channel load of the working channel, and when it is determined that the channel load of the working channel is greater than or equal to the preset channel load threshold, the switching channel is parsed from the switching instruction. In the above technical solution, when it is determined that the number of devices connected to the network device is one, it can be determined that the network device is only connected to the terminal device, so that when the network device responds to the switching instruction and restarts, even if the network device and the terminal device are temporarily disconnected, it will not affect the normal Internet access of other devices connected to the network device.
[0009] In one embodiment of the present application, the method further includes: if the network device is connected to multiple devices, the network device does not respond to the switching instruction. In the above technical solution, when it is determined that the number of devices connected to the network device is one, it can be determined that the network device is connected to multiple devices including the terminal device, so that the network device does not respond to the switching instruction, thereby avoiding affecting the normal Internet access of other devices connected to the network device when the network device responds to the switching instruction to restart.
[0010] In one embodiment of the present application, the terminal device obtains the screen state including: calling the function of the isScreenOn() function of the power management system of the terminal device; if the Boolean value returned by the isScreenOn() function is a true value, determining that the screen state of the terminal device is a screen-on state; if the Boolean value returned by the isScreenOn() function is a false value, determining that the screen state of the terminal device is a screen-off state. The above technical solution can accurately identify the screen state of the terminal device by calling the function of the isScreenOn() function of the power management system of the terminal device.
[0011] In one embodiment of the present application, the terminal device acquires the motion state including: the terminal device detects the movement acceleration of the terminal device through an acceleration sensor; if the movement acceleration is greater than or equal to a preset acceleration value, it is determined that the terminal device is in a moving state; if the movement acceleration is less than the preset acceleration value, it is determined that the terminal device is in a stationary state. The above technical solution can accurately identify the motion state of the terminal device by detecting the movement acceleration of the terminal device through the acceleration sensor.
[0012] In one embodiment of the present application, determining that the terminal device has no user-perceivable service according to the screen state and the motion state includes: if it is determined that the screen state is off and the motion state is stationary, the terminal device determines that there is no user-perceivable service. In the above technical solution, by confirming the user-perceivable service, the user of the terminal device can be unaware of the network device during the process of restarting and setting the channel, thereby improving the user's Internet experience.
[0013] In one embodiment of the present application, determining whether a network device has a channel switching function includes: a terminal device sends a search request to a network device, the search request is used to determine whether the network device has a channel switching function; if a confirmation response is received from the network device, the terminal device determines that the network device has a channel switching function. In the above technical solution, the terminal device can accurately obtain information on whether the network device has a channel switching function by sending a search request to the network device.
[0014] In a second aspect, an embodiment of the present application provides an Internet connection method, in which a terminal device is communicatively connected to a network device, the method comprising: when it is determined that the network device has a channel switching function, obtaining the channel load of a working channel of the terminal device; if it is determined that an Internet freeze event caused by an air interface occurs based on the channel load of the working channel, judging whether an interference value of a channel is detected to be less than a preset interference value; if it is detected that the interference value of at least one channel is less than the preset interference value, obtaining the screen state and motion state of the terminal device; if it is determined that the terminal device has no user-perceivable service based on the screen state and the motion state, determining a switching channel from at least one detected channel, and sending a switching instruction carrying the switching channel to the network device, the switching instruction being used to instruct the network device to set the working channel according to the switching channel carried in the switching instruction; in response to a notification of successful channel setting sent from the network device, the terminal device re-establishes a connection with the network device. In the above technical solution, when the terminal device determines that an Internet access freeze event has occurred due to air interface reasons, it scans the interference values of other channels and selects the channel with the smallest interference value as the switching channel. When it is determined that the terminal device has no user-perceivable service, it sends a channel switching instruction to the network device to instruct the network device to set the working channel as the switching channel. After the terminal device reconnects to the network device, it communicates with the network device through the new working channel, thereby solving the problem of Internet freeze in the terminal device and improving the user's Internet experience. In addition, the above technical solution confirms the user-perceivable service, so as to avoid the problem of the user being able to perceive the network disconnection and affecting the Internet experience when the network device is restarting and setting the channel due to the presence of user-perceivable services at the terminal device.
[0015] In one embodiment of the present application, determining that an Internet access freeze event caused by an air interface reason occurs according to the channel load of the working channel includes: if the channel load of the working channel is greater than or equal to a preset channel load threshold, determining that the air interface quality of the working channel does not meet a preset condition, and determining that an Internet access freeze event caused by an air interface reason occurs. In the above technical solution, by comparing the channel load of the working channel with the preset channel load threshold, it is possible to accurately determine whether an Internet access freeze event caused by an air interface reason occurs in the terminal device.
[0016] In one embodiment of the present application, detecting that the interference value of a channel is less than a preset interference value includes: obtaining beacon frames of multiple channels other than the working channel; parsing the beacon frame of each channel to obtain the identity information of at least one device carried by the beacon frame of each channel, and determining the number of devices connected to each channel based on the identity information of at least one device, and using the number of devices connected to each channel as the interference value of the corresponding channel; comparing the interference value of each channel with the preset interference value, and when the interference value of at least one channel is less than the preset interference value, determining that the channel whose interference value is less than the preset interference value is detected. In the above technical solution, by obtaining the number of devices connected to multiple channels other than the working channel, the channel whose interference value is less than the preset interference value can be accurately detected.
[0017] In one embodiment of the present application, determining the switching channel from at least one detected channel includes: selecting a channel corresponding to a minimum interference value from all channels having interference values less than a preset interference value as the switching channel. In the above scheme, selecting the channel corresponding to the minimum interference value as the switching channel can reduce the channel load of the working channel between the terminal device and the network device, and improve the data transmission rate between the terminal device and the network device.
[0018] In one embodiment of the present application, determining that the terminal device has no user-perceivable service according to the screen state and the motion state includes: if it is determined that the screen state is off and the motion state is stationary, determining that there is no user-perceivable service. In the above technical solution, by confirming the user-perceivable service, the user of the terminal device can be unaware of the network device during the process of restarting and setting the channel, thereby improving the user's Internet experience.
[0019] In one embodiment of the present application, determining whether a network device has a channel switching function includes: sending a search request to the network device, the search request is used to determine whether the network device has a channel switching function; if a confirmation response sent by the network device is received, determining that the network device has a channel switching function. In the above technical solution, the terminal device can accurately obtain information on whether the network device has a channel switching function by sending a search request to the network device.
[0020] In the third aspect, the embodiment of the present application provides an Internet connection method, in which a network device is connected to a terminal device by communication, and the method includes: responding to a search request sent by the terminal device, sending a confirmation reply to the terminal device to indicate that the network device has a channel switching function; receiving a switching instruction sent by the terminal device, parsing the switching instruction to determine the switching channel, setting the switching channel to an updated working channel and restarting the network device; sending a notification of successful channel setting to the terminal device. In the above technical scheme, the network device parses the switching channel from the switching instruction sent by the terminal device, sets the working channel of the network device to the switching channel, restarts the network device, and makes the network device work on the new working channel. After the terminal device reconnects to the network device, it communicates with the network device through the new working channel, thereby solving the problem of Internet jams on the terminal device and improving the user's Internet experience.
[0021] In one embodiment of the present application, parsing the switching instruction to determine the switching channel includes: determining the number of devices connected to the network device; if the network device is connected to one device, obtaining the channel load of the working channel, and parsing the switching channel from the switching instruction when it is determined that the channel load of the working channel is greater than or equal to the preset channel load threshold. In the above technical solution, when it is determined that the number of devices connected to the network device is one, it can be determined that the network device is only connected to the terminal device, so that when the network device responds to the switching instruction and restarts, even if the network device and the terminal device are temporarily disconnected, it will not affect the normal Internet access of other devices connected to the network device.
[0022] In one embodiment of the present application, the method further includes: if the network device is connected to multiple devices, not responding to the switching instruction. In the above technical solution, when it is determined that the number of devices connected to the network device is one, it can be determined that the network device is connected to multiple devices including the terminal device, so that the network device does not respond to the switching instruction, thereby avoiding affecting the normal Internet access of other devices connected to the network device when the network device responds to the switching instruction to restart.
[0023] In a fourth aspect, an embodiment of the present application provides a terminal device, including a processor and a memory; wherein the processor is connected to the memory; the memory is used to store program instructions; and the processor is used to read the program instructions stored in the memory to implement the above-mentioned Internet connection method.
[0024] In a fifth aspect, an embodiment of the present application provides a network device, including a processor and a memory; wherein the processor is connected to the memory; the memory is used to store program instructions; and the processor is used to read the program instructions stored in the memory to implement the above-mentioned Internet connection method.
[0025] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores program instructions. When the program instructions are executed on an electronic device, the electronic device executes the above-mentioned Internet connection method.
[0026] In addition, the technical effects brought about by the fourth to sixth aspects can be found in the descriptions related to the methods of each design in the above method part, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0028] Figure 1 A schematic diagram of a channel load provided in accordance with an embodiment of the present application.
[0029] Figure 2 This is an application scenario diagram of the Internet connection method provided in one embodiment of the present application.
[0030] Figure 3 A flowchart of a method for reducing power consumption provided in one embodiment of the present application.
[0031] Figure 4 A schematic diagram of a network setting interface provided in accordance with an embodiment of the present application.
[0032] Figure 5 A schematic diagram of the communication connection between a mobile phone and a router provided in one embodiment of the present application.
[0033] Figure 6 A schematic diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0034] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. 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 concrete way.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field in this application. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. It should be understood that, unless otherwise specified in this application, " / " means or. For example, A / B can represent A or B. "And / or" in this application is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. "At least one" means one or more. "Multiple" means two or more than two. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c seven situations.
[0036] When a terminal device is connected to a Wi-Fi network, the network speed of the terminal device is related to the air interface quality of the current channel of the terminal device. On the channel of the terminal device, the more routers are connected to the channel, or the larger the data traffic of the router, the higher the channel load, the lower the network speed of the terminal device, and the terminal device may experience lag in surfing the Internet. Figure 1 As shown in FIG. 1 , starting from 2.4 GHz, channels 1, 2, and 3 are formed every 5 MHz, and so on until channel 14. Figure 1 As shown, on channel 1, the number of routers connected to the channel for communication is 5, and on channel 12, the number of routers connected to the channel for communication is 2. Since the number of routers connected to channel 1 is greater than the number of routers connected to channel 12, the load of channel 1 is higher than the load of channel 12. Assuming that the routers working on channel 1 include router A, and the routers working on channel 12 include router B, based on the above situation, the network speed of the terminal device when communicating with router A is lower than the network speed when communicating with router B, and even the problem of Internet access freeze occurs. In the related art, the solution to the problem of terminal device Internet access freeze is to connect the terminal device to other routers or to connect the terminal device to a cellular base station. However, if the terminal device cannot use other routers to access the Internet, for example, a private router requires password verification before allowing the terminal device to connect, and by connecting the terminal device to a cellular base station, the terminal device's own traffic will be consumed additionally, thus increasing the user's expenses and affecting the user's Internet experience.
[0037] In order to solve the problem of Internet access lag when a terminal device is connected to a wireless network (eg, Wi-Fi), an embodiment of the present application provides an Internet access connection method. Figure 2 As shown, it is an application scenario diagram of the method for reducing power consumption provided by an embodiment of the present application. The method is applied to a terminal device (such as Figure 2 The terminal device 100 shown in FIG. Figure 2 The terminal device 100 establishes a communication connection with the network device 200 (for example, communicating through a Wi-Fi channel), and can communicate with the network connected to the network device 200 through the network device 200, thereby realizing the Internet access function. When the terminal device 100 determines that the air interface quality of the working channel for communication connection with the network device 200 is poor (for example, the number of connections of the router connected to the working channel exceeds the preset number, or the data traffic of the router exceeds the preset data traffic), the terminal device 100 scans the interference value of other channels, and selects the channel corresponding to the minimum interference value as the switching channel, and sends a channel switching instruction to the network device 200 when it is determined that the terminal device meets the preset working conditions. The network device 200 sets the working channel of the network device 200 to the switching channel and restarts according to the information of the switching channel carried by the channel switching instruction. After the network device 200 is restarted, the terminal device 100 reconnects to the network device 200 and communicates with the network device 200 through the new working channel (i.e., the switching channel), thereby solving the problem of freezing when the terminal device 100 is online and improving the user's online experience.
[0038] In one embodiment of the present application, the terminal device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device. In one embodiment of the present application, the network device 200 may be a switch, a router, or a hub.
[0039] In one embodiment of the present application, the terminal device 100 includes a screen-on perception module 101, a mobile state perception module 102, a business scenario perception module 103, a first decision module 104, a user experience quality evaluation module 105, a first Wi-Fi driver 106, a first Wi-Fi chip 107, and a kernel protocol stack 108.
[0040] The screen-on perception module 101 is used to obtain the screen status of the terminal device 100 and send the screen status to the business scenario perception module 103. In one embodiment of the present application, the screen status of the terminal device 100 includes a screen-on status and a screen-off status. The screen-on perception module 101 obtains whether the screen is on by calling the isScreenOn() function of the power management (Power Manager) system. After calling the isScreenOn() function, if the Boolean value returned by the isScreenOn() function is a true value, it is determined that the screen status of the terminal device 100 is a screen-on status. If the Boolean value returned by the isScreenOn() function is a false value, it is determined that the screen status of the terminal device 100 is an off-screen status.
[0041] The mobile state sensing module 102 is used to determine the motion state of the terminal device 100, and send the motion state to the business scene sensing module 103. In one embodiment of the present application, the mobile state sensing module 102 can detect the motion state of the terminal device 100 through a sensor of the terminal device 100, such as an acceleration sensor or a gravity sensor, and send the motion state to the business scene sensing module 103. In one embodiment of the present application, the motion state includes a moving state and a stationary state.
[0042] The service scenario perception module 103 is used to obtain the screen status of the terminal device 100 from the screen perception module 101, and obtain the motion status of the terminal device 100 from the mobile status perception module 102, and determine whether the terminal device 100 has no user-perceivable service based on the screen status and motion status of the terminal device 100. If it is determined that the terminal device 100 has no user-perceivable service, the terminal device 100 issues a channel switching instruction to instruct the network device 200 to reset the channel according to the channel switching instruction. In the process of restarting and setting the channel, the network device 200 is temporarily disconnected from the network device 200. Since the terminal device is in a state of no user-perceivable service, the user of the terminal device 100 is not aware of it, which does not affect the Internet experience of the user of the terminal device 100.
[0043] In one embodiment of the present application, the business scenario perception module 103 determines that the terminal device 100 has no user-perceivable business when it determines that the screen state of the terminal device 100 is the screen-off state. For example, in a scenario where the terminal device 100 is off at night, the business scenario perception module 103 determines that the terminal device 100 has no user-perceivable business when it determines that the screen state of the terminal device 100 is the screen-off state. In another embodiment of the present application, the business scenario perception module 103 determines that the terminal device 100 has no user-perceivable business when it determines that the screen state of the terminal device 100 is the screen-off state and the motion state is the stationary state. For example, in the scenario of making a phone call, the terminal device 100 is in the screen-off state, but the terminal device has user-perceivable services (such as the data communication service of the current call). Therefore, it is not possible to accurately determine whether the terminal device has no user-perceivable services based only on whether the terminal device 100 is in the screen-off state. The motion state of the terminal device 100 must also be evaluated. When it is determined that the screen state of the terminal device 100 is the screen-off state and the motion state of the terminal device 100 is the stationary state, it is determined that the terminal device 100 has no user-perceivable services. For example, in the scenario of making a phone call, the screen state of the terminal device 100 is in the screen-off state, and the motion state of the terminal device 100 is in the moving state. At this time, it is determined that the terminal device 100 has service-perceivable services.
[0044] The user experience quality evaluation module 105 is used to send a first acquisition request to the first Wi-Fi chip 107 to obtain the channel load (channel load) of the working channel of the terminal device 100. Specifically, the user experience quality evaluation module 105 sends the first acquisition request to the first Wi-Fi chip 107 through the first Wi-Fi driver 106. The first Wi-Fi chip 107 obtains the channel load of the terminal device 100 according to the first acquisition request, and sends the channel load to the first Wi-Fi driver 106. The first Wi-Fi driver 106 sends the channel load to the user experience quality evaluation module 105. The user experience quality evaluation module 105 determines the air interface quality of the working channel of the terminal device 100 according to the channel load, and determines whether an Internet access freeze event caused by the air interface occurs according to the air interface quality of the working channel. In one embodiment of the present application, the working channel refers to the channel used when the terminal device 100 is connected to the network device 200 for communication. In one embodiment of the present application, if the channel load of the working channel is greater than or equal to the preset channel load threshold, that is, the channel load of the working channel is high, the user experience quality evaluation module 105 determines that the air interface quality of the working channel is poor, and determines that an Internet access freeze event caused by air interface reasons has occurred, and sends the Internet access freeze event caused by air interface reasons to the first decision module 104; if the channel load of the working channel is less than the preset channel load threshold, that is, the channel load is low, the user experience quality evaluation module 105 determines that the air interface quality of the working channel of the terminal device 100 is good, and determines that no Internet access freeze event caused by air interface reasons has occurred. In one embodiment of the present application, the preset channel load threshold can be set according to the number of network devices connected to the working channel, or the data traffic of the network device 200.
[0045] In another embodiment of the present application, the kernel protocol stack 108 is used to determine whether a message retransmission event occurs in the terminal device 100. In one embodiment of the present application, after the terminal device 100 sends a packet to the network device 200, if it is determined that the ACK response sent by the network device 200 in response to the packet is not received, the kernel protocol stack 108 determines that a message retransmission event occurs in the terminal device 100, and sends the message retransmission event to the user experience quality evaluation module 105. The user experience quality evaluation module 105 determines that the terminal device 100 has an Internet jam event based on the message retransmission event. However, the Internet jam event is not caused by poor air interface quality.
[0046] In one embodiment of the present application, the user experience quality evaluation module 105 is further configured to obtain interference values of multiple channels other than the working channel. Specifically, the user experience quality evaluation module 105 sends a second acquisition request to the first Wi-Fi chip 107 to obtain beacon frames of multiple channels other than the working channel. For example, referring to Figure 1, the working channel is channel 1, then the user experience quality evaluation module 105 sends a second acquisition request to the first Wi-Fi chip 107 to obtain beacon frames of channel 2, channel 3, channel 4, etc. other than channel 1. Specifically, the user experience quality evaluation module 105 sends a second acquisition request to the first Wi-Fi chip 107 through the first Wi-Fi driver 106. The first Wi-Fi chip 107 obtains beacon frames of multiple channels other than the working channel according to the second acquisition request. The beacon frame of each channel carries the identity information of at least one device (such as a mobile phone, a laptop, etc.) connected to the channel. The first Wi-Fi chip 107 sends all the acquired beacon frames to the first Wi-Fi driver 106. The first Wi-Fi driver 106 sends all beacon frames to the user experience quality evaluation module 105. The user experience quality evaluation module 105 parses each beacon frame to obtain the identity information of the device included in each beacon frame, and determines the number of devices connected to the channel corresponding to the beacon frame according to the identity information of the device included in each beacon frame, determines the interference value of the channel according to the number of devices connected to the channel, and sends the interference value of the channel to the first decision module 104. In an embodiment of the present application, if the number of devices connected to the channel is more, the interference value of the channel is also greater; if the number of devices connected to the channel is less, the interference value of the channel is also smaller.
[0047] When the first decision module 104 determines that the network device 200 has a channel switching function, the terminal device 100 has an Internet access freeze event caused by an air interface reason, and the interference value of other channels except the working channel is small, if the service scenario perception module 10 receives no user-perceivable service, at least one channel is selected from channels other than the working channel according to the interference value of the channel as a switching channel, and a switching instruction carrying the switching channel is sent to the network device 200. In one embodiment of the present application, the first decision module 105 sends a query request to the network device 200 whether it has a channel switching function, and when receiving a reply with a channel switching function sent by the network device 200, it can be determined that the network device 200 has a channel switching function. For example, the first decision module 105 sends a query request to the first Wi-Fi driver 106 whether it has a channel switching function, and the first Wi-Fi driver 106 sends the query request to the first Wi-Fi chip 107. The first Wi-Fi chip 107 sends a query request to the network device 200, and receives a reply with a channel switching function sent by the network device 200 in response to the query request. The first Wi-Fi chip 107 sends the reply with the channel switching function to the first decision module 105 through the first Wi-Fi driver 106. The first decision module 105 determines that the network device 200 has the channel switching function according to the reply with the channel switching function sent by the network device 200.
[0048] In an embodiment of the present application, the network device 200 includes a monitoring module 201 , a second decision module 202 , a second Wi-Fi driver 203 , and a second Wi-Fi chip 204 .
[0049] The monitoring module 201 obtains the switching instruction sent by the terminal device 100, determines the number of devices connected to the network device 200, and sends the switching instruction and the number of devices connected to the network device 200 to the second decision module 202. In one embodiment of the present application, the monitoring module 201 determines the number of devices connected to the network device 200 by obtaining the number of identification tags of the devices connected to the network device 200 for communication. For example, if the identification tags of the devices connected to the network device 200 for communication include the identification tags of the terminal device 100 and the identification tags of the laptop computer, for a total of 2 identification tags, the monitoring module 201 determines that the number of devices connected to the network device 200 is 2.
[0050] The second decision module 202 receives the switching instruction sent by the monitoring module 201 and the number of devices connected to the network device 200. If it is determined that the number of devices connected to the network device 200 is greater than 1, the second decision module 202 does not respond to the switching instruction. If it is determined that the number of devices connected to the network device 200 is 1, that is, it is determined that the network device 200 is only connected to the terminal device 100, the second decision module 202 obtains the channel load of the working channel from the second Wi-Fi chip 204 to verify the channel load of the working channel between the terminal device 100 and the network device 200. Specifically, the second decision module 202 sends the third acquisition request to the second Wi-Fi chip 204 through the second Wi-Fi driver 203. The second Wi-Fi chip 204 obtains the channel load of the working channel of the network device 200 according to the third acquisition request, and sends the channel load of the working channel of the network device 200 to the second Wi-Fi driver 203. The second Wi-Fi driver 203 sends the channel load to the second decision module 202. If it is determined that the channel load of the working channel is greater than or equal to the preset channel load threshold (i.e., it is determined that the channel load of the working channel is high), and the number of devices connected to the network device 200 is 1, the second decision module 202 parses the switching channel from the switching instruction, sets the working channel of the network device 200 to the switching channel, restarts the network device 200, and makes the network device 200 work on the new working channel. After reconnecting to the network device 200, the terminal device 100 communicates with the network device 200 through the new working channel, thereby solving the problem of freezing when the terminal device 100 accesses the Internet and improving the user's Internet experience.
[0051] refer to Figure 3As shown, it is a flow chart of an Internet connection method provided by an embodiment of the present application. The method disclosed in the embodiment of the present application or the method shown in the flow chart includes one or more steps for implementing the method. Without departing from the scope of the claims, the execution order of multiple steps can be interchanged with each other, and some steps can also be omitted. Some embodiments will be described below in conjunction with the accompanying drawings. The Internet connection method includes the following steps.
[0052] Step S301: The terminal device establishes a communication connection with the network device.
[0053] For the sake of clarity, the following describes the specific implementation of the Internet connection method by taking the terminal device as a mobile phone, the network device 200 as a router, and the communication connection as a Wi-Fi connection as an example. In one embodiment of the present application, the mobile phone responds to the user selecting the Wi-Fi network option in the network setting interface of the mobile phone and establishes a Wi-Fi connection with the router. Figure 4 , which is a schematic diagram of a network setting interface provided by an embodiment of the present application. The network setting interface includes a Wi-Fi network switch option and at least one Wi-Fi network connection option. Each Wi-Fi network connection option corresponds to a router. After the mobile phone detects that the user turns on the Wi-Fi network switch option on the network setting interface and selects a Wi-Fi network connection option, a Wi-Fi connection is established between the mobile phone and the router corresponding to the selected Wi-Fi network connection option.
[0054] refer to Figure 5As shown, it is a schematic diagram of the communication connection between a mobile phone and a router provided in an embodiment of the present application. In an embodiment of the present application, the mobile phone and the router establish a Wi-Fi connection through a Wi-Fi network protocol (such as 802.11a, 802.11b, and 802.11e protocols). In an embodiment of the present application, the mobile phone can interact with the router in accordance with the interactive process of the probe frame, the authentication frame, the association frame, and the dynamic host configuration protocol (Dynamic Host Configuration Protocol, DHCP) frame to realize the Wi-Fi connection between the mobile phone and the router. Among them, in the interactive process of the Probe frame, the mobile phone sends a probe request (Probe Request) to find out whether there is a connectable router in the surrounding environment. If the mobile phone receives a probe response (ProbeResponse) frame sent by the router, it is determined that there is a connectable router in the surrounding environment. In the interactive process of the Authentication frame, the mobile phone sends an authentication request (Authentication Request) frame to determine whether the capabilities of the mobile phone and the router match. If the mobile phone receives an authentication response (AuthenticationResponse) frame carrying success (Successful) sent by the router, it is determined that the capabilities of the mobile phone and the router match. In the interaction process of the Association frame, the mobile phone sends an Association Request frame to request to establish an association with the router. If the mobile phone receives an Association Response frame sent by the router with a successful association, it is determined that the mobile phone is associated with the router. In the interaction process of the DHCP frame, the mobile phone can establish a communication connection with the router according to the IP address configured by the router. The means for the mobile phone to establish a Wi-Fi connection with the router through the Wi-Fi network protocol can refer to the existing related technologies. The detailed interaction process for establishing a Wi-Fi connection between the mobile phone and the router will not be described here.
[0055] In one embodiment of the present application, the mobile phone and the router establish a Wi-Fi connection through the Wi-Fi network protocol, including: a first Wi-Fi chip of the mobile phone can establish a connection with a second Wi-Fi chip of the router through the Wi-Fi network protocol.
[0056] Step S302: The terminal device sends a search request to the network device, wherein the search request is used to determine whether the network device has a channel switching function.
[0057] In one embodiment of the present application, reference Figure 5After the mobile phone establishes a connection with the router, it sends a discovery request frame to the router to determine whether the network device has a channel switching function. The channel switching function refers to the ability of the router to set and update the working channel.
[0058] Step S303: After receiving the confirmation response sent by the network device in response to the search request, the terminal device determines that the network device has a channel switching function.
[0059] In one embodiment of the present application, after the mobile phone receives the support (Ack) response reply frame sent by the network device in response to the search request, it is determined that the router has a channel switching function, thereby realizing the confirmation of the mobile phone on the channel switching function of the router.
[0060] In step S304, the terminal device obtains the channel load of the working channel and determines whether the channel load of the working channel is less than a preset channel load threshold. If the channel load of the working channel is greater than or equal to the preset channel load threshold, step S305 is executed. If the channel load of the working channel is less than the preset channel load threshold, step S304 is returned to continue monitoring the channel load of the working channel.
[0061] In one embodiment of the present application, the user experience quality evaluation module of the mobile phone sends a first acquisition request to the first Wi-Fi chip of the mobile phone through the first Wi-Fi driver of the mobile phone. The first Wi-Fi chip obtains the channel load of the working channel of the mobile phone according to the first acquisition request, and sends the channel load of the working channel to the first Wi-Fi driver. The first Wi-Fi driver sends the channel load of the working channel to the user experience quality evaluation module of the mobile phone. The user experience quality evaluation module compares the channel load of the working channel with the preset channel load threshold to determine the comparison result of the channel load of the working channel with the preset channel load threshold. In one embodiment of the present application, the preset channel load threshold can be set according to the number of routers connected to the working channel, or the data traffic of the router. The user experience quality evaluation module compares the number of routers of the working channel with the number of routers corresponding to the preset channel load threshold, so as to determine the comparison result of the channel load of the working channel with the preset channel load threshold.
[0062] Step S305: The terminal device determines that an Internet access freeze event occurs due to air interface reasons.
[0063] In one embodiment of the present application, if it is determined that the channel load of the working channel is greater than or equal to a preset channel load threshold, it is determined that the air interface quality of the working channel of the mobile phone does not meet the preset conditions. For the air interface quality that does not meet the preset conditions, it can be determined that the air interface quality is poor, and it is determined that an Internet access freeze event caused by air interface reasons has occurred, and the Internet access freeze event caused by air interface reasons is sent to the first decision module of the mobile phone; if it is determined that the channel load of the working channel is less than the preset channel load threshold, it is determined that the air interface quality of the working channel of the mobile phone meets the preset conditions (that is, indicating that the air interface quality of the working channel is good), and it is determined that an Internet access freeze event caused by air interface reasons has not occurred.
[0064] Step S306, the terminal device determines whether a channel with an interference value less than a preset interference value is detected. If the terminal device detects a channel with an interference value less than the preset interference value, step S307 is executed, otherwise, the terminal device does not detect a channel with an interference value less than the preset interference value, and returns to step S306.
[0065] In one embodiment of the present application, the user experience quality evaluation module of the mobile phone obtains the interference values of multiple channels outside the working channel, and determines the channel whose interference value is less than the preset interference value according to the interference values of the multiple channels. Specifically, the user experience quality evaluation module of the mobile phone sends a second acquisition request to the first Wi-Fi chip of the mobile phone through the first Wi-Fi driver of the mobile phone. The first Wi-Fi chip obtains the beacon frames of multiple channels outside the working channel according to the second acquisition request. The beacon frame of each channel carries the identity information of at least one device. The first Wi-Fi chip sends all the acquired beacon frames to the first Wi-Fi driver. The first Wi-Fi driver sends all beacon frames to the user experience quality evaluation module of the mobile phone. The user experience quality evaluation module parses each beacon frame to obtain the identity information of the device included in each beacon frame, and determines the number of devices connected to the channel corresponding to the beacon frame according to the identity information of the device included in each beacon frame, and uses the number of devices connected to the channel as the interference value of the channel, and sends the interference value of the channel to the first decision module of the mobile phone. The device connected to the channel can be a laptop, a tablet computer or a mobile phone of another user. The first decision module compares the interference value of the channel with the preset interference value, and when the interference value of the channel is less than the preset interference value, determines that a channel with an interference value less than the preset interference value is detected. In one embodiment of the present application, if the number of devices connected to the channel is greater, the interference value of the channel is greater; if the number of devices connected to the channel is less, the interference value of the channel is smaller.
[0066] Step S307, the terminal device obtains the screen state and motion state of the terminal device, and determines whether the terminal device has no user-perceivable service according to the screen state and motion state of the terminal device. If it is determined that the terminal device has no user-perceivable service, step S308 is executed; if it is determined that the mobile phone has a user-perceivable service, step S307 is returned to be executed.
[0067] In one embodiment of the present application, the screen-on sensing module of the mobile phone obtains the screen status of the mobile phone and sends the screen status to the business scenario sensing module of the mobile phone, wherein the screen status of the mobile phone includes the screen-on status and the screen-off status. For example, the screen-on sensing module of the mobile phone calls the function of the isScreenOn() function of the power management system. If the Boolean value returned by the isScreenOn() function is true, it is determined that the screen status of the mobile phone is the screen-on status. If the Boolean value returned by the isScreenOn() function is false, it is determined that the screen status of the mobile phone is the screen-off status.
[0068] The mobile state sensing module of the mobile phone determines the motion state of the mobile phone and sends the motion state to the business scenario sensing module, where the motion state includes the moving state and the stationary state. For example, the mobile state sensing module of the mobile phone detects the moving acceleration or moving speed of the mobile phone through the acceleration sensor. If the moving acceleration of the mobile phone is greater than or equal to the preset acceleration value, or the moving speed of the mobile phone is greater than or equal to the preset speed value, it is determined that the mobile phone is in a moving state. If the moving acceleration of the mobile phone is less than the preset acceleration value, or the moving speed of the mobile phone is less than the preset speed value, it is determined that the mobile phone is in a stationary state.
[0069] The business scenario perception module of the mobile phone obtains the screen state of the mobile phone from the screen-on perception module, obtains the motion state of the mobile phone from the mobile state perception module, and determines whether the mobile phone has no user-perceivable service based on the screen state and motion state of the mobile phone. In one embodiment of the present application, the business scenario perception module determines that the mobile phone has no user-perceivable service when it determines that the screen state of the mobile phone is an off-screen state and the motion state is a stationary state. In one embodiment of the present application, the business scenario perception module determines that the mobile phone has no user-perceivable service when it determines that the screen state of the mobile phone is an off-screen state.
[0070] Step S308: The terminal device selects at least one channel as a switching channel from all channels whose interference values are less than a preset interference value, and sends a switching instruction carrying the switching channel to the network device.
[0071] In one embodiment of the present application, the first decision module of the mobile phone selects the channel corresponding to the minimum interference value from all channels whose interference values are less than the preset interference value as the switching channel, and sends a switching instruction carrying the switching channel to the network device. The switching instruction is used to instruct the network device to set the working channel according to the switching channel carried in the switching instruction. In this embodiment, the first decision module of the mobile phone selects the channel corresponding to the minimum interference value from all channels whose interference values are less than the preset interference value as the switching channel, and instructs the network device to set the working channel according to the switching channel, which can reduce the channel load of the working channel between the mobile phone and the router, increase the data transmission rate between the mobile phone and the router, and thus improve the Internet experience of the mobile phone.
[0072] refer to Figure 5 As shown, in one embodiment of the present application, after the terminal device sends a switching instruction to the network device, if an Ack response reply frame in response to the switching instruction from the network device is received, it is determined that the network device has received the switching instruction.
[0073] Step S309: The network device parses the switching channel from the switching instruction sent by the terminal device, sets the working channel of the network device as the switching channel, and restarts the network device.
[0074] In one embodiment of the present application, the monitoring module of the router receives a switching instruction sent by a mobile phone. For example, the monitoring module of the router receives the switching instruction sent by the mobile phone through the second Wi-Fi chip of the router. The monitoring module is also used to determine the number of devices connected to the router, and send the switching instruction and the number of devices connected to the router to the second decision module of the router. If it is determined that the number of devices connected to the router is greater than 1, the second decision module does not respond to the switching instruction. If it is determined that the number of devices connected to the router is 1, that is, it is determined that the router is only connected to the mobile phone, the second decision module sends a third acquisition request to the second Wi-Fi chip of the router through the second Wi-Fi driver of the router. The second Wi-Fi chip obtains the channel load of the working channel of the router according to the third acquisition request, and sends the channel load of the working channel to the second Wi-Fi driver. The second Wi-Fi driver sends the channel load to the second decision module. If it is determined that the channel load of the working channel is greater than or equal to the preset channel load threshold, that is, it is determined that the working channel load is high or the channel is busy, and the number of devices connected to the router is 1, the second decision module parses the switching channel from the switching instruction, sets the working channel of the router to the switching channel, restarts the router, and makes the router work on the new working channel, that is, the switching channel.
[0075] Step S310: The network device sends a channel setting success notification to the terminal device.
[0076] In one embodiment of the present application, reference Figure 5 As shown in the figure, after the router completes the setting of the working channel and restarts to take effect, it sends a notification of successful channel setting to the mobile phone.
[0077] Step S311, the terminal device responds to the channel setting success notification and sends an Ack response to the network device.
[0078] In one embodiment of the present application, the mobile phone responds to the channel setting success notification sent by the router and replies an Ack response to the router, indicating that the channel setting success notification has been received.
[0079] Step S312: The terminal device re-establishes a connection with the network device.
[0080] In one embodiment of the present application, the mobile phone interacts with the router in accordance with the interaction process of the detection frame, the authentication frame, the association frame and the dynamic host configuration protocol frame, and then re-establishes the Wi-Fi connection between the mobile phone and the router. The process of establishing a Wi-Fi connection between the mobile phone and the router can refer to the description of step S301, which will not be repeated here.
[0081] In another embodiment of the present application, in step S309, the network device parses the switching channel from the switching instruction sent by the terminal device, sets the working channel of the network device as the switching channel and sends a setting success notification to the terminal device. After sending the setting success notification, the network device restarts to make the set working channel take effect.
[0082] In the above embodiment, when the terminal device determines that the air interface quality of the working channel for communication connection with the network device is poor, it scans the interference values of other channels and selects the channel with the smallest interference value as the switching channel. When it is determined that the terminal device has no user-perceivable service, it sends a channel switching instruction to the network device. The network device parses the switching channel from the switching instruction, sets the working channel of the network device to the switching channel, restarts the network device, and makes the network device work on the new working channel. After the terminal device reconnects to the network device, it communicates with the network device through the new working channel, thereby solving the problem of terminal device Internet access jamming and improving the user's Internet experience. In addition, in the above embodiment, by confirming the user-perceivable service, it can avoid the problem of the user being able to perceive the network disconnection that affects the Internet experience during the process of restarting the network device to set the channel due to the presence of user-perceivable service at the terminal device. The terminal device involved in the embodiment of the present application is introduced below.
[0083] refer to Figure 6 FIG. 1 is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application. The terminal device may be Figure 1The terminal device 100 in.
[0084] In this embodiment, the terminal 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. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0085] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0086] 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 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.
[0087] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0088] 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.
[0089] 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.
[0090] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the terminal device 100.
[0091] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0092] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0093] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0094] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.
[0095] 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.
[0096] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other terminal devices 100, such as AR devices, etc.
[0097] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0098] 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 terminal device 100. While the charging management module 140 is charging the battery 142, it may also power the terminal device 100 through the power management module 141.
[0099] 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 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.
[0100] The wireless communication function of the terminal 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.
[0101] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal 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.
[0102] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal 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.
[0103] 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.
[0104] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the terminal 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 it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0105] In some embodiments, the antenna 1 of the terminal 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 terminal 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).
[0106] The terminal 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, which execute program instructions to generate or change display information.
[0107] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0108] The terminal device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0109] 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.
[0110] 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 terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0111] 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 terminal device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0112] Video codecs are used to compress or decompress digital videos. The terminal device 100 may support one or more video codecs. Thus, the terminal device 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0113] 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 the terminal device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0114] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0115] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.
[0116] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level; universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.
[0117] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.
[0118] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
[0119] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the terminal device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.
[0120] The internal memory 121 or the external memory interface 120 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 110. The one or more computer programs include multiple instructions. When the multiple instructions are executed by the processor 110, the Internet connection method in the above embodiment can be executed on the terminal device 100 to achieve the function of avoiding Internet lag of the terminal device 100.
[0121] The terminal 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.
[0122] 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.
[0123] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The terminal device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0124] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the ear.
[0125] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The terminal device 100 can be provided with at least one microphone 170C. In other embodiments, the terminal device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.
[0126] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0127] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the touch operation intensity according to the pressure sensor 180A. The terminal device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0128] The gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the terminal device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0129] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0130] The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the terminal device 100 is a flip phone, the terminal device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.
[0131] The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in all directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device 100 and applied to applications such as horizontal and vertical screen switching and pedometers.
[0132] The distance sensor 180F is used to measure the distance. The terminal device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0133] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light outward through the light emitting diode. The terminal device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100. When insufficient reflected light is detected, the terminal device 100 can determine that there is no object near the terminal device 100. The terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, and pocket mode automatically unlocks and locks the screen.
[0134] The ambient light sensor 180L is used to sense the ambient light brightness. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket to prevent accidental touch.
[0135] The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0136] The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0137] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the terminal device 100, which is different from the position of the display screen 194.
[0138] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0139] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100.
[0140] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0141] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
[0142] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the terminal device 100 by inserting the SIM card interface 195 or pulling it out from the SIM card interface 195. The terminal device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the terminal device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.
[0143] This embodiment further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on the terminal device 100, the terminal device 100 executes the above-mentioned related method steps to implement the Internet connection method in the above-mentioned embodiment.
[0144] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the Internet connection method in the above-mentioned embodiment.
[0145] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory so that the chip executes the Internet connection method in the above-mentioned method embodiments.
[0146] Among them, the terminal device 100, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0147] Through the description of the above implementation methods, technical personnel in the relevant field can clearly 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.
[0148] 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 the modules or units is only a logical function division. 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.
[0149] The unit described as a separate component may or may not be physically separated, and the component shown as a unit may be one physical unit or multiple physical units, that is, it 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 embodiment.
[0150] 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.
[0151] 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, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.
[0152] The above implementation modes are only used to illustrate the technical solutions of the present application and are not intended to limit the present application. Although the present application has been described in detail with reference to the above preferred implementation modes, a person skilled in the art should understand that the technical solutions of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. A method for connecting to the Internet, applied in a communication system, characterized in that: The communication system includes a terminal device and a network device, and the method includes: The terminal device obtains a channel load of a working channel of the terminal device when determining that the network device has a channel switching function; If it is determined according to the channel load of the working channel that an Internet access freeze event caused by an air interface occurs, the terminal device determines whether an interference value of a channel is detected to be less than a preset interference value; If it is detected that the interference value of at least one channel is less than the preset interference value, the terminal device obtains the screen state and the motion state; If it is determined according to the screen state and the motion state that the terminal device has no user-perceivable service, the terminal device determines a switching channel from at least one detected channel, and sends a switching instruction carrying the switching channel to the network device; The network device responds to the switching instruction, parses the switching instruction to determine the switching channel, sets the switching channel as an updated working channel and restarts the network device; In response to the notification of successful channel setting sent from the network device, the terminal device re-establishes a communication connection with the network device.
2. The Internet connection method according to claim 1, characterized in that: The determining, according to the channel load of the working channel, that an Internet access freeze event caused by an air interface reason comprises: If the channel load of the working channel is greater than or equal to a preset channel load threshold, it is determined that the air interface quality of the working channel does not meet a preset condition, and it is determined that an Internet access freeze event caused by the air interface occurs.
3. The Internet connection method according to claim 1, characterized in that: The detecting that the interference value of a channel is less than a preset interference value comprises: Acquire beacon frames of multiple channels other than the working channel; Parsing the beacon frame of each channel to obtain identity information of at least one device carried by the beacon frame of each channel, and determining the number of devices connected to each channel according to the identity information of the at least one device, and using the number of devices connected to each channel as the interference value of the corresponding channel; The interference value of each channel is compared with a preset interference value, and when the interference value of at least one channel is smaller than the preset interference value, it is determined that a channel having an interference value smaller than the preset interference value is detected.
4. The Internet connection method according to claim 1, characterized in that: Determining a switching channel from the at least one detected channel includes: A channel corresponding to a minimum interference value is selected from all channels whose interference values are smaller than a preset interference value as the switching channel.
5. The Internet connection method according to claim 1, characterized in that: The network device responds to the switching instruction, and the parsing of the switching instruction to determine the switching channel includes: The network device determines the number of devices connected to the network device; If the network device is connected to a device, the channel load of the working channel is obtained, and when it is determined that the channel load of the working channel is greater than or equal to a preset channel load threshold, the switching channel is parsed from the switching instruction.
6. The Internet connection method according to claim 5, characterized in that: The method further comprises: If the network device is connected to multiple devices, the network device does not respond to the switching instruction.
7. The Internet connection method according to claim 1, characterized in that: The terminal device acquiring the screen status includes: Call the isScreenOn() function of the power management system of the terminal device; If the Boolean value returned by the isScreenOn() function is a true value, it is determined that the screen state of the terminal device is a screen-on state; if the Boolean value returned by the isScreenOn() function is a false value, it is determined that the screen state of the terminal device is a screen-off state.
8. The Internet connection method according to claim 1, characterized in that: The terminal device acquiring the motion state includes: The terminal device detects the movement acceleration of the terminal device through an acceleration sensor; If the movement acceleration is greater than or equal to a preset acceleration value, it is determined that the terminal device is in a moving state; If the moving acceleration is less than the preset acceleration value, it is determined that the terminal device is in a stationary state.
9. The Internet connection method according to claim 1, characterized in that: The determining that the terminal device has no user-perceivable service according to the screen state and the motion state includes: If it is determined that the screen state is an off state and the motion state is a stationary state, the terminal device determines that there is no user-perceivable service.
10. The Internet connection method according to claim 1, characterized in that: Determining that the network device has a channel switching function includes: The terminal device sends a search request to the network device, where the search request is used to determine whether the network device has a channel switching function; If a confirmation response is received from the network device, the terminal device determines that the network device has a channel switching function.
11. A method for connecting to the Internet, applied to a terminal device, characterized in that: The terminal device is communicatively connected with the network device, and the method comprises: In the case where it is determined that the network device has a channel switching function, obtaining a channel load of a working channel of the terminal device; If it is determined according to the channel load of the working channel that an Internet access freeze event caused by an air interface occurs, it is determined whether an interference value of a channel is detected to be less than a preset interference value; If it is detected that the interference value of at least one channel is less than the preset interference value, the screen state and motion state of the terminal device are obtained; If it is determined according to the screen state and the motion state that the terminal device has no user-perceivable service, determining a switching channel from at least one detected channel, and sending a switching instruction carrying the switching channel to the network device, the switching instruction being used to instruct the network device to set the working channel according to the switching channel carried in the switching instruction; In response to the notification of successful channel setting sent from the network device, the terminal device re-establishes a connection with the network device.
12. The Internet connection method according to claim 11, characterized in that: The determining, according to the channel load of the working channel, that an Internet access freeze event caused by an air interface reason comprises: If the channel load of the working channel is greater than or equal to a preset channel load threshold, it is determined that the air interface quality of the working channel does not meet a preset condition, and it is determined that an Internet access freeze event caused by the air interface occurs.
13. The Internet connection method according to claim 1, characterized in that: The detecting that the interference value of a channel is less than a preset interference value comprises: Acquire beacon frames of multiple channels other than the working channel; Parsing the beacon frame of each channel to obtain identity information of at least one device carried by the beacon frame of each channel, and determining the number of devices connected to each channel according to the identity information of the at least one device, and using the number of devices connected to each channel as the interference value of the corresponding channel; The interference value of each channel is compared with a preset interference value, and when the interference value of at least one channel is smaller than the preset interference value, it is determined that a channel having an interference value smaller than the preset interference value is detected.
14. The Internet connection method according to claim 11, characterized in that: Determining a switching channel from the at least one detected channel includes: A channel corresponding to a minimum interference value is selected from all channels whose interference values are smaller than a preset interference value as the switching channel.
15. The Internet connection method according to claim 11, characterized in that: The determining that the terminal device has no user-perceivable service according to the screen state and the motion state includes: If it is determined that the screen state is the screen-off state, and the motion state is the stationary state, it is determined that there is no user-perceivable service.
16. The Internet connection method according to claim 1, characterized in that: Determining that the network device has a channel switching function includes: Sending a search request to the network device, wherein the search request is used to determine whether the network device has a channel switching function; If a confirmation response sent by the network device is received, it is determined that the network device has a channel switching function.
17. A method for connecting to the Internet, applied to a network device, characterized in that: The network device is communicatively connected with the terminal device, and the method comprises: In response to the search request sent by the terminal device, a confirmation response is sent to the terminal device to indicate that the network device has a channel switching function; receiving a switching instruction sent by the terminal device, parsing the switching instruction to determine a switching channel, setting the switching channel as an updated working channel and restarting the network device; A notification of successful channel setting is sent to the terminal device.
18. The Internet connection method according to claim 17, characterized in that: The parsing the switching instruction to determine the switching channel comprises: determining the number of devices connected to the network device; If the network device is connected to a device, the channel load of the working channel is obtained, and when it is determined that the channel load of the working channel is greater than or equal to a preset channel load threshold, the switching channel is parsed from the switching instruction.
19. The Internet connection method according to claim 17, characterized in that: The method further comprises: If the network device is connected to multiple devices, it does not respond to the switching instruction.
20. A terminal device, characterized in that: It includes a processor and a memory; wherein the processor is connected to the memory; The memory is used to store program instructions; The processor is used to read the program instructions stored in the memory to implement the Internet connection method according to any one of claims 11 to 16.
21. A network device, characterized in that: It includes a processor and a memory; wherein the processor is connected to the memory; The memory is used to store program instructions; The processor is used to read the program instructions stored in the memory to implement the Internet connection method as described in any one of claims 17 to 19.
22. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed on the electronic device, the electronic device executes the Internet connection method according to any one of claims 1 to 19.
Citation Information
Patent Citations
Link quality assessment method of multi-channel wireless network
CN104853380A
Dynamic adjustment method for metallurgical machinery monitoring communication network channel under complex working conditions
CN116232500A
Techniques for Determining a Handoff Profile Between Telecommunications Networks
US20160044568A1