WiFi Network Processing Method, Terminal Device, Storage Medium and Program Product

By turning off a WiFi network on the terminal device according to specific conditions and selecting a WiFi network with better signal strength for data transmission, the problem of dual WiFi increasing power consumption is solved and the device's battery life is improved.

CN119521360BActive Publication Date: 2025-06-27HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510090374.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-06-27
Estimated Expiration
2045-01-21

AI Technical Summary

Technical Problem

When terminal devices use dual WiFi for redundant packet transmission, their power consumption is high, which affects battery life.

Method used

When specific conditions are met, turn off a WiFi network and select a WiFi network with better signal strength for data transmission to reduce power consumption.

Benefits of technology

Without affecting the reliability of data transmission, the power consumption of terminal equipment is reduced and the battery life time is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119521360B_ABST
    Figure CN119521360B_ABST
Patent Text Reader

Abstract

The present application provides a WiFi network processing method, a terminal device, a storage medium, and a program product, which are beneficial to improving the battery life of the terminal device. The method is applied to the terminal device, and the terminal device includes a first WiFi network and a second WiFi network, where the frequency bands of the first WiFi network and the second WiFi network are different. The method includes: when a first condition is satisfied, turning off the target WiFi network, where the target WiFi network is one of the first WiFi network and the second WiFi network; where the first condition is related to one or more of the following information: the default data transmission network of the terminal device; the duration of the terminal device activating the cellular network; the first transmission delay of the terminal device using the first WiFi network to transmit the first data packet; the second transmission delay of the terminal device using the second WiFi network to transmit the first data packet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of WiFi, and in particular, to a method for processing a WiFi network, a terminal device, a storage medium, and a program product. Background Art

[0002] With the development of technology, more and more terminal devices can support dual-band wireless fidelity (WiFi). The terminal device can perform redundant transmission of data packets through dual-band WiFi to improve the reliability of data transmission. For example, the terminal device can use the first WiFi network to send data packet 1, copy data packet 1, and use the second WiFi network to send the copied data packet 1.

[0003] Although dual-band WiFi can improve the reliability of data transmission, the power consumption of the terminal device will also be relatively large, which will affect the battery life of the terminal device. Summary of the Invention

[0004] This application provides a method for processing a WiFi network, a terminal device, a storage medium, and a program product, which is beneficial to improving the battery life of the terminal device.

[0005] In a first aspect, a method for processing a WiFi network is provided. The method is applied to a terminal device, the terminal device includes a first WiFi network and a second WiFi network, and the frequency bands of the first WiFi network and the second WiFi network are different. The method includes: closing a target WiFi network when a first condition is met, where the target WiFi network is one of the first WiFi network and the second WiFi network; where the first condition is related to one or more of the following information: the default data transmission network of the terminal device; the duration for which the terminal device activates the cellular network; the first transmission delay of the terminal device using the first WiFi network to transmit a first data packet; the second transmission delay of the terminal device using the second WiFi network to transmit the first data packet.

[0006] The terminal device can close one of the WiFi networks when the first condition is met. Since the information related to the first condition is all related to the reliability of data packet transmission, meeting the first condition also means that the reliability of data transmission can be satisfied. Therefore, closing one of the WiFi networks when the first condition is met can ensure that the battery life of the terminal device is improved without affecting the reliability of data transmission.

[0007] In some implementations, the first condition includes one or more of the following conditions: second condition: the default data transmission network of the terminal device is a cellular network; third condition: the duration for which the terminal device activates the cellular network is greater than or equal to a first threshold; fourth condition: the difference between the first transmission delay and the second transmission delay is less than or equal to a second threshold, and the first data packet is a single data packet; fifth condition: the average value of the differences between the multiple first transmission delays and the multiple second transmission delays is less than or equal to a third threshold, and the first data packet includes multiple data packets.

[0008] The default data transmission network can be understood as the preferred transmission network. If the terminal device switches the default data transmission network to a cellular network, it means that when the terminal device transmits data, it will preferentially use the cellular network. In this case, the cellular network and one WiFi network are sufficient to ensure the reliability of data transmission. Therefore, the power consumption of the terminal device can be reduced by turning off one WiFi network, and the battery life of the terminal device can be extended.

[0009] Generally, when the WiFi network signal is poor, the terminal device will activate the cellular network and use it as a backup network to transmit data through the cellular network when needed, ensuring the reliability of data transmission. Since the terminal device has activated the cellular network, it means that the terminal device will use the cellular network to transmit data. In this case, the power consumption of the terminal device can be reduced by turning off one WiFi network, and the remaining one WiFi network and the cellular network can ensure the reliability of data packet transmission.

[0010] The transmission delay of a data packet can reflect the performance of the WiFi network. The difference in transmission delays between two WiFi networks can indicate which WiFi network has better transmission performance and which has worse transmission performance. The terminal device can turn off one WiFi network when the performance of a certain WiFi network is poor to reduce the power consumption of the terminal device. The remaining one WiFi network, due to its better transmission performance, is also sufficient to ensure the reliability of data packet transmission.

[0011] In some implementations, the difference between the first transmission delay and the second transmission delay includes a first difference and / or a second difference. The first difference is the difference in the delay for the terminal device to receive the first data packet through the first WiFi network and the second WiFi network respectively, and the second difference is the difference in the delay for the peer device to receive the first data packet sent by the terminal device through the first WiFi network and the second WiFi network respectively.

[0012] Embodiments of the present application can determine whether the first condition is satisfied based on the uplink transmission time delay difference and / or the downlink transmission time delay difference, thereby ensuring the reliability of uplink transmission and the reliability of downlink transmission.

[0013] In some implementation manners, the method further includes: receiving the first data packet using the first WiFi network to obtain a first reception time of the first data packet; receiving the first data packet using the second WiFi network to obtain a second reception time of the first data packet; calculating the difference between the first reception time and the second reception time to obtain the first difference.

[0014] In some implementation manners, the method further includes: sending the first data packet to the peer device using the first WiFi network, and the reception time when the peer device receives the first data packet using the first WiFi network is the third reception time; sending the first data packet to the peer device using the second WiFi network, and the reception time when the peer device receives the first data packet using the first WiFi network is the fourth reception time; wherein, the difference between the third reception time and the fourth reception time is the second difference.

