Network device switching method, electronic device and computer readable storage medium
By combining uplink and downlink information to switch network devices, the problem that STAs in wireless LANs cannot switch APs in time is solved, and the timely switching of the optimal network devices is achieved, which improves business smoothness and user experience.
Patent Information
- Application Number
- CN202311342925.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-17
- Publication Date
- 2025-04-18
AI Technical Summary
In a wireless LAN, STA cannot switch AP in time due to the downlink signal strength indication, resulting in the uplink signal being unable to receive, affecting the smooth progress of services and user experience.
By combining uplink information and downlink information, the terminal device decides whether to switch network equipment to ensure the best network equipment, so as to ensure smooth business progress and improve user experience.
It realizes timely switching of the optimal network equipment, avoids the terminal equipment from residing under low-quality network equipment for a long time, and improves business smoothness and user experience.
Smart Images

Figure CN119854885A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a network device switching method, an electronic device, and a computer-readable storage medium. Background Art
[0002] Wireless local area network (WLAN) refers to the use of wireless communication technology to interconnect computer devices to form a network system that can communicate with each other and share resources.
[0003] When a wireless terminal in a wireless LAN, i.e. a station (STA), moves, the wireless terminal will switch between wireless access points (APs). Currently, STAs decide whether to switch APs based on the received downlink signal strength indication. Since the AP's transmit power is generally greater than the STA's transmit power, even if the STA moves and the uplink signal cannot be received, the downlink signal can still be received, which causes the STA to be unable to switch APs in time, affecting the smooth operation of services and user experience. Summary of the invention
[0004] The present application provides a network device switching method, an electronic device and a computer-readable storage medium, which can combine uplink information and downlink information to determine whether to switch network devices, and can timely implement the switching of the optimal network device, ensure the smooth progress of the business, and improve the user experience.
[0005] In order to achieve the above purpose, this application adopts the following technical solutions:
[0006] In a first aspect, a network device switching method is provided, which is applied to a terminal device, and the method includes: receiving first information from a first network device, the first information including one or more of the following: signal strength of an uplink signal from the terminal device received by the first network device, packet loss of uplink data from the terminal device received by the first network device, and a fault condition of the first network device; obtaining second information, the second information including one or more of the following: signal strength of a downlink signal from the first network device received by the terminal device, and packet loss of downlink data from the first network device received by the terminal device; when the first information satisfies the first condition and the second information satisfies the second condition, searching for a second network device, and switching from the first network device to the second network device.
[0007] Exemplarily, the first condition includes, but is not limited to, one or more conditions including the signal strength of the uplink signal being less than a first preset strength threshold, the packet loss rate of the uplink data being greater than a first preset packet loss threshold, and the network device being at risk of failure.
[0008] Exemplarily, the second condition includes, but is not limited to, one or more conditions including: the signal strength of the downlink signal is less than a second preset strength threshold, the packet loss rate of the downlink data is greater than a second preset packet loss threshold, and the like.
[0009] Exemplarily, when the first information satisfies the first condition and the second information satisfies the second condition, it indicates that the downlink quality from the first network device to the terminal device begins to deteriorate, but the terminal device can receive the data sent by the first network device, and the uplink quality from the terminal device to the first network device is poor, and the first network device cannot normally receive the data sent by the terminal device.
[0010] The solution provided in the first aspect above can avoid the problem of terminal equipment staying on a network device for a long time without triggering the switching of the optimal network device by switching the network device in combination with the first information including uplink information and the second information including downlink information. The switching of the optimal network device can be realized in time, which facilitates the terminal to connect to the network device with better communication quality, ensures the smooth operation of the business, and improves the user's Internet experience.
[0011] As a possible implementation, before receiving the first information from the first network device, the method further includes: sending a first action frame to the first network device, the first action frame including a trigger condition for sending the first information, the first action frame being used to instruct the first network device to send a second action frame to the terminal device when the trigger condition is met; receiving the first information from the first network device includes: receiving a second action frame from the first network device, the second action frame including the first information. In this way, through the form of an action frame, it is convenient for the first network device to interact with the terminal device, and the information required for successful interaction between the first network device and the terminal device can be guaranteed.
[0012] As a possible implementation, the trigger condition includes that the signal strength of the uplink signal is less than a first preset strength threshold, and / or that the packet loss rate of the uplink data is greater than a preset packet loss threshold. In this way, by sending the trigger condition to the first network device, the first network device can send the first information in a timely manner when the trigger condition is met, which can improve the timeliness of network device switching and improve the Internet access quality of users.
[0013] As a possible implementation, the trigger condition includes that the signal strength of the uplink signal is less than a first preset strength threshold and the duration is greater than a preset duration threshold. Thus, by setting a preset duration threshold, the first information is sent when the signal strength is less than the first preset strength threshold and the duration is greater than the preset duration threshold, which can improve the accuracy of the first information sending and reduce erroneous sending caused by other interference factors.
[0014] As a possible implementation, sending the first action frame to the first network device includes: sending a negotiation capability request frame to the first network device; after receiving a negotiation capability response frame from the first network device, sending the first action frame to the first network device. In this way, by sending the negotiation capability request frame to the first network device, the capabilities supported by the first network device can be confirmed in advance, invalid switching of the network device can be avoided, and resources can be saved.
[0015] As a possible implementation, the first information satisfies the first condition including one or more of the following: the signal strength of the uplink signal is less than the first strength threshold, the packet loss rate of the uplink data is greater than the first preset packet loss threshold, and the first network device has a risk of failure; the second information satisfies the second condition including one or more of the following: the signal strength of the downlink signal is less than the second strength threshold, and the packet loss rate of the downlink data is greater than the second preset packet loss threshold. In this way, by combining the signal strength of the uplink signal, the signal strength of the downlink signal, the packet loss rate of the uplink data, the packet loss rate of the downlink data, and the risk of failure of the network device to switch the network device, the optimal network device can be switched in time, which facilitates the terminal to connect to the network device with better communication quality, ensures the smooth operation of the business, and improves the user's Internet experience.
[0016] As a possible implementation, searching for the second network device and switching from the first network device to the second network device includes: obtaining the signal strength of the downlink signal of the available network device of the terminal device; switching from the first network device to the second network device, where the second network device is the network device with the strongest downlink signal strength among the available network devices of the terminal device. In this way, by comparing the signal strength of the downlink signals of the available network devices, the network device with the best signal can be obtained from the available network devices, thereby switching to the network device with the best signal, which can improve the Internet quality of users and improve the user experience.
[0017] As a possible implementation, the first network device and the second network device are both connected to the first network; or, the first network device is connected to the first network, and the second network device is connected to the second network. In this way, when switching network devices, the signal strength of the downlink signals of the network devices in each network can be compared, and then connected to the network with better communication quality, thereby improving the user experience.
[0018] In a second aspect, a network device switching method is provided, which is applied to a network device, and the method includes: when a trigger condition is met, sending first information to a terminal device, the first information includes one or more of the following: signal strength of an uplink signal received by the network device from the terminal device, packet loss of uplink data received by the network device from the terminal device, and failure of the network device.
[0019] After the terminal device receives the first information from the network device, if the first information satisfies the first condition and the second information satisfies the second condition, the network device is switched. The second information includes one or more of the following: the signal strength of the downlink signal from the network device received by the terminal device, and the packet loss of the downlink data from the network device received by the terminal device.
[0020] Exemplarily, the first condition includes, but is not limited to, one or more conditions including the signal strength of the uplink signal being less than a first preset strength threshold, the packet loss rate of the uplink data being greater than a first preset packet loss threshold, and the network device being at risk of failure.
[0021] Exemplarily, the second condition includes, but is not limited to, one or more conditions including: the signal strength of the downlink signal is less than a second preset strength threshold, the packet loss rate of the downlink data is greater than a second preset packet loss threshold, and the like.
[0022] Exemplarily, when the first information satisfies the first condition and the second information satisfies the second condition, it indicates that the downlink quality from the network device to the terminal device begins to deteriorate, but the terminal device can receive the data sent by the first network device, and the uplink quality from the terminal device to the network device is poor, and the first network device cannot normally receive the data sent by the terminal device.
[0023] The solution provided in the second aspect above can avoid the problem of terminal equipment staying on a network device for a long time without triggering the switching of the optimal network device by switching the network device in combination with the first information including uplink information and the second information including downlink information. The switching of the optimal network device can be realized in time, which facilitates the terminal to connect to the network device with better communication quality, ensures the smooth operation of the business, and improves the user's Internet experience.
[0024] As a possible implementation, when the trigger condition is met, the first information is sent to the terminal device, including: when the signal strength of the uplink signal is less than the first preset strength threshold, the second action frame is sent to the terminal device; and / or, when the packet loss rate of the uplink data is greater than the preset packet loss threshold, the second action frame is sent to the terminal device; and / or, when there is a risk of failure of the network device, the second action frame is sent to the terminal device, and the second action frame includes the first information. In this way, the network device sends the first information when the trigger condition is met, which can improve the timeliness of network device switching and improve the quality of Internet access for users.
[0025] As a possible implementation, when the signal strength of the uplink signal is less than a first preset strength threshold, a second action frame is sent to the terminal device, including: when the signal strength of the uplink signal is less than the first preset strength threshold and the duration is greater than the preset duration threshold, the second action frame is sent to the terminal device. In this way, by setting a preset duration threshold, the first information is sent when the signal strength is less than the first preset strength threshold and the duration is greater than the preset duration threshold, the accuracy of the first information transmission can be improved, and the erroneous transmission caused by other interference factors can be reduced.
[0026] As a possible implementation, before sending the first information to the terminal device, the method further includes: receiving a negotiation capability request frame sent by the terminal device; sending a negotiation capability response frame to the terminal device according to the negotiation capability request frame, and the terminal device sends a first action frame to the network device after receiving the negotiation capability response frame, and the first action frame includes a sending trigger condition. In this way, through the negotiation capability request frame and the negotiation capability response frame, the capabilities supported by the network device can be confirmed in advance, invalid switching of the network device can be avoided, and resources can be saved.
[0027] As a possible implementation, the network device is one of an access point, a base station, and a transmitting and receiving point. Thus, when switching network devices, various types of network devices can be compared, and then connected to a network device with better communication quality, thereby improving user experience.
[0028] In a third aspect, a terminal device is provided, comprising: a transceiver for sending and receiving radio signals; a memory for storing computer program instructions; and a processor for executing computer program instructions to support the terminal device to implement a method as described in any possible implementation manner in the first aspect.
[0029] In a fourth aspect, a network device is provided, comprising: a transceiver for sending and receiving radio signals; a memory for storing computer program instructions; and a processor for executing computer program instructions to support the network device to implement a method as described in any possible implementation manner in the second aspect.
[0030] In a fifth aspect, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processing circuit, the method described in any possible implementation of the first aspect or the method described in any possible implementation of the second aspect is implemented.
[0031] In a sixth aspect, a chip system is provided, which includes a processing circuit and a storage medium, in which computer program instructions are stored; when the computer program instructions are executed by the processing circuit, the method described in any possible implementation manner in the first aspect or the method described in any possible implementation manner in the second aspect is implemented.
[0032] In a seventh aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute a method as described in any possible implementation of the first aspect or a method as described in any possible implementation of the second aspect.
[0033] In an eighth aspect, a communication system is provided, comprising a terminal device and a network device, wherein the terminal device is used to execute the method described in any possible implementation manner of the first aspect, and the network device is used to execute the method described in any possible implementation manner of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 An interactive schematic diagram of switching network devices for conventional technology;
[0035] Figure 2 A schematic diagram of a scenario provided for an embodiment of the present application;
[0036] Figure 3 A schematic diagram of the structure of a communication system provided in an embodiment of the present application;
[0037] Figure 4 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0038] Figure 5 A schematic diagram of the software structure of the terminal device and the network device provided in the embodiment of the present application;
[0039] Figure 6 One of the flowcharts of the network device switching method provided in the embodiment of the present application;
[0040] Figure 7 A second flowchart of a network device switching method provided in an embodiment of the present application;
[0041] Figure 8 A third flowchart of the network device switching method provided in an embodiment of the present application;
[0042] Fig. 9 A schematic diagram of a format of an action frame provided in an embodiment of the present application;
[0043] Fig.10 A fourth flowchart of a network device switching method provided in an embodiment of the present application;
[0044] Fig.11 A schematic diagram of an interactive timing sequence of a network device switching method provided in an embodiment of the present application;
[0045] Fig.12 A schematic diagram of signal strength variation provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0047] The terms "including" and "having" and any variations thereof mentioned in the description of the embodiments of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0048] In the following, the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the features.
[0049] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0050] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more. The "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0051] To facilitate understanding, an explanation of relevant terms is given first.
[0052] Downlink data: data sent from network equipment to terminal equipment.
[0053] Uplink data: data sent from terminal devices to network devices.
[0054] Downlink signal: A signal sent from a network device to a terminal device.
[0055] Uplink signal: The signal sent from the terminal device to the network device.
[0056] Currently, in a wireless LAN, when a STA moves, it will switch APs based on the downlink received signal strength indication (RSSI). Figure 1 As shown, there are two APs in the current network environment, namely AP1 and AP2, where STA establishes a network connection with AP1, and STA is provided with communication services by AP1. STA initiates a signal strength scan of AP1 and AP2, obtains the downlink RSSI of AP1 and the downlink RSSI of AP2, and compares the downlink RSSI of AP1 and AP2 after obtaining the downlink RSSI of AP1 and AP2 to determine whether AP switching is required. When the downlink RSSI of AP2 is greater than the downlink RSSI of AP1, STA will disconnect the network connection of AP1 and initiate a network connection with AP2, that is, STA switches from AP1 to AP2.
[0057] Since the transmit power of the AP is usually greater than that of the STA, the downlink RSSI at the STA's location may be relatively good, but the uplink data may not be received at the AP side due to path loss attenuation when it reaches the AP due to the STA's transmit power limitation. When the downlink RSSI at the STA's location is relatively good, the STA usually does not switch APs, which causes the STA to stay at the AP for a long time. However, since the AP cannot receive the STA's uplink data, the smooth operation of the service is affected, resulting in a poor user experience.
[0058] Take STA as a mobile phone and AP as a router as an example to illustrate this technical problem. Figure 2 As shown, a network connection is established between the mobile phone and the router, and the user can use the mobile phone to access the Internet through the router to surf the Internet. When the user is close to the router, that is, the distance between the mobile phone and the router is close, the mobile phone can receive the downlink data from the router, and the router can also receive the uplink data from the mobile phone. At this time, the downlink signal strength displayed on the mobile phone is full, and the user can surf the Internet normally. When the user moves, the distance between the mobile phone and the router increases, especially when there is a wall between the user's location and the router's location. Since the transmission power of the router is greater than that of the mobile phone, the downlink signal of the router can pass through the wall, while the uplink signal of the mobile phone cannot pass through the wall due to power limitation. As a result, the data sent by the router can be received normally by the mobile phone, while the data sent by the mobile phone cannot be received normally by the router. Although the downlink signal strength displayed on the mobile phone covers 2-3 grids at this time, the mobile phone cannot surf the Internet normally, which seriously affects the user experience.
[0059] Based on the above problems, an embodiment of the present application provides a network device switching method, by receiving first information sent by a first network device and obtaining second information measured by the terminal device itself, wherein the first information includes at least one of the signal strength of an uplink signal received by the first network device from the terminal device, the packet loss situation of the uplink data of the terminal device, and a fault situation of the first network device; the second information includes at least one of the signal strength of a downlink signal received by the terminal device from the first network device, and the packet loss situation of the downlink data of the first network device. Whether to switch the first network device is determined based on the first information and the second information. In this way, the problem of the terminal device staying in the network device for a long time without triggering the switching of the network device can be avoided, and the switching of the optimal network device can be realized in time to ensure the smooth progress of the business and improve the user experience.
[0060] The network device switching method provided in the embodiment of the present application can be applied to a communication system, such as Figure 3 As shown, the communication system includes a plurality of electronic devices, wherein the plurality of electronic devices include at least a network device 200 and a terminal device 100. A communication connection can be established between the network device 200 and the terminal device 100, and information can be exchanged between the terminal device 100 and the network device 200 that establish the communication connection based on air interface resources. Taking the network device 200 including the network device 200a and the network device 200b as an example to illustrate the switching scenario of the network device, the terminal device 100 can establish a communication connection with the network device 200a and the network device 200b. When the terminal device 100 establishes a communication connection with the network device 200a, the terminal device 100 can exchange information with the network device 200a based on air interface resources. When the terminal device 100 has a switching demand for the network device, the terminal device 100 can switch to the network device 200b, establish a communication connection with the network device 200b, and thus exchange information with the network device 200b based on air interface resources.
[0061] The network device 200 is a device located at the network side of the communication system and having a wireless transceiver function or a chip or chip system that can be set in the device. The network device includes but is not limited to: an access point (AP) in a WLAN system, such as a home gateway, router, switch, etc. with WLAN function, a base station, an evolved NodeB (eNodeB), a transmission reception point (TRP), a next generation NodeB (gNB), or an access node in a WiFi system.
[0062] The terminal device is a terminal that accesses the communication system and has a wireless transceiver function or a chip or chip system that can be set at the terminal. The terminal device can also be called an access terminal, a user unit, a user station, a mobile station, a far station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication equipment, a user agent or a user device. The terminal device in the embodiment of the present application can be a mobile phone, a tablet computer, a computer with a wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. Vehicle-mounted terminal, RSU with terminal function, etc. The terminal device of the present application may also be a vehicle-mounted module, a vehicle-mounted module, a vehicle-mounted component, a vehicle-mounted chip or a vehicle-mounted unit built into the vehicle as one or more components or units. The vehicle may implement the network device switching method provided by the present application through the built-in vehicle-mounted module, vehicle-mounted module, vehicle-mounted component, vehicle-mounted chip or vehicle-mounted unit.
[0063] For ease of understanding, the structure of the terminal device provided in the embodiment of the present application is specifically described below. Figure 4 The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 130, an antenna 141, an antenna 142, a mobile communication module 150, a wireless communication module 160, and the like.
[0064] 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.
[0065] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0066] The controller may be the nerve center and command center of the terminal device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0067] 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.
[0068] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0069] The internal memory 130 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the terminal device 100 by running the instructions stored in the internal memory 130. The internal memory 130 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 130 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0070] The wireless communication function of the terminal device 100 can be implemented through the antenna 141, the antenna 142, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0071] Antenna 141 and antenna 142 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 141 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.
[0072] 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 141, 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 141. 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.
[0073] 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 142, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 142.
[0074] In some embodiments, the antenna 141 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 142 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).
[0075] Accordingly, in the embodiment of the present application, the network device 200 may also include a processor, a memory, a wireless communication module, an antenna, and a network port.
[0076] The memory of the network device is used to store instructions and data, and the processor can call the instructions or data stored in the memory.
[0077] The network port of the network device may include a wired network interface, which may be connected to the Internet via a wired network and may provide access to the Internet for multiple terminal devices.
[0078] The wireless communication module of the network device is used to communicate through wireless local area network standards such as Wi-Fi networks. It can be understood that the wireless communication module of the network device can also be one or more devices integrating at least one communication processing module. The wireless communication module can receive electromagnetic waves via the antenna of the network device, frequency modulate and filter the electromagnetic wave signals, and send the processed signals to the processor. The wireless communication module can also receive the signal to be sent from the processor, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna.
[0079] It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the network device 200. In other embodiments of the present application, the network device 200 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.
[0080] For ease of understanding, the software structure of the terminal device 100 and the network device 200 is described below. Figure 5 ,like Figure 5 As shown, in an embodiment of the present application, the terminal device 100 may include a framework layer and a kernel layer, and the network device 200 may include a user layer and a kernel layer.
[0081] In the embodiment of the present application, the framework layer of the terminal device 100 includes a wireless service, such as WIFI Service, and the kernel layer includes at least a wireless driver, such as WIFIDriver. The framework layer and the kernel layer can interact through the HAL layer, that is, the WIFI Service can interact with the WIFIDriver through the WIFI HAL.
[0082] The user layer of the network device 200 may include multiple service processes, such as a WLAN APP process, and the kernel layer also includes at least a wireless driver, such as a WIFIDriver. The WLAN APP process may interact with the WIFIDriver through the WLAN process.
[0083] based on Figure 3 , Figure 4 and Figure 5In the embodiment of the present application, a proprietary channel can be constructed between the terminal device and the network device, and an action frame (Action frame) is sent through the proprietary channel. Data interaction is performed based on the form of the action frame to determine whether it is necessary to switch the network device. Exemplarily, the WLAN APP process in the network device 200 can send an action frame to the WIFIDriver of the terminal device 100 through the WIFIDriver. After receiving the action frame, the WIFIDriver of the terminal device 100 transmits the information of the action frame to the WIFI Service. The WIFI Service decides whether it is necessary to switch the network device based on the information of the action frame. Accordingly, the WIFI Service of the terminal device 100 can also send an action frame to the network device 200 through the WIFIDriver.
[0084] In some implementations, the network device 200 and the terminal device 100 may also directly send action frames through the WIFIDriver. After receiving the action frame, the WIFIDriver of the terminal device 100 may directly decide whether to switch the network device based on the information in the action frame. That is, the network device switching method provided in the embodiment of the present application may be applied to a wireless driver chip and implemented based on the wireless driver chip.
[0085] For easier understanding, please refer to Figure 6 The step flow shown illustrates the network device switching method provided in the embodiment of the present application.
[0086] S301: A first network device sends first information to a terminal device.
[0087] The first network device refers to the network device to which the terminal device is connected.
[0088] In the embodiment of the present application, the first network device can provide a wireless network, and the terminal device can exchange data with the network device based on the wireless network to access the Internet. The frequency band of the wireless network can be set according to the usage requirements. For example, the wireless network can be a 5 GHz frequency band network or a 2.4 GHz frequency band network.
[0089] In some implementations, the first network device may also provide a plurality of wireless networks with different frequency bands, and the terminal device may establish a connection with the first network device according to the frequency band of the supported network.
[0090] Taking into account that network congestion, network equipment failure and weak network signals all affect the user's Internet access services, based on this, in order to improve the user's Internet experience, in an embodiment of the present application, the first information includes one or more of the following: signal strength of the uplink signal from the terminal device received by the first network device, that is, the RSSI of the uplink signal from the terminal device received by the first network device, the packet loss of the uplink data from the terminal device received by the first network device, and the failure of the first network device.
[0091] A communication connection is established between the first network device and the terminal device. When the first network device interacts with the terminal device, the first network device monitors the packet loss of the data packets sent by the terminal device to obtain the packet loss situation of the uplink data of the terminal device.
[0092] The packet loss of uplink data may include a packet loss rate of uplink data. The first network device may calculate the number of data packets sent by the terminal device and the number of data packets discarded within a set time interval, and calculate the packet loss rate of uplink data from the terminal device within the set time interval according to the number of data packets sent by the terminal device and the number of data packets discarded within the set time interval. It can be understood that the set time interval can be set according to actual needs.
[0093] In the embodiment of the present application, the fault condition of the first network device may include, but is not limited to, information such as probability information of the first network device failing, a fault type, etc. As an example, the first network device may obtain its own operation information, and obtain information such as probability information of the first network device failing, a fault type, etc. by monitoring the operation information.
[0094] Among them, the operation information is monitored using a fault monitoring model or a set monitoring rule to obtain the probability information of the first network device failing and the fault type and other information. The fault monitoring model can be a model obtained by training a neural network through supervised or unsupervised training methods. The neural network can be a long short-term memory network (longshort-term memory, LSTM), a multi-layer perceptron (multi-layer perceptron, MLP), a multi-layer feedforward neural network, a self-organizing neural network, etc., without specific restrictions, and can be set according to actual needs. The monitoring rules can be pre-set conditional rules, for example, whether there is a conditional rule for a certain type of alarm information, which can be set according to business needs, and the embodiments of the present application do not make specific restrictions.
[0095] In the embodiment of the present application, the first network device also measures the signal strength of the uplink signal from the terminal device to obtain the signal strength of the uplink signal from the terminal device, that is, the uplink RSSI of the uplink signal from the terminal device received by the first network device.
[0096] In an embodiment of the present application, the first network device may send the first information to the terminal device in real time, or may send the first information to the terminal device according to a set duration.
[0097] S302: The terminal device receives first information from the first network device and obtains second information.
[0098] Considering that the signal strength of the uplink signal of the terminal device received by the network device and the uplink data will be affected by many factors, for example, when the terminal device does not send data, the network device will not be able to receive the uplink data of the terminal device and the signal strength of the uplink signal. For another example, when there is interference in the environment where the terminal device is located, it will also affect the signal strength of the uplink signal of the terminal device and the transmission of the uplink data of the terminal device.
[0099] In order to improve the accuracy of network device switching and avoid frequent switching of network devices by terminal devices, in an embodiment of the present application, the terminal device also obtains second information and detects whether to switch the network device based on the first information and the second information.
[0100] In the embodiment of the present application, the second information includes, but is not limited to, the signal strength of the downlink signal received by the terminal device from the first network device and the packet loss status of the downlink data received by the terminal device from the first network device.
[0101] In an embodiment of the present application, after a communication connection is established between the first network device and the terminal device, when the terminal device interacts with the first device, the terminal device will also monitor the packet loss of the data packets sent by the first network device to obtain the packet loss status of the downlink data from the first network device.
[0102] Accordingly, the packet loss situation of the downlink data may include the packet loss rate of the downlink data. The terminal device may calculate the number of data packets sent from the first network device and the number of data packets discarded within a set time interval, and calculate the packet loss rate of the downlink data from the first network device within the set time interval based on the number of data packets sent from the first network device and the number of data packets discarded within the set time interval.
[0103] In an embodiment of the present application, the terminal device can measure the signal strength of the downlink signal of the first network device to obtain the signal strength of the downlink signal from the first network device, that is, the downlink RSSI of the downlink signal from the first network device received by the terminal device.
[0104] It can be understood that the terminal device can also obtain the second information in real time, or according to a set duration, or after receiving the first information sent by the first network device. The specific settings can be based on actual needs, and the embodiments of the present application do not impose specific restrictions.
[0105] S303: The terminal device detects whether the first information satisfies the first condition and whether the second information satisfies the second condition. If the first information satisfies the first condition and the second information satisfies the second condition, the terminal device searches for the second network device and switches from the first network device to the second network device.
[0106] Among them, the first condition refers to the condition used to detect the uplink quality, and the first condition includes, but is not limited to, one or more conditions including the signal strength of the uplink signal being less than a first preset strength threshold, the packet loss rate of the uplink data being greater than a first preset packet loss threshold, and the network equipment being at risk of failure.
[0107] The second condition refers to a condition for detecting downlink quality, and the second condition includes, but is not limited to, one or more conditions including: the signal strength of the downlink signal is less than a second preset strength threshold, the packet loss rate of the downlink data is greater than a second preset packet loss threshold, etc.
[0108] In the embodiment of the present application, the first preset strength threshold and the second preset strength threshold can be set according to the actual switching demand, and there is no specific limitation. For example, the first preset strength threshold can be -90dB, and the second preset strength threshold can be -70dB. It can be understood that if the second preset strength threshold is set larger than the first preset strength threshold, the switching action of the terminal device is more frequent, and if the second preset strength threshold is set smaller than the first preset strength threshold, the switching action of the terminal device is less frequent.
[0109] In the embodiment of the present application, the first preset packet loss threshold and the second preset packet loss threshold can be the same or different, and can be set according to actual needs, and the embodiment of the present application does not make specific restrictions. It can be understood that the larger the first preset packet loss threshold and the second preset packet loss threshold are set, the less frequent the switching action of the terminal device is, and the smaller the first preset packet loss threshold and the second preset packet loss threshold are set, the more frequent the switching action of the terminal device is.
[0110] In an embodiment of the present application, when the signal strength of the uplink signal received by the first network device from the terminal device is less than the first preset strength threshold, it means that the signal strength of the uplink signal is weak, and the first network device cannot normally receive and parse the data sent by the terminal device, which will cause the Internet access service of the terminal device to be affected.
[0111] In an embodiment of the present application, when the packet loss rate of the uplink data received by the first network device from the terminal device is greater than the first preset packet loss threshold, it means that the network channel of the first network device is relatively congested or there are problems such as transmission path fading. The first network device cannot normally send the uplink data from the terminal device, and the packet loss rate is high, which will cause the terminal device's Internet access service to be affected.
[0112] In the embodiment of the present application, when there is a risk of failure of the first network device, it means that the first network device may fail and the first network device cannot work normally, which will cause the Internet access service of the terminal device to be affected.
[0113] In an embodiment of the present application, when the signal strength of the downlink signal from the first network device received by the terminal device is less than the second preset strength threshold, it means that the signal strength of the downlink signal from the first network device received by the terminal device has become weaker. Although the terminal device can still receive the data sent by the first network device at this time, there may be problems with slow receiving rate and analysis rate.
[0114] In an embodiment of the present application, when the packet loss rate of downlink data received by the terminal device from the first network device is greater than the second preset packet loss threshold, it indicates that the network channel from the first network device to the terminal device is blocked. Although the terminal device can receive the data sent by the first network device, a slow receiving rate may occur.
[0115] In some embodiments of the present application, when the first condition includes multiple conditions, when any one of the conditions is met, it is determined that the first information satisfies the first condition. Correspondingly, when the second condition includes multiple conditions, when any one of the conditions is met, it is determined that the second information satisfies the second condition.
[0116] It can be understood that in the embodiment of the present application, when it is detected that the first information satisfies the first condition and the second information satisfies the second condition, it indicates that the downlink quality from the first network device to the terminal device begins to deteriorate, but the terminal device can receive the data sent by the first network device, and the uplink quality from the terminal device to the first network device is poor, and the first network device cannot normally receive the data sent by the terminal device.
[0117] When the terminal device can receive data sent by the first network device, but the first network device cannot normally receive the data sent by the terminal device, in order to improve the Internet access quality, the switching of the network device can be triggered, and then the second network device can be scanned and searched. After the second network device is found, the communication connection with the first network device can be disconnected, and the communication connection with the second network device can be established, thereby realizing the switching of the network device, avoiding the problem of the terminal device staying under the network device for a long time without triggering the switching, which can effectively improve the network quality and improve the user experience.
[0118] Considering that in actual application, when the downlink quality is poor, it will also affect the user's Internet access quality. In order to improve processing efficiency and ensure the user's Internet access quality, in some embodiments of the present application, after the terminal device obtains the second information, it can also detect whether the second information meets the third condition. The third condition includes, but is not limited to, the signal strength of the downlink signal of the first network device is less than the third preset strength threshold, and the packet loss rate of the downlink data of the first network device is greater than the third preset packet loss threshold.
[0119] In an embodiment of the present application, the third preset strength threshold is less than the second preset strength threshold, and the third preset packet loss threshold is greater than the second preset packet loss threshold. When the signal strength of the downlink signal of the first network device is less than the third preset strength threshold, it indicates that the terminal device can no longer normally receive the data sent by the first network device, and the terminal device can no longer normally browse data through the network. When the packet loss rate of the downlink data of the first network device is greater than the third preset packet loss threshold, it indicates that the network channel from the first network device to the terminal device is severely blocked, the terminal device can no longer normally receive the data sent by the first network device, and the terminal device can no longer normally browse data through the network.
[0120] In the embodiment of the present application, when the second information satisfies the third condition, the switching of the network device can be directly triggered, so that the switching of the optimal network device can be realized in time, the smooth progress of the business is guaranteed, and the user experience is improved.
[0121] It can be understood that when the second information does not meet the third condition, it can be detected again whether the first information meets the first condition and whether the second information meets the second condition. When the first information meets the first condition and the second information meets the second condition, the switching of the network device is triggered. When the first information does not meet the first condition and / or the second information does not meet the second condition, there is no need to trigger the switching of the network device.
[0122] In some embodiments, in order to timely implement the switching of the optimal network device, the network device may be switched when only the first information satisfies the first condition, which may be specifically set according to actual needs.
[0123] The network device switching method provided in the embodiment of the present application searches for the second network device when the first information satisfies the first condition and the second information satisfies the second condition, and then switches from the first network device to the second network device. In this way, by combining the first information including the uplink information and the second information including the downlink information to switch the network device, it is possible to avoid the problem that the terminal device resides in one network device for a long time without triggering the switching of the optimal network device. The switching of the optimal network device can be realized in time, which facilitates the terminal to connect to a network with better communication quality, ensures the smooth operation of the business, and improves the user's Internet experience.
[0124] Considering that in actual application, when the terminal device switches to the first network device, the terminal device can scan multiple available network devices. In order to obtain the best network device, improve the quality of Internet access and improve the user experience, please refer to Figure 7 , searching for the second network device, and the step of switching from the first network device to the second network device may include:
[0125] S3031: Obtain the signal strength of the downlink signal of the available network device of the terminal device.
[0126] S3032: Switch from the first network device to the second network device, where the second network device is the device with the strongest downlink signal strength among the available network devices of the terminal device.
[0127] When the terminal device switches to the first network device, it can scan the surrounding environment for devices to obtain available network devices in the surrounding environment.
[0128] After obtaining the available network device, the terminal device may measure the signal strength of the downlink signal of the available network device to obtain the signal strength of the downlink signal of the available network device.
[0129] After obtaining the signal strength of the downlink signal of the available network devices, the signal strength of the downlink signals of the available network devices are compared to determine the network device with the strongest downlink signal strength among the available network devices, wherein the network device with the strongest downlink signal strength is the second network device.
[0130] After obtaining the second network device, the first network device may be switched to the second network device, that is, the connection with the first network device is disconnected and a connection with the second network device is established.
[0131] As an example, in order to ensure the quality of Internet access for users, when the available network devices do not include the first network device, the network device with the strongest signal strength of the downlink signal among the available network devices can be directly determined as the second network device, and the first network device can be switched to the second network device. When the available network devices include the first network device, and the first network device is the network device with the strongest signal strength of the downlink signal among the available network devices, a candidate network device with the second signal strength of the downlink signal can be obtained from the available network devices, and the signal strength of the downlink signal of the first network device is compared with the signal strength of the downlink signal of the candidate network device. If the difference between the signal strength of the downlink signal of the first network device and the signal strength of the downlink signal of the candidate network device is within the set range, the candidate network device can be determined as the second device network, and the first network device can be switched to the second network device. If the difference between the signal strength of the downlink signal of the first network device and the signal strength of the downlink signal of the candidate network device is not within the set range, the first network device and the second network device are the same network device, and there is no need to switch the first network device to the second network device. Among them, the setting range can be set according to actual needs, and the embodiment of the present application does not make specific restrictions.
[0132] In the embodiment of the present application, the first network device and the second network device can be connected to the same network, that is, the first network device and the second network device can both be connected to the first network. Correspondingly, the first network device and the second network device can also be connected to different networks, that is, the first network device is connected to the first network, the second network device is connected to the second network, and the first network and the second network are different networks.
[0133] For example, when the first network device and the second network device are both routers, the first network device and the second network device can be connected to a network provided by the same optical network terminal.
[0134] For another example, when the first network device is a router and the second network device is a base station, the first network device can be connected to a network provided by an optical network terminal, and the second network device can be connected to a cellular mobile network. It can be understood that when the first network device is a router and the second network device is a base station, after the terminal device switches from the first network device to the second network device, the terminal device can interact with the second network device through a subscriber identification module (SIM) card to access the cellular mobile network and surf the Internet. In order to further achieve the optimal network device switching in a timely manner, please refer to Figure 8 The network device switching method provided in the embodiment of the present application may also include:
[0135] S401: When a trigger condition is met, the first network device sends first information to the terminal device.
[0136] The trigger condition refers to the condition for sending the first information, which can be set according to business requirements.
[0137] In the embodiment of the present application, the trigger condition may be, but is not limited to, the signal strength of the uplink signal from the terminal device is less than the first preset strength threshold, and the packet loss rate of the uplink data of the terminal device is greater than the first preset packet loss threshold. Based on this, in the embodiment of the present application, when the trigger condition is met, the step of sending the first information to the terminal device by the first network device may include:
[0138] When the signal strength of the uplink signal is less than a first preset strength threshold, sending first information to the terminal device; and / or,
[0139] When the packet loss rate of the uplink data is greater than a first preset packet loss threshold, first information is sent to the terminal device.
[0140] It can be understood that when the signal strength of the uplink signal obtained by the first network device from the terminal device is less than the first preset strength threshold and / or the packet loss rate of the uplink data from the terminal device is greater than the first preset packet loss threshold, it means that the first network device cannot normally receive the data sent by the terminal device. In order to ensure the quality of Internet access, the first information can be sent to the terminal device to enable the terminal device to decide whether to switch the network device.
[0141] Considering that when the terminal device moves back and forth in the coverage area of the first network device, the signal strength of the uplink signal may fluctuate, resulting in greater fluctuations in the detection of the signal strength, and thus causing the terminal device to frequently initiate switching, in order to improve accuracy, in the embodiment of the present application, the trigger condition may also include that the signal strength of the uplink signal of the terminal device is less than the first preset strength threshold and the duration is greater than the preset duration threshold. In this way, the first network device can send the first information to the terminal device when the signal strength of the uplink signal of the terminal device is less than the first preset strength threshold and the duration is greater than the preset duration threshold.
[0142] In an embodiment of the present application, the preset duration threshold may be 2s or 5s, which may be set according to actual needs, and the embodiment of the present application does not impose any specific limitation.
[0143] Exemplarily, taking the first preset strength threshold of -90db and the preset duration threshold of 5s as an example, when the first network device detects that the signal strength of the uplink signal from the terminal device is less than -90db, the timing can be started to count the duration of the signal strength being less than -90db, and when the duration of the signal strength being less than -90db is greater than 5s, the first information can be sent to the terminal device.
[0144] It can be understood that when the first network device detects that the signal strength of the uplink signal of the terminal device is less than the first preset strength threshold but the duration is not greater than the preset duration threshold, the first network device may not send the first information to the terminal device.
[0145] Considering that when a network device fails, the terminal device cannot access the Internet, in order to ensure the Internet access quality of the terminal device, in the embodiment of the present application, the trigger condition may also include the risk of failure of the network device. Based on this, in the embodiment of the present application, when the trigger condition is met, the step of sending the first information to the terminal device may include:
[0146] When there is a risk of failure of the first network device, first information is sent to the terminal device.
[0147] In order to enable the terminal device to switch network devices in time, when the first network device detects that it has a risk of failure, it can send the first information to the terminal device.
[0148] It can be understood that the first network device can send the first information to the terminal device when at least one of the trigger conditions is met.
[0149] S402: The terminal device receives first information from the first network device and obtains second information.
[0150] S403: The terminal device detects whether the first information satisfies the first condition and whether the second information satisfies the second condition. If the first information satisfies the first condition and the second information satisfies the second condition, the terminal device searches for the second network device and switches from the first network device to the second network device.
[0151] It should be noted that when the first condition is the same as the trigger condition, since the first network device sends the first information to the terminal device when the trigger condition is met, after obtaining the first information, the terminal device can directly obtain the result that the first information meets the first condition, and can only detect whether the second information meets the second condition.
[0152] It can be understood that the specific process of step S402 and step S403 can refer to step S302 to step S303, and will not be repeated here.
[0153] In some embodiments of the present application, the trigger condition may be pre-configured in the first network device. After the first network device establishes a communication connection with the terminal device, the first network device monitors the signal strength of the uplink signal of the terminal device, the packet loss of the uplink data of the terminal device, and its own fault condition. When it is detected that the trigger condition is met, the first network device sends the first information to the terminal device.
[0154] Taking into account that in actual applications, different terminal devices have inconsistent switching requirements for network devices. Therefore, in an embodiment of the present application, the trigger condition can also be sent by the terminal device to the first network device.
[0155] Exemplarily, after establishing a connection with the first network device, the terminal device can actively send a trigger condition to the first network device to instruct the first network device to monitor the signal strength of the uplink signal of the terminal device, the packet loss of the uplink data, and the fault of the first network device, and send the first information when the trigger condition is met.
[0156] To facilitate data exchange between the first network device and the terminal device, in an embodiment of the present application, the first network device and the terminal device exchange data based on an action frame (Action frame) in a management frame. For example, the terminal device may send a trigger condition to the first network device via an Action frame, and the first network device may send the first information to the terminal device via an Action frame. For example, the terminal device may carry the trigger condition via a frame body (Frame Body) in the Action frame, and the first network device may carry the first information via a frame body in the Action frame.
[0157] In some embodiments, the Action frame may also include a header (MAC Header) and a frame check sequence (FCS).
[0158] As an example, see Fig. 9 , Fig. 9 A frame format of an Action frame provided in an embodiment of the present application. Fig. 9 As shown, the Action frame in the embodiment of the present application includes a header (MAC Header), a frame body (Frame Body), and a frame check sequence (FCS).
[0159] The header includes a frame control structure (Frame Control), a duration / identifier (Duration / ID), addresses (Address1, Address2, Address3), a sequence control field (Sequence Control), and an HT control field (HTControl). The frame control structure includes information such as the destination of the frame. The duration / identifier is used to indicate how long the frame and its confirmation frame will occupy the channel. Addressres1 indicates the address of the frame receiver, Address2 indicates the address of the sender, and Address3 indicates the filtering address. The sequence control field is used to reassemble frame fragments and discard duplicate frames. The HT control field includes a probe request for requesting the receiver to send a probe frame.
[0160] The Action frame ends with a frame check sequence, which is used to check the integrity of the received frame.
[0161] For the header and frame check sequence of the Action frame, reference may be made to the explanation in conventional technology and will not be described in detail here.
[0162] In the embodiment of the present application, information is mainly carried by the frame body. Fig. 9 As shown, the frame body includes a Category field and an Action Detail. The Category field is used to characterize the type of the frame, and different Category field values correspond to different types. As shown in Table 1, Table 1 shows the types corresponding to some Category field values. It can be understood that the action details of different types of Action frames may be different.
[0163] Table 1
[0164] Code Meaning 0 Spectrum Management 1 Quality of Service (QoS) … 127 Vendor-specific 128-255 Error
[0165] In the embodiment of the present application, a Vendor-specific Action frame may be used to transmit trigger conditions and first information between the terminal device and the network device. As shown in FIG9 , the Category field is 0X7F, that is, number 127, indicating that a Vendor-specific Action frame is used.
[0166] As an example, the action details part of the Vendor-specific Action frame may include an Organizationally Unique Identifier (OUI) field and Vendor Specific Content. It can be understood that in the embodiment of the present application, the Vendor Specific Content may be used to carry the trigger condition and the first information.
[0167] As an example, the vendor-specific information may include an identification type (OUI-Type) field, a version (Version) field, an action (Operation) field, a transaction ID (Transaction ID) field, a total length (TotalLength) field, a type (Type) field, a length (length) field, and a value (Value) field.
[0168] The OUI field can be used to describe the identification information of the supplier, and the OUI-Type field can be used to describe whether there is a conflict risk in the supplier type. Fig. 9 As shown, Fig. 9The OUI in the format is "0x0 0XE0 0xFC", the OUI-Type is "0x80", indicating that there is a conflict risk, and the Version is "00".
[0169] The Version field can be used to describe the version number of the current product. It is understandable that the fields defined in the Action of different versions of products may be different. The Transition ID field can be used to describe the ID information of the Action frame. The TotalLength field refers to the total length of the Type field, the Length field, and the Value field.
[0170] The Type field may be used to describe the type of data (such as first information, trigger condition, etc.) carried by the Action frame. The Length field may be used to describe the length of the data carried by the Action frame. The Value field may be used to describe the value of the data carried by the Action frame.
[0171] The Operation field can be used to describe the action type of the action frame. Different values of the Operation field indicate different action types. As shown in Table 2, Table 2 shows the action types corresponding to different Operation field values. For example, when the value in the Operation field is 0, it indicates that the action type of the current Action frame is Abort, which means that the other party is informed to abort subsequent transmission.
[0172] Table 2
[0173]
[0174] It should be noted that the fields included in the action details described above are only one implementation method of the Vendor-specific Action frame. The action details in the Vendor-specific Action frame can be adjusted according to actual needs, and the embodiments of the present application do not impose specific limitations.
[0175] It can be understood that, for any terminal device or network device, after receiving the Action frame, the header and the frame body are parsed to obtain the information carried by the Action.
[0176] The following is a detailed description of the interaction process between the terminal device and the network device in the embodiment of the present application using the above-described Vendor-specific Action frame. In the embodiment of the present application, the data interaction between the network device and the terminal device, that is, the interaction of the trigger condition and the first information, can be realized by using Action frames of different action types. Fig.10The network device switching method provided in the embodiment of the present application may also include S501 to S506.
[0177] S501: The terminal device sends a negotiation capability request frame to the first network device.
[0178] Taking into account that in actual applications, some network devices do not have the monitoring function, or do not have the interactive function of monitoring data, in order to avoid invalid switching of network devices and save resources, in an embodiment of the present application, before sending a trigger condition to the first network device, the terminal device can first determine the capabilities supported by the first network device, that is, determine whether the first network device performs network quality monitoring and provides feedback of the first information based on the quality monitoring.
[0179] It can be understood that network quality monitoring includes, but is not limited to, monitoring the signal strength of an uplink signal from a terminal device and monitoring the packet loss of uplink data from the terminal device.
[0180] In some embodiments, network quality monitoring may also include fault monitoring of the first network device.
[0181] In an embodiment of the present application, after establishing a communication connection with the first network device, the terminal device can send a negotiation capability request frame to the first network device, and determine through the negotiation capability request frame whether the first network device can perform network quality monitoring and provide feedback of first information based on the quality monitoring.
[0182] As an example, the negotiation capability request frame sent by the terminal device to the first network device may be an Action frame with an action type of Request, or may be an Action frame with an action type of Announcement.
[0183] Exemplarily, as shown in Table 2, when the negotiation capability request frame sent by the terminal device to the first network device is a Request Action frame, the Operation field value is 1; when the negotiation capability request frame sent by the terminal device to the first network device is an Announcement Action frame, the Operation field value is 5.
[0184] S502: The first network device sends a negotiation capability response frame to the terminal device.
[0185] Among them, after receiving the negotiation capability request frame sent by the terminal device, if the first network device can perform network quality monitoring and feedback the first information based on the quality monitoring, it can send a negotiation capability response frame to the terminal device. If the first network device cannot perform network quality monitoring, it is not necessary to send a negotiation capability response frame to the terminal device, thereby simplifying the process and improving efficiency.
[0186] In some embodiments of the present application, the first network device may also carry the capabilities supported by itself through a negotiation capability response frame. After receiving the negotiation capability response frame, the terminal device parses the negotiation capability response frame to obtain a result of determining whether the first network device can perform network quality monitoring and feedback of the first information based on the quality monitoring. For example, the Value field in the negotiation capability response frame may carry information on whether the first network device can perform network quality monitoring and feedback of the first information based on the quality monitoring. After receiving the negotiation capability response frame, the terminal device parses the negotiation capability response frame and determines whether the first network device can perform network quality monitoring and feedback of the first information based on the quality monitoring according to the content in the Value field.
[0187] In the embodiment of the present application, the first network device may reply with a corresponding negotiation capability response frame according to the action type of the negotiation capability request frame sent by the terminal device.
[0188] Exemplarily, when the negotiation capability request frame sent by the terminal device to the first network device is an Action frame with an action type of Request, the negotiation capability response frame sent by the first network device to the terminal device may be an Action frame with an action type of Response. When the negotiation capability request frame sent by the terminal device to the first network device is an Action frame with an action type of Announcemen, the negotiation capability response frame sent by the first network device to the terminal device may also be an Action frame with an action type of Announcement.
[0189] Exemplarily, as shown in Table 2, when the negotiation capability response frame sent by the first network device to the terminal device is an Action frame of Response, the Operation field value is 2; when the negotiation capability response frame sent by the first network device to the terminal device is an Action frame of Announcement, the Operation field value is 5.
[0190] S503: The terminal device sends a first action frame to the first network device, where the first action frame includes a trigger condition.
[0191] Among them, after the terminal device receives the negotiation capability response frame sent by the first network device and parses the negotiation capability response frame, if it is determined that the first network device can perform network quality monitoring and provide first information feedback based on the quality monitoring, the terminal device can send a first action frame to the first network device.
[0192] In an embodiment of the present application, the first action frame includes a trigger condition for sending the first information. The first action frame is used to instruct the first network device to send the first information to the terminal device when it detects that the trigger condition is met, so that the terminal device can decide whether to switch the network device based on the first information.
[0193] As an example, the trigger condition may be carried in the Value field in the first action frame. When the first network device receives the first action frame, it parses the first action frame and obtains the trigger condition from the Value field in the first action frame.
[0194] As an example, the first action frame sent by the terminal device to the first network device may be an Action frame with an action type of Data, or may be an Action frame with an action type of Notice.
[0195] Exemplarily, when the negotiation capability response frame sent by the first network device to the terminal device is an Action frame with an action type of Response, the terminal device can send an Action frame with an action type of Data to the first network device. When the negotiation capability response frame sent by the first network device to the terminal device is an Action frame with an action type of Announcement, the terminal device can send an Action frame with an action type of Notice to the first network device.
[0196] Exemplarily, as shown in Table 2, when the first action frame sent by the terminal device to the first network device is an Action frame of Data, the Operation field value is 3; when the first action frame sent by the terminal device to the first network device is an Action frame of Notice, the Operation field value is 4.
[0197] S504: The first network device sends a second action frame to the terminal device, where the second action frame includes the first information.
[0198] After receiving the first action frame sent by the terminal device, the first network device parses the first action frame to obtain the triggering condition.
[0199] After obtaining the trigger condition, the first network device can detect whether the signal strength of the uplink signal from the terminal device, the packet loss of the uplink data of the terminal device, and the fault condition of the first network device meet the trigger condition during the process of monitoring the signal strength of the uplink signal from the terminal device, the packet loss of the uplink data of the terminal device, and the fault condition of the first network device. If the trigger condition is met, a second action frame can be sent to the terminal device.
[0200] As an example, the first information may be carried through the Value field in the second action frame. When the terminal device receives the second action frame, it parses the second action frame and obtains the first information from the Value field in the second action frame.
[0201] It can be understood that the process of the first network device detecting the signal strength of the uplink signal from the terminal device, the packet loss of the uplink data of the terminal device and whether the fault condition of the first network device meets the triggering condition can refer to step S401 and will not be repeated here.
[0202] In an embodiment of the present application, when the trigger condition is met, the second action frame that the first network device can send to the terminal device may be an Action frame with an action type of Notice.
[0203] It should be noted that in step S501 to step S504, the action type of the Action frame is only an example and is not a specific limitation. The action type of the Action frame can be set according to actual needs as long as data interaction can be achieved.
[0204] S505: The terminal device receives the second action frame from the first network device and obtains second information.
[0205] In order to timely switch the optimal network, the terminal device can decide whether to switch the network device based on the first information and the second information.
[0206] It can be understood that the first information can be obtained from the second action frame by parsing the second action frame sent by the first network device, and the process of the terminal device obtaining the second information can refer to step S302, which will not be repeated here.
[0207] S506: The terminal device detects whether the first information satisfies the first condition and whether the second information satisfies the second condition. If the first information satisfies the first condition and the second information satisfies the second condition, the terminal device searches for the second network device and switches from the first network device to the second network device.
[0208] Among them, after the terminal device obtains the first information and the second information, if the first information satisfies the first condition and the second information satisfies the second condition, the switching of the network device is triggered, and then the second network device is scanned and searched. After the second network device is found, the terminal device can switch from the first network device to the second network device, that is, disconnect the communication connection with the first network device and establish a communication connection with the second network device. For details, please refer to step S303, which will not be repeated here.
[0209] For easier understanding, please refer to Fig.11 , Fig.11An interactive timing method for the network device switching method provided in the embodiment of the present application. Fig.11 As shown, after the first network device establishes a connection with the terminal device, the terminal device sends a negotiation capability request frame to the first network device to determine whether the first network device can perform network quality monitoring and feedback of the first information based on the quality monitoring. After receiving the negotiation capability request frame, if the first network device supports network quality monitoring and feedback of the first information, it can send a negotiation capability response frame to the terminal device to inform the terminal device that it can perform network quality monitoring and feedback of the first information. After receiving the negotiation capability response frame, the terminal device can send a first action frame including a trigger condition to the first network device. After receiving the first action frame, the first network device sends a second action frame including the first information to the terminal device during the network quality monitoring process if the trigger condition is met. For example, if the signal strength of the received uplink signal of the terminal device is less than the first preset strength threshold, and the duration of being less than the first preset strength threshold reaches the preset duration threshold, then the second action frame is sent to the terminal device. After receiving the second action frame, the terminal device parses the second action frame to obtain the first information, and then detects whether it is necessary to switch the network device based on the obtained second information and the first information. If it is necessary to switch the network device, it searches whether there is an available network device, determines the second network device with the best downlink signal strength from the available network devices, and switches from the first network device to the second network device, that is, disconnects the connection with the first network device and establishes a connection with the second network device.
[0210] The network device switching method provided in the embodiment of the present application, when the triggering condition is met, the network device encapsulates the signal strength of the uplink signal from the terminal device, the packet loss of the uplink data, and the fault condition of the network device in the Action frame, and sends it to the terminal device. The terminal device obtains the switching timing of the network device by combining the signal strength of the downlink signal from the network device, the packet loss of the downlink data, and the signal strength of the uplink signal sent by the network device, the packet loss of the uplink data, and the fault condition of the network device. In this way, through the coordinated processing of the network device and the terminal device, it is possible to avoid the problem of the terminal device staying under the network device for a long time without triggering the switching of the optimal network, and the switching of the optimal network device can be realized in time to ensure the smooth progress of the business and improve the user experience.
[0211] Take signal strength as an example. Fig.12 , Fig.12 A schematic diagram of signal strength variation is shown in Fig.12As shown, in a 2.4GHz frequency band network, in conventional technology, at 11:18:53, that is, when the signal strength of the downlink signal is less than -80dB, the switching of the network device is triggered. However, for the technical solution of the present application, the first preset strength threshold corresponding to the uplink signal is set to -90dB, and the second preset strength threshold corresponding to the downlink signal is set to -70dB, which triggers the switching of the network device. Fig.12 As shown, at 11:18:38, the signal strength of the uplink signal is less than -90dB, the line of the uplink signal becomes horizontal, the signal strength of the uplink signal is maintained at the original value, and the signal strength of the downlink signal is less than -70dB. By adopting the technical solution of the present application, the switching of the network device will be triggered at 11:18:38. Compared with the prior art, the switching of the network device can be triggered 15s in advance.
[0212] like Fig.12 As shown, in the 5GHz frequency band network, in conventional technology, the switching of network devices is usually triggered at 11:21:58, that is, the signal strength of the downlink signal is less than -90db. For the technical solution of the present application, the first preset strength threshold corresponding to the uplink signal is set to -93db, and the second preset strength threshold corresponding to the downlink signal is set to -70db, which triggers the switching of network devices. Fig.12 As shown, at 11:21:22, the signal strength of the uplink signal is less than -93db, and at the same time, the signal strength of the downlink signal is less than -70db. By adopting the technical solution of the present application, the switching of the network device will be triggered at 11:21:22. Compared with conventional technology, the switching of the network device can be triggered 36s in advance.
[0213] The network device switching method provided in the embodiment of the present application can avoid the problem of terminal devices staying in the network device for a long time without triggering the switching of the optimal network through the collaborative processing of the network device and the terminal device. It can realize the switching of the optimal network device in time, ensure the smooth progress of the business, and improve the user experience.
[0214] Based on the same inventive concept, an embodiment of the present application provides an electronic device, which may be a terminal device or a network device in the above embodiment. The electronic device may specifically include a communication interface, a memory, a processor, and one or more computer programs. Among them, the communication interface, the memory, and the processor may be connected via one or more communication buses. Among them, the one or more computer programs are stored in the above memory and configured to be executed by the processor, and when the one or more computer programs are executed by the processor, the functions or steps in the above network device switching method are implemented.
[0215] An embodiment of the present application also provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processing circuit, the functions or steps in the above-mentioned network device switching method are implemented.
[0216] In addition, an embodiment of the present application may also provide a chip system, which includes a processing circuit and a storage medium, wherein the storage medium stores computer program instructions, and when the computer program instructions are executed by the processing circuit, the functions or steps in the above-mentioned network device switching method are implemented.
[0217] In addition, the embodiments of the present application may also provide a computer program product including instructions, which, when executed on a computer, enables the computer to execute the functions or steps in the above-mentioned network device switching method.
[0218] In addition, an embodiment of the present application may also provide a communication system, which includes an auxiliary device and a terminal device, and the terminal device and the auxiliary device can be used to execute the functions or steps in the above-mentioned network device switching method.
[0219] In addition, an embodiment of the present application may also provide an operating system, which, when running on a computer, enables the computer to execute the functions or steps in the above-mentioned network device switching method.
[0220] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that, for the convenience and conciseness of description, the specific working processes of the chip system, electronic device, computer-readable storage medium, computer program product containing instructions, communication system, and operating system described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0221] It is understandable that the steps of the method or algorithm described in conjunction with the embodiments of the present application can be implemented in a hardware manner, or can be implemented by a processor executing a software instruction. The software instruction can be composed of corresponding software modules, and the software module can be stored in a random access memory, a flash memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a register, a hard disk, a mobile hard disk, a read-only optical disk, or any other form of storage medium. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuit, ASIC). In addition, the ASIC can be located in an electronic device. Of course, the processor and the storage medium can also be present in an electronic device as discrete components.
[0222] In an optional manner, when software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is implemented in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disk (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
[0223] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.
Claims
1. A network device switching method, characterized in that: Applied to a terminal device, the method comprises: Receiving first information from a first network device, the first information including one or more of the following: signal strength of an uplink signal from the terminal device received by the first network device, packet loss of uplink data from the terminal device received by the first network device, and a fault condition of the first network device; Acquire second information, where the second information includes one or more of the following: signal strength of a downlink signal received by the terminal device from the first network device, and packet loss of downlink data received by the terminal device from the first network device; When the first information satisfies a first condition and the second information satisfies a second condition, a second network device is searched for, and a switch is made from the first network device to the second network device.
2. The network device switching method according to claim 1, characterized in that: Before receiving the first information from the first network device, the method further includes: Sending a first action frame to the first network device, where the first action frame includes a trigger condition for sending the first information, and the first action frame is used to instruct the first network device to send a second action frame to the terminal device when the trigger condition is met; The receiving first information from the first network device includes: The second action frame is received from the first network device, where the second action frame includes the first information.
3. The network device switching method according to claim 2, characterized in that: The trigger condition includes that the signal strength of the uplink signal is less than a first preset strength threshold, and / or the packet loss rate of the uplink data is greater than a preset packet loss threshold.
4. The network device switching method according to claim 3, characterized in that: The trigger condition includes that the signal strength of the uplink signal is less than a first preset strength threshold and the duration thereof is greater than a preset duration threshold.
5. The network device switching method according to claim 2, characterized in that: The sending a first action frame to the first network device includes: Sending a negotiation capability request frame to the first network device; After receiving the negotiation capability response frame from the first network device, the first action frame is sent to the first network device.
6. The network device switching method according to any one of claims 1 to 5, characterized in that: The first information satisfies the first condition including one or more of the following: the signal strength of the uplink signal is less than a first strength threshold, the packet loss rate of the uplink data is greater than a first preset packet loss threshold, and the first network device has a failure risk; The second information satisfies the second condition including one or more of the following: the signal strength of the downlink signal is less than a second strength threshold, and the packet loss rate of the downlink data is greater than a second preset packet loss threshold.
7. The network device switching method according to any one of claims 1 to 6, characterized in that: The searching for the second network device and switching from the first network device to the second network device comprises: Obtaining the signal strength of the downlink signal of the available network device of the terminal device; Switch from the first network device to the second network device, where the second network device is the network device with the strongest downlink signal strength among the available network devices of the terminal device.
8. The network device switching method according to any one of claims 1 to 7, characterized in that: The first network device and the second network device are both connected to a first network; or, The first network device is connected to the first network, and the second network device is connected to a second network.
9. A network device switching method, characterized in that: Applied to a network device, the method comprises: When the trigger condition is met, first information is sent to the terminal device, and the first information includes one or more of the following: signal strength of the uplink signal received by the network device from the terminal device, packet loss of the uplink data received by the network device from the terminal device, and failure status of the network device.
10. The network device switching method according to claim 9, characterized in that: The sending of first information to the terminal device when the trigger condition is met includes: When the signal strength of the uplink signal is less than a first preset strength threshold, sending a second action frame to the terminal device; and / or, When the packet loss rate of the uplink data is greater than a preset packet loss threshold, sending a second action frame to the terminal device; and / or, When the network device is at risk of failure, a second action frame is sent to the terminal device, where the second action frame includes the first information.
11. The network device switching method according to claim 10, characterized in that: When the signal strength of the uplink signal is less than a first preset strength threshold, sending a second action frame to the terminal device includes: When the signal strength of the uplink signal is less than a first preset strength threshold and the duration is greater than a preset duration threshold, a second action frame is sent to the terminal device.
12. The network device switching method according to any one of claims 9 to 11, characterized in that: Before sending the first information to the terminal device, the method further includes: Receiving a negotiation capability request frame sent by the terminal device; According to the negotiation capability request frame, a negotiation capability response frame is sent to the terminal device. After receiving the negotiation capability response frame, the terminal device sends a first action frame to the network device, wherein the first action frame includes sending the trigger condition.
13. The network device switching method according to any one of claims 9 to 12, characterized in that: The network device is one of an access point, a base station, and a transmitting and receiving point.
14. An electronic device, characterized in that: The electronic device comprises: A transceiver for sending and receiving radio signals; a memory for storing computer program instructions; A processor is used to execute the computer program instructions to support the electronic device to implement the method as described in any one of claims 1-8 or any one of claims 9-13.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processing circuit, the method according to any one of claims 1 to 8 or the method according to any one of claims 9 to 13 is implemented.
16. A chip system, characterized in that: The chip system includes a processing circuit and a storage medium, wherein the storage medium stores computer program instructions; when the computer program instructions are executed by the processing circuit, the method according to any one of claims 1 to 8 or the method according to any one of claims 9 to 13 are implemented.
17. A computer program product comprising instructions, characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 8 or the method according to any one of claims 9 to 13.