WiFi antenna intelligent switching method and device, terminal equipment and storage medium

By starting compatibility detection between terminal devices and network devices and switching WiFi antenna mode according to detection results, the problems of dynamic antenna switching compatibility risks and narrow coverage in the prior art are solved, and wider compatibility and function are achieved Consumption saving.

CN119450625APending Publication Date: 2025-02-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310968877.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-02
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

When realizing dynamic antenna switching between terminal devices and network devices, there are problems of compatibility risks and narrow coverage, resulting in mismatch in data flow count and high power consumption.

Method used

After the terminal device establishes a WiFi connection with the network device, start compatibility detection and determine whether the network device supports switching from multi-antenna mode to single-antenna mode accordingly, and switch the WiFi antenna mode of the terminal device accordingly.

Benefits of technology

Through intelligent switching technology, it can cover all network devices on the market, reduce power consumption of terminal devices, and improve the coverage of compatibility detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450625A_ABST
    Figure CN119450625A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a WiFi antenna intelligent switching method and device, terminal equipment and a storage medium, which are used for starting compatibility detection under the condition that WiFi connection is established between the terminal equipment and network equipment, and starting compatibility detection under the condition that the network equipment supports switching from a multi-antenna mode to a single-antenna mode according to a detection result. The WiFi antenna mode of the terminal device is switched to the single antenna mode, network devices in the market can be covered, and therefore power consumption of the terminal device is saved. The method provided by the embodiment of the invention comprises the following steps: starting compatibility detection under the condition that wireless fidelity WiFi connection is established between terminal equipment and network equipment to obtain a detection result; and switching the WiFi antenna mode of the terminal device from a second multi-antenna mode to a second single-antenna mode under the condition that the network device is determined to support switching from the first multi-antenna mode to the first single-antenna mode according to the detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of wireless fidelity WiFi, and in particular to a method, device, terminal equipment and storage medium for intelligent switching of wireless fidelity WiFi antennas. Background Art

[0002] To implement dynamic antenna switching, terminal devices (such as mobile phones) need to send an action frame to the network device at the Media Access Control (MAC) layer after the local antenna is switched (1T1R) to request a response from the other party. If the network device does not respond to the antenna switching, a data stream mismatch may occur, resulting in a disconnection. To address this type of compatibility risk, the industry usually uses a network device blacklist and whitelist solution to add supported network device models one by one. The network device blacklist and whitelist are configured through pre-testing, and there are many network device models on the market. This pre-test configuration of the network device whitelist is inefficient and has a narrow coverage. Summary of the invention

[0003] The embodiments of the present application provide a method, apparatus, terminal device and storage medium for intelligent switching of wireless fidelity WiFi antennas, which are used to start compatibility detection when a terminal device establishes a WiFi connection with a network device, and when it is determined according to the detection result that the network device supports switching from a multi-antenna mode to a single antenna mode, the WiFi antenna mode of the terminal device is switched to a single antenna mode, which can cover network devices on the market, thereby saving power consumption of the terminal device.

[0004] In a first aspect, the present application provides a method for intelligent switching of wireless fidelity WiFi antennas, which may include: when a terminal device establishes a wireless fidelity WiFi connection with a network device, starting a compatibility detection to obtain a detection result; when it is determined according to the detection result that the network device supports switching from a first multi-antenna mode to a first single antenna mode, switching the WiFi antenna mode of the terminal device from a second multi-antenna mode to a second single antenna mode.

[0005] A second aspect of the present application provides a device for intelligently switching a WiFi antenna, which may include:

[0006] The detection module is used to start compatibility detection and obtain detection results when the terminal device establishes a wireless fidelity WiFi connection with the network device;

[0007] A switching module is used to switch the WiFi antenna mode of the terminal device from the second multi-antenna mode to the second single antenna mode when it is determined according to the detection result that the network device supports switching from the first multi-antenna mode to the first single antenna mode.

[0008] A third aspect of the present application provides a terminal device, which may include:

[0009] A memory storing executable program code;

[0010] a processor coupled to the memory;

[0011] The processor is used to execute the method described in the first aspect of the present application.

[0012] Another aspect of an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a processor, enables the processor to execute the method described in the first aspect of the present application.

[0013] Yet another aspect of an embodiment of the present application discloses a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the method described in the first aspect of the present application.

[0014] Another aspect of an embodiment of the present application discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer executes the method described in the first aspect of the present application.

[0015] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0016] In an embodiment of the present application, when a terminal device establishes a wireless fidelity WiFi connection with a network device, compatibility detection is started to obtain a detection result; when it is determined according to the detection result that the network device supports switching from a first multi-antenna mode to a first single-antenna mode, the WiFi antenna mode of the terminal device is switched from a second multi-antenna mode to a second single-antenna mode. When a terminal device establishes a WiFi connection with a network device, compatibility detection is started, and when it is determined according to the detection result that the network device supports switching from a multi-antenna mode to a single-antenna mode, the WiFi antenna mode of the terminal device is switched to a single-antenna mode, which can cover network devices on the market, thereby saving power consumption of the terminal device. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments and the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained based on these drawings.

[0018] Figure 1 A system architecture diagram used in the embodiments of the present application;

[0019] Figure 2 A schematic diagram of an embodiment of a method for intelligently switching WiFi antennas in an embodiment of the present application;

[0020] Figure 3A A schematic diagram of determining whether a network device is in a network device list in an embodiment of the present application;

[0021] Figure 3B A schematic diagram of a flow chart of a method for intelligently switching WiFi antennas in an embodiment of the present application;

[0022] Figure 4 A schematic diagram of an embodiment of a device for intelligently switching WiFi antennas in an embodiment of the present application;

[0023] Figure 5 This is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application;