[0015] In some implementation manners, the method further includes: receiving first indication information sent by the peer device, where the first indication information is used to indicate whether the second difference satisfies the third condition and / or the fourth condition; and the closing the target WiFi network when the first condition is satisfied includes: closing the target WiFi network when the first difference satisfies the third condition and / or the fourth condition, and the second difference satisfies the third condition and / or the fourth condition.

[0016] In the case where both the peer device and the terminal device determine that the target WiFi network needs to be closed, the terminal device then closes the target WiFi network to avoid affecting the reliability of data transmission after closing the target WiFi network. Therefore, embodiments of the present application can ensure the reliability of uplink transmission and the reliability of downlink transmission on the premise of reducing the power consumption of the terminal device.

[0017] In some implementation manners, the first WiFi network is the primary WiFi network, the second WiFi network is the secondary WiFi network, and the target WiFi network is the secondary WiFi network.

[0018] In the embodiments of the present application, the secondary Wi-Fi network can be turned off only when the transmission delay of the secondary Wi-Fi network is relatively large, so as to avoid affecting the reliability of data transmission after the primary Wi-Fi network is turned off. Since the primary Wi-Fi network is the Wi-Fi network mainly used by the terminal device, in the embodiments of the present application, the primary Wi-Fi network will not be turned off regardless of whether its transmission delay is relatively large or not.

[0019] In some implementation manners, if the first condition includes the second condition and / or the third condition, the target Wi-Fi network is the secondary Wi-Fi network among the first Wi-Fi network and the second Wi-Fi network.

[0020] When the default data transmission network of the terminal device is the cellular network, the terminal device can directly turn off the secondary Wi-Fi network. This method is relatively simple to implement and can reduce the processing complexity of the terminal device.

[0021] When the activation duration of the cellular network is greater than or equal to the first threshold, the terminal device can directly turn off the secondary Wi-Fi network. This method is relatively simple to implement and can reduce the processing complexity of the terminal device.

[0022] In some implementation manners, if the first condition includes the second condition and / or the third condition, the method further includes: determining a first signal strength of the first Wi-Fi network; determining a second signal strength of the second Wi-Fi network; and determining the target Wi-Fi network based on the first signal strength and the second signal strength.

[0023] The terminal device can determine the Wi-Fi network to be turned off based on the signal strengths of the two Wi-Fi networks. For example, the terminal device can choose to turn off the Wi-Fi network with a relatively poor signal strength and use the Wi-Fi network with a relatively good signal strength for data transmission to ensure the reliability of data transmission.

[0024] In some implementation manners, the determining the target Wi-Fi network based on the first signal strength and the second signal strength includes: determining a third difference between the first signal strength and a fourth threshold, where the fourth threshold is a signal strength threshold for the first Wi-Fi network; determining a fourth difference between the second signal strength and a fifth threshold, where the fifth threshold is a signal strength threshold for the second Wi-Fi network; and determining the target Wi-Fi network based on the third difference and the fourth difference.

[0025] When determining the target WiFi network based on the signal strength, the signal strength thresholds (i.e., reference signal strengths) of different WiFi networks can be considered, rather than simply using the signal strength of the WiFi network to determine the target WiFi network, so that the determined target WiFi is more reasonable.

[0026] In some implementation manners, determining the target WiFi network based on the third difference and the fourth difference includes: if the difference between the third difference and the fourth difference is greater than the sixth threshold, determining the target WiFi network as the first WiFi network; if the difference between the fourth difference and the third difference is greater than the sixth threshold, determining the target WiFi network as the second WiFi network.

[0027] If the difference between the third difference and the fourth difference is greater than the sixth threshold, it indicates that the signal strength of the first WiFi network is poor. Therefore, the power consumption of the terminal device can be reduced by turning off the first WiFi network; if the difference between the fourth difference and the third difference is greater than the sixth threshold, it indicates that the signal strength of the second WiFi network is poor. Therefore, the power consumption of the terminal device can be reduced by turning off the second WiFi network.

[0028] In a second aspect, a terminal device is provided, including a unit composed of software and / or hardware, and the unit is used to execute any one of the methods in the technical solutions of the first aspect.

[0029] In a third aspect, a chip is provided, including a processor; the processor is used to read and execute a computer program stored in a memory to execute any one of the methods in the technical solutions described in the first aspect.

[0030] Optionally, the chip further includes a memory, and the memory is connected to the processor through a circuit or a wire.

[0031] Optionally, the chip further includes a communication interface.

[0032] In a fourth aspect, a terminal device is provided, including: a processor, a memory, and an interface; the processor, the memory, and the interface cooperate with each other to enable the terminal device to execute any one of the methods in the technical solutions described in the first aspect; or including any one of the chips described in the third aspect.

[0033] In a fifth aspect, a computer-readable storage medium is provided, and a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the processor is enabled to execute any one of the methods in the technical solutions described in the first aspect.

[0034] In a sixth aspect, a computer program product is provided, which includes computer program code that, when running on a terminal device, causes the terminal device to execute any one of the methods in the technical solutions described in the first aspect. Description of the Drawings

[0035] Figure 1 FIG. 6 is a schematic hardware structure diagram of a terminal device 100 provided by an embodiment of the present application;

[0036] Figure 2 FIG. 7 is a software system architecture diagram of the terminal device provided by an embodiment of the present application;

[0037] Figure 3 FIG. 8 is a schematic diagram of dual-WiFi data redundant transmission;

[0038] Figure 4 FIG. 9 is a schematic flowchart of a method for processing a WiFi network provided by an embodiment of the present application;

[0039] Figure 5 FIG. 10 is a data transmission scheme after turning off the secondary WiFi network provided by an embodiment of the present application;

[0040] Figure 6 FIG. 11 is a schematic diagram of determining a packet transmission delay difference provided by an embodiment of the present application;

[0041] Figure 7 FIG. 12 is a schematic block diagram of a terminal device provided by an embodiment of the present application;

[0042] Figure 8 FIG. 13 is a schematic structural diagram of a device for processing a WiFi network provided by an embodiment of the present application. Detailed Embodiments

[0043] The solution of the embodiment of the present application relates to the scenario of a terminal device processing a WiFi network. First, the terminal device will be introduced below.

[0044] The terminal device in the embodiment of the present application can be a terminal device capable of interacting with a user. For example, the terminal device can be a device such as a mobile phone, a tablet computer, a computer, etc.

[0045] Exemplarily, Figure 1It is a schematic structural diagram of a terminal device 100 provided by an embodiment of the present application. The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, etc.

[0046] The mobile communication module 150 may include one or more of second generation (2G), 3G, 4G, and 5G communication modules. The mobile communication module 150 may include one or more of a filter, a switch, a power amplifier, and a low noise amplifier (LNA).

[0047] The wireless communication module 160 may include one or more of a Bluetooth (BT) module, a wireless local area network (WLAN) module, a global navigation satellite system (GNSS) module, a near field communication (NFC) module, an infrared (IR) module, and a frequency modulation (FM) module. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive signals to be sent from the processor 110, perform frequency modulation and amplification processing on them, and convert them into electromagnetic waves through the antenna 2 for radiation.

[0048] It can be understood that the structure illustrated in the embodiments 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 those shown in the figures, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figures may be implemented in hardware, software, or a combination of software and hardware.

[0049] It can be understood that the interface connection relationships between the various modules illustrated in the embodiments of the present application are only illustrative descriptions and do not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.

[0050] Next, in conjunction with Figure 2 , the software system architecture of the terminal device in the embodiments of the present application will be introduced. The software system of the terminal device in the embodiments of the present application may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present application, taking the Android system with a layered architecture as an example, the software structure of the device will be illustratively described.

[0051] Figure 2 is the software structure block diagram of the terminal device provided by the embodiments of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system can be divided into four layers, from top to bottom, namely the application layer, the application framework layer, the system layer, and the driver layer.

[0052] As Figure 2 shown, the application layer may include a series of application packages, and the application packages may include applications such as text messages, calendars, navigation, galleries, calls, WLAN, screen mirroring, and file sharing.

[0053] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.

[0054] As Figure 2 shown, the application framework layer may include a window manager, a resource manager, a view system, a phone manager, etc.

[0055] The window manager is used to manage window programs, including managing the hierarchy and display order of windows. The window manager can obtain the size of the display screen, determine whether there is a status bar, a locked screen, take a screenshot, etc.

[0056] The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc.

[0057] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build an application. The display interface can consist of one or more views. For example, the display interface can include a display interface for a text message notification icon, and the view can include a view for displaying text and a view for displaying pictures.

[0058] The telephone manager is used to provide the communication function of the terminal device. For example, the telephone manager can be used to provide management of call states (including answering calls, hanging up calls, etc.).

[0059] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as management of object life cycles, stack management, thread management, security and exception management, and garbage collection.

[0060] The system layer can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library (such as: OpenGL ES), 2D graphics engine (such as: SGL), etc.

[0061] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

[0062] The media library supports the playback and recording of various common audio and video formats, as well as static image files, etc. The media library can support multiple audio and video coding formats, such as: MPEG4, H.164, MP3, AAC, AMR, JPG, PNG, etc.

[0063] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.

[0064] The 2D graphics engine is a graphics engine for 2D drawing.

[0065] The kernel layer is the layer between the hardware and the software. The kernel layer contains at least a display driver, a sensor driver, a WiFi driver, etc. Among them, the display driver is used to drive the display screen; the sensor driver is used to drive the sensor; the WiFi driver is used to drive the WiFi module to establish a WiFi connection.

[0066] The hardware layer at least includes physical devices such as a display screen, sensors, a WiFi module, etc. Among them, the sensors may include: a pressure sensor, a gyroscope sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, etc. The functions of each sensor are not elaborated in the embodiments of the present application.

[0067] With the continuous development of Internet technology, the use of wireless networks, especially WiFi networks, has become increasingly common. Due to its portability, WiFi hotspots have been favored by more and more users.

[0068] In today's digital age, WiFi hotspots have become an indispensable part of people's lives. Whether at home, in the office, in public places or on the go, we can easily connect to WiFi hotspots and enjoy high-speed wireless network connections.

[0069] A WiFi hotspot, also known as a wireless access point (AP), is a device that can provide wireless network connections. It shares the Internet connection with surrounding devices, such as smartphones, tablets, laptops, etc., through wireless signals. A WiFi hotspot can be an independent device or a function integrated in other devices, such as a wireless router, a mobile hotspot, etc. In addition, currently more and more terminal devices can also support the hotspot function to provide WiFi signals for surrounding devices. Such terminal devices can be, for example, mobile phones, laptops, tablets, etc.

[0070] The AP device emits wireless signals through an antenna, and these signals propagate within a certain range. Surrounding devices can receive these signals and establish a connection with the AP through a wireless network card.

[0071] The AP device is usually connected to a wired network or a mobile network, such as a broadband Internet, a 4G network, a 5G network, etc. The AP can share the received network connection with the devices connected to the AP through wireless signals, enabling these devices to access the Internet.

[0072] Currently, some wireless router products can support 2.4GHz and 5GHz dual-band wireless signals, which can meet the usage requirements in different scenarios. With the continuous development of technology, more and more devices are starting to support dual-band WiFi to bring a more convenient and efficient network experience to users.

[0073] The terminal device can connect to 2 WiFi hotspots to work, one with a WiFi frequency band of 2.4GHz and the other with a WiFi frequency band of 5GHz. After the terminal device uses dual-band WiFi, it is equivalent to an increase in the communication bandwidth, and the network transmission rate will also increase accordingly.

[0074] The WiFi circuit system of the terminal device's radio frequency can include a baseband processing module and a radio frequency (RF) front-end circuit. The baseband processing module can include the processing parts of the physical layer and the medium access control (MAC) layer. The RF front-end circuit includes an antenna, a power amplifier (PA), a low noise amplifier (LNA), etc. The WiFi circuit system determines the support ability of WiFi.

[0075] Since WiFi devices can operate on two frequency bands, 2.4 GHz and 5 GHz, according to the concurrent working mode of WiFi for these two frequency bands, WiFi devices can be divided into single band single concurrent (SBSC) devices, dual band single concurrent (DBSC) devices, and dual band dual concurrent (DBDC) devices.