[0024] Figure 6 This is another schematic diagram of a terminal device in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The embodiments of the present application provide a method, apparatus, terminal device and storage medium for intelligently switching WiFi antennas, which are used to start compatibility detection when a WiFi connection is established between a terminal device and a network device. When it is determined according to the detection result that the network device supports switching from a multi-antenna mode to a single-antenna mode, the WiFi antenna mode of the terminal device is switched to a single-antenna mode, which can cover network devices on the market, thereby saving power consumption of the terminal device.

[0026] In order to make the technical personnel in the technical field better understand the scheme of the present application, the technical scheme in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, not all of the embodiments. Based on the embodiments in the present application, they should all fall within the scope of protection of the present application.

[0027] The following is a brief description of some terms involved in this application, as follows:

[0028] Action frames are used to request a station to take necessary action. Spectrum management services use Action frames to request measurements, collect measurement results, and announce any necessary channel switching. The format of an Action frame is a category field followed by the action details of the category. The "action details" will vary depending on the value of the category field.

[0029] Category: Set to 0, indicating spectrum management.

[0030] Action: All spectrum management frames use the first byte of the "Action Details" field to specify the type of action to be taken. Table 1 below lists all possible values ​​for the Action field. Values ​​not listed are reserved.

[0031] Table 1 Spectrum management action frame types

[0032] value Spectrum Management Action Frame Type 0 Measurement Request 1 Measurement Report 2 Transmit Power Control (TPC) request 3 TPC Report 4 Channel Switch Announcement

[0033] Elements: The spectrum management action frame uses information elements (Elements field) to carry information.

[0034] BSSID is a special Ad-hoc LAN (Local Area Network) application, also known as Basic Service Set (BSS). A group of computers with the same BSS name can form a group. Each BSS is assigned a BSSID, which is a 48-bit binary identifier used to identify different BSSs.

[0035] Wireless Fidelity (WiFi) with dual antenna capabilities (supporting Multiple Input Multiple Output (MIMO)) has been standard in mid-to-high-end smart terminals. Multiple antennas mean that multiple data streams can be sent and received simultaneously to increase data transmission rates. At the same time, WiFi devices working with dual antennas (2T2R, i.e. dual transmit and dual receive) consume more power than single antennas (1T1R, i.e. single transmit and single receive). However, in most user usage scenarios, such as browsing the web, chatting and other low-throughput scenarios, a very high transmission rate is not required, so the dual antenna (2T2R) can be temporarily switched to a single antenna (1T1R) working mode to save power consumption, and when high throughput is required, the single antenna can be dynamically switched to a dual antenna.

[0036] In order to solve the problem of narrow applicability of blacklist and whitelist of network devices in dynamic antenna switching scheme, the technical solution of this application proposes a self-learning intelligent antenna switching scheme. Figure 1 As shown, it is a system architecture diagram used in the embodiment of the present application. The terminal device successfully connects to the network device, and the terminal device connected to the network device may be one or more. After the terminal device and the network device establish a WiFi connection, the technical solution of the present application can perform compatibility detection, and can also determine whether to switch the antenna according to the detection result, thereby improving the coverage of the compatibility detection and saving the power consumption of the terminal device to a certain extent.

[0037] The technical solution of this application is further described below by way of examples. Figure 2 As shown, it is a schematic diagram of an embodiment of a method for intelligently switching wireless fidelity WiFi antennas in an embodiment of the present application, which may include:

[0038] 201. When a wireless fidelity WiFi connection is established between the terminal device and the network device, a compatibility detection is started to obtain a detection result.

[0039] Optionally, the network device may include a router.

[0040] Exemplarily, when the terminal device successfully establishes a WiFi connection with the network device, a compatibility detection can be initiated to obtain a detection result.

[0041] Optionally, when a wireless fidelity WiFi connection is established between the terminal device and the network device, initiating a compatibility detection and obtaining a detection result may include: when a WiFi connection is established between the terminal device and the network device and the network device is not in a list of network devices, initiating a compatibility detection and obtaining a detection result, wherein the list of network devices is a list of whether switching from a first multi-antenna mode to a first single antenna mode is supported.

[0042] Exemplarily, when the terminal device successfully establishes a WiFi connection with the network device, the network device list is matched to determine whether the network device is in the network device list; if the network device is not in the network device list, that is, the network device is neither in the network device whitelist nor in the network device blacklist, it means that the network device is connected for the first time, and compatibility detection can be started to obtain the detection result.

[0043] For example: The list of network devices is: key-value pairs<Key,Value> ={(bssid1, black), (bssid2, white)}.

[0044] Optionally, the network device list includes: a network device blacklist and a network device whitelist;

[0045] The network devices in the network device whitelist support switching from the first multi-antenna mode to the first single-antenna mode;

[0046] The network devices in the network device blacklist do not support switching from the first multi-antenna mode to the first single-antenna mode.

[0047] It should be noted that, in the present application, the list of network devices saved by the terminal device may be empty initially, and a compatibility detection is performed through the network device to which the terminal device is connected each time to obtain a list of network devices containing network device information; alternatively, the list of network devices saved by the terminal device is a list of network devices containing part of the network device information, and then the network device to which the terminal device is connected may be used to determine whether it is in the list of network devices. If it is not in the list of network devices, a compatibility detection is performed, and then it is determined whether to update the network device list based on the detection results.

[0048] Optionally, when the terminal device establishes a WiFi connection with the network device and the network device is not in the network device list, starting compatibility detection to obtain a detection result may include but is not limited to the following implementations:

[0049] Implementation method 1: When a terminal device establishes a WiFi connection with a network device and the network device is not in the network device list, if it is detected that the terminal device is currently in a WiFi application idle scenario, compatibility detection is started to obtain a detection result.