[0076] The SBSC device includes 1 complete path, that is, it includes 1 complete baseband processing and 1 complete RF front-end. The SBSC device can operate on a single frequency band (such as the 2.4 GHz frequency band).

[0077] The DBSC device can also be called a VSDB device. The DBSC device includes 2 complete baseband processing modules and 1 RF front-end. This RF front-end can choose to operate on the 2.4 GHz frequency band or the 5 GHz frequency band. Although the DBSC baseband can support both the 2.4 GHz and 5 GHz frequency bands, since the RF front-end can only stably select one frequency band to operate, therefore, the DBSC device can only achieve single transmission. The DBSC can work on the 2.4G frequency band and the 5G frequency band through time-division multiplexing.

[0078] The DBDC device integrates 2 complete paths, including 2 complete baseband processing and 2 RF front-ends. Since it has two independent paths, the DBDC device can support operation on both the 2.4 GHz and 5 GHz frequency bands simultaneously.

[0079] The dual-band concurrent function of the terminal device can be implemented by one WiFi module or two WiFi modules. If the terminal device includes one WiFi module, the one WiFi module can work on the 2.4G band and the 5G band simultaneously. If the terminal device includes two WiFi modules, denoted as the first WiFi module and the second WiFi module, the first WiFi module works on the 2.4G band and the second WiFi module works on the 5G band, or the first WiFi module works on the 5G band and the second WiFi module works on the 2.4G band.

[0080] The WiFi module in the terminal device is in the station (STA) mode. The WiFi module accesses the WiFi network by connecting to a WiFi hotspot. A WiFi hotspot is a type of access point (AP). The WiFi hotspot can be a router or other device that provides a WiFi network for the terminal device.

[0081] For example, mobile phone A provides a network for mobile phone B by turning on the hotspot. Mobile phone B connects to the WiFi network provided by mobile phone A to implement the Internet access service. In the above example, mobile phone A is the WiFi hotspot, and mobile phone B corresponds to the terminal device in the embodiments of the present application.

[0082] As can be seen from the above, the terminal device can support two-band WiFi networks, denoted as the first WiFi network and the second WiFi network respectively. The dual-WiFi mode means that the first WiFi network and the second WiFi network can work simultaneously without interference. The dual-WiFi module in the embodiments of the present application has the DBDC function, supports 2*2 antennas, and both sets of antennas are equipped with amplifier circuits and power amplifier chips, and can support the antennas to transmit and receive signals simultaneously.

[0083] One of the first WiFi network and the second WiFi network is the main WiFi network, and the other is the secondary WiFi network. The main WiFi network can be the WiFi network that the terminal device connects to first, and the secondary WiFi network is the WiFi network that the terminal device connects to later.

[0084] The terminal device can copy and redundantly transmit the same data packet through the dual-channel WiFi network. The following combines Figure 3 to introduce the data redundancy transmission solution.

[0085] See Figure 3 For uplink transmission, the terminal device transmits data packet 1 through the first WiFi network, copies data packet 1, and transmits the copied data packet 1 through the second WiFi network. After receiving data packet 1, the router can send data packet 1 to the Internet.

[0086] For another example, for downlink transmission, the Internet can send data packet 1 for a terminal device to a router. After receiving data packet 1, the router can send data packet 1 to the terminal device through the first WiFi network, copy data packet 1, and send the copied data packet 1 to the terminal device through the second WiFi network.

[0087] The advantage of dual-band WiFi is that it improves the reliability of data packet transmission. However, the disadvantage is that for the terminal device, the power consumption of dual-WiFi connected data transmission is high, which affects the battery life of the terminal device.

[0088] Based on this, the embodiments of the present application provide a method for processing a WiFi network. By turning off one of the WiFi networks under certain conditions, the battery life of the terminal device can be improved without affecting the reliability of data transmission.

[0089] The following combines Figure 4 , and introduces the method for processing a WiFi network provided by the embodiments of the present application.

[0090] The method for processing a WiFi network in the embodiments of the present application can be applied to a terminal device. The terminal device may include multiple WiFi networks. The number of multiple WiFi networks may be 2, or 3, or more.

[0091] The multiple WiFi networks may include a first WiFi network and a second WiFi network. The first WiFi network and the second WiFi network may be any two of the multiple WiFi networks.

[0092] The frequency bands where the first WiFi network and the second WiFi network are located are different. For example, the first WiFi network is located in the 5G frequency band, and the second WiFi network is located in the 2.4G frequency band, or the first WiFi network is located in the 2.4G frequency band, and the second WiFi network is located in the 5G frequency band.

[0093] One of the first WiFi network and the second WiFi network is the main WiFi network, and the other is the secondary WiFi network.

[0094] The first WiFi network and the second WiFi network may correspond to one WiFi module, or may respectively correspond to two WiFi modules.

[0095] In the embodiments of the present application, the terminal device enables dual-WiFi data redundancy transmission and uses the first WiFi network and the second WiFi network for data transmission.

[0096] It should be understood that the terminal device in the embodiments of the present application may be the terminal device itself, or a chip, a chip system or a processor that supports the terminal device to implement the communication method, or may also be a logical module or software that can implement all or part of the terminal device. The network device in the embodiments of the present application may be the network device itself, or a chip, a chip system or a processor that supports the network device to implement the communication method, or may also be a logical module or software that can implement all or part of the network device.

[0097] Refer to Figure 4 , in step S410, when the first condition is met, the terminal device turns off the target WiFi network. Turning off the target WiFi network can be understood as disconnecting from the target WiFi network.

[0098] The target WiFi network is one of the first WiFi network and the second WiFi network. In other words, when the first condition is met, the terminal device turns off one of the first WiFi network and the second WiFi network, and the terminal device only uses one WiFi network for communication to save the power of the terminal device and improve the battery life of the terminal device.

[0099] The first condition may be related to multiple factors, and the first condition will be introduced in detail below.

[0100] In some implementation manners, the first condition is related to the default data transmission network of the terminal device. The default data transmission network can be understood as the transmission network that is preferentially used. The terminal device can set the cellular network as the default data transmission network, or can also set the WiFi network as the data transmission network.

[0101] The first condition includes a second condition, and the second condition is that the default data transmission network of the terminal device is the cellular network. If the user switches the default data transmission network to the cellular network, the terminal device can turn off the target WiFi network to save the power of the terminal device and improve the battery life of the terminal device. The target WiFi network may be a secondary WiFi network, and of course, it may also be a WiFi network determined based on the signal strength in the following text. The secondary WiFi network may be a 2.4G network, or the secondary WiFi network is the later-connected WiFi network.

[0102] Since the terminal device switches the default data transmission network to the cellular network, the terminal device will preferentially use the cellular network for data transmission. In this case, the cellular network and one path of the WiFi network are sufficient to ensure the reliability of data transmission. Therefore, one path of the WiFi network can be turned off to reduce the power consumption of the terminal device and improve the battery life of the terminal device.

[0103] In some implementations, the first condition is related to the duration for which the terminal device activates the cellular network. Activating the cellular network can be understood as activating the cellular data service. Generally, when the WiFi network signal is poor, the terminal device will activate the cellular network and use it as a backup network to transmit data through the cellular network when needed, ensuring the reliability of data transmission.

[0104] As an example, the terminal device can turn off the target WiFi network when the cellular network is activated. That is to say, the first condition includes the terminal device activating the cellular network.

[0105] As another example, the terminal device can turn off the target WiFi network after activating the cellular network for a period of time, which can avoid data transmission interruption or lag caused by network switching (such as switching from two WiFi networks to one WiFi network + cellular network), and is beneficial to improving the reliability of data transmission. For example, the first condition can include a third condition, where the third condition is that the duration for which the terminal device activates the cellular network is greater than or equal to a first threshold. If the terminal device meets the third condition, the target WiFi network that the terminal device turns off can be the secondary WiFi network. Of course, it can also be the WiFi network determined based on the signal strength in the following text. The secondary WiFi network can be a 2.4G network, or the secondary WiFi network is the later-connected WiFi network.

[0106] In some implementations, the first condition can include a second condition and a third condition, that is, the terminal device can turn off the target WiFi network when it switches the default data transmission network to the cellular network and the duration for which the cellular network is activated is greater than or equal to a first threshold.

[0107] Figure 5 Shows a scenario where the terminal device turns off the target WiFi network (taking the secondary WiFi network as an example). If the terminal device meets the above second condition and / or third condition, the terminal device can turn off the secondary WiFi network. Since the terminal device sets the cellular network as the default network or activates the cellular network, when there is a data packet to be transmitted, the terminal device will use the cellular network for transmission.

[0108] See Figure 5 , if the terminal device needs to send a data packet, the terminal device can send the data packet to the base station through the cellular network, and the base station can send the data packet to the Internet. When there is a data packet sent to the terminal device on the Internet, it can send the data packet to the base station, and the base station will send the data packet to the terminal device. In this case, the primary WiFi network can be used as a backup network. When the cellular network signal is poor, the terminal device can use the primary WiFi network to transmit data packets.

[0109] In some implementations, the first condition is related to the first transmission delay of the terminal device transmitting the first data packet using the first WiFi network. For example, if the first transmission delay is greater than or equal to a preset threshold, it indicates that the performance of the first WiFi network is worse, and the terminal device can turn off the target WiFi network, which can be the first WiFi network. The first data packet can be one data packet or multiple data packets.

[0110] The first transmission delay can include the uplink transmission delay and / or the downlink transmission delay. The uplink transmission delay refers to the time difference between the sending time and the receiving time of the first data packet when the terminal device sends the first data packet to the peer device through the first WiFi network. The downlink transmission delay refers to the time difference between the sending time and the receiving time of the first data packet when the terminal device receives the first data packet sent by the peer device through the first WiFi network.

[0111] In some implementations, the first condition is related to the second transmission delay of the first data packet transmitted using the second WiFi network. For example, if the second transmission delay is greater than or equal to a preset threshold, it indicates that the performance of the second WiFi network is worse, and the terminal device can turn off the target WiFi network, which can be the second WiFi network.

[0112] The second transmission delay can include the uplink transmission delay and / or the downlink transmission delay. The uplink transmission delay refers to the time difference between the sending time and the receiving time of the first data packet when the terminal device sends the first data packet to the peer device through the second WiFi network. The downlink transmission delay refers to the time difference between the sending time and the receiving time of the first data packet when the terminal device receives the first data packet sent by the peer device through the second WiFi network.

[0113] In some implementations, the first condition is related to the first transmission delay and the second transmission delay. For example, the first condition is related to the difference between the first transmission delay and the second transmission delay.

[0114] The difference between the first transmission delay and the second transmission delay can include the first difference and / or the second difference. The first difference refers to the delay difference of the terminal device receiving the first data packet through the first WiFi network and the second WiFi network respectively. The first difference can also be called the downlink delay difference. For example, the terminal device uses the first WiFi network to receive the first data packet and obtains the first receiving time of the first data packet; the terminal device uses the second WiFi network to receive the first data packet and obtains the second receiving time of the first data packet; the terminal device can take the difference between the first receiving time and the second receiving time to obtain the first difference. First difference = First receiving time - Second receiving time.

[0115] The second difference refers to the time delay difference between the terminal device sending the first data packet through the first WiFi network and the second WiFi network respectively. The second difference can also be referred to as the uplink time delay difference. For example, the terminal device uses the first WiFi network to send the first data packet to the peer device, and the receiving time when the peer device receives the first data packet through the first WiFi network is the third receiving time; the terminal device uses the second WiFi network to send the first data packet to the peer device, and the receiving time when the peer device receives the first data packet through the second WiFi network is the fourth receiving time; the difference between the third receiving time and the fourth receiving time is the second difference. The second difference = the third receiving time - the fourth receiving time.

[0116] In some implementation manners, the first condition includes a fourth condition, and the fourth condition is that the difference between the first transmission time delay and the second transmission time delay is less than or equal to a second threshold, where the first data packet is a single data packet. As can be seen from the above, the difference between the first transmission time delay and the second transmission time delay includes the first difference and / or the second difference, so the first condition may include one or more of the following: the first difference is less than or equal to the second threshold; the second difference is less than or equal to the second threshold.

[0117] If the first difference is less than or equal to the second threshold, it means that for downlink transmission, among the two WiFi networks, one WiFi network (i.e., the second WiFi network) has a larger transmission time delay, that is, the transmission performance of this WiFi network is not good. In this case, the WiFi network with the larger transmission time delay can be turned off.