[0050] Exemplarily, when a terminal device establishes a WiFi connection with a network device, and the network device is neither in the network device whitelist nor in the network device blacklist, it is detected whether the terminal device is currently in a WiFi application idle scenario, such as when the mobile phone is stationary (i.e., the user is not operating the mobile phone), the current traffic usage is lower than the traffic threshold (referred to as low traffic), the screen is black, the number of applications running in the foreground is less than a first number threshold, and the number of applications running in the foreground and background is less than a second number threshold. If it is detected that the terminal device is currently in a WiFi application idle scenario, compatibility detection can be initiated to obtain a detection result.

[0051] Implementation method 2: When a WiFi connection is established between a terminal device and a network device, and the network device is not in the network device list, the WiFi antenna mode of the terminal device is switched from a multi-transmit multi-receive mode to a single-transmit multi-receive mode, and a compatibility detection is started to obtain a detection result.

[0052] It can be understood that the second multi-antenna mode may include: a multi-transmit multi-receive mode and a single-transmit multi-receive mode.

[0053] Exemplarily, after a terminal device establishes a WiFi connection with a network device, and the network device is neither in the whitelist nor in the blacklist of the network device, the WiFi antenna mode of the terminal device is switched from 2T2R to 1T2R (to avoid the terminal device being unable to receive the 2T2R data packet replied by the network device), compatibility detection can be initiated to obtain the detection result.

[0054] Implementation method 3: When a terminal device establishes a WiFi connection with a network device and the network device is not in the network device list, if it is detected that the terminal device is currently in a WiFi application idle scenario, the WiFi antenna mode of the terminal device is switched from a multi-transmit multi-receive mode to a single-transmit multi-receive mode, and compatibility detection is started to obtain the detection result.

[0055] Exemplarily, when a terminal device establishes a WiFi connection with a network device, and the network device is neither in the whitelist nor in the blacklist of the network device, it is detected whether the terminal device is currently in a WiFi application idle scenario. If it is detected that the terminal device is currently in a WiFi application idle scenario, the WiFi antenna mode of the terminal device is switched from 2T2R to 1T2R (to avoid the terminal device being unable to receive the data packet after the network device replies to 2T2R), and then compatibility detection can be initiated to obtain the detection result.

[0056] Implementation method 4: When a terminal device establishes a WiFi connection with a network device and the network device is not in the list of network devices, a waiting period is set and an action frame is sent to the network device, wherein the action frame is used to instruct the network device to switch from the first antenna mode to the first single antenna mode; within the waiting period, a data packet sent by the network device via the first single antenna or the first multiple antennas is received; or, within the waiting period, a data packet sent by the network device via the first single antenna or the first multiple antennas is not received.

[0057] Optionally, the terminal device receives a data packet sent by the network device, which carries the number of spatial streams (NSS) through a specific field, where the number of spatial streams corresponds to the number of antennas.

[0058] For example, NSS is 1, indicating that the number of antennas is 1, that is, a single antenna. NSS is 2, indicating that the number of antennas is 2, that is, dual antennas. NSS is 3, indicating that the number of antennas is 3, that is, three antennas, and so on.

[0059] Exemplarily, when a terminal device establishes a WiFi connection with a network device, and the network device is neither in the whitelist nor in the blacklist of the network device, a waiting time (DWELL_TIME) can be set, where the waiting time can be understood as the maximum waiting time, and an Action frame is sent to the network device to instruct the network device to switch to 1T1R mode; if within DWELL_TIME, the terminal device receives a data packet sent by the network device through the first single antenna, it can be considered that the network device supports switching from the first multi-antenna mode to the first single antenna mode; if within DWELL_TIME, the terminal device receives a data packet sent by the network device through the first multi-antenna, it can be considered that the network device does not support switching from the first multi-antenna mode to the first single antenna mode; if within DWELL_TIME, the terminal device does not receive a data packet sent by the network device through the first single antenna or the first multi-antenna, it can be considered that the network device does not support switching from the first multi-antenna mode to the first single antenna mode, or will perform compatibility detection next time.

[0060] Implementation method 5: When a terminal device establishes a WiFi connection with a network device and the network device is not in the list of network devices, if it is detected that the terminal device is currently in an idle scenario of the WiFi application, a waiting time is set, and an action frame is sent to the network device, wherein the action frame is used to instruct the network device to switch from the first antenna mode to the first single antenna mode; within the waiting time, a data packet sent by the network device via the first single antenna or the first multiple antennas is received; or, within the waiting time, a data packet sent by the network device via the first single antenna or the first multiple antennas is not received.

[0061] Exemplarily, when a terminal device establishes a WiFi connection with a network device, and the network device is neither in the whitelist nor in the blacklist of the network device, it can be detected whether the terminal device is currently in a WiFi application idle scenario. If it is detected that the terminal device is currently in a WiFi application idle scenario, a waiting time (DWELL_TIME) is set, and an Action frame is sent to the network device to instruct the network device to switch to 1T1R mode; if within DWELL_TIME, the terminal device receives a data packet sent by the network device through the first single antenna, it can be considered that the network device supports switching from the first multi-antenna mode to the first single antenna mode; if within DWELL_TIME, the terminal device receives a data packet sent by the network device through the first multi-antenna, it can be considered that the network device does not support switching from the first multi-antenna mode to the first single antenna mode; if within DWELL_TIME, the terminal device does not receive a data packet sent by the network device through the first single antenna or the first multi-antenna, it can be considered that the network device does not support switching from the first multi-antenna mode to the first single antenna mode, or compatibility detection will be performed next time.