[0118] If the second difference is less than or equal to the second threshold, it means that for uplink transmission, among the two WiFi networks, one WiFi network (i.e., the second WiFi network) has a larger transmission time delay, that is, the transmission performance of this WiFi network is not good. In this case, the WiFi network with the larger transmission time delay can be turned off.

[0119] In some implementation manners, the first condition includes a fifth condition, and the fifth condition is that the average value of the differences between multiple first transmission time delays and multiple second transmission time delays is less than or equal to a third threshold, and the first data packet includes multiple data packets. Or rather, the fifth condition includes that the average value of multiple first differences is less than or equal to the third threshold, and / or the average value of multiple second differences is less than or equal to the third threshold.

[0120] The sender sends multiple data packets. Assume that the multiple data packets are data packet 1, data packet 2,..., data packet n (denoted as data packet i) respectively. The sender sends the same data packets simultaneously through the first WiFi network and the second WiFi network, as Figure 6 shown. The receiver receives multiple data packets through the first WiFi network and the second WiFi network respectively. The receiving times of receiving multiple data packets through the first WiFi network are t1-1 、t 2-1 、…、t n-1 ,The reception times for receiving multiple data packets through the second WiFi network are respectively t 1-2 、t 2-2 、…、t n-2 ,The reception delay differences of the multiple data packets (i.e., the first difference or the second difference) are ,Correspondingly, the average value of the first difference or the second difference is . Where n > 1 and 1 ≤ i ≤ n.

[0121] If the above receiving end is a terminal device, the reception delay difference of the multiple data packets is the first difference. If the sending end is a terminal device, the reception delay difference of the multiple data packets is the second difference.

[0122] The multiple data packets can be the data packets within one period. The terminal device can make a judgment every time it goes through one period, which can reduce the judgment times of the terminal device and lower the power consumption of the terminal device.

[0123] The peer device in the embodiments of the present application can be a router or other devices capable of performing WiFi communication with the terminal device, such as other terminal devices.

[0124] In some implementation manners, the peer device can send the judgment result to the terminal device to facilitate the terminal device to make a decision on whether to close the target WiFi network. For example, the peer device can send the first indication information to the terminal device, and the first indication information is used to indicate whether the second difference satisfies the above third condition and / or the fourth condition; or, the first indication information is used to indicate whether the first difference is less than or equal to the second threshold, and / or whether the second difference is less than or equal to the third threshold; or, the first indication information is used to indicate the judgment result determined by the peer device on whether the target WiFi needs to be closed.

[0125] If the peer device indicates that the target WiFi needs to be closed and the terminal device also determines that the target WiFi needs to be closed based on the first difference, the terminal device closes the target WiFi. If the peer device indicates that the target WiFi does not need to be closed, but the terminal device determines that the target WiFi needs to be closed, the terminal device does not close the target WiFi. If the peer device indicates that the target WiFi needs to be closed, but the terminal device determines that the target WiFi does not need to be closed, the terminal device does not close the target WiFi. That is to say, only when both the terminal device and the peer device determine that the target WiFi needs to be closed, the terminal device will close the target WiFi to ensure the reliability of communication.

[0126] In some implementations, the embodiments of the present application mainly determine that the transmission delay of the secondary WiFi is relatively large, rather than determining whether the transmission delay of the primary WiFi is relatively large. Only when the transmission delay of the secondary WiFi is relatively large, the secondary WiFi will be turned off. That is to say, the above-mentioned first WiFi network is the primary WiFi network, the second WiFi network is the secondary WiFi network, and the target WiFi network is the secondary WiFi network.

[0127] The method for determining the target WiFi based on the signal strength is introduced below. The terminal device can choose to turn off the WiFi network with a worse signal strength, that is, the target WiFi network is the WiFi network with a worse signal strength among the first WiFi network and the second WiFi network.

[0128] The terminal device can determine the first signal strength of the first WiFi network and the signal strength of the second WiFi network. The signal strength can be obtained by measuring the signal. The terminal device can determine the target WiFi network based on the first signal strength and the second signal strength.

[0129] In some implementations, the terminal device can directly compare the magnitudes of the first signal strength and the second signal strength to determine the target WiFi network. The target WiFi network is the WiFi network with a lower signal strength. For example, if the first signal strength is less than the second signal strength, the target WiFi network is the first WiFi network; if the second signal strength is lower than the first signal strength, the target WiFi network is the second WiFi network.

[0130] In some implementations, the signal strength thresholds corresponding to different WiFi networks are different. Therefore, the target WiFi network can be determined based on the difference between the actually measured signal strength and the signal strength threshold to more accurately determine the signal quality of the WiFi network. For example, the terminal device can determine the third difference between the first signal strength and the fourth threshold, and determine the fourth difference between the second signal strength and the fifth threshold, and determine the target WiFi network based on the third difference and the fourth difference. Among them, the fourth threshold is the signal strength threshold for the first WiFi network, and the fifth threshold is the signal strength threshold for the second WiFi network. The fourth threshold and the fifth threshold can be preset thresholds. Generally, the signal strength threshold corresponding to the secondary WiFi network is less than the signal strength threshold corresponding to the primary WiFi network. The signal strength threshold can also be referred to as the reference signal strength.

[0131] The difference between the first signal strength and the fourth threshold can reflect the degree to which the signal strength of the first WiFi network deviates from the reference signal strength, and the difference between the second signal strength and the fifth threshold can reflect the degree to which the signal strength of the second WiFi network deviates from the reference signal strength.

[0132] As an example, the first condition includes that the third difference is greater than the fourth difference. If the third difference is greater than the fourth difference, the terminal device can turn off the first WiFi network, that is, the target WiFi network is the first WiFi network.

[0133] As another example, the first condition includes that the fourth difference is greater than the third difference. If the fourth difference is greater than the third difference, the terminal device can turn off the second WiFi network, that is, the target WiFi network is the second WiFi network.

[0134] As yet another example, the first condition includes that the difference between the third difference and the fourth difference is greater than the sixth threshold, that is, the third difference - the fourth difference > the sixth threshold. If the difference between the third difference and the fourth difference is greater than the sixth threshold, the terminal device can turn off the first WiFi network, that is, the target WiFi network is the first WiFi network.

[0135] As yet another example, the first condition includes that the difference between the fourth difference and the third difference is greater than the sixth threshold, that is, the fourth difference - the third difference ≥ the sixth threshold. If the difference between the fourth difference and the third difference is greater than the sixth threshold, the terminal device can turn off the second WiFi network, that is, the target WiFi network is the second WiFi network. The following is an example for illustration.

[0136] Suppose the signal strength of the first WiFi network is s1, and the preset signal strength threshold is Th1, the signal strength of the second WiFi network is s2, and the preset signal strength threshold is Th2. Additionally, the sixth threshold is Th3. Then, if the above parameters satisfy the following formula:

[0137] (Formula 1)

[0138] The above Formula 1 indicates that the signal strength of the second WiFi network is significantly better than that of the first WiFi network, then the terminal device can turn off the first WiFi network.

[0139] If the above parameters satisfy the following formula:

[0140] (Formula 2)

[0141] The above Formula 2 indicates that the signal strength of the first WiFi network is significantly better than that of the second WiFi network, then the terminal device can turn off the second WiFi network.

[0142] It should be noted that the above signal strength can be measured by the terminal device when it determines that one of the WiFi connections needs to be closed. When the terminal device determines that one of the WiFi networks needs to be closed, it then measures the signal strengths of the two WiFi networks, which can ensure that the measured signal strengths are relatively accurate and enable the terminal device to make a correct decision.

[0143] The above text has introduced in detail the examples of the method provided in this application. It can be understood that, in order to implement the above functions, the corresponding device includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments disclosed in this article, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0144] This application can divide the functional modules of the WiFi network processing device according to the above method examples. For example, each function can be divided into each functional module, or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of modules in this application is illustrative, only a logical function division, and there can be other division methods in actual implementation.

[0145] The WiFi network processing device in the embodiments of this application can be a terminal device, or the WiFi network processing device can be a chip for implementing the above method, etc.

[0146] The following combines Figure 7 and Figure 8 , and introduces the device embodiments of this application. It should be noted that the device embodiments correspond to the method embodiments, and the content not described in detail can be referred to the method embodiments.

[0147] Figure 7 is a schematic block diagram of a terminal device provided by an embodiment of this application. The terminal device 700 includes a processing module 710. The terminal device includes a first WiFi network and a second WiFi network, and the frequency bands where the first WiFi network and the second WiFi network are located are different.

[0148] A processing module 710 is configured to: when a first condition is satisfied, turn off a target Wi-Fi network, where the target Wi-Fi network is one of the first Wi-Fi network and the second Wi-Fi network; wherein the first condition is related to one or more of the following information: the default data transmission network of the terminal device; the duration of activation of the cellular network of the terminal device; the first transmission delay of the terminal device transmitting a first data packet using the first Wi-Fi network; the second transmission delay of the terminal device transmitting a first data packet using the second Wi-Fi network.

[0149] In some implementation manners, the first condition includes one or more of the following conditions: a second condition: the default data transmission network of the terminal device is a cellular network; a third condition: the duration of activation of the cellular network of the terminal device is greater than or equal to a first threshold; a fourth condition: the difference between the first transmission delay and the second transmission delay is less than or equal to a second threshold, and the first data packet is a single data packet; a fifth condition: the average value of the differences between multiple first transmission delays and multiple second transmission delays respectively is less than or equal to a third threshold, and the first data packet includes multiple data packets.

[0150] In some implementation manners, the difference between the first transmission delay and the second transmission delay includes a first difference and / or a second difference, the first difference is the delay difference of the terminal device receiving the first data packet through the first Wi-Fi network and the second Wi-Fi network respectively, and the second difference is the delay difference of the peer device receiving the first data packet sent by the terminal device through the first Wi-Fi network and the second Wi-Fi network respectively.

[0151] In some implementation manners, the terminal device 700 further includes a receiving module and a difference-making module. The receiving module is configured to: receive the first data packet using the first Wi-Fi network to obtain a first receiving time of the first data packet; receive the first data packet using the second Wi-Fi network to obtain a second receiving time of the first data packet. The difference-making module is configured to: make a difference between the first receiving time and the second receiving time to obtain the first difference.

[0152] In some implementations, the terminal device 700 further includes a sending module. The sending module is configured to: send the first data packet to the peer device using the first Wi-Fi network, and the receiving time when the peer device receives the first data packet using the first Wi-Fi network is the third receiving time; send the first data packet to the peer device using the second Wi-Fi network, and the receiving time when the peer device receives the first data packet using the first Wi-Fi network is the fourth receiving time; wherein, the difference between the third receiving time and the fourth receiving time is the second difference.

[0153] In some implementations, the terminal device 700 further includes a receiving module. The receiving module is configured to: receive first indication information sent by the peer device, and the first indication information is used to indicate whether the second difference satisfies the third condition and / or the fourth condition; the processing module 710 is configured to: turn off the target Wi-Fi network when the first difference satisfies the third condition and / or the fourth condition, and the second difference satisfies the third condition and / or the fourth condition.

[0154] In some implementations, the first Wi-Fi network is the primary Wi-Fi network, the second Wi-Fi network is the secondary Wi-Fi network, and the target Wi-Fi network is the secondary Wi-Fi network.

[0155] In some implementations, if the first condition includes the second condition and / or the third condition, then the target Wi-Fi network is the secondary Wi-Fi network among the first Wi-Fi network and the second Wi-Fi network.

[0156] In some implementations, if the first condition includes the second condition and / or the third condition, then the terminal device further includes a determination module. The determination module is configured to: determine the first signal strength of the first Wi-Fi network; determine the second signal strength of the second Wi-Fi network; determine the target Wi-Fi network based on the first signal strength and the second signal strength.

[0157] In some implementations, the determination module is configured to: determine a third difference between the first signal strength and a fourth threshold, where the fourth threshold is a signal strength threshold for the first Wi-Fi network; determine a fourth difference between the second signal strength and a fifth threshold, where the fifth threshold is a signal strength threshold for the second Wi-Fi network; determine the target Wi-Fi network based on the third difference and the fourth difference.