[0062] Implementation method 6: When a terminal device establishes a WiFi connection with a network device and the network device is not in the list of network devices, the WiFi antenna mode of the terminal device is switched from a multi-transmit multi-receive mode to a single-transmit multi-receive mode, a waiting time is set, and an action frame is sent to the network device, wherein the action frame is used to instruct the network device to switch from a first antenna mode to a first single antenna mode; within the waiting time, a data packet sent by the network device via a first single antenna or a first multiple antennas is received; or, within the waiting time, a data packet sent by the network device via the first single antenna or the first multiple antennas is not received.

[0063] Exemplarily, when it is determined that the network device is neither in the whitelist nor in the blacklist of the network device, the WiFi antenna mode of the terminal device can be switched from 2T2R to 1T2R (to avoid the terminal device being unable to receive the data packet after the network device replies to the 2T2R), the waiting time (DWELL_TIME) is set, and an Action frame is sent to the network device to instruct the network device to switch to 1T1R mode; if within DWELL_TIME, the terminal device receives a data packet sent by the network device through the first single antenna, it can be considered that the network device supports switching from the first multi-antenna mode to the first single antenna mode; if within DWELL_TIME, the terminal device receives a data packet sent by the network device through the first multi-antenna, it can be considered that the network device does not support switching from the first multi-antenna mode to the first single antenna mode; if within DWELL_TIME, the terminal device does not receive a data packet sent by the network device through the first single antenna or the first multi-antenna, it can be considered that the network device does not support switching from the first multi-antenna mode to the first single antenna mode, or compatibility detection will be performed next time.

[0064] Implementation method 7: When a terminal device establishes a WiFi connection with a network device and the network device is not in the list of network devices, if it is detected that the terminal device is currently in a WiFi application idle scenario, the WiFi antenna mode of the terminal device is switched from a multi-transmit multi-receive mode to a single-transmit multi-receive mode, a waiting time is set, and an action frame is sent to the network device, where the action frame is used to instruct the network device to switch from a first antenna mode to a first single antenna mode; within the waiting time, a data packet sent by the network device via a first single antenna or a first multiple antennas is received; or, within the waiting time, a data packet sent by the network device via the first single antenna or the first multiple antennas is not received.

[0065] Exemplarily, when it is determined that the network device is neither in the network device whitelist nor in the network device blacklist, it can be detected whether the terminal device is currently in a WiFi application idle scenario. If it is detected that the terminal device is currently in a WiFi application idle scenario, a waiting time (DWELL_TIME) is set, and an Action frame is sent to the network device to instruct the network device to switch to 1T1R mode, and to switch the WiFi antenna mode of the terminal device from 2T2R to 1T2R (to avoid the terminal device not being able to receive the data packet after the network device replies to 2T2R); if within DWELL_TIME, the terminal device receives a data packet sent by the network device through the first single antenna, it can be considered that the network device supports switching from the first multi-antenna mode to the first single antenna mode; if within DWELL_TIME, the terminal device receives a data packet sent by the network device through the first multi-antenna, it can be considered that the network device does not support switching from the first multi-antenna mode to the first single antenna mode; if within DWELL_TIME, the terminal device does not receive a data packet sent by the network device through the first single antenna or the first multi-antenna, it can be considered that the network device does not support switching from the first multi-antenna mode to the first single antenna mode, or perform compatibility detection next time.

[0066] It should be noted that there is no limitation on the timing of setting the waiting time, sending the Action frame to the network device, and switching the WiFi antenna mode of the terminal device from 2T2R to 1T2R.

[0067] Optionally, the method may also include: when determining that the network device is in the network device whitelist, indicating that the network device supports switching from a first multi-antenna mode to a first single antenna mode, determining whether to switch the WiFi antenna mode of the terminal device from a second multi-antenna mode to a second single antenna mode according to at least one of a current service type and a current traffic demand of the terminal device.

[0068] Exemplarily, if the network device matches in the network device whitelist, it means that the network device to which the terminal device is connected this time can perform dynamic antenna switching, and dynamically switch the antenna in combination with factors such as foreground business and traffic demand.

[0069] Optionally, the method may further include: when determining that the network device is in the network device blacklist, indicating that the network device does not support switching from the first multi-antenna mode to the first single antenna mode, the terminal device does not switch from the second multi-antenna mode to the second single antenna mode.

[0070] Exemplarily, if the network device matches in the network device blacklist, it means that the network device to which the terminal device is currently connected has a compatibility problem, and no switching action is performed.

[0071] like Figure 3A FIG. 1 is a schematic diagram showing whether a network device is in a list of network devices in an embodiment of the present application. Figure 3A As shown, when the terminal device and the network device successfully establish a WiFi connection, the network device list is matched, and the network device list includes a network device whitelist and a network device blacklist; if the network device whitelist is successfully matched, it is determined whether to switch from the second multi-antenna mode to the second single antenna mode based on at least one of the current service type and the current traffic demand; if the network device blacklist is successfully matched, the second multi-antenna mode is not switched to the second single antenna mode; if neither the network device whitelist nor the network device blacklist is successfully matched, a compatibility detection can be started to obtain the detection results, and the network device whitelist is updated according to the detection results, or the network device blacklist is updated, or the network device list is not updated.

[0072] Optionally, the method may further include: if it is determined that the network device is not in the list of network devices, determining whether the network device is in the list of network devices to be tested, and if it is determined that the network device is in the list of network devices to be tested, restarting compatibility detection.

[0073] It is understandable that the list of network devices to be tested is a list of network devices that have been tested for compatibility, but it has not been detected whether they belong to the network device whitelist or the network device blacklist.

[0074] Optionally, the method may further include: the terminal device sending the detection result of the network device to other terminal devices connected to the network device.

[0075] For example, when there are multiple terminal devices connected to a network device, if a terminal device performs a compatibility test and obtains a detection result, and sends the detection result to other terminal devices connected to the network device, the other terminal devices connected to the network device do not need to perform a compatibility test, thereby saving power consumption of the terminal devices and improving user experience.

[0076] Optionally, the method may further include: determining whether to update the network device list according to the detection result.

[0077] 202. When it is determined according to the detection result that the network device supports switching from the first multi-antenna mode to the first single-antenna mode, switch the WiFi antenna mode of the terminal device from the second multi-antenna mode to the second single-antenna mode.

[0078] Optionally, in the case where it is determined according to the detection result that the network device supports switching from the first multi-antenna mode to the first single antenna mode, switching the WiFi antenna mode of the terminal device from the second multi-antenna mode to the second single antenna mode may include: within the waiting time, in the case where a data packet sent by the network device through the first single antenna is received, switching the WiFi antenna mode of the terminal device from the second multi-antenna mode to the second single antenna mode;

[0079] Determining whether to update the network device list according to the detection result may include: adding the network device to the network device whitelist.

[0080] It can be understood that if a data packet sent by the network device through a single antenna is received within the waiting time, it means that the detection result indicates that the network device supports switching from the first multi-antenna mode to the first single antenna mode. The WiFi antenna mode of the terminal device can be switched from the second dual antenna mode to the second single antenna mode, and the network device list can also be updated, that is, the network device is added to the network device whitelist.

[0081] For example, if a 1T1R data packet is received from a network device within DWELL_TIME, it indicates that the network device supports switching from the first multi-antenna mode to the first single antenna mode, so the network device can be added to the network device whitelist, and the WiFi antenna mode of the terminal device can be set to 1T1R mode.

[0082] Optionally, within the waiting period, when a data packet is received from the network device through the first single antenna, the WiFi antenna mode of the terminal device is switched from the second multi-antenna mode to the second single antenna mode, and the network device is added to the network device whitelist, which may include: within the waiting period, when a data packet is received from the network device through the first single antenna, if the current service type of the terminal device is not a high-reliability and low-latency service, and / or the current traffic demand is less than the traffic threshold, the WiFi antenna mode of the terminal device is switched from the second multi-antenna mode to the second single antenna mode, and the network device is added to the network device whitelist.

[0083] 203. When it is determined according to the detection result that the network device does not support switching from the first multi-antenna mode to the first single-antenna mode, restore the WiFi antenna mode of the terminal device to the second multi-antenna mode.

[0084] Optionally, in the case where it is determined according to the detection result that the network device does not support switching from the first multi-antenna mode to the first single-antenna mode, restoring the WiFi antenna mode of the terminal device to the second multi-antenna mode may include: within the waiting time, in the case where a data packet sent by the network device through the first multi-antenna is received, restoring the WiFi antenna mode of the terminal device to the second multi-antenna mode;

[0085] Determining whether to update the network device list according to the detection result may include: adding the network device to the network device blacklist.

[0086] It can be understood that if a data packet is received from the network device through the first multi-antenna (for example, a dual antenna) during the waiting period, it indicates that the network device does not support switching from the first multi-antenna mode to the first single antenna mode. The WiFi antenna mode of the terminal device can be restored to the second multi-antenna mode, and the network device list can be updated, that is, the network device is added to the network device blacklist.

[0087] Optionally, in the case where it is determined according to the detection result that the network device does not support switching from the first multi-antenna mode to the first single antenna mode, restoring the WiFi antenna mode of the terminal device to the second multi-antenna mode may include: within the waiting time, if no data packet sent by the network device through the first single antenna or the first multi-antenna is received; if the current WiFi signal quality is lower than the quality threshold, then starting compatibility detection next time, and restoring the WiFi antenna mode of the terminal device to the second multi-antenna mode;

[0088] The determining whether to update the network device list according to the detection result may include: not updating the network device list.

[0089] Optionally, in the case where it is determined according to the detection result that the network device does not support switching from the first multi-antenna mode to the first single antenna mode, restoring the WiFi antenna mode of the terminal device to the second multi-antenna mode may include: within the waiting time, if no data packet sent by the network device through the first single antenna or the first multi-antenna is received; if the current WiFi signal quality is not lower than the quality threshold, restoring the WiFi antenna mode of the terminal device to the second multi-antenna mode;

[0090] Determining whether to update the network device list according to the detection result may include: adding the network device to the network device blacklist.

[0091] Exemplarily, if DWELL_TIME is detected to have timed out, and the data packet sent by the network device through the first single antenna or the first multi-antenna is not received, if the WiFi network environment is poor and causes packet loss or the network device itself has no data packet, the compatibility detection can be started again next time, and the WiFi antenna mode of the terminal device is restored to the 2T2R mode, and the network device list is not updated. Otherwise, it is determined that the network device does not support switching from the first multi-antenna mode to the first single antenna mode, and it is added to the network device blacklist, and the WiFi antenna mode of the terminal device is restored to the 2T2R mode.

[0092] like Figure 3B FIG. 1 is a flow chart of a method for intelligently switching WiFi antennas in an embodiment of the present application. Figure 3B In the figure, the network device is explained by taking the current router as an example. The mobile phone can first perform WiFi application idle scene identification to determine whether it belongs to the WiFi application idle scene. If it does not belong to the WiFi application idle scene, the WiFi application idle scene identification can be performed again; if it belongs to the WiFi application idle scene, the mobile phone sends an Action frame to instruct the current router to switch to 1T1R mode. The mobile phone actually works in 1T2R mode and sets the waiting time DWELL_TIME; then determine whether the waiting time DWELL_TIME has timed out. If DWELL_TIME has not timed out and the 1T1R data packet returned by the current router is received, the detection ends, the current router is added to the router whitelist, and the WiFi antenna mode of the mobile phone is set to 1T1R mode. ; If DWELL_TIME has not timed out and the 2T2R data packet returned by the current router is received, the detection is completed, the current router is added to the router blacklist, and the mobile phone's WiFi antenna mode is set to 2T2R mode; if DWELL_TIME has timed out, determine whether the current WiFi signal quality is lower than the quality threshold; if the current WiFi signal quality is lower than the quality threshold, then the compatibility detection can be started next time, and the mobile phone's WiFi antenna mode is restored to 2T2R mode, and the router list is not updated; if the current WiFi signal quality is not lower than the quality threshold, the mobile phone's WiFi antenna mode is restored to 2T2R mode, and the current router is added to the router blacklist.