[0158] In some implementations, the determining module is configured to: if the difference between the third difference and the fourth difference is greater than a sixth threshold, determine that the target WiFi network is the first WiFi network; if the difference between the fourth difference and the third difference is greater than the sixth threshold, determine that the target WiFi network is the second WiFi network.

[0159] Figure 8 It is a schematic structural diagram of the device according to an embodiment of the present application. Figure 8 The dashed lines in it indicate that the unit or module is optional. The device 800 can be used to implement the method described in the above method embodiment. The device 800 can be a chip or a terminal device.

[0160] The device 800 may include one or more processors 810. The processor 810 can support the device 800 to implement the method described in the foregoing method embodiment. The processor 810 can be a general-purpose processor or a dedicated processor. For example, the processor can be a central processing unit (CPU). Alternatively, the processor can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0161] The device 800 may further include one or more memories 820. A program is stored on the memory 820, and the program can be executed by the processor 810, so that the processor 810 executes the method described in the foregoing method embodiment. The memory 820 can be independent of the processor 810 or integrated in the processor 810.

[0162] The device 800 may further include a transceiver 830. The processor 810 can communicate with other devices or chips through the transceiver 830. For example, the processor 810 can perform data transmission and reception with other devices or chips through the transceiver 830.

[0163] An embodiment of the present application further provides a chip, which includes a processor, and the processor is configured to read and execute a computer program stored in a memory to execute the method for processing a WiFi network described in any of the above embodiments.

[0164] The embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor is caused to execute the method for processing a WiFi network described in any of the above embodiments.

[0165] The embodiments of the present application also provide a computer program product. When the computer program product runs on a computer, the computer is caused to execute the above-related steps to implement the method for processing a WiFi network in the above embodiments.

[0166] Among them, the terminal device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here.

[0167] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, indirect couplings or communication connections of devices or units. The replaced units may or may not be physically separated. The components displayed as units can be a physical unit or multiple physical units, that is, they can be located in one place, or they can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0168] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-integrated units can be implemented in the form of hardware or in the form of software functional units.

[0169] When an integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0170] It should be understood that in the various embodiments of the present application, the magnitudes of the serial numbers of the above processes do not mean the sequence of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0171] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for processing a wireless fidelity WiFi network, characterized in that: The method is applied to a terminal device, the terminal device includes a first WiFi network and a second WiFi network, the first WiFi network and the second WiFi network are in different frequency bands, one of the first WiFi network and the second WiFi network is a primary WiFi network, and the other WiFi network is a secondary WiFi network, and the first WiFi network and the second WiFi network transmit data in a redundant transmission mode, The method comprises: When the second condition and / or the third condition is met, shutting down the target WiFi network, where the target WiFi network is the secondary WiFi network or the target WiFi network is a WiFi network with a poor signal strength between the first WiFi network and the second WiFi network; When the fourth condition and / or the fifth condition is met, shutting down the secondary WiFi network; The second condition is that the default data transmission network of the terminal device is a cellular network; The third condition is: the duration of the terminal device activating the cellular network is greater than or equal to the first threshold; The fourth condition is: the difference between the first transmission delay and the second transmission delay is less than or equal to the second threshold; The fifth condition is that: the average value of the differences between the plurality of first transmission delays and the plurality of second transmission delays is less than or equal to the third threshold; The first transmission delay is the transmission delay of the terminal device transmitting the first data packet using the primary WiFi network, and the second transmission delay is the transmission delay of the terminal device transmitting the first data packet using the secondary WiFi network.

2. The method according to claim 1, characterized in that The difference between the first transmission delay and the second transmission delay includes a first difference and / or a second difference, the first difference being a delay difference for the terminal device to receive the first data packet through the primary WiFi network and the secondary WiFi network respectively, The second difference is a time delay difference when the opposite device receives the first data packet sent by the terminal device through the primary WiFi network and the secondary WiFi network respectively.

3. The method according to claim 2, characterized in that The method further comprises: Receive the first data packet using the primary WiFi network to obtain a first receiving time of the first data packet; Using the secondary WiFi network to receive the first data packet, and obtaining a second receiving time of the first data packet; The first receiving time is subtracted from the second receiving time to obtain the first difference.

4. The method according to claim 2 or 3, characterized in that: The method further comprises: The first data packet is sent to the peer device by using the primary WiFi network, and a receiving time when the peer device receives the first data packet by using the primary WiFi network is a third receiving time; The first data packet is sent to the peer device by using the secondary WiFi network, and a receiving time when the peer device receives the first data packet by using the secondary WiFi network is a fourth receiving time; The difference between the third receiving time and the fourth receiving time is the second difference.

5. The method according to claim 4, characterized in that The method further comprises: receiving first indication information sent by the opposite device, where the first indication information is used to indicate whether the second difference satisfies the fourth condition and / or the fifth condition; When the fourth condition and / or the fifth condition is met, shutting down the secondary WiFi network includes: When the first difference satisfies the fourth condition and / or the fifth condition, and the second difference satisfies the fourth condition and / or the fifth condition, the secondary WiFi network is closed.

6. The method according to claim 1, characterized in that The method further comprises: Determining a first signal strength of the first WiFi network; Determine a second signal strength of the second WiFi network; The target WiFi network is determined based on the first signal strength and the second signal strength.

7. The method according to claim 6, characterized in that The determining the target WiFi network based on the first signal strength and the second signal strength includes: Determine a third difference between the first signal strength and a fourth threshold, where the fourth threshold is a signal strength threshold for the first WiFi network; Determine a fourth difference between the second signal strength and a fifth threshold, where the fifth threshold is a signal strength threshold for the second WiFi network; The target WiFi network is determined based on the third difference and the fourth difference.

8. The method according to claim 7, characterized in that The determining the target WiFi network based on the third difference and the fourth difference includes: If the difference between the third difference and the fourth difference is greater than a sixth threshold, determining that the target WiFi network is the first WiFi network; If the difference between the fourth difference and the third difference is greater than a sixth threshold, it is determined that the target WiFi network is the second WiFi network.

9. A terminal device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the method according to any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 8.

11. A computer program product, characterized in that The method comprises a program for causing a computer to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Network switching method and device, mobile terminal and computer readable storage medium

    CN109495939A

  • Data transmission method and related device

    CN112399442A