[0093] The embodiments of the present application can perform compatibility detection in the idle scene of the WiFi application in advance, add the network device whitelist or network device blacklist according to the detection result, or perform compatibility detection next time, which can cover all network devices on the market and greatly improve the power consumption of terminal devices.

[0094] In an embodiment of the present application, when a terminal device establishes a wireless fidelity WiFi connection with a network device, compatibility detection is started to obtain a detection result; when it is determined according to the detection result that the network device supports switching from a first multi-antenna mode to a first single-antenna mode, the WiFi antenna mode of the terminal device is switched from a second multi-antenna mode to a second single-antenna mode. When a terminal device establishes a WiFi connection with a network device, compatibility detection is started, and when it is determined according to the detection result that the network device supports switching from a multi-antenna mode to a single-antenna mode, the WiFi antenna mode of the terminal device is switched to a single-antenna mode, which can cover network devices on the market, thereby saving power consumption of the terminal device.

[0095] like Figure 4 As shown, it is a schematic diagram of an embodiment of a device for intelligently switching WiFi antennas in an embodiment of the present application, which may include:

[0096] The detection module 401 is used to start compatibility detection and obtain detection results when the terminal device establishes a wireless fidelity WiFi connection with the network device;

[0097] The switching module 402 is used to switch the WiFi antenna mode of the terminal device from the second multi-antenna mode to the second single antenna mode when it is determined according to the detection result that the network device supports switching from the first multi-antenna mode to the first single antenna mode.

[0098] Optionally, the detection module 401 is specifically used to start compatibility detection and obtain a detection result when the terminal device establishes a WiFi connection with the network device and the network device is not in the network device list. The network device list is a list of whether it supports switching from the first multi-antenna mode to the first single antenna mode.

[0099] Optionally, the detection module 401 is specifically used to start compatibility detection and obtain detection results when the terminal device establishes a WiFi connection with the network device and the network device is not in the network device list and if it is detected that the terminal device is currently in a WiFi application idle scenario.

[0100] Optionally, the detection module 401 is specifically used to switch the WiFi antenna mode of the terminal device from the multi-transmission and multi-reception mode to the single-transmission and multi-reception mode when the terminal device establishes a WiFi connection with the network device and the network device is not in the network device list, start compatibility detection, and obtain the detection result.

[0101] Optionally, the detection module 401 is specifically used to set a waiting period and send an action frame to the network device when a terminal device establishes a WiFi connection with a network device and the network device is not in the network device list, wherein the action frame is used to instruct the network device to switch from a first multi-antenna mode to a first single antenna mode; within the waiting period, a data packet sent by the network device via the first single antenna or the first multi-antenna is received; or, within the waiting period, a data packet sent by the network device via the first single antenna or the first multi-antenna is not received.

[0102] Optionally, the device for intelligently switching the WiFi antenna may further include:

[0103] An updating module 403 is used to determine whether to update the network device list according to the detection result;

[0104] Wherein, the network device list includes: a network device blacklist and a network device whitelist;

[0105] The network devices in the network device whitelist support switching from the first multi-antenna mode to the first single-antenna mode;

[0106] The network devices in the network device blacklist do not support switching from the first multi-antenna mode to the first single-antenna mode.

[0107] Optionally, the switching module 402 is specifically configured to switch the WiFi antenna mode of the terminal device from the second multi-antenna mode to the second single antenna mode when a data packet sent by the network device through the first single antenna is received within the waiting time;

[0108] The updating module 403 is specifically configured to add the network device to the network device whitelist.

[0109] Optionally, the device for intelligently switching the WiFi antenna may further include:

[0110] The recovery module 404 is used to restore the WiFi antenna mode of the terminal device to the second multi-antenna mode when it is determined according to the detection result that the network device does not support switching from the first multi-antenna mode to the first single-antenna mode.

[0111] Optionally, the recovery module 404 is specifically configured to restore the WiFi antenna mode of the terminal device to the second multi-antenna mode when a data packet sent by the network device through the first multi-antenna is received within the waiting time;

[0112] The updating module 403 is specifically configured to add the network device to the network device blacklist.

[0113] Optionally, the recovery module 404 is specifically configured to, if no data packet sent by the network device through the first single antenna or the first multiple antennas is received within the waiting time, if the current WiFi signal quality is lower than the quality threshold, restore the WiFi antenna mode of the terminal device to the second multiple antenna mode;

[0114] The updating module 403 is specifically configured to not update the network device list.

[0115] Optionally, the recovery module 404 is specifically configured to, if no data packet sent by the network device through the first single antenna or the first multiple antennas is received within the waiting time, restore the WiFi antenna mode of the terminal device to the multiple antenna mode if the current WiFi signal quality is not lower than the quality threshold;

[0116] The updating module 403 is specifically configured to add the network device to the network device blacklist.

[0117] like Figure 5 As shown, it is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application, which may include: Figure 4 The device shown is a WiFi antenna intelligent switching device.

[0118] In the embodiment of the present application, the terminal device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control, a wireless terminal device in self driving, a wireless terminal device in remote medical, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, etc.

[0119] As an example but not limitation, in the embodiments of the present application, the terminal device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.

[0120] like Figure 6 FIG. 1 is a schematic diagram of another embodiment of a terminal device in an embodiment of the present application. It may include:

[0121] Combine the following Figure 6 A detailed introduction to the various components of the mobile phone in the terminal device:

[0122] The RF circuit 610 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 680 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 610 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the RF circuit 610 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.

[0123] The memory 620 can be used to store software programs and modules. The processor 680 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 620. The memory 620 can mainly include a program storage area and a data storage area, wherein the program storage area can 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 can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 620 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0124] The input unit 630 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 630 may include a touch panel 631 and other input devices 632. The touch panel 631, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 631 or near the touch panel 631 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 631 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 680, and can receive and execute commands sent by the processor 680. In addition, the touch panel 631 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 631, the input unit 630 may also include other input devices 632. Specifically, the other input devices 632 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.

[0125] The display unit 640 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 640 may include a display panel 641. Optionally, the display panel 641 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 631 may cover the display panel 641. When the touch panel 631 detects a touch operation on or near it, it is transmitted to the processor 680 to determine the type of touch event. Subsequently, the processor 680 provides a corresponding visual output on the display panel 641 according to the type of touch event. Although in Figure 6 In the embodiment, the touch panel 631 and the display panel 641 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 631 and the display panel 641 can be integrated to realize the input and output functions of the mobile phone.

[0126] The mobile phone may also include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 641 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 641 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0127] The audio circuit 660, the speaker 661, and the microphone 662 can provide an audio interface between the user and the mobile phone. The audio circuit 660 can transmit the received audio data to the speaker 661 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 662 converts the collected sound signal into an electrical signal, which is received by the audio circuit 660 and converted into audio data, and then the audio data is output to the processor 680 for processing, and then sent to another mobile phone through the RF circuit 610, or the audio data is output to the memory 620 for further processing.

[0128] Wi-Fi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the Wi-Fi module 670, which provides users with wireless broadband Internet access. Figure 6A Wi-Fi module 670 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.

[0129] The processor 680 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 620, and calling data stored in the memory 620, it executes various functions of the mobile phone and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 680 may include one or more processing units; preferably, the processor 680 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 680.

[0130] The mobile phone also includes a power supply 690 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 680 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.

[0131] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0132] In the embodiment of the present application, the processor 680 is configured to perform the following steps:

[0133] When a wireless fidelity WiFi connection is established between a terminal device and a network device, a compatibility detection is started to obtain a detection result; when it is determined according to the detection result that the network device supports switching from a first multi-antenna mode to a first single antenna mode, the WiFi antenna mode of the terminal device is switched from a second multi-antenna mode to a second single antenna mode.

[0134] Optionally, processor 680 is specifically used to start compatibility detection and obtain a detection result when the terminal device establishes a WiFi connection with the network device and the network device is not in the network device list, and the network device list is a list of whether it supports switching from the first multi-antenna mode to the first single antenna mode.

[0135] Optionally, the processor 680 is specifically used to start compatibility detection and obtain detection results when the terminal device establishes a WiFi connection with the network device and the network device is not in the network device list and if it is detected that the terminal device is currently in a WiFi application idle scenario.

[0136] Optionally, the processor 680 is specifically used to switch the WiFi antenna mode of the terminal device from the multi-transmit multi-receive mode to the single-transmit multi-receive mode when the terminal device establishes a WiFi connection with the network device and the network device is not in the network device list, start compatibility detection, and obtain the detection result.

[0137] Optionally, processor 680 is specifically used to set a waiting period and send an action frame to the network device when a terminal device establishes a WiFi connection with a network device and the network device is not in the network device list, wherein the action frame is used to instruct the network device to switch from a first multi-antenna mode to a first single antenna mode; within the waiting period, a data packet sent by the network device via the first single antenna or the first multi-antenna is received; or, within the waiting period, a data packet sent by the network device via the first single antenna or the first multi-antenna is not received.

[0138] Optionally, the processor 680 is further configured to determine whether to update the network device list according to the detection result;

[0139] Wherein, the network device list includes: a network device blacklist and a network device whitelist;

[0140] The network devices in the network device whitelist support switching from the first multi-antenna mode to the first single-antenna mode;

[0141] The network devices in the network device blacklist do not support switching from the first multi-antenna mode to the first single-antenna mode.

[0142] Optionally, the processor 680 is specifically used to switch the WiFi antenna mode of the terminal device from the second multi-antenna mode to the second single antenna mode when a data packet sent by the network device through the first single antenna is received within the waiting period; and add the network device to the network device whitelist.

[0143] Optionally, the processor 680 is further used to restore the WiFi antenna mode of the terminal device to the second multi-antenna mode when it is determined according to the detection result that the network device does not support switching from the first multi-antenna mode to the first single antenna mode.

[0144] Optionally, the processor 680 is specifically used to restore the WiFi antenna mode of the terminal device to the second multi-antenna mode when a data packet sent by the network device through the first multi-antenna is received within the waiting period; and add the network device to the network device blacklist.

[0145] Optionally, processor 680 is specifically used to restore the WiFi antenna mode of the terminal device to the second multi-antenna mode if no data packet is received from the network device through the first single antenna or the first multi-antenna within the waiting period and if the current WiFi signal quality is lower than the quality threshold; and the network device list is not updated.

[0146] Optionally, processor 680 is specifically used to, if no data packet is received from the network device via the first single antenna or the first multiple antennas within the waiting period, restore the WiFi antenna mode of the terminal device to the multiple antenna mode if the current WiFi signal quality is not lower than the quality threshold; and add the network device to the network device blacklist.

[0147] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, 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 generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can 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 can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (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 can be any available medium that a computer can store or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0148] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

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

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

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

[0152] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0153] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for intelligently switching WiFi antennas, characterized in that: include: When the terminal device and the network device establish a wireless fidelity WiFi connection, start compatibility detection and obtain the detection result; When it is determined according to the detection result that the network device supports switching from the first multi-antenna mode to the first single-antenna mode, the WiFi antenna mode of the terminal device is switched from the second multi-antenna mode to the second single-antenna mode.

2. The method according to claim 1, characterized in that When the terminal device establishes a wireless fidelity WiFi connection with the network device, starting compatibility detection and obtaining detection results include: When a WiFi connection is established between a terminal device and a network device, and the network device is not in a list of network devices, a compatibility detection is initiated to obtain a detection result. The list of network devices is a list of whether switching from a first multi-antenna mode to a first single-antenna mode is supported.

3. The method according to claim 2, characterized in that When the terminal device establishes a WiFi connection with the network device and the network device is not in the network device list, starting compatibility detection to obtain detection results includes: When a terminal device establishes a WiFi connection with a network device and the network device is not in the network device list, if it is detected that the terminal device is currently in a WiFi application idle scenario, compatibility detection is started to obtain a detection result.

4. The method according to claim 2, characterized in that: When the terminal device establishes a WiFi connection with the network device and the network device is not in the network device list, starting compatibility detection to obtain detection results includes: When a WiFi connection is established between a terminal device and a network device, and the network device is not in the network device list, the WiFi antenna mode of the terminal device is switched from a multi-transmit multi-receive mode to a single-transmit multi-receive mode, and a compatibility detection is started to obtain a detection result.

5. The method according to any one of claims 2 to 4, characterized in that: When the terminal device establishes a WiFi connection with the network device and the network device is not in the network device list, starting compatibility detection to obtain detection results includes: When a terminal device establishes a WiFi connection with a network device and the network device is not in the network device list, a waiting period is set and an action frame is sent to the network device, wherein the action frame is used to instruct the network device to switch from a first multi-antenna mode to a first single antenna mode; within the waiting period, a data packet sent by the network device via a first single antenna or a first multi-antenna is received; or, within the waiting period, a data packet sent by the network device via the first single antenna or the first multi-antenna is not received.

6. The method according to claim 5, characterized in that The method further comprises: Determining whether to update the network device list according to the detection result; Wherein, the network device list includes: a network device blacklist and a network device whitelist; The network devices in the network device whitelist support switching from the first multi-antenna mode to the first single-antenna mode; The network devices in the network device blacklist do not support switching from the first multi-antenna mode to the first single-antenna mode.

7. The method according to claim 6, characterized in that The method of switching the WiFi antenna mode of the terminal device from the second multi-antenna mode to the second single-antenna mode, when it is determined according to the detection result that the network device supports switching from the first multi-antenna mode to the first single-antenna mode, includes: Within the waiting time, when receiving a data packet sent by the network device through the first single antenna, switching the WiFi antenna mode of the terminal device from the second multi-antenna mode to the second single antenna mode; The determining whether to update the network device list according to the detection result includes: Add the network device to the network device whitelist.

8. The method according to claim 6, characterized in that The method further comprises: When it is determined according to the detection result that the network device does not support switching from the first multi-antenna mode to the first single-antenna mode, the WiFi antenna mode of the terminal device is restored to the second multi-antenna mode.

9. The method according to claim 8, characterized in that The step of restoring the WiFi antenna mode of the terminal device to the second multi-antenna mode when it is determined according to the detection result that the network device does not support switching from the first multi-antenna mode to the first single-antenna mode comprises: Within the waiting time, when receiving a data packet sent by the network device through the first multi-antenna, restoring the WiFi antenna mode of the terminal device to the second multi-antenna mode; The determining whether to update the network device list according to the detection result includes: The network device is added to the network device blacklist.

10. The method according to claim 8, characterized in that The step of restoring the WiFi antenna mode of the terminal device to the second multi-antenna mode when it is determined according to the detection result that the network device does not support switching from the first multi-antenna mode to the first single-antenna mode comprises: If no data packet is received from the network device through the first single antenna or the first multiple antennas within the waiting time, if the current WiFi signal quality is lower than the quality threshold, restoring the WiFi antenna mode of the terminal device to the second multiple antenna mode; The determining whether to update the network device list according to the detection result includes: The network device list is not updated.

11. The method according to claim 8, characterized in that The step of restoring the WiFi antenna mode of the terminal device to the second multi-antenna mode when it is determined according to the detection result that the network device does not support switching from the first multi-antenna mode to the first single-antenna mode comprises: If no data packet is received from the network device through the first single antenna or the first multiple antennas within the waiting time, and if the current WiFi signal quality is not lower than the quality threshold, restoring the WiFi antenna mode of the terminal device to the second multiple antenna mode; The determining whether to update the network device list according to the detection result includes: The network device is added to the network device blacklist.

12. A device for intelligently switching WiFi antennas, characterized in that: include: The detection module is used to start compatibility detection and obtain detection results when the terminal device establishes a wireless fidelity WiFi connection with the network device; A switching module is used to switch the WiFi antenna mode of the terminal device from the second multi-antenna mode to the second single antenna mode when it is determined according to the detection result that the network device supports switching from the first multi-antenna mode to the first single antenna mode.

13. A terminal device, characterized in that: include: A memory storing executable program code; a processor coupled to the memory; The processor is used to execute the method according to any one of claims 1 to 11.

14. A computer-readable storage medium comprising instructions, which, when executed on a processor, causes the processor to perform the method according to any one of claims 1 to 11